THIS SDK ISDEPRECATED.

We rolled out a new and better SDK for you.

Custom Gps Indicator

Custom GPS radius color

The Maps SDK provides the ability to change the GPS Indicator inaccuracy radius color at runtime. Default behavior of the indicator consists of two states: active when GPS signal is accurate and dimmed. To change both radius colors, first you need to obtain the current GPS Indicator by using the following method:

1Optional<GpsIndicator> indicatorOptional = tomtomMap.getGpsPositionIndicator()
2if (indicatorOptional.isPresent()) {
3 gpsIndicator = indicatorOptional.get();
4}
val gpsIndicator = tomtomMap.gpsPositionIndicator.orNull()

After obtaining the indicator, you can change the active state radius color by invoking the following method:

gpsIndicator.setInaccuracyAreaColor(COLOR_RGBA);
gpsIndicator?.setInaccuracyAreaColor(COLOR_RGBA)

image

Default GPS indicator active radius

image

Custom GPS indicator active radius

Changing the dimmed radius color can be done by using a similar piece of code:

gpsIndicator.setDimmedInaccuracyAreaColor(COLOR_RGBA);
gpsIndicator?.setDimmedInaccuracyAreaColor(COLOR_RGBA)

image

Default GPS indicator dimmed radius

image

Custom GPS indicator dimmed radius