I am using Google Maps Android API 
v2<https://developers.google.com/maps/documentation/android/> in 
my android app, but there is no way to zoom in and out on the pins on the 
map. There is no zoom function at all, I press on map or pins and I dont 
see how to zoom.  

Here's some of the relevant code:

     Iterator<Map<String, String>> iterator2 = historyData.iterator();

  while(iterator2.hasNext()){   

     Map<String, String> item = iterator2.next();

     double currentLat = Double.parseDouble(item.get("latitude"));

  double currentLong = Double.parseDouble(item.get("longitude"));   

     mMap.addMarker(new MarkerOptions()

         .position(new LatLng(currentLat, currentLong))

         .title(item.get("address"))

         .snippet("Alert: " + item.get("alert") + ", Speed:" + item.get(
"speed"))

  )         

         ;

               
   if(previousItem != null){

   Polyline line = mMap.addPolyline(new PolylineOptions()

        .add(new LatLng(currentLat, currentLong), 
newLatLng(Double.parseDouble(previousItem.get(
"latitude")),Double.parseDouble(previousItem.get("longitude"))) )

        .width(5)

        .color(Color.RED));

  }


      if(!iterator2.hasNext()){

   currentView = new LatLng(currentLat, currentLong);


   }

  previousItem = item;

     }

    if(currentView != null){

   mMap.getUiSettings().setZoomControlsEnabled(false);

      mMap.getUiSettings().setAllGesturesEnabled(false);

          CameraPosition cameraPosition = new CameraPosition.Builder()

          .target(currentView)

              .zoom(13)

          .bearing(90)

          .build();

         

  mMap.moveCamera(CameraUpdateFactory.newCameraPosition(cameraPosition)); 

  }

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to