Adapter for vector data display control.
True if there are selected features in the layer
Experimental option, only for MVT. Points to a data source instead of loading data into a layer.
Add GeoJson data to layer.
Remove layer data.
Optionalcb: ((feature) => boolean)
Delete only those objects that match the filter.
OptionalfindFeatureCb: DataLayerFilter<F, L>
Ability to filter a layer with a callback function. It is necessary for the adapter to provide access to the layer objects before output to the map. It is not possible to apply such a filter to vector tiles and data on the remote server. So, where possible, use the VectorLayerAdapter.propertiesFilter.
layer.filter((e) => e.feature.properties.id === 2011);
// but in this case it’s better to do so:
layer.propertiesFilter([['id', 'eq', 2011]])
Get the filtered objects of the vector layer.
Allows to get all vector objects of the layer. Does not work for vector tiles.
Get the selected objects of the vector layer.
The way to filter layer objects through serializable expressions.
To clear the filter, pass
undefined as the second parameter.
Filter, conforming to the PropertiesFilter expression specification's.
Optionaloptions: FilterOptions<(F extends Feature<Geometry, GeoJsonProperties>
layer.propertiesFilter(['all', ['color', 'eq', 'green'], ['year', 'gt', 2011]]);
['color', 'eq', 'green'],
['color', 'eq', 'red']
['year', 'gt', 2011]
Cancel the filter, return all objects to the map.
Method for selecting objects on the map. The
selectedPaint option will be applied to the selected objects.
It is strongly recommended to use an
PtropertiesFilter expression to set selected objects,
since the selecting by the callback function is not supported by vector tiles and other asynchronous adapters.
Update layer with new geojson.
Deselect all objects in the vector layer.
findFeatureCb is deprecated and will be deleted soon.
Instead, it’s better to deselect all and select again.
OptionallayerDef: LayerDefinition<F, L>
Generated using TypeDoc