@magiclane/maps-sdk
    Preparing search index...

    Class MapViewExtensions

    Map View Extensions

    A compact set of view-scoped helpers that extend the native map view with lightweight, platform-proxied utilities for view tuning and small integrations. Exposes convenience features for performance and interaction tuning as well as integrations with sensing/positioning subsystems.

    Common tasks are enforcing zoom limits and toggling performance optimizations for lower-end devices, switching reduced-rate navigation updates, enabling or disabling enhanced position-tracking visualizations (optionally driven by a specific data source and rendering settings), and querying the current tracked positions or tracking state.

    Index

    Constructors

    Accessors

    • get isTrackedPositions(): boolean

      Check if tracked position is started in the map view

      Returns boolean

      True if tracking is enabled, false otherwise

      An exception if it fails

    • get lowEndCPUOptimizations(): boolean

      Get low end CPU optimizations flag.

      Returns boolean

      True if optimizations are enabled, false otherwise

      An exception if it fails.

    • set lowEndCPUOptimizations(bEnable: boolean): void

      Enable optimizations for low end CPU.

      Parameters

      • bEnable: boolean

        True to enable optimizations, false to disable

      Returns void

      An exception if it fails.

    • get mapId(): number

      Gets the map ID

      Returns number

    • get maximumAllowedZoomLevel(): number

      Get the maximum allowed zoom level.

      Returns number

      The maximum allowed zoom level

      An exception if it fails.

    • set maximumAllowedZoomLevel(zoomLevel: number): void

      Set the maximum allowed zoom level.

      Parameters

      • zoomLevel: number

        The maximum allowed zoom level

      Returns void

      An exception if it fails.

    • get minimumAllowedZoomLevel(): number

      Get the minimum allowed zoom level.

      Returns number

      The minimum allowed zoom level

      An exception if it fails.

    • set minimumAllowedZoomLevel(zoomLevel: number): void

      Set the minimum allowed zoom level.

      Parameters

      • zoomLevel: number

        The minimum allowed zoom level

      Returns void

      An exception if it fails.

    • Gets navigation route low rate update flag

      Returns boolean

      True if navigation route low rate update is enabled, false otherwise

      An exception if it fails

    • Sets navigation route low rate update flag

      Parameters

      • bEnable: boolean

        True to enable navigation route low rate update, false to disable

      Returns void

      An exception if it fails

    • get pointerId(): number

      Gets the pointer ID

      Returns number

    • get trackedPositions(): Coordinates[]

      Get the current tracked positions as a coordinates list

      Returns Coordinates[]

      The list of tracked Coordinates. If tracking is not started the function will return empty list.

      An exception if it fails.

    Methods

    • Get group highlighted item index for the given highlighted item index (in original list)

      Parameters

      • idx: number

        The highlighted item index in original list for which the group head is searched.

      • highlightId: number = 0

        The highlight collection id (optional).

      Returns number

      On success, returns the group index in highlighted items original list. On error, returns the error code.

      An exception if it fails.

    • Start the sense data source improved position tracking on map by rendering a marker polyline between relevant map links points

      Parameters

      • options: {
            dataSource?: DataSource;
            settings: MarkerCollectionRenderSettings;
            updatePositionMs: number;
        }

        Object containing tracking parameters

        • OptionaldataSource?: DataSource

          The DataSource object which positions are tracked

        • settings: MarkerCollectionRenderSettings

          The markers collection rendering settings in the map view

        • updatePositionMs: number

          The tracked position collection update frequency. High frequency may decrease rendering performances on low end devices

      Returns GemError

      GemError.success on success.

      • GemError.notFound when called without a specific datasource and there is no data source in PositionService.
      • Other GemError values for other errors

      An exception if it fails.

    • Stops the sense data source improved position tracking on map

      Returns GemError

      GemError.success on success, GemError.notFound if tracking is not started

      An exception if it fails

    • Internal

      Internal method to initialize the MapViewExtensions instance

      Parameters

      • id: number
      • mapId: number

      Returns MapViewExtensions