Type Definitions
-
olx.control.AttributionOptions{Object}
-
Properties:
Name Type Argument Description classNamestring | undefined <optional>
CSS class name. Default is
ol-attribution.targetElement | string | undefined <optional>
Specify a target if you want the control to be rendered outside of the map's viewport.
collapsibleboolean | undefined <optional>
Specify if attributions can be collapsed. If you use an OSM source, should be set to
false— see OSM Copyright — Default istrue.collapsedboolean | undefined <optional>
Specify if attributions should be collapsed at startup. Default is
true.tipLabelstring | undefined <optional>
Text label to use for the button tip. Default is
Attributionslabelstring | Node | undefined <optional>
Text label to use for the collapsed attributions button. Default is
i. Instead of text, also a Node (e.g. aspanelement) can be used.collapseLabelstring | Node | undefined <optional>
Text label to use for the expanded attributions button. Default is
». Instead of text, also a Node (e.g. aspanelement) can be used.renderfunction | undefined <optional>
Function called when the control should be re-rendered. This is called in a requestAnimationFrame callback.
-
olx.control.ControlOptions{Object}
-
Properties:
Name Type Argument Description elementElement | undefined <optional>
The element is the control's container element. This only needs to be specified if you're developing a custom control.
renderfunction | undefined <optional>
Function called when the control should be re-rendered. This is called in a requestAnimationFrame callback.
targetElement | string | undefined <optional>
Specify a target if you want the control to be rendered outside of the map's viewport.
-
olx.control.DefaultsOptions{Object}
-
Properties:
Name Type Argument Description attributionboolean | undefined <optional>
Attribution. Default is
true.attributionOptionsolx.control.AttributionOptions | undefined <optional>
Attribution options.
rotateboolean | undefined <optional>
Rotate. Default is
true.rotateOptionsolx.control.RotateOptions | undefined <optional>
Rotate options.
zoomboolean | undefined <optional>
Zoom. Default is
true.zoomOptionsolx.control.ZoomOptions | undefined <optional>
Zoom options.
-
olx.control.FullScreenOptions{Object}
-
Properties:
Name Type Argument Description classNamestring | undefined <optional>
CSS class name. Default is
ol-full-screen.labelstring | Node | undefined <optional>
Text label to use for the button. Default is
\u2922(NORTH EAST AND SOUTH WEST ARROW). Instead of text, also a Node (e.g. aspanelement) can be used.labelActivestring | Node | undefined <optional>
Text label to use for the button when full-screen is active. Default is
\u00d7(a cross). Instead of text, also a Node (e.g. aspanelement) can be used.tipLabelstring | undefined <optional>
Text label to use for the button tip. Default is
Toggle full-screenkeysboolean | undefined <optional>
Full keyboard access.
targetElement | string | undefined <optional>
Specify a target if you want the control to be rendered outside of the map's viewport.
sourceElement | string | undefined <optional>
The element to be displayed fullscreen. When not provided, the element containing the map viewport will be displayed fullscreen.
-
olx.control.MousePositionOptions{Object}
-
Properties:
Name Type Argument Description classNamestring | undefined <optional>
CSS class name. Default is
ol-mouse-position.coordinateFormatol.CoordinateFormatType | undefined <optional>
Coordinate format.
projectionol.ProjectionLike Projection.
renderfunction | undefined <optional>
Function called when the control should be re-rendered. This is called in a requestAnimationFrame callback.
targetElement | string | undefined <optional>
Specify a target if you want the control to be rendered outside of the map's viewport.
undefinedHTMLstring | undefined <optional>
Markup for undefined coordinates. Default is `` (empty string).
-
olx.control.OverviewMapOptions{Object}
-
Properties:
Name Type Argument Description collapsedboolean | undefined <optional>
Whether the control should start collapsed or not (expanded). Default to
true.collapseLabelstring | Node | undefined <optional>
Text label to use for the expanded overviewmap button. Default is
«. Instead of text, also a Node (e.g. aspanelement) can be used.collapsibleboolean | undefined <optional>
Whether the control can be collapsed or not. Default to
true.labelstring | Node | undefined <optional>
Text label to use for the collapsed overviewmap button. Default is
». Instead of text, also a Node (e.g. aspanelement) can be used.layersArray.<ol.layer.Layer> | ol.Collection.<ol.layer.Layer> | undefined <optional>
Layers for the overview map. If not set, then all main map layers are used instead.
renderfunction | undefined <optional>
Function called when the control should be re-rendered. This is called in a requestAnimationFrame callback.
targetElement | string | undefined <optional>
Specify a target if you want the control to be rendered outside of the map's viewport.
tipLabelstring | undefined <optional>
Text label to use for the button tip. Default is
Overview mapviewol.View | undefined <optional>
Custom view for the overview map. If not provided, a default view with an EPSG:3857 projection will be used.
-
olx.control.RotateOptions{Object}
-
Properties:
Name Type Argument Description classNamestring | undefined <optional>
CSS class name. Default is
ol-rotate.labelstring | Element | undefined <optional>
Text label to use for the rotate button. Default is
⇧. Instead of text, also a Node (e.g. aspanelement) can be used.tipLabelstring | undefined <optional>
Text label to use for the rotate tip. Default is
Reset rotationdurationnumber | undefined <optional>
Animation duration in milliseconds. Default is
250.autoHideboolean | undefined <optional>
Hide the control when rotation is 0. Default is
true.renderfunction | undefined <optional>
Function called when the control should be re-rendered. This is called in a requestAnimationFrame callback.
resetNorthfunction | undefined <optional>
Function called when the control is clicked. This will override the default resetNorth.
targetElement | string | undefined <optional>
Specify a target if you want the control to be rendered outside of the map's viewport.
-
olx.control.ScaleLineOptions{Object}
-
Properties:
Name Type Argument Description classNamestring | undefined <optional>
CSS Class name. Default is
ol-scale-line.minWidthnumber | undefined <optional>
Minimum width in pixels. Default is
64.renderfunction | undefined <optional>
Function called when the control should be re-rendered. This is called in a requestAnimationFrame callback.
targetElement | string | undefined <optional>
Specify a target if you want the control to be rendered outside of the map's viewport.
unitsol.control.ScaleLineUnits | string | undefined <optional>
Units. Default is
metric. -
olx.control.ZoomOptions{Object}
-
Properties:
Name Type Argument Description durationnumber | undefined <optional>
Animation duration in milliseconds. Default is
250.classNamestring | undefined <optional>
CSS class name. Default is
ol-zoom.zoomInLabelstring | Node | undefined <optional>
Text label to use for the zoom-in button. Default is
+. Instead of text, also a Node (e.g. aspanelement) can be used.zoomOutLabelstring | Node | undefined <optional>
Text label to use for the zoom-out button. Default is
-. Instead of text, also a Node (e.g. aspanelement) can be used.zoomInTipLabelstring | undefined <optional>
Text label to use for the button tip. Default is
Zoom inzoomOutTipLabelstring | undefined <optional>
Text label to use for the button tip. Default is
Zoom outdeltanumber | undefined <optional>
The zoom delta applied on each click.
targetElement | string | undefined <optional>
Specify a target if you want the control to be rendered outside of the map's viewport.
-
olx.control.ZoomSliderOptions{Object}
-
Properties:
Name Type Argument Description classNamestring | undefined <optional>
CSS class name.
durationnumber | undefined <optional>
Animation duration in milliseconds. Default is
200.maxResolutionnumber | undefined <optional>
Maximum resolution.
minResolutionnumber | undefined <optional>
Minimum resolution.
renderfunction | undefined <optional>
Function called when the control should be re-rendered. This is called in a requestAnimationFrame callback.
-
olx.control.ZoomToExtentOptions{Object}
-
Properties:
Name Type Argument Description classNamestring | undefined <optional>
Class name. Default is
ol-zoom-extent.targetElement | string | undefined <optional>
Specify a target if you want the control to be rendered outside of the map's viewport.
labelstring | Node | undefined <optional>
Text label to use for the button. Default is
E. Instead of text, also a Node (e.g. aspanelement) can be used.tipLabelstring | undefined <optional>
Text label to use for the button tip. Default is
Zoom to extentextentol.Extent | undefined <optional>
The extent to zoom to. If undefined the validity extent of the view projection is used.
OpenLayers