Classes
Type Definitions
-
AtPixelOptions{Object}
-
Properties:
Name Type 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 returnstrue
will be tested for features. By default, all visible layers will be tested.hitTolerance
number
(defaults to 0)Hit-detection tolerance in css pixels. Pixels inside the radius around the given position will be checked for features.
checkWrapped
boolean
(defaults to true)Check-Wrapped Will check for wrapped geometries inside the range of +/- 1 world width. Works only if a projection is used that can be wrapped.
-
FrameState{Object}
-
State of the current frame. Only
pixelRatio
,time
andviewState
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
State The state of the current view.
animate
boolean Animate.
coordinateToPixelTransform
Transform CoordinateToPixelTransform.
declutter
Object<string, module:rbush<DeclutterEntry>> | null Declutter trees by declutter group. When null, no decluttering is needed because no layers have decluttering enabled.
extent
null | Extent Extent (in view projection coordinates).
nextExtent
Extent | undefined Next extent during an animation series.
index
number Index.
layerStatesArray
Array<State> LayerStatesArray.
layerIndex
number LayerIndex.
pixelToCoordinateTransform
Transform PixelToCoordinateTransform.
postRenderFunctions
Array<PostRenderFunction> PostRenderFunctions.
size
Size Size.
tileQueue
TileQueue TileQueue.
usedTiles
Object.<string, Object.<string, boolean>> UsedTiles.
viewHints
Array.<number> ViewHints.
wantedTiles
Object.<string, Object.<string, boolean>> WantedTiles.
mapId
string The id of the map.
renderTargets
Object.<string, boolean> Identifiers of previously rendered elements.
-
MapObjectEventTypes{Types} {'change:layergroup'} {'change:size'} {'change:target'} {'change:view'}
-
-
MapOptions{Object}
-
Object literal with config options for the map.
Properties:
Name Type Description controls
Collection<Control> | Array<Control> | undefined Controls initially added to the map. If not specified,
defaults
is used.pixelRatio
number
(defaults to window.devicePixelRatio)The ratio between physical pixels and device-independent pixels (dips) on the device.
interactions
Collection<Interaction> | Array<Interaction> | undefined Interactions that are initially added to the map. If not specified,
defaults
is used.keyboardEventTarget
HTMLElement | Document | string | undefined The element to listen to keyboard events on. This determines when the
KeyboardPan
andKeyboardZoom
interactions trigger. For example, if this option is set todocument
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 notdocument
, the target element needs to be focused for key events to be emitted, requiring that the target element has atabindex
attribute.layers
Array<BaseLayer> | Collection<BaseLayer> | LayerGroup | undefined 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
(defaults to 16)Maximum number tiles to load simultaneously.
moveTolerance
number
(defaults to 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
Collection<Overlay> | Array<Overlay> | undefined Overlays initially added to the map. By default, no overlays are added.
target
HTMLElement | string | undefined The container for the map, either the element itself or the
id
of the element. If not specified at construction time,setTarget
must be called for the map to be rendered. If passed by element, the container can be in a secondary document. For accessibility (focus and keyboard events for map navigation), thetarget
element must have a properly configuredtabindex
attribute. If thetarget
element is inside a Shadow DOM, thetabindex
atribute must be set on the custom element's host element. Note: CSStransform
support for the target element is limited toscale
.view
View | Promise<ViewOptions> | undefined The map's view. No layer sources will be fetched unless this is specified at construction time or through
setView
. -
MapOptionsInternal{Object}
-
Properties:
Name Type Description controls
Collection<Control> | undefined Controls.
interactions
Collection<Interaction> | undefined Interactions.
keyboardEventTarget
HTMLElement | Document KeyboardEventTarget.
overlays
Collection<Overlay> Overlays.
values
Object.<string, *> Values.
-