Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to add a map layer showing state boundaries.
Tableau
MapLayers.AddLayer([1]) Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing a layer that shows cities instead of states.
Using a heatmap layer instead of boundary lines.
✗ Incorrect
The StateBoundaries layer adds the outlines of states on the map.
2fill in blank
mediumComplete the code to set the map layer opacity to 50%.
Tableau
MapLayers.SetOpacity([1]) Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 50 instead of 0.5 for opacity.
Choosing full opacity (1.0) instead of 50%.
✗ Incorrect
Opacity values range from 0 (transparent) to 1 (opaque). 0.5 means 50% opacity.
3fill in blank
hardFix the error in the code to add a heatmap layer.
Tableau
MapLayers.AddLayer([1]) Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect casing like HeatMapLayer.
Adding underscores in the layer name.
✗ Incorrect
The correct layer name is HeatmapLayer with exact casing and no underscores.
4fill in blank
hardFill both blanks to create a map layer with circle markers and set its color to blue.
Tableau
layer = MapLayers.CreateLayer([1]) layer.SetColor([2])
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using square markers instead of circles.
Setting the color to red instead of blue.
✗ Incorrect
CircleMarkers creates circle points on the map, and Blue sets their color.
5fill in blank
hardFill all three blanks to add a polygon layer, set its fill color to green, and set opacity to 0.3.
Tableau
polyLayer = MapLayers.AddLayer([1]) polyLayer.SetFillColor([2]) polyLayer.SetOpacity([3])
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong layer type like CircleMarkers.
Setting opacity to 1 instead of 0.3.
Choosing blue instead of green for fill color.
✗ Incorrect
PolygonLayer adds polygon shapes, Green sets fill color, and 0.3 sets 30% opacity.