Parameters and methods that control the behavior of the map and the layers on it.

Implements

Constructors

Properties

controlAdapters: {
    ATTRIBUTION: typeof AttributionControl;
    ZOOM: typeof Zoom;
} = LeafletMapAdapter.controlAdapters

Named map controls specific for each framework.

emitter: EventEmitter<DefaultEventMap> = ...

An instance of the EventEmitter class for listen and emit events

layerAdapters: {
    [name: string]: Type<LayerAdapter<Map, any, any>>;
} = LeafletMapAdapter.layerAdapters

Named adapters for map layers through a generic interface.

map?: Map

Original map object of GIS framework (Leaflet.Map, Openlayers.Map, MaplibreGL.Map or other)

options: MapOptions<Map, any> = ...
controlAdapters: {
    ATTRIBUTION: typeof AttributionControl;
    ZOOM: typeof Zoom;
} = ...
layerAdapters: {
    [name: string]: Type<LayerAdapter<Map, any, any>>;
} = ...
Map: typeof Map = Map

Methods

  • Tries to locate the user using the Geolocation API, firing a locationfound event with location data on success or a locationerror event on failure, and optionally sets the map view to the user's location with respect to detection accuracy (or to the world view if geolocation failed). Note that, if your page doesn't use HTTPS, this method will fail in modern browsers (Chrome 50 and newer) See Locate options for more details.

    Parameters

    Returns Locate