Class: CanvasScaleLine

ol.control. CanvasScaleLine

OpenLayers Scale Line Control integrated in the canvas (for jpeg/png


new CanvasScaleLine( [options])

Parameters:
Name Type Argument Description
options Object <optional>

extend the ol.control.ScaleLine options.

Properties
Name Type Description
style ol.style.Style

used to draw the scale line (default is black/white, 10px Arial).

See:

Extends

  • ol.control.ScaleLine

Methods


setMap(map)

Remove the control from its current map and attach it to the new map. Subclasses may set up event handlers to get notified about changes to the map here.

Parameters:
Name Type Description
map ol.Map

Map.


setStyle(style)

Change the control style

Parameters:
Name Type Description
style ol.style.Style