Static
generateConverts a given OpenLayers map to an inkmap spec. Only returns options which can be derived from a map (center, scale, projection, layers).
The ol map.
Promise of the inmkap print spec.
Static
getReturns all layers of a collection. Even the hidden ones.
The collection to get the layers from. This can be an ol.layer.Group or an ol.Map.
Optional
filter: (olLayer: BaseLayer) => boolean = ...A filter function that receives the layer. If it returns true it will be included in the returned layers.
An array of all Layers.
Static
getReturns all interactions by the given name of a map.
The map to use for lookup.
The name of the interaction to look for.
The list of result interactions.
Static
getReturns the layer from the provided map by the given feature.
The map to use for lookup.
The feature to get the layer by.
list of supported GeoServer namespaces.
The result layer or undefined if the layer could not be found.
Static
getReturns the layer from the provided map by the given name.
The map to use for lookup.
The name to get the layer by.
The result layer or undefined if the layer could not be found.
Static
getReturns the layer from the provided map by the given name (parameter LAYERS).
The map to use for lookup.
The name to get the layer by.
The result layer or undefined if the layer could not be found.
Static
getGet a layer by its key (ol_uid).
The map to use for lookup.
The layer.
Static
getGet information about the LayerPosition in the tree.
The layer to get the information.
The groupLayer or map containing the layer.
The groupLayer containing the layer and the position of the layer in the collection.
Static
getReturns all layers of the specified layer group recursively.
The map to use for lookup.
The group to flatten.
The (flattened) layers from the group
Static
getReturns the list of layers matching the given pair of properties.
The map to use for lookup.
The property key.
The property value.
The array of matching layers.
Static
getGet the getlegendGraphic url of a layer. Designed for geoserver. Currently supported Sources:
The getLegendGraphicUrl.
Static
getCalculates the appropriate map resolution for a given scale in the given units.
See: https://gis.stackexchange.com/questions/158435/ how-to-get-current-scale-in-openlayers-3
The input scale to calculate the appropriate resolution for.
The units to use for calculation (m or degrees).
The calculated resolution.
Static
getStatic
getReturns the appropriate zoom level for the given scale and units.
Map scale to get the zoom for.
Resolutions array.
The units the resolutions are based on, typically either 'm' or 'degrees'. Default is 'm'.
Determined zoom level for the given scale.
Static
isChecks if the given layer is visible for the given resolution.
The layer.
The resolution of the map
Static
layerChecks whether the resolution of the passed map's view lies inside of the min- and max-resolution of the passed layer, e.g. whether the layer should be displayed at the current map view resolution.
Optional
layer: BaseLayerThe layer to check.
Optional
map: MapThe map to get the view resolution for comparison from.
Whether the resolution of the passed map's view lies
inside of the min- and max-resolution of the passed layer, e.g. whether
the layer should be displayed at the current map view resolution. Will
be false
when no layer
or no map
is passed or if the view of the
map is falsy or does not have a resolution (yet).
Static
roundRounds a scale number depending on its size.
The exact scale
The roundedScale
Static
setSet visibility for layer having names (if in map)
The OpenLayers map.
An array of layer names (feature type names can also be used)
if layer should be visible or not
Static
zoomFits the map's view to the extent of the passed features.
The map to get the view from.
The features to zoom to.
Helper class for the OpenLayers map.