Reputation: 17
I have a method to a add markers to google map v2 and i wish to clear the markers and then add more markers all while in the map. This is how i add the markers which works fine mapLoc being the map itself. Further down the line i then call mapLoc.clear which gets rid of the markers.
I then wish to add more markers to the map but the markers dont appear when i call this method any help?
for(int i=0;i<list.size();i++){
LatLng lg=new LatLng(Float.parseFloat(list.get(i).get(5)), Float.parseFloat(list.get(i).get(6)));
Marker mark= mapLoc.addMarker(new MarkerOptions().position(lg)
.title(list.get(i).get(0)).snippet(list.get(i).get(1)).icon(BitmapDescriptorFactory
.fromResource(R.drawable.mark2)));
counter++;
}
Upvotes: 1
Views: 573