靜態render靜態unRemove 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.
Map.
This function is used to set a target element for the control. It has no
effect if it is called after the control has been added to the map (i.e.
after setMap is called on the control). If no target is set in the
options passed to the control constructor and if setTarget is not called
then the control is added to the map's overlay container.
Target.
Listen for a certain type of event.
The event type or array of event types.
The listener function.
可選opt_this: ObjectThe object to use as this in listener.
Unique key for the listener. If called with an array of event types as the first argument, the return will be an array of keys.
Listen once for a certain type of event.
The event type or array of event types.
The listener function.
可選opt_this: ObjectThe object to use as this in listener.
Unique key for the listener. If called with an array of event types as the first argument, the return will be an array of keys.
函數Removes an event listener using the key returned by on() or once().
Note that using the ol.Observable.unByKey static function is to
be preferred.
可選opt_options: ScaleLineOptionsScale line options.
A control displaying rough y-axis distances, calculated for the center of the
viewport. For conformal projections (e.g. EPSG:3857, the default view
projection in OpenLayers), the scale is valid for all directions.
No scale line will be shown when the y-axis distance of a pixel at the
viewport center cannot be calculated in the view projection.
By default the scale line will show in the bottom left portion of the map,
but this can be changed by using the css selector .ol-scale-line.
Classdesc
A control displaying rough y-axis distances, calculated for the center of the viewport. For conformal projections (e.g. EPSG:3857, the default view projection in OpenLayers), the scale is valid for all directions. No scale line will be shown when the y-axis distance of a pixel at the viewport center cannot be calculated in the view projection. By default the scale line will show in the bottom left portion of the map, but this can be changed by using the css selector
.ol-scale-line.參數: opt_options
Scale line options.
Api
stable