Google Maps-API and development MCQs

Google Maps-API and development MCQs

The following Google Maps-API and development MCQs have been compiled by our experts through research, in order to test your knowledge of the subject of Google Maps-API and development. We encourage you to answer these 80+ multiple-choice questions to assess your proficiency.
Please continue by scrolling down.

1: Which control contains a Pegman icon that can be dragged onto a map?

A.   Pan

B.   Overview

C.   StreetView

D.   Zoom

2: Which of the following is not a valid base map type?





3: Which of the following functions can change the zoom level of the map.

A.   map.zoom

B.   map.setCenter

C.   map.setZoom

D.   map.changeZoom

4: True or False: The JavaScript Google Maps API does not support reverse geocoding (translating a map location into an address).

A.   True

B.   False

5: What service can be used to obtain a LatLng from an address?

A.   Geography

B.   Distance

C.   Geocoder

D.   Directions

6: Which of the following must you obtain to load the JavaScript Google Maps API for a non-business application?

A.   Temporary application license

B.   Cryptographic key

C.   API key

D.   Enterprise application license

7: True or False: When using the JavaScript Google Maps API, you normally specify a <div> HTML element as a container for the map.

A.   False

B.   True

8: True or False: When using the JavaScript Google Maps API, the MapType control appears by default on the map.

A.   False

B.   True

9: Street View provides a panoramic view of:

A.   180 degrees

B.   90 degrees

C.   45 degrees

D.   360 degrees

10: Which arguments must be passed to a LatLng object?

A.   Latitude and longitude

B.   Highway number and mile marker

C.   Address and ZIP code

D.   Height and width

11: True or False: You can use a custom map projection when implementing a custom map.

A.   True

B.   False

12: If you want to monetize your map application with context-sensitive display advertising, which library should you use?

A.   Shopping

B.   Panoramio

C.   AdSense

D.   Places

13: When you create a new map, you must specify the initial zoom as a map option. What is the other required initial map option?

A.   backgroundColor

B.   styles

C.   center

D.   tilt

14: In the syntax to load the JavaScript Google Maps API, what does the parameter "sensor=true" indicate?

A.   Show current location of street level camera.

B.   Locate landmarks near map location. 

C.   Use GPS locator to determine user's location.

D.   Use weather sensor at map location.

15: For best map display on mobile devices, set the width and height of the <div> that contains the map to:

A.   50%

B.   100%

C.   80%

D.   600px

16: What overlay object can be used to contain information HTML content?

A.   Bubble

B.   InfoWindow

C.   Polygon

D.   Marker

17: The Google Maps API for which of the following platforms is deprecated?

A.   JavaScript v3

B.   Flash

C.   Android

D.   iOS

18: How do you add a click event listener to a google map?

A.   map.addListener.add('click', clickFunction);

B.   map.listener.add('click', clickFunction);

C.   google.maps.listener.add(map, 'click', clickFunction);

D.   google.maps.event.addListener(map, 'click', clickFunction);

19: Taking an address and translating it into a geographic point is known as what?

A.   Geocoding

B.   Geocaching

C.   Geoparsing

D.   Geolocating

20: True or False: If you want your JavaScript Google Maps API application to search for places, you must load an additional places library through the bootstrap request.

A.   False

B.   True

21: Which of the following is not a common MapType?





22: True or False: You can only create one instance of the JavaScript Map class on a page.

A.   False

B.   True

23: Which of the following travel modes is not supported when you are calculating directions?





24: Which of the following is not a built-in control that can be used on a map?

A.   StreetView

B.   BirdsEyeView 

C.   MapType

D.   Pan

25: How can you add a marker to an existing map, named "myMap"?

A.   map.add(marker);

B.   marker.setMap(map);

C.   var marker = new marker({position:latLng, map:map});

D.   marker.setMap(myMap); or var marker = new marker({position:latLng, map:myMap});

26: What is the correct way to create a Google Maps API object that represents a point on a map?

A.   new LatLng(lat:number, lng:number);

B.   new PointCode(lat:number,lng:number)

C.   new IconPoint(lat:number,lng:number)

D.   new Geocode(lat:number,lng:number)

27: What type of object is the position property of MarkerOptions?

A.   google.maps.LatLng

B.   google.maps.Sharpie

C.   google.maps.LatLngBounds

D.   google.maps.point;

28: What function do you call to make the map contain specific bounds.

A.   map.setCenter(LatLng);

B.   map.fitBounds(GeographicBounds);

C.   map.panTo(LatLng);

D.   map.fitBounds(LatLngBounds);

29: Which class is used to display text or images in a popup window attached to a marker?

A.   MapOptions

B.   InfoWindow

C.   MarkerOptions

D.   InfoOptions

30: What function sets the HTML contained in an InfoWindow?

A.   infoWindow.html(HTMLstring);

B.   infoWindow.setContent(HTMLstring);

C.   infoWindow.setHTML(HTMLstring);

D.   infoWindow.innerHTML(HTMLstring);

31: What is the namespace on which event listeners must be registered to listen for Google Maps API events?

A.   google.maps.event

B.   google.mapevents


D.   google.api.mapevents

32: Which additional library must you load if you want to add a heatmap layer to your map?

A.   drawing

B.   weather

C.   visualization

D.   places

33: What querystring parameter added to the maps api url will call a named function after the maps api loads?

A.   loaded

B.   afterload

C.   callback

D.   function

34: What overlay object would you use to draw an enclosed shape on the map given an array of LatLng objects?

A.   polyline

B.   shape

C.   polygon

D.   marker

35: Which of the following is not an argument for the addListener() event handler?

A.   object on which event occurred

B.   function to respond to event

C.   bubbling phase of event

D.   event for which the handler is listening

36: How can you determine if the current map viewport contains a specific point?

A.   map.contains(LatLng);

B.   map.getBounds.Overlaps(LatLng)

C.   map.getBounds().contains(LatLngBounds);

D.   map.getBounds().contains(LatLng);

37: What is the default map type?





38: How do you add traffic information to a map?

A.   var trafficLayer = new google.maps.TrafficLayer(); map.add(trafficLayer)

B.   var trafficLayer = new google.maps.TrafficLayer(); trafficLayer.setMap(map);

C.   map.trafficLayer.setVisible(true);

D.   map.addLayer('traffic');

39: How can you retrieve an array of markers that have been added to the map?

A.   var markers = map.getOverlays("marker");

B.   var markers = map.getMarkers();

C.   var markers = map.markers;

D.   Overlays added to the map are not managed by the map and must be managed manually.

40: Which Map class method is used to animate the transition of the map center to a new LatLng?

A.   panTo

B.   newCenter

C.   panCenter

D.   panBy

41: What property of MarkerOptions allows you to set a custom image for a marker?

A.   image

B.   icon

C.   picture

D.   markerImage

42: What MapOptions properties are required when creating a new map?

A.   mapDiv

B.   center

C.   zoom

D.   zoom and center

43: Which object defines a geographic rectangle on the map using two LatLng objects?

A.   GeographicBounds

B.   LatLngBounds

C.   LatLng

D.   Bounds

44: How can you expand a LatLngBounds object to ensure that it included additional points?

A.   (none of these)

B.   latLngBounds.add(newLatLng)

C.   latLngBounds.contain(newLatLng)

D.   latLngBounds.extend(newLatLng)

45: What zoom level displays a map of the Earth fully zoomed out?

A.   10

B.   5

C.   20

D.   0

46: How would you load the data contained in a KML file onto google map?

A.   map.addKml(stringUrl);

B.   map.loadKml(stringUrl);

C.   (none of these)

D.   new KmlLayer({url:stringUrl, map:map});

47: Which property of the DOM enables you to detect iPhone and Android devices?


B.   navigator.userAgent

C.   navigator.deviceType

D.   device.deviceType

48: What property of MarkerOptions determines where a marker is placed on the map?

A.   point

B.   position

C.   center

D.   latLng

49: What class can be used to create custom overlays?

A.   OverlayView

B.   object

C.   Marker

D.   Overlay

50: If you create a marker but do not specify its map in the marker options, you can specify the map later by using this syntax:

A.   map.markerOptions(marker)

B.   marker.setMap(map)

C.   map.setMarker(marker)

D.   marker.setMarker(map)