MCQs > IT & Programming > Google Maps-API And Development MCQs > Basic Google Maps-API and development MCQs

Basic Google Maps-API and development MCQ

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

Answer

Correct Answer: panTo

Note: This Question is unanswered, help us to find answer for this one

2. Which control contains a Pegman icon that can be dragged onto a map??

Answer

Correct Answer: StreetView

Note: This Question is unanswered, help us to find answer for this one

3. How would you call the function testFunction only the first time the map is loaded?

Answer

Correct Answer: google.maps.event.addListenerOnce(map, 'idle', testFunction);

Note: This Question is unanswered, help us to find answer for this one

4. What method of an OverlayView would the overlay's html elements be in?

Answer

Correct Answer: draw

Note: This Question is unanswered, help us to find answer for this one

5. How do you extend a LatLngBounds object to contain another LatLngBounds object?

Answer

Correct Answer: latLngBounds.union(otherLatLngBounds);

Note: This Question is unanswered, help us to find answer for this one

6. Which class is used to create a new map type and apply styles to it?

Answer

Correct Answer: StyledMapType

Note: This Question is unanswered, help us to find answer for this one

7. In what method of an OverlayView would you initialize html elements to be added to the map?

Answer

Correct Answer: onAdd

Note: This Question is unanswered, help us to find answer for this one

8. True or False: MVC state changes pass arguments in their events.

Answer

Correct Answer: False

Note: This Question is unanswered, help us to find answer for this one

9. Which object is the most atomic unit of the route returned in response to a directions request?

Answer

Correct Answer: DirectionStep

Note: This Question is unanswered, help us to find answer for this one

10. What object represents a set of x, y coordinates on the map?

Answer

Correct Answer: point

Note: This Question is unanswered, help us to find answer for this one

11. How would you add a custom control to a map?

Answer

Correct Answer: map.controls[ControlPosition].push(customControl);

Note: This Question is unanswered, help us to find answer for this one

12. How can a marker be places so that it is certain to be placed above any other existing markers?

Answer

Correct Answer: marker.setZIndex(google.maps.Marker.MAX_ZINDEX + 1);

Note: This Question is unanswered, help us to find answer for this one

13. What class allows users to draw overlays on the map themselves?

Answer

Correct Answer: DrawingManager

Note: This Question is unanswered, help us to find answer for this one

14. True or False: Direction results from Toronto, Ontario to Milwaukee, Wisconsin will be displayed in miles by default.

Answer

Correct Answer: False

Note: This Question is unanswered, help us to find answer for this one

15. Which object should you use to specify that you want to add controls to a map?

Answer

Correct Answer: MapOptions

Note: This Question is unanswered, help us to find answer for this one

16. What property of MarkerOptions defines the rollover text for a marker?

Answer

Correct Answer: title

Note: This Question is unanswered, help us to find answer for this one

17. Which map pane should you add an OverlayView to if you want it to respond to click events?

Answer

Correct Answer: overlayMouseTarget

Note: This Question is unanswered, help us to find answer for this one

18. What function returns a LatLng based on a pixel position?

Answer

Correct Answer: fromDivPixelToLatLng

Note: This Question is unanswered, help us to find answer for this one

19. What RectangleOptions property allows a rectangle to be resized by the user?

Answer

Correct Answer: editable

Note: This Question is unanswered, help us to find answer for this one

20. Which of the following is not a valid ControlPosition?

Answer

Correct Answer: Center_Bottom

Note: This Question is unanswered, help us to find answer for this one

21. How would you resize the map after its containing element has been resized?

Answer

Correct Answer: google.maps.event.trigger(map, 'resize');

Note: This Question is unanswered, help us to find answer for this one

22. Which of the following is not one of the additional libraries that you can load into a JavaScript Google Maps API application?

Answer

Correct Answer: topography

Note: This Question is unanswered, help us to find answer for this one

23. Which class is used to display the results of a directions query?

Answer

Correct Answer: DirectionsRenderer

Note: This Question is unanswered, help us to find answer for this one

24. Which function will animate the map to a newly defined center point, provided the change is less than both the width and height of the map?

Answer

Correct Answer: panTo

Note: This Question is unanswered, help us to find answer for this one

25. Which of the following events are fired after the zoom has changed on the map?

Answer

Correct Answer: bounds_changed

Note: This Question is unanswered, help us to find answer for this one

26. How would you remove a marker from a map?

Answer

Correct Answer: marker.setMap(null);

Note: This Question is unanswered, help us to find answer for this one

27. Which class is used to draw an overlay of connected line segments?

Answer

Correct Answer: Polyline

Note: This Question is unanswered, help us to find answer for this one

28. To remove the polyline "flightPath" from a map, which syntax would you use?

Answer

Correct Answer: flightPath.setMap(null);

Note: This Question is unanswered, help us to find answer for this one

29. Which of the following will call the testFunction function when the div named testDiv is clicked?

Answer

Correct Answer: google.maps.event.addDomListener(testDiv, 'click', testFunction);

Note: This Question is unanswered, help us to find answer for this one

30. Which of the following is not a type of place search that can be performed with the Places Service?

Answer

Correct Answer: Multilevel

Note: This Question is unanswered, help us to find answer for this one

31. What is the maximum number of waypoints allowed in a non-business directions request?

Answer

Correct Answer: 8

Note: This Question is unanswered, help us to find answer for this one

32. When set to true, the draggable property of the DirectionsRenderer class enables a user to:

Answer

Correct Answer: Alter a route by dragging the polyline for the route path.

Note: This Question is unanswered, help us to find answer for this one

33. 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:

Answer

Correct Answer: marker.setMap(map)

Note: This Question is unanswered, help us to find answer for this one

34. What class can be used to create custom overlays?

Answer

Correct Answer: OverlayView

Note: This Question is unanswered, help us to find answer for this one

35. Which property of the DOM enables you to detect iPhone and Android devices?

Answer

Correct Answer: navigator.userAgent

Note: This Question is unanswered, help us to find answer for this one

36. How would you load the data contained in a KML file onto google map?

Answer

Correct Answer: new KmlLayer({url:stringUrl, map:map});

Note: This Question is unanswered, help us to find answer for this one

37. What zoom level displays a map of the Earth fully zoomed out?

Answer

Correct Answer: 0

Note: This Question is unanswered, help us to find answer for this one

38. How can you expand a LatLngBounds object to ensure that it included additional points?

Answer

Correct Answer: latLngBounds.extend(newLatLng)

Note: This Question is unanswered, help us to find answer for this one

39. Which object defines a geographic rectangle on the map using two LatLng objects?

Answer

Correct Answer: LatLngBounds

Note: This Question is unanswered, help us to find answer for this one

40. What MapOptions properties are required when creating a new map?

Answer

Correct Answer: zoom and center

Note: This Question is unanswered, help us to find answer for this one

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

Answer

Correct Answer: icon

Note: This Question is unanswered, help us to find answer for this one

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

Answer

Correct Answer: panTo

Note: This Question is unanswered, help us to find answer for this one

43. How do you add traffic information to a map?

Answer

Correct Answer: var trafficLayer = new google.maps.TrafficLayer(); trafficLayer.setMap(map);

Note: This Question is unanswered, help us to find answer for this one

44. What is the default map type?

Answer

Correct Answer: ROADMAP

Note: This Question is unanswered, help us to find answer for this one

45. How can you determine if the current map viewport contains a specific point?

Answer

Correct Answer: map.getBounds().contains(LatLng);

Note: This Question is unanswered, help us to find answer for this one

46. Which of the following is not an argument for the addListener() event handler?

Answer

Correct Answer: bubbling phase of event

Note: This Question is unanswered, help us to find answer for this one

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

Answer

Correct Answer: polygon

Note: This Question is unanswered, help us to find answer for this one

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

Answer

Correct Answer: callback

Note: This Question is unanswered, help us to find answer for this one

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

Answer

Correct Answer: visualization

Note: This Question is unanswered, help us to find answer for this one

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

Answer

Correct Answer: google.maps.event

Note: This Question is unanswered, help us to find answer for this one

51. What function sets the HTML contained in an InfoWindow?

Answer

Correct Answer: infoWindow.setContent(HTMLstring);

Note: This Question is unanswered, help us to find answer for this one

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

Answer

Correct Answer: InfoWindow

Note: This Question is unanswered, help us to find answer for this one

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

Answer

Correct Answer: map.fitBounds(LatLngBounds);

Note: This Question is unanswered, help us to find answer for this one

54. What type of object is the position property of MarkerOptions?

Answer

Correct Answer: google.maps.LatLng

Note: This Question is unanswered, help us to find answer for this one

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

Answer

Correct Answer: new LatLng(lat:number, lng:number);

Note: This Question is unanswered, help us to find answer for this one

56. How can you add a marker to an existing map, named "myMap"?

Answer

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

Note: This Question is unanswered, help us to find answer for this one

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

Answer

Correct Answer: BirdsEyeView 

Note: This Question is unanswered, help us to find answer for this one

58. Which of the following travel modes is not supported when you are calculating directions?

Answer

Correct Answer: FLYING

Note: This Question is unanswered, help us to find answer for this one

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

Answer

Correct Answer: False

Note: This Question is unanswered, help us to find answer for this one

60. Which of the following is not a common MapType?

Answer

Correct Answer: ELEVATION

Note: This Question is unanswered, help us to find answer for this one

61. 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.

Answer

Correct Answer: True

Note: This Question is unanswered, help us to find answer for this one

62. Taking an address and translating it into a geographic point is known as what?

Answer

Correct Answer: Geocoding

Note: This Question is unanswered, help us to find answer for this one

63. How do you add a click event listener to a google map?

Answer

Correct Answer: google.maps.event.addListener(map, 'click', clickFunction);

Note: This Question is unanswered, help us to find answer for this one

64. The Google Maps API for which of the following platforms is deprecated?

Answer

Correct Answer: Flash

Note: This Question is unanswered, help us to find answer for this one

65. What overlay object can be used to contain information HTML content?

Answer

Correct Answer: InfoWindow

Note: This Question is unanswered, help us to find answer for this one

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

Answer

Correct Answer: 100%

Note: This Question is unanswered, help us to find answer for this one

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

Answer

Correct Answer: Use GPS locator to determine user's location.

Note: This Question is unanswered, help us to find answer for this one

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

Answer

Correct Answer: center

Note: This Question is unanswered, help us to find answer for this one

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

Answer

Correct Answer: AdSense

Note: This Question is unanswered, help us to find answer for this one

70. Which arguments must be passed to a LatLng object?

Answer

Correct Answer: Latitude and longitude

Note: This Question is unanswered, help us to find answer for this one

71. Street View provides a panoramic view of:

Answer

Correct Answer: 360 degrees

Note: This Question is unanswered, help us to find answer for this one

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

Answer

Correct Answer: True

Note: This Question is unanswered, help us to find answer for this one

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

Answer

Correct Answer: True

Note: This Question is unanswered, help us to find answer for this one

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

Answer

Correct Answer: API key

Note: This Question is unanswered, help us to find answer for this one

75. What service can be used to obtain a LatLng from an address?

Answer

Correct Answer: Geocoder

Note: This Question is unanswered, help us to find answer for this one

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

Answer

Correct Answer: False

Note: This Question is unanswered, help us to find answer for this one

77. Which of the following is not a valid base map type?

Answer

Correct Answer: STREETLEVEL

Note: This Question is unanswered, help us to find answer for this one

78. Which control contains a Pegman icon that can be dragged onto a map?

Answer

Correct Answer: StreetView

Note: This Question is unanswered, help us to find answer for this one