250+ TOP MCQs on HTML Google Maps and Answers

HTML Multiple Choice Questions “HTML Google Maps”.

1. Which of the following map type is not supported by mapTypeId?
a) Hybrid
b) Terrain
c) Roadmap
d) Climatic map

Answer: d
Clarification: The map type that is to be displayed is specified by mapTypeId. The types that are supported are Satellite, Roadmap, Terrain and hybrid. E.g. mapTypeId: google.maps.MapTypeId.ROADMAP.

2. Which one of the following defines properties for the map?
a) mapOptions
b) zoom
c) center
d) mapTypeId

Answer: a
Clarification: The variable mapOptions defines the properties of the map. Where to center the map is defined by center property, it uses longitude and latitude properties. To specify the zoom level for the map we use zoom property.

3. Which one of the following is not google map overlay?
a) Polygon
b) Polyline
c) Eclipse
d) Marker

Answer: c
Clarification: The objects on the map that are bound to longitude/latitude coordinates are overlays. Google Maps has many types of overlays. Marker, Polygon, Polyline, Circle, Rectangle, Info Windows, Custom overlays etc.

4. For single locations on a map, we use the overlay for _______
a) Marker
b) Polygon
c) Polyline
d) Circle

Answer: a
Clarification: Marker specifies the single locations on the map. It can also display custom icon images. A series of straight lines on a map can be specified by Polyline. A series of a straight line with the “closed” shape is defined by Polygon.

5. Polyline will not support the property of _________
a) Path
b) StrokeOpacity
c) Editable
d) Fillcolor

Answer: d
Clarification: Polyline supports various properties like strokeColor, strokeWeight, editable, strokeOpacity, path. The several longitude or latitude coordinates for a line is specified by path. An opacity of the line is specified by strokeOpacity.

  250+ TOP MCQs on Responsive Overview and Answers

6. The property that is not supported by Polyline but by Polygon is __________
a) strokeWeight
b) fillOpacity
c) path
d) editable

Answer: b
Clarification: The properties supported by polygon are strokeColor, strokeWeight, editable, fillOpacity, fillColor, path, strokeCapacity. The hexadecimal color for the area within an enclosed region is specified by fillColor, the opacity to fill color is specified by fillOpacity.

7. The property which is not supported by the circle is _________
a) path
b) radius
c) center
d) fillColor

Answer: a
Clarification: Circle supports the properties like radius, center, strokeOpacity, strokeCapacity, fillColor, fillOpacity, stokeOpacity, editable, specify google.maps.LatLng of center of circle, the radius of a circle is specified by radius. Opacity of stroke color is specified by strokeOpacity.

8. The value of fillOpacity lies between __________
a) 0.0 and 2.0
b) 0.0 and 1.0
c) 2.0 and 3.0
d) 3.0 and 4.0

Answer: b
Clarification: The value of fillOpacity lies between 0.0 and 1.0. The value of strokeOpacity also lies between 0.0 and 1.0, E.g path: Trip, strokeOpacity: 0.7, strokeWeight: 3, strokeColor: “#000FFF” .

9. Which one of the following is not the default control in google maps?
a) Pan
b) Street view
c) MapType
d) Climate map

Answer: d
Clarification: Google map has a default control set namely Pan, Zoom, Street view, MapType, Rotate, Overview map, scale. A slider or “+/-” buttons for controlling zoom level of the map. For panning the map we use pan control.

10. Which control displays the current map viewport?
a) Scale
b) Overview Map
c) Street view
d) MapType

  250+ TOP MCQs on Adding HTML features safely with Modernizr

Answer: b
Clarification: The control overview displays a thumbnail overview map which reflects the current map viewport within the wider area. A map scale element is displayed by scale control. Pegman icon that can be dragged to the map for enabling street view is displayed by this control. When a user wants to toggle between the maps (roadmap and satellite), Map Type is used.

11. MapTypeControlOptions field may not contain _______
a) google.maps.MapTypeControlStyle.HORZONTAL_BAR
b) google.maps.MapTypeControlStyle.DEFAULT
c) google.maps.MapTypeControlStyle.DROPDOWN_MENU
d) google.maps.MapTypeControlStyle.LARGE

Answer: d
Clarification: For modifying control we use mapTypeControlOptions field. google.maps.MapTypeControlStyle.HORZONTAL_BAR displays a single button for each map type. google.maps.MapTypeControlStyle.DEFAULT displays default behavior. google.maps.MapTypeControlStyle.DROPDOWN_MENU helps in selecting map type via dropdown menu.

12. Photographic map lies under the map type ____________
a) satellite
b) roadmap
c) hybrid
d) terrain

Answer: a
Clarification: Photographic map lies under the map type satellite. Default 2D map and normal maps lie under the type roadmap. Photographic + city and roads names include hybrid maps. Maps with rivers, mountains etc. lies under the category terrain.

13. Which of the following type will support 45 degree perspective view?
a) Terrain
b) Hybrid
c) Roadmap
d) Climate map

Answer: b
Clarification: Satellite and hybrid type of map support 45 degree perspective imagery view for specified locations. The map will add a compass wheel around Pan control, it allows to rotate the image. There is a toggle control to display 45 degree perspective view.

14. Which of the following method will return DOM object that contains map?
a) getCenter()
b) getProjection()
c) getDiv()
d) gettilt()

Answer: c
Clarification: getDiv() method will return DOM object that contains map. Its return type is node. getCenter() will return lng/lat of center of the map. getTilt() method will return angle of incidence for aerial imagery in degrees. Current position is returned when getProjection() event is fired up.

  250+ TOP MCQs on HTML Google Maps and Answers

15. Which one of the following will set the viewport to contain given bounds?
a) fitBounds()
b) getBounds()
c) getHeading()
d) panTo()

Answer: a
Clarification: fitBounds() method sets viewport to contain given bounds. Its parameters are LAtLngBounds. The return value of getBounds() is LatLng, LatLng. getHeading will return compass heading of the aerial imager. Its return type is number. The center of the map to the given LatLng can be changed by the panTo() event.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top