GoodBarber's Online Help
Display lines and polygon using a kml file
The Map section can display the following geometries :
Lines and Polygons are created by uploading a KML file into the map section.
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
<?xml version="1.0" encoding="UTF-8"?>
Import your line or polygon
When you add a map section, you have to choose between using the CMS or an external plugin
If you choose a CMS Map section, 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. You can also display 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 with the points included.
If you choose kml, 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
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.