The plugin provides the possibility to display one or multiple* KML/KMZ layers in one map. To upload a KML/KMZ file, do the following:
* The Maps JavaScript API has limitations to the size and complexity of loaded KML files.
- Edit a map
- Open the widget “Progress Map Settings”.
- Click on the menu “KML Layers settings”.
- Select the option “Yes” in the field “KML Layers option”.
- Scroll down to the section “KML/KMZ Layers”, then, click on the group field “KML/KMZ 1”.
- Enter the name/title of your KML/KMZ layer in the field “KML/KMZ Label”.
- Paste the link of the your KML/KMZ file in the field “KML/KMZ File URL”. Note that you can use the Media Library to upload your file, then, paste its URL in this field! The file should be publicly accessible. It is only possible to display KML files if they are hosted at a publicly accessible URL that does not require authentication to access.
- If your KML/KMZ layer contains infoboxes, choose whether to show or hide them on your map by selecting an option in the field “Suppress Infowindows”.
- Select whether you want to center and zoom the map to the bounding box of the contents of the layer when the map is fully loaded in the field “Preserve Viewport”.
- Select whether to render the screen overlays included in the KML/KMZ layer by choosing an option in the field “Screen Overlays”.
- Enter the z-index of your KML/KMZ layer in the field “zIndex”.
- Hide and/or show your KML/KMZ Layer on the map by choosing an option in the field “Visibility”.
- To add a new KML/KMZ layer, click on the button “Add new KML/KMZ”, then, repeat the steps 6 to 12.
Hint: If your have multiple KML/KMZ Layers on one single map and you want to automatically center and zoom the map to the bounding box of the contents of your layers, activate the Autofit option #!
Troubleshooting: To make sure the KML functionality works well on your map, make a test using this file https://googlearchive.github.io/js-v2-samples/ggeoxml/cta.kml. You can see how it should be displayed here. If the test file works fine on your map, then, your KML file should work too! If it doesn’t (your KML file), make sure it has no error. To validate you KML file, visit this website. More about validating a KML file can also be found here.