Sorry, you need to enable JavaScript to visit this website.

Custom Gps Indicator

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:

_

Optional<GpsIndicator> indicatorOptional = tomtomMap.getGpsPositionIndicator();
if (indicatorOptional.isPresent()) {
    gpsIndicator = indicatorOptional.get();
}
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