The main map controller

interface MapController {
    addGroup: ((group) => void);
    addMarkerController: ((c) => void);
    addPolygonController: ((c) => void);
    addPolylineController: ((c) => void);
    clearMapGroups: (() => void);
    distanceFromUser: ((latlng) => number);
    fitUserLatlng: ((bounds) => void);
    map: Map;
    removeGroup: ((name) => void);
    removeMarkerController: ((name) => void);
    removePolygonController: ((name) => void);
    removePolylineController: ((name) => void);
    removePositionMaker: (() => void);
    resetMap: (() => void);
    resize: (() => void);
    setLocate: ((onLocationUpdate?, onLocationError?) => void);
    setMap: ((params) => void);
    state: LeafletControllerState;
}

Properties

addGroup: ((group) => void)

Type declaration

    • (group): void
    • Add a marker controller group

      Parameters

      Returns void

addMarkerController: ((c) => void)

Type declaration

addPolygonController: ((c) => void)

Type declaration

addPolylineController: ((c) => void)

Type declaration

clearMapGroups: (() => void)

Type declaration

    • (): void
    • Remove all marker controller groups

      Returns void

distanceFromUser: ((latlng) => number)

Type declaration

    • (latlng): number
    • Calculate the distance from given coordinates to the user position

      Parameters

      • latlng: LatLng

      Returns number

fitUserLatlng: ((bounds) => void)

Type declaration

    • (bounds): void
    • Fit bounds for given coordinates list and user position

      Parameters

      • bounds: LatLngTuple[]

      Returns void

map: Map

The Leaflet map object

removeGroup: ((name) => void)

Type declaration

    • (name): void
    • Remove a marker controller group

      Parameters

      • name: string

      Returns void

removeMarkerController: ((name) => void)

Type declaration

    • (name): void
    • Remove a marker controller

      Parameters

      • name: string

      Returns void

removePolygonController: ((name) => void)

Type declaration

    • (name): void
    • Remove a polygon controller

      Parameters

      • name: string

      Returns void

removePolylineController: ((name) => void)

Type declaration

    • (name): void
    • Remove a polyline controller

      Parameters

      • name: string

      Returns void

removePositionMaker: (() => void)

Type declaration

    • (): void
    • Remove the position marker

      Returns void

resetMap: (() => void)

Type declaration

    • (): void
    • Reset the map to it's initial state: center and zoom and clear all items on map

      Returns void

resize: (() => void)

Type declaration

    • (): void
    • Trigger a map resize

      Returns void

setLocate: ((onLocationUpdate?, onLocationError?) => void)

Type declaration

    • (onLocationUpdate?, onLocationError?): void
    • Set the on location update callback

      Parameters

      • Optional onLocationUpdate: ((e) => void)
          • (e): void
          • Parameters

            • e: LocationEvent

            Returns void

      • Optional onLocationError: ((e) => void)
          • (e): void
          • Parameters

            • e: ErrorEvent

            Returns void

      Returns void

setMap: ((params) => void)

Type declaration

    • (params): void
    • Initialize the map

      Parameters

      Returns void

The reactive map state

Generated using TypeDoc