Showing multiple markers on google mapfragment via an array list

84 Views Asked by At

I have an arraylist of latitude and longitude and I am trying to put a marker at different places using the values of my array list; but nothing is showing on map when I run the below code.

for(int x = 0 ; x < latlong.size(); x++){
     place1 = new MarkerOptions().position(new LatLng(latlong.get(x).longitude,latlong.get(x).latitude)).title("location");
     mMap.addMarker(place1);
     mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latlong.get(0), 14));
}
0

There are 0 best solutions below