Protected
_initProtected
Readonly
_starterReadonly
emitterReadonly
keysReadonly
mapReadonly
mapFrom runtime params
Readonly
runtimeStatic
controlsStatic
getStatic
keysProtected
_addInternal
Optional
options: unknownProtected
_emitOptional
data: anyProtected
_onShortcut method to create base layer
Optional
options: O | LayerAdaptersOptions[K]Optional
options: MapControls[K]Shortcut for WebMapLayers.addGeoJsonLayer to create GeoJson adapter with generic types for working in typescript
Create layer from GeoJson data. Set style and behavior for selection.
Optional
adapter: LayerAdapterDefinition<K>// Add simple layer
webMap.addGeoJsonLayer({ data: geojson, paint: { color: 'red' } });
// Add styled by feature property layer with selection behavior
webMap.addGeoJsonLayer({
data: geojson,
paint: function (feature) {
return { color: feature.properties.color, opacity: 0.5 }
},
selectedPaint: function (feature) {
return { color: feature.properties.selcolor, opacity: 1 }
},
selectable: true,
multiselect: true
});
// Add marker layer styled with use [Icons](icons)
webMap.addGeoJsonLayer({ data: geojson, paint: webMap.getIcon({ color: 'orange' })});
// work with added layer
const layer = webMap.addGeoJsonLayer({ data: geojson, id: 'my_layer_name'});
// access layer by id
webMap.showLayer('my_layer_name');
// or access layer by instance
webMap.showLayer(layer);
Shortcut for WebMapLayers.addLayer to create TileLayer adapter
Registration of map layer.
The name of layer adapter from MapAdapter.layerAdapters. May be custom object or class implemented by MainLayerAdapter.
Specific options for given adapter
Optional
order: numberPush new the GeoJSON features into given vector layer.
Optional
order: numberShortcut for WebMapLayers.addLayer to create TileLayer adapter
Remove from vector layer all features. it is possible to remove only some objects if you specify a callback function.
Optional
cb: ((feature: Feature<Geometry, GeoJsonProperties>) => boolean)Manual way to create a map (If MapOptions.create is false
).
Creating a universal map layout control element. Can be used with any map adapter.
Optional
options: CreateControlOptionsCreate any toggler control button
Options for control layout customization and assigning a callback function
Hide features from a vector layer using a callback function.
Sets a map view that contains the given geographical bounds.
Array of coordinates, measured in degrees, in [west, south, east, north] order.
Optional
options: FitOptionsTry to fit map view by given layer bounds. But not all layers have borders
Optional
options: FitOptionsReturns the map's geographical centerpoint.
lngLat Array of two numbers representing longitude and latitude of the center of the map view.
Get instance of registered control
Any registered control string name
Optional
options: MapControls[K]Custom control options
Checking the status of any asynchronous operation
The name of the event whose status is checked
Helper method to return added layer object by any definition type.
Helper method to return added layer identificator by any definition type.
Optional
options: GetLegendOptionsHide added layer on the map by it definition.
Check if given layer is baselayer
Check if the given layer on the map
Optional
events: LocationEventshelper method to wait for events to load. By default, card creation is tracked
The name of the event whose status is checked
Optional
cb: ((mapAdapter: MapAdapter<any, any, any>) => void)Optional
options: FilterOptions<{ Remove specific layer from map and memory by its definition.
Remove all layer from map and memory.
Optional
allowCb: ((layer: string, adapter: LayerAdapter) => boolean)Mark the layer as selected. If the adapter is a vector layer and supports data selection, you can pass a callback function to specify which data will be selected.
Optional
findFeatureFun: DataLayerFilterSet the center of the current view.
Array of two numbers representing longitude and latitude of the center of the map view.
Set the cursor icon to be displayed when hover icon on the map container.
Available cursor name from https://developer.mozilla.org/ru/docs/Web/CSS/cursor
Sets the GeoJSON data for given vector layer.
Set transparency for a given layer by number from 0 to 1
Sets the view of the map geographical center and zoom
Optional
zoom: numberThe zoom level to set (0-24).
Show added layer on the map by it definition.
Change added layer visibility on the map by given status or inverse current status.
Optional
status: booleanOptional
status: booleanUnselect the given layer. If the adapter is a vector layer and supports data selection, you can pass a callback function to specify which data will be unselected.
Optional
findFeatureFun: DataLayerFilterOptional
options: { Optional
params?: Record<string, string>
Collection of methods for managing map controls