Android Google Map - LearnHowToCode SarkariResult.com Interview Questions and Answers LearnHowToCodeOnline
Android Google Map

Android Google Map

Android Google Map

Android provides facility to integrate Google map in our application. Google map displays your current location, navigate location direction, search location etc. We can also customize Google map according to our requirement.

Types of Google Maps

There are four different types of Google maps, as well as an optional to no map at all. Each of them gives different view on map. These maps are as follow:
  1. Normal: This type of map displays typical road map, natural features like river and some features build by humans.
  2. Hybrid: This type of map displays satellite photograph data with typical road maps. It also displays road and feature labels.
  3. Satellite: Satellite type displays satellite photograph data, but doesn't display road and feature labels.
  4. Terrain: This type displays photographic data. This includes colors, contour lines and labels and perspective shading.
  5. None: This type displays an empty grid with no tiles loaded.

Syntax of different types of map

  1. googleMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);  
  2. googleMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);  
  3. googleMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);  
  4. googleMap.setMapType(GoogleMap.MAP_TYPE_TERRAIN);  

Methods of Google map

Google map API provides several methods that help to customize Google map. These methods are as following:
MethodsDescription
addCircle(CircleOptions options)This method add circle to map.
addPolygon(PolygonOptions options)This method add polygon to map.
addTileOverlay(TileOverlayOptions options)This method add tile overlay to the map.
animateCamera(CameraUpdate update)This method moves the map according to the update with an animation.
clear()This method removes everything from the map.
getMyLocation()This method returns the currently displayed user location.
moveCamera(CameraUpdate update)This method reposition the camera according to the instructions defined in the update.
setTrafficEnabled(boolean enabled)This method set the traffic layer on or off.
snapshot(GoogleMap.SnapshotReadyCallback callback)This method takes a snapshot of the map.
stopAnimation()This method stops the camera animation if there is any progress.


 

About Mariano

I'm Ethan Mariano a software engineer by profession and reader/writter by passion.I have good understanding and knowledge of AngularJS, Database, javascript, web development, digital marketing and exploring other technologies related to Software development.

0 comments:

Featured post

Political Full Forms List

Acronym Full Form MLA Member of Legislative Assembly RSS Really Simple Syndication, Rashtriya Swayamsevak Sangh UNESCO United Nations E...

Powered by Blogger.