Points can be created using the CMS or can be imported using a KML file.
Lines and Polygons are created by uploading a KML file into the map section.
1. KML structure
If you don’t have coding skills, we recommend you to use Google Maps to create your kml file. With Google Maps, you can create easily points and lines.
Note that the Map section cannot support the formatting applied to your geometries in Google Maps. For instance, if you choose a color for a line, this color won’t be interpreted by the map section.
If you have coding skills, you can create a kml file where the following properties will be interpreted by the map section:
- Line weight
- Line color
- Polygon outerboundary color
- Polygon outerboundary weight
- Polygon inner color
Here are some code samples with the kml structure you must follow to have those properties displayed in your map.
<?xml version="1.0" encoding="UTF-8"?>
2. Importing your line or polygon
When you add a map section, you have to choose between using the CMS or an external source
If you choose CMS, you can upload a kml file to display lines and polygons.
Go to the Settings tab of the section, and upload your file under “Routes”
You benefit from a powerful way to add metadata to your points, thanks to the various options provided by the CMS, and you can display also other geometries with the file import.
Note: if you upload a kml file that contains points, lines and polygons under the “Route” area of the section, all the geometries will be displayed in the map, points included.
If you choose External, you will have to upload 2 files to get the map section working properly:
- 1 kml file (or source url) with the points. Providing the points file is mandatory to have the section working
- 1 kml file with lines and polygons
Note: if you upload a kml file that contains points, lines and polygons under the “Points” area of the section, only points will be displayed in the map.
On the contrary, if you upload a kml file that contains points, lines and polygons under the “Route” area of the section, all the geometries will be displayed in the map.