After reading the docs at
I found that the following code works well. However my original code
should have worked so I guess there are still some bugs.
CameraPosition cameraPosition = new CameraPosition.Builder()
.target(new LatLng(Lat, Lon))
.zoom(15)
.bearing(0)
.tilt(45)
.build();
map.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));
map.addMarker(new MarkerOptions()
.position(new LatLng(Lat, Lon))
.title("Phone Location")
);
On Thursday, September 26, 2013 4:50:45 PM UTC-7, Gary Blakely wrote:
>
> In my android app I have the following code...
>
> CameraUpdate center= CameraUpdateFactory.newLatLng(new LatLng(Lat,Lon));
> DebugLog.debugLog("centered camera on " + Lat + " and " + Lon, false);
> CameraUpdate zoom=CameraUpdateFactory.zoomTo(15);
> map.moveCamera(center);
> map.animateCamera(zoom);
> map.addMarker(new MarkerOptions()
> .position(new LatLng(Lat, Lon))
> .title("Phone Location")
> );
>
> Lat is 31.7898
> Lon is -111.0354
>
> The marker is exactly at that location. However the camera is centered
> about 5 miles north of that location on the v2 map.
> Why?
> Thanks
> Gary
>
--
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.