1

Adding and showing markers on Tomtom map without using clear() function using this simple logic. Create a boolean variable and change it according to your needs. Buttons will do, just switch the values from true to false or false to true to display.

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Brylle
  • 46
  • 6

1 Answers1

0
 MarkerBuilder marker = new MarkerBuilder(LatLng)
                        .icon(Icon.Factory.fromResources(MainActivity.this, R.drawable.markerIcon))
                        .tag("marker-name");

               if(putMarker == true) {
                    tomtomMap.addMarker(marker);
                } else {
                    tomtomMap.removeMarkerByTag("marker-name");
                }
Brylle
  • 46
  • 6