@heumes-it/expo-mapbox-navigation - v0.1.0
    Preparing search index...

    Variable MapboxNavigationConst

    MapboxNavigation: {
        addCircleLayer(id: string, options: CircleLayerOptions): Promise<void>;
        addGeoJsonSource(id: string, options: GeoJsonSourceOptions): Promise<void>;
        addImage(id: string, uri: string): Promise<void>;
        addLineLayer(id: string, options: LineLayerOptions): Promise<void>;
        configureTts(options: ConfigureTtsOptions): Promise<void>;
        getCurrentLocation(): Promise<
            { latitude: number; longitude: number }
            | null,
        >;
        getLocationPermissionStatus(): LocationPermissionStatus;
        getSessionState(): Promise<SessionState>;
        navigateNextLeg(): Promise<void>;
        pauseFreeDrive(): Promise<void>;
        pauseRouteRefresh(): Promise<void>;
        refreshRouteNow(): Promise<void>;
        removeImage(id: string): Promise<void>;
        removeLayer(id: string): Promise<void>;
        removeSource(id: string): Promise<void>;
        requestLocationPermission(
            options?: RequestLocationPermissionOptions,
        ): Promise<LocationPermissionStatus>;
        requestRoutes(options: RequestRoutesOptions): Promise<DirectionsResponse>;
        resumeRouteRefresh(): Promise<void>;
        setAccessToken(token: string): void;
        setCamera(options: CameraOptions): Promise<void>;
        setKeepScreenOn(enabled: boolean): void;
        setSimulated(enabled: boolean, speedMultiplier?: number): Promise<void>;
        startActiveGuidance(options: StartActiveGuidanceOptions): Promise<void>;
        startFreeDrive(): Promise<void>;
        startHistoryRecording(): Promise<void>;
        stopHistoryRecording(): Promise<string>;
        stopNavigation(): Promise<void>;
    } = ...

    Public API facade. Wraps the raw native module in typed, JS-ergonomic methods. Default export of the package.

    Type Declaration

    • addCircleLayer: function
      • Adds a circle layer to the map backed by a GeoJSON source.

        Parameters

        • id: string

          Unique layer identifier.

        • options: CircleLayerOptions

          Layer options including source ID and paint properties.

        Returns Promise<void>

    • addGeoJsonSource: function
    • addImage: function
      • Adds an image asset to the map style for use in symbol layers.

        Parameters

        • id: string

          Unique image identifier.

        • uri: string

          HTTP/HTTPS URL or local file URI of the image.

        Returns Promise<void>

    • addLineLayer: function
      • Adds a line layer to the map backed by a GeoJSON source.

        Parameters

        • id: string

          Unique layer identifier.

        • options: LineLayerOptions

          Layer options including source ID and paint properties.

        Returns Promise<void>

    • configureTts: function
    • getCurrentLocation: function
      • Returns the current map-matched GPS location, if available.

        Returns Promise<{ latitude: number; longitude: number } | null>

        Latitude/longitude, or null when no location is available.

    • getLocationPermissionStatus: function
    • getSessionState: function
      • Advances navigation to the next leg of a multi-leg route.

        Returns Promise<void>

        DirectionsError When advancement fails.

    • pauseFreeDrive: function
      • Pauses the current free drive session.

        Returns Promise<void>

    • pauseRouteRefresh: function
      • Pauses automatic background route refresh.

        Returns Promise<void>

    • refreshRouteNow: function
      • Triggers an immediate route refresh to update traffic and ETA data.

        Returns Promise<void>

    • removeImage: function
      • Removes a previously added image from the map style.

        Parameters

        • id: string

          Image identifier to remove.

        Returns Promise<void>

    • removeLayer: function
      • Removes a previously added layer from the map.

        Parameters

        • id: string

          Layer identifier to remove.

        Returns Promise<void>

    • removeSource: function
      • Removes a previously added GeoJSON source from the map.

        Parameters

        • id: string

          Source identifier to remove.

        Returns Promise<void>

    • requestLocationPermission: function
    • requestRoutes: function
    • resumeRouteRefresh: function
      • Resumes automatic background route refresh after a pause.

        Returns Promise<void>

    • setAccessToken: function
      • Sets the Mapbox access token. Must be called before any other method.

        Parameters

        • token: string

          A valid Mapbox public access token.

        Returns void

    • setCamera: function
    • setKeepScreenOn: function
      • Keeps the screen on (or allows it to sleep) during navigation.

        Parameters

        • enabled: boolean

          true to prevent screen sleep; false to restore default.

        Returns void

    • setSimulated: function
      • Enables or disables route simulation (replaying route geometry instead of real GPS).

        Parameters

        • enabled: boolean

          true to enable simulation.

        • OptionalspeedMultiplier: number

          Playback speed. Default: 1.

        Returns Promise<void>

    • startActiveGuidance: function
    • startFreeDrive: function
      • Starts a free drive session (passive tracking without active navigation).

        Returns Promise<void>

    • startHistoryRecording: function
      • Starts recording navigation history to a binary file.

        Returns Promise<void>

    • stopHistoryRecording: function
      • Stops recording navigation history and returns the path to the recorded file.

        Returns Promise<string>

        Absolute file path to the history recording.

    • stopNavigation: function
      • Stops the active navigation session and returns to idle state.

        Returns Promise<void>

        DirectionsError When stop fails.