Display geometries, boundaries, areas, roads, pipelines, and more with the Map widget layer GIS. Each layer is defined by GeoJSON files (.geojson, .json, .zip), which you can upload and manage, either statically or dynamically.
Shapefiles are also accepted in this feature; to achieve that, upload a zip that contains the layer (.shx, .shp, .prj, .dbf) and it will be converted to GeoJSON.
Layer type defines where to get the layer file from, and it can be done statically or dynamically.
In the Static layer, you can use the Widget config to input and choose a file, and this file can come from our files module or an external URL. In addition, the label input defines how the layer will be listed.
In the dynamic layer, the files are saved in a variable, this way developers can manage them easily, display the layers, and more.
This is similar to the Data From field, from the Map widget.
Each variable value will display a GIS layer, you can control that using the Dynamic Table widget or Input Form widget.
In this case, the variable should have a payload like this so that the Map widget can successfully display a layer:
{ "variable": "layer_variable", "value": "file name", "metadata": { "url" : "uploaded file URL", "label": "layer label" } }
Metadata is used to indicate files' URL or the label which defines how the layer will be listed
You can use the colors for your figures from your file; you just need to indicate which property from the file represents this color. You can also override your file color with a fixed color or color conditions.
Color conditions can help to indicate the layer status based on variable data. The variable used for color conditions is defined in the Layer color config.