MapLayr
    Preparing search index...

    Class GeolocationPositionProvider

    A position provider that uses the browser's Geolocation API to provide the user's current location.

    Implements

    Index

    Constructors

    Accessors

    Methods

    Constructors

    • Creates a new geolocation position provider.

      Parameters

      • options: PositionOptions = ...

        Options for the geolocation API. Defaults to high accuracy with a 10-second timeout.

      Returns GeolocationPositionProvider

    Accessors

    Methods

    • Subscribes to position updates from the geolocation API.

      Parameters

      • callback: (position: Position | null) => void

        The callback to call when the position changes.

      Returns () => void

      A function to unsubscribe from the position updates.