Tutorial 3
Google Maps API and Polygon data
Drawing on the map
On the map above I have demonstrated the use of a polygon, line and circle to draw shapes on the map. Click the button labeled "Molde" to toggle the visibility of these shapes. The toggle switch will change color to indicate the current state, and when it is turned on, the map will zoom to fit the shapes, and center the map on the Molde area.
By clicking on the polygon and circle shape a info window will breafly appear showing information about the locations.
GeoJSON Data
The map also demonstrates the use of GeoJSON data to represent geographical features. By clicking on the button labeled "Norway outline", you will toggle the visibility of a GeoJSON shape outlining Norway. This data is loaded from a GeoJSON file and displayed on the map.
The GeoJSON file was created by loading a KML file into QGIS and exporting it as GeoJSON.
Notes
Using the links below you can compare the implementations.