wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Modules 1.1-1.2 Questions

Total questions: 19

Worksheet time: 10mins

Name
Class
Date
1.

Which Leaflet method initializes a map in a given HTML element?

a)

L.map('map')

b)

L.initMap()

c)

L.createMap('map')

d)

map.new()

2.

How do you set a Leaflet map view to a specific location and zoom level?

a)

map.setView([lat, lng], zoom)

b)

map.setLocation(lat, lng, zoom)

c)

map.view(lat, lng, zoom)

d)

map.zoom(lat, lng)

3.

Which method is used to add a tile layer to a Leaflet map?

a)

L.tileLayer(...).addTo(map)

b)

map.addTile(...)

c)

L.mapTile(...)

d)

map.loadTiles(...)

4.

Which URL pattern is correct for most Leaflet tile layers?

a)

'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'

b)

'https://osm.org/{x}/{y}/{z}.jpg'

c)

'https://tiles.org/zxy/{z}/{x}/{y}'

d)

'https://maps.com/tiles/{zoom}/{lat}/{lng}'

5.

Which function creates a map marker at a specified location?

a)

L.marker([lat, lng])

b)

L.point([lat, lng])

6.

How do you bind a popup to a marker?

a)

marker.bindPopup('text')

b)

marker.addPopup('text')

c)

popup.attachTo(marker)

d)

marker.setPopup('text')

7.

Which method shows a tooltip when hovering over a marker?

a)

bindTooltip(...)

b)

bindHover(...)

c)

attachTooltip(...)

d)

addTooltip(...)

8.

What Leaflet method opens a popup on a specific map coordinate?

a)

L.popup().setLatLng(...).setContent(...).openOn(map)

b)

map.popup(...)

c)

L.showPopup(...).open()

d)

popup.trigger(map)

9.

Which Leaflet function draws a polyline?

a)

L.polyline([...])

b)

L.line([...])

c)

L.path([...])

d)

L.drawLine([...])

10.

To style a polyline with a dashed stroke, which option should you use?

(a)  

11.

Which function draws a polygon on a Leaflet map?

a)

L.polygon([...])

b)

L.polyline([...])

c)

L.shape([...])

d)

L.boundary([...])

12.

How do you set a polygon's fill opacity?

a)

polygon.setStyle({ fillOpacity: 0.3 })

b)

polygon.fillOpacity(0.3)

c)

polygon.setOpacity(0.3)

d)

polygon.style.fill(0.3)

13.

How do you create a circle with a radius of 250 meters?

a)

L.circle([lat, lng], { radius: 250 })

b)

L.circle([lat, lng], 250)

c)

L.buffer([lat, lng], 250)

d)

L.radiusCircle([lat, lng], 250)

14.

Which Leaflet class is used to group multiple layers together?

a)

L.layerGroup([...])

b)

L.groupLayers([...])

c)

L.layerBundle([...])

d)

L.multiLayer([...])

15.

Q15. The method that hides a layer group from the map is:

a)

setVisible(false)

b)

addLayer()

c)

setOpacity(1)

d)

removeFeature()

16.

What method adds a previously removed group back to the map?

a)

group.addTo(map)

b)

map.show(group)

c)

group.enable()

d)

map.attach(group)

17.

Which class would you use to create a group with shared event handling?

a)

L.featureGroup([...])

b)

L.layerGroup([...])

c)

L.eventGroup([...])

d)

L.controlGroup([...])

18.

What is the purpose of using `.addTo(map)` at the end of a layer?

a)

It adds the layer to the map

b)

It makes the map clickable

c)

It zooms to the layer

d)

It centers the map

19.

Which order of operations is correct when creating and styling a polygon?

a)

Create -> Add to map -> Style -> Bind popup

b)

Style -> Bind popup -> Create -> Add

c)

Bind popup -> Style -> Create -> Add

d)

Create -> Style -> Bind -> Skip add