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