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) => 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
getStatic
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
getStatic
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
getStatic
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
getStatic
getStatic
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
getReturns the appropriate scale for the given resolution and units.
The resolutions to calculate the scale for.
The units the resolution is based on, typically either 'm' or 'degrees'.
The appropriate scale.
Static
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
isStatic
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
roundStatic
setStatic
zoom
Helper class for the OpenLayers map.