Issue
I have a latitude and longitude(GeoPoint) which is the center of map. I want to set zoom level of 4miles distance from latitude and longitude that I have.
Thanks in Advance,
Solution
You can use the setzoom()-function to do so. The code below can be found in this example.
mc = mapView.getController();
String coordinates[] = {"1.352566007", "103.78921587"};
double lat = Double.parseDouble(coordinates[0]);
double lng = Double.parseDouble(coordinates[1]);
p = new GeoPoint(
(int) (lat * 1E6),
(int) (lng * 1E6));
mc.animateTo(p);
mc.setZoom(17);
Answered By - pecka85
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.