Top Google Maps Questions (2020) | CodeUsingJava








Most frequently asked Google Maps Interview Questions


What is Google Maps?

Google Maps is a web mapping service developed by Google. It offers satellite imagery, aerial photography, street maps, 360° interactive panoramic views of streets , real-time traffic conditions, and route planning for traveling by foot, car, bicycle and air (, or public transportation.
Google Maps is a free web mapping service by Google that provides various types of geographical information. Google Maps has a JavaScript API to customize the maps and display them on your webpage.
Google Maps is a free web mapping service by Google that provides various types of geographical information. Using Google Maps, one can. Search for places or get directions from one place to another.

What are the types of Google Maps?

Following are the types of Google Maps-
  • ROADMAP - It is the default type. It shows the normal 2D view
  • SATELLITE - It shows the Satellite image
  • HYBRID - Satellite view of the roads
  • TERRAIN - It shows the terrains i.e forests, rivers
var mapOptions = {
  center:new google.maps.LatLng(57.508742,-0.1750),
  zoom:9,
  mapTypeId: google.maps.MapTypeId.HYBRID
};

How to remove all map markers in Google Maps?

markersArray.push(newMarker) ;
while(markersArray.length) { markersArray.pop().setMap(null); }


What are the available overlays in Google Maps?

Following are the overlays of Google Maps-
  • Markers
  • Polylines
  • Polygons
  • Circle and rectangle
  • Info window
  • Symbols
var marker = new google.maps.Marker({
   position: new google.maps.LatLng(25.373341, 38.662109),
   map: map,
}); 


What are the default controls in Google Maps?

  • Zoom - it shows a slider or "+/-" buttons using which we can use the zoom functionality of google maps
  • Pan - Used for panning the map
  • MapType - toggle between types. example - Satellite to Terrain
  • Street View - displays the Pegman icon using which we can enable Street View

How to create a google map?

var map = new google.maps.Map(mapCanvas, mapOptions);


How to create a google map container?

<div id="googleMap" style="width:100%;height:400px"></div>