GoogleMap
GoogleMap
Satish Mulgi
smulgi7@gmail.com
satishkumarmulgi@dypvp.edu.in
Google Maps
Android allows us to integrate Google Maps in our application. For this Google
provides us a library via Google Play Services for using maps.
In order to use the Google Maps API, you must register your application on
the Google Developer Console and enable the API.
Steps For Getting The Google Maps Api Key:
An API key is needed to access the Google Maps servers. This key is free and
you can use it with any of your applications.
Step 1: Open Google developer console and signin with your gmail account:
https://console.developers.google.com/project
Now create new project. You can create new project by clicking on the Create
Project button and give name to your project.
Step 3: Now click on APIs & Services and open Dashboard from it.
Google Maps
Step 8: Now API your API key will be generated. Copy it and save it somewhere as we
Google Maps Demo
Terrian Topographic data. The map includes colors, contour lines and labels, and perspective
shading. Some roads and labels are also visible.
None No tiles. The map will be rendered as an empty grid with no tiles loaded.
googleMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);
googleMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);
googleMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);
googleMap.setMapType(GoogleMap.MAP_TYPE_TERRAIN);
Google Map Zoom, Rotation
We can enable/disable map zoom and rotations using the following lines of
codes:
googleMap.getUiSettings().setZoomGesturesEnabled(true);
googleMap.getUiSettings().setRotateGesturesEnabled(true);