Use Google Maps in an Android Application and Zoom Level
I have created two sample Android Applications in order to find the best way to integrate Google Maps with my application.
I found out that using WebView and Google Maps Javascript API v3 the Zoom Level is much greater than using Android Mapview.
I am doing something wrong? Can I have the same Zoom Level I achieved with Javascript APIv3 using MapView or how can I increase the zoom level in my MapView version of the application?
Is there a reason why Google allows a greater Zoom Level to Javascript API v3 than in a MapView?
MapView
WebView with JavaScript API v3
Background
Google Maps Javascript API v3
and MapView
are both tile based maps. These tiles are pre-rendered for different zoom levels and limit the minimum and maximum zoom you can get for the map.
Why diiferent zooms
Middle 2012, Google released Google Maps Javascript API v3
(making previous version deprecated) which is based on a new set of tiles. This new set of tiles includes pre-rendered tiles for higher zoom levels then previous version.
Unfortunately, MapView
has not received any update for a long time and still uses the old tiles version, with smaller maximum zoom levels.
Note
Google Maps
application for Android (that can be download from Google Play) is already using the new tile version and can achieve higher zoom levels than MapView
, but no equivalent API has been made available for Android.
Regards.
You can set zoomlevel as follows
mapController = locationMap.getController();
mapController.setZoom(17);
where locationMap is object of MapView
链接地址: http://www.djcxy.com/p/81592.html