Adding hotspots with identical lat/long

66 views Asked by At

I'm adding hotspots to my map with the following code:

public void addMarker(MyCustomMarker marker) {

    LatLng latLng = new LatLng(marker.getLatitude(), marker.getLongitude());

    mMap.addMarker(new MarkerOptions().position(latLng).title("Marker"));

}

What are the consequences of adding multiple hotspots with the identical lat/long? Will they both remain on the map and in memory, or will adding a new marker override the last one at that position?

2

There are 2 answers

0
maveroid On BEST ANSWER

Adding a new marker with identical lat/long will make both remain on the map and in memory.

2
Christopher On

The lat/long of a marker are just instance variables so no, this won't replace the existing Marker.