Where type can be:
- MAP_TYPE_NONE
No base map tiles. - MAP_TYPE_NORMAL
Basic maps. - MAP_TYPE_SATELLITE
Satellite maps with no labels. - MAP_TYPE_HYBRID
Satellite maps with a transparent layer of major streets. - MAP_TYPE_TERRAIN
Terrain maps.
Example:
FragmentManager myFragmentManager = getSupportFragmentManager();
SupportMapFragment mySupportMapFragment
= (SupportMapFragment)myFragmentManager.findFragmentById(R.id.map);
myMap = mySupportMapFragment.getMap();
myMap.setMyLocationEnabled(true);
//myMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);
//myMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);
//myMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);
myMap.setMapType(GoogleMap.MAP_TYPE_TERRAIN);
MAP_TYPE_NORMAL |
MAP_TYPE_SATELLITE |
MAP_TYPE_HYBRID |
MAP_TYPE_TERRAIN |
The series:
A simple example using Google Maps Android API v2, step by step.
Title: Set map type of GoogleMap
Rating: 100% based on 99998 ratings. 10 user reviews.
Post by 11:29 AM
Rating: 100% based on 99998 ratings. 10 user reviews.
Post by 11:29 AM
0 comments:
Post a Comment