Module: ol/PluggableMap

ol/PluggableMap


Classes

PluggableMap

Type Definitions

AtPixelOptions{Object}

Properties:
Name Type Argument Default Description
layerFilter undefined | function

Layer filter function. The filter function will receive one argument, the layer-candidate and it should return a boolean value. Only layers which are visible and for which this function returns true will be tested for features. By default, all visible layers will be tested.

hitTolerance number <optional>
0

Hit-detection tolerance in pixels. Pixels inside the radius around the given position will be checked for features. This only works for the canvas renderer and not for WebGL.

FrameState{Object}

State of the current frame. Only pixelRatio, time and viewState should be used in applications.

Properties:
Name Type Description
pixelRatio number

The pixel ratio of the frame.

time number

The time when rendering of the frame was requested.

viewState module:ol/View~State

The state of the current view.

animate boolean
coordinateToPixelTransform module:ol/transform~Transform
extent null | module:ol/extent~Extent
focus module:ol/coordinate~Coordinate
index number
layerStates Object.<string, module:ol/layer/Layer~State>
layerStatesArray Array.<module:ol/layer/Layer~State>
pixelToCoordinateTransform module:ol/transform~Transform
postRenderFunctions Array.<PostRenderFunction>
size module:ol/size~Size
skippedFeatureUids Object.<string, boolean>
tileQueue module:ol/TileQueue~TileQueue
usedTiles Object.<string, Object.<string, module:ol/TileRange~TileRange>>
viewHints Array.<number>
wantedTiles Object.<string, Object.<string, boolean>>

MapOptions{Object}

Object literal with config options for the map.

Properties:
Name Type Argument Default Description
controls module:ol/Collection~Collection.<module:ol/control/Control~Control> | Array.<module:ol/control/Control~Control> <optional>

Controls initially added to the map. If not specified, module:ol/control~defaults is used.

pixelRatio number <optional>
window.devicePixelRatio

The ratio between physical pixels and device-independent pixels (dips) on the device.

interactions module:ol/Collection~Collection.<module:ol/interaction/Interaction~Interaction> | Array.<module:ol/interaction/Interaction~Interaction> <optional>

Interactions that are initially added to the map. If not specified, module:ol/interaction~defaults is used.

keyboardEventTarget HTMLElement | Document | string <optional>

The element to listen to keyboard events on. This determines when the KeyboardPan and KeyboardZoom interactions trigger. For example, if this option is set to document the keyboard interactions will always trigger. If this option is not specified, the element the library listens to keyboard events on is the map target (i.e. the user-provided div for the map). If this is not document, the target element needs to be focused for key events to be emitted, requiring that the target element has a tabindex attribute.

layers Array.<module:ol/layer/Base~BaseLayer> | module:ol/Collection~Collection.<module:ol/layer/Base~BaseLayer> | module:ol/layer/Group~LayerGroup <optional>

Layers. If this is not defined, a map with no layers will be rendered. Note that layers are rendered in the order supplied, so if you want, for example, a vector layer to appear on top of a tile layer, it must come after the tile layer.

maxTilesLoading number <optional>
16

Maximum number tiles to load simultaneously.

loadTilesWhileAnimating boolean <optional>
false

When set to true, tiles will be loaded during animations. This may improve the user experience, but can also make animations stutter on devices with slow memory.

loadTilesWhileInteracting boolean <optional>
false

When set to true, tiles will be loaded while interacting with the map. This may improve the user experience, but can also make map panning and zooming choppy on devices with slow memory.

moveTolerance number <optional>
1

The minimum distance in pixels the cursor must move to be detected as a map move event instead of a click. Increasing this value can make it easier to click on the map.

overlays module:ol/Collection~Collection.<module:ol/Overlay~Overlay> | Array.<module:ol/Overlay~Overlay> <optional>

Overlays initially added to the map. By default, no overlays are added.

target HTMLElement | string <optional>

The container for the map, either the element itself or the id of the element. If not specified at construction time, module:ol/Map~Map#setTarget must be called for the map to be rendered.

view module:ol/View~View <optional>

The map's view. No layer sources will be fetched unless this is specified at construction time or through module:ol/Map~Map#setView.

MapOptionsInternal{Object}

Properties:
Name Type Argument Description
controls module:ol/Collection~Collection.<module:ol/control/Control~Control> <optional>
interactions module:ol/Collection~Collection.<module:ol/interaction/Interaction~Interaction> <optional>
keyboardEventTarget HTMLElement | Document
overlays module:ol/Collection~Collection.<module:ol/Overlay~Overlay>
values Object.<string, *>

PostRenderFunction()

PluggableMap.js, line 58