For this post, we will be creating a legend that will describe different types of features from the map. The legend will show point, line and polygon features on a map unlike our previous examples where only one type of feature is displayed.
First, we create the web map with the point, line and polygon features added on.
First we create the div container and a style that will form the legend for the points.
We write this code immediately after the body opening tag
Next, we just write a div and style for the legend for the line features.
We write the code for the polygon legend and style the div.
The final web page contains a map with all the features represented on the legend
See live map by clicking:
Download the plain text version of the source code by clicking:
See source code below:
Thank you for following the blog.