Custom GPS Indicator

The Maps SDK provides the ability to change the GPS Indicator inaccuracy area color at runtime. Default behavior of the indicator consists of two states: active, when GPS signal is accurate, and inactive (dimmed).

To change both radius colors, first you need to obtain the current GPS Indicator by using the following method:

SWIFT
OBJECTIVEC
let gpsIndicator = mapview.trackingManager.currentPosition as? TTCurrentPositionTrackingObject
TTCurrentPositionTrackingObject *gpsIndicator = self.mapView.trackingManager.currentPosition;

Use the following code to adjust a color of the active GPS indicator:

SWIFT
OBJECTIVEC
gpsIndicator.setInaccuracyAreaColor(GPS_ACTIVE_RADIUS_COLOR)
[gpsIndicator setInaccuracyAreaColor:GPS_ACTIVE_RADIUS_COLOR];

Default GPS indicator active

Custom GPS indicator active

Use the following code to adjust a color of the inactive GPS indicator:

SWIFT
OBJECTIVEC
gpsIndicator.setDimmedInaccuracyAreaColor(GPS_INACTIVE_RADIUS_COLOR)
[gpsIndicator setDimmedInaccuracyAreaColor:GPS_INACTIVE_RADIUS_COLOR];

Default GPS indicator inactive

Custom GPS indicator inactive

Use the following code to set the GPS indicator to inactive:

SWIFT
OBJECTIVEC
gpsIndicator.setDimmed(true)
[gpsIndicator setDimmed:YES];