Google Maps (API and development) 2015

1. Which object defines a geographic rectangle on the map using two LatLng objects?
Answers:
• LatLng
• GeographicBounds
• Bounds
• LatLngBounds
2. How can a marker be places so that it is certain to be placed above any other existing markers?
Answers:
• map.addMarker(marker, google.maps.Marker.MAX_ZINDEX + 1);
• marker.setZIndex(999);
• marker.setZIndex(google.maps.Marker.MAX_ZINDEX + 1);
• marker.bringToFront();
3. Which control contains a Pegman icon that can be dragged onto a map?
Answers:
• Pan
• Overview
• StreetView
• Zoom
4. What property of MarkerOptions determines where a marker is placed on the map?
Answers:
• position
• center
• point
• latLng
5. Which of the following will call the testFunction function when the div named testDiv is clicked?
Answers:
• google.maps.event.addListener(testDiv, 'click', testFunction);
• (none of these)
• google.maps.event.addDomListener(testDiv, 'click', testFunction);
• google.maps.onClick(testDiv, testFunction);
6. Which of the following is not a valid ControlPosition?
Answers:
• Right_Center
• Bottom_Center
• Center_Bottom
• Top_Right
7. Which of the following is not a type of place search that can be performed with the Places Service?
Answers:
• Text
• Radar
• Multilevel
• Nearby
8. Which of the following events are fired after the zoom has changed on the map?
Answers:
• changed
• center_changed
• bounds_changed
• resize
9. In what method of an OverlayView would you initialize html elements to be added to the map?
Answers:
• add
• onAdd
• draw
• setMap
10. 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?
Answers:
• setCenter
• setZoom
• panTo
• panToBounds
11. What class allows users to draw overlays on the map themselves?
Answers:
• DrawingManager
• OverlayManager
• OverlayControl
• DrawingLibrary
12. Which of the following is not one of the additional libraries that you can load into a JavaScript Google Maps API application?
Answers:
• topography
• geometry
• adsense
• weather
13. Which class is used to create a new map type and apply styles to it?
Answers:
• MapType
• MapTypeStyler
• MapTypeControlOptions
• StyledMapType
14. When set to true, the draggable property of the DirectionsRenderer class enables a user to:
Answers:
• Drag the map to a new center point.
• Drag the Directions control to a new location.
• Drag a marker to a new location.
• Alter a route by dragging the polyline for the route path.
15. What RectangleOptions property allows a rectangle to be resized by the user?
Answers:
• draggable
• resizable
• editable
• clickable
16. Which object should you use to specify that you want to add controls to a map?
Answers:
• ControlOptions
• AddControls
• MapControls
• MapOptions
17. What is the maximum number of waypoints allowed in a non-business directions request?
Answers:
• 4
• 8
• 12
• 16
18. What class can be used to create custom overlays?
Answers:
• object
• Overlay
• Marker
• OverlayView
19. What property of MarkerOptions defines the rollover text for a marker?
Answers:
• rolloverText
• markerText
• toolTip
• title
20. Which property of the DOM enables you to detect iPhone and Android devices?
Answers:
• navigator.mobile
• device.deviceType
• navigator.userAgent
• navigator.deviceType
21. Which class is used to draw an overlay of connected line segments?
Answers:
• Polygon
• Polyline
• Drawline
• LineOverlay
22. How would you load the data contained in a KML file onto google map?
Answers:
• map.addKml(stringUrl);
• (none of these)
• new KmlLayer({url:stringUrl, map:map});
• map.loadKml(stringUrl);
23. 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:
Answers:
• marker.setMap(map)
• map.markerOptions(marker)
• marker.setMarker(map)
• map.setMarker(marker)
24. What MapOptions properties are required when creating a new map?
Answers:
• zoom
• mapDiv
• center
• zoom and center
25. What property of MarkerOptions allows you to set a custom image for a marker?
Answers:
• markerImage
• image
• picture
• icon
26. Which Map class method is used to animate the transition of the map center to a new LatLng?
Answers:
• newCenter
• panTo
• panBy
• panCenter
27. What zoom level displays a map of the Earth fully zoomed out?
Answers:
• 10
• 20
• 5
• 0
28. How can you expand a LatLngBounds object to ensure that it included additional points?
Answers:
• latLngBounds.add(newLatLng)
• latLngBounds.contain(newLatLng)
• latLngBounds.extend(newLatLng)
• (none of these)
29. What is the default map type?
Answers:
• HYBRID
• STREETLEVEL
• ROADMAP
• SATELLITE
30. Which of the following is not a valid base map type?
Answers:
• ROADMAP
• STREETLEVEL
• SATELLITE
• TERRAIN
31. How do you add traffic information to a map?
Answers:
• var trafficLayer = new google.maps.TrafficLayer(); trafficLayer.setMap(map);
• map.addLayer('traffic');
• var trafficLayer = new google.maps.TrafficLayer(); map.add(trafficLayer)
• map.trafficLayer.setVisible(true);
32. What overlay object would you use to draw an enclosed shape on the map given an array of LatLng objects?
Answers:
• marker
• polyline
• shape
• polygon
33. How can you retrieve an array of markers that have been added to the map?
Answers:
• var markers = map.getMarkers();
• Overlays added to the map are not managed by the map and must be managed manually.
• var markers = map.markers;
• var markers = map.getOverlays("marker");
34. What querystring parameter added to the maps api url will call a named function after the maps api loads?
Answers:
• loaded
• afterload
• function
• callback
35. How can you determine if the current map viewport contains a specific point?
Answers:
• map.getBounds.Overlaps(LatLng)
• map.contains(LatLng);
• map.getBounds().contains(LatLngBounds);
• map.getBounds().contains(LatLng);
36. Which of the following is not an argument for the addListener() event handler?
Answers:
• object on which event occurred
• event for which the handler is listening
• bubbling phase of event
• function to respond to event
37. Which class is used to display text or images in a popup window attached to a marker?
Answers:
• MarkerOptions
• InfoWindow
• InfoOptions
• MapOptions
38. What is the namespace on which event listeners must be registered to listen for Google Maps API events?
Answers:
• google.mapevents
• google.maps.event
• google.api.mapevents
• events.maps.google
39. How can you add a marker to an existing map, named "myMap"?
Answers:
• marker.setMap(myMap); or var marker = new marker({position:latLng, map:myMap});
• var marker = new marker({position:latLng, map:map});
• marker.setMap(map);
• map.add(marker);
40. What type of object is the position property of MarkerOptions?
Answers:
• google.maps.Sharpie
• google.maps.LatLngBounds
• google.maps.point;
• google.maps.LatLng
41. Which additional library must you load if you want to add a heatmap layer to your map?
Answers:
• drawing
• visualization
• weather
• places
42. For best map display on mobile devices, set the width and height of the <div> that contains the map to:
Answers:
• 50%
• 100%
• 80%
• 600px
43. The Google Maps API for which of the following platforms is deprecated?
Answers:
• iOS
• Flash
• JavaScript v3
• Android
44. What is the correct way to create a Google Maps API object that represents a point on a map?
Answers:
• new PointCode(lat:number,lng:number)
• new LatLng(lat:number, lng:number);
• new Geocode(lat:number,lng:number)
• new IconPoint(lat:number,lng:number)
45. What function sets the HTML contained in an InfoWindow?
Answers:
• infoWindow.innerHTML(HTMLstring);
• infoWindow.setHTML(HTMLstring);
• infoWindow.setContent(HTMLstring);
• infoWindow.html(HTMLstring);
46. Which of the following is not a built-in control that can be used on a map?
Answers:
• BirdsEyeView 
• Pan
• MapType
• StreetView
47. 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.
Answers:
• True
• False
48. Which of the following functions can change the zoom level of the map.
Answers:
• map.zoom
• map.setZoom
• map.changeZoom
• map.setCenter
49. True or False: You can only create one instance of the JavaScript Map class on a page.
Answers:
• True
• False
50. What function do you call to make the map contain specific bounds.
Answers:
• map.setCenter(LatLng);
• map.panTo(LatLng);
• map.fitBounds(LatLngBounds);
• map.fitBounds(GeographicBounds);
51. In the syntax to load the JavaScript Google Maps API, what does the parameter "sensor=true" indicate?
Answers:
• Show current location of street level camera.
• Use GPS locator to determine user's location.
• Locate landmarks near map location. 
• Use weather sensor at map location.
52. Taking an address and translating it into a geographic point is known as what?
Answers:
• Geocaching
• Geoparsing
• Geolocating
• Geocoding
53. Which of the following is not a common MapType?
Answers:
• TERRAIN
• HYBRID
• ELEVATION
• ROADMAP
54. What overlay object can be used to contain information HTML content?
Answers:
• Polygon
• InfoWindow
• Marker
• Bubble
55. Which of the following travel modes is not supported when you are calculating directions?
Answers:
• DRIVING
• FLYING
• TRANSIT
• BICYCLING
56. How do you add a click event listener to a google map?
Answers:
• map.addListener.add('click', clickFunction);
• google.maps.listener.add(map, 'click', clickFunction);
• map.listener.add('click', clickFunction);
• google.maps.event.addListener(map, 'click', clickFunction);
57. When you create a new map, you must specify the initial zoom as a map option. What is the other required initial map option?
Answers:
• backgroundColor
• styles
• center
• tilt
58. What service can be used to obtain a LatLng from an address?
Answers:
• Directions
• Geography
• Distance
• Geocoder
59. If you want to monetize your map application with context-sensitive display advertising, which library should you use?
Answers:
• Shopping
• AdSense
• Panoramio
• Places
60. Street View provides a panoramic view of:
Answers:
• 360 degrees
• 180 degrees
• 90 degrees
• 45 degrees
61. True or False: The JavaScript Google Maps API does not support reverse geocoding (translating a map location into an address).
Answers:
• True
• False
62. Which of the following must you obtain to load the JavaScript Google Maps API for a non-business application?
Answers:
• API key
• Cryptographic key
• Enterprise application license
• Temporary application license
63. True or False: When using the JavaScript Google Maps API, you normally specify a <div> HTML element as a container for the map.
Answers:
• True
• False
64. To remove the polyline "flightPath" from a map, which syntax would you use?
Answers:
• flightPath.setMap(null);
• flightPath.setPolyline = null;
• flightPath.setPolyline = 0;
• flightPath.setDisplay(null);
65. Which class is used to display the results of a directions query?
Answers:
• DirectionsRenderer
• DirectionsResult
• DirectionsRequest
• DirectionsDisplay
66. How would you remove a marker from a map?
Answers:
• marker.setMap(null);
• marker.destroy();
• map.remove(marker);
• marker.setVisible(false);
67. How would you resize the map after its containing element has been resized?
Answers:
• google.maps.event.trigger(map, 'resizeMap');
• google.maps.event.trigger(map, 'resize');
• map.resize();
• map.setSize(newSize);
68. True or False: When using the JavaScript Google Maps API, the MapType control appears by default on the map.
Answers:
• True
• False
69. True or False: You can use a custom map projection when implementing a custom map.
Answers:
• False
• True
70. Which arguments must be passed to a LatLng object?
Answers:
• Highway number and mile marker
• Height and width
• Latitude and longitude
• Address and ZIP code
71. Which map pane should you add an OverlayView to if you want it to respond to click events?
Answers:
• overlayLayer
• overlayMouseTarget
• mapPane
• overlayImage
72. True or False: MVC state changes pass arguments in their events.
Answers:
• True
• False
73. True or False: Direction results from Toronto, Ontario to Milwaukee, Wisconsin will be displayed in miles by default.
Answers:
• True
• False
74. What function returns a LatLng based on a pixel position?
Answers:
• fromPixelToLatLng
• fromPointToLatLng
• fromDivPixelToLatLng
• getPositionOf
75. How would you add a custom control to a map?
Answers:
• map.controls.add(customControl, ControlPosition);
• map.controls[ControlPosition].push(customControl);
• map.controls[ControlPosition].add(customControl);
• map.addControl(customControl, ControlPosition);
76. What object represents a set of x, y coordinates on the map?
Answers:
• pixel
• LatLngBounds
• point
• position
77. Which object is the most atomic unit of the route returned in response to a directions request?
Answers:
• DirectionLeg
• DirectionResult
• DirectionRoute
• DirectionStep
78. How do you extend a LatLngBounds object to contain another LatLngBounds object?
Answers:
• latLngBounds.union(otherLatLngBounds);
• latLngBounds.expand(otherLatLngBounds);
• (all of these will work)
• latLngBounds.add(otherLatLngBounds);
79. What method of an OverlayView would the overlay's html elements be in?
Answers:
• add
• draw
• onAdd
• setMap
80. How would you call the function testFunction only the first time the map is loaded?
Answers:
• google.maps.event.addListenerOnce(map, 'load', testFunction);
• google.maps.event.addListener(map, 'idle', testFunction);
• google.maps.event.addListener(map, 'load', testFunction);

• google.maps.event.addListenerOnce(map, 'idle', testFunction);

No comments:

Post a Comment