Protected
disposedThe object has already been disposed.
Protected
renderedProtected
applyProtected
createDispatches an event and calls all listeners listening for events
of this type. The event parameter can either be a string or an
Object with a type
property.
Event object.
false
if anyone called preventDefault on the
event object or if any of the listeners returned false.
Protected
disposeGet the attributions of the source of this layer for the given view.
Optional
view: View | ViewStateLayerStateExtentView or import("../Map.js").FrameState. Only required when the layer is not added to a map.
Attributions for this layer at the given view.
Abstract
getAbstract
getRender order.
Abstract
getThe layer is visible on the map view, i.e. within its min/max resolution or zoom and
extent, not set to visible: false
, and not inside a layer group that is set
to visible: false
.
Optional
view: View | ViewStateLayerStateExtentView or import("../Map.js").FrameState. Only required when the layer is not added to a map.
The layer is visible in the map view.
Protected
onceProtected
onIn charge to manage the rendering of the layer. One layer type is bounded with one layer renderer.
Frame state.
Target which the renderer may (but need not) use for rendering its content.
The rendered element.
Sets the layer to be rendered on top of other layers on a map. The map will
not manage this layer in its layers collection. This
is useful for temporary layers. To remove an unmanaged layer from the map,
use #setMap(null)
.
To add the layer to a map and have it managed by the map, use module:ol/Map~Map#addLayer instead.
Map.
Sets a collection of key-value pairs. Note that this changes any existing properties and adds new ones (it does not remove any existing properties).
Values.
Optional
silent: booleanUpdate without triggering an event.
Set the style for features. This can be a single style object, an array
of styles, or a function that takes a feature and resolution and returns
an array of styles. If set to null
, the layer has no style (a null
style),
so only features that have their own styles will be rendered in the layer. Call
setStyle()
without arguments to reset to the default style. See
[the ol/style/Style module]module:ol/style/Style~Style for information on the default style.
If your layer has a static style, you can use [flat style]module:ol/style/flat~FlatStyle object
literals instead of using the Style
and symbolizer constructors (Fill
, Stroke
, etc.):
vectorLayer.setStyle({
"fill-color": "yellow",
"stroke-color": "black",
"stroke-width": 4
})
Optional
style: null | StyleLike | FlatStyleLikeLayer style.
Protected
un
MVTLayer
Demos
Description
The MVTLayer is an OpenLayers layer that loads tile data from hiking, hiking proposition, hiking activity, points of interest or detours.
Before using the MVTLayer, you need to set the environment and the jwt token environment if needed.
Adding all the hiking of the user to the map:
For the other layers, you can use the same way only changing the layer name:
hiking_proposition
hiking_activity
poi
detours
Authentication
For hiking data, it uses a JWT token to load only user's specific data. For the other layers, no token is needed. No special
scope
is needed for the token, only thesub
value is used to load the user's data.Organisation and Uuids filters
For the hiking proposition and activity , the data can be filtered by organisation or uuids by passing the corresponding option:
The uuids option is a string of uuids separated by a commas. Without the organisation option, the layer will display all the data.
POI type filter
For the poi layer, the data can be filtered by type by passing the 'poi_types' option:
The poi_types option is a string of types separated by a commas.