Whilst we recommend layers to be created within District Engage, layers created outside of District Engage can be uploaded to your project map
How to add an external layer to your map
To add external layers to a map:
- Create a map in the maps content and save it, or open an existing map you want to edit.
- To open the new or existing map, use the top-level menu to navigate to the Projects tab.
- Select the relevant project; this opens your project overview page.
- In the project sub-menu, under Content, click Maps. This shows all the maps available for this project. Select the map you would like to add a layer to.
- Click the Edit tab.
- Scroll down and click +Add layer.
- Select a layer type by choosing either to upload a Shape file, use a GeoJson URL or a GeoJson Raw.
- For a Shapefile, add a Title, upload a valid Shapefile .zip file by clicking and browsing, or dragging and dropping the file into the window. See more information about this layer type further down this page.
- For a GeoJson URL, add a Title, and provide a valid GeoJson URL. If the URL does not provide valid GeoJson the layer will not be visible on the map or an error will display when viewing the map. See more information about this layer type further down this page.
- For a GeoJson Raw, add a Title, and paste a valid JSON source in the GeoJson field. See more information about this layer type further down this page.
- Style your map layer. Note: The styling of map layers is only applicable to polygons and shapes.
- Adjust the Border colour and Border opacity using the colour picker and slider.
- Adjust the Fill colour and Fill opacity using the colour picker and slider.
- Adjust the Border width and Border style using the dropdown fields.
- Click Add new Shape file layer (if you added a shape file), or Add new GeoJson URL layer (if you added a GeoJson URL) to finish.
- Repeat this process until you have added all your desired layers.
- Click Publish to publish the map and its layer(s).
Option 1. Use a Shapefile
A Shapefile is a format for storing geospatial data that can be added to a map as a layer. It is a standardised structure and can be recognised or generated by most mapping services.
Maps in District Engage support adding Shapefiles through uploading an existing Shapefile that has been created outside District Engage.
How to create a Shapefile
- Use your existing tools: If you already use a map service for interacting with geospatial or mapping data, it likely supports Shapefiles. Read the documentation or ask support for how to create a Shapefile you want to add to your map.
- Use Geojson: Geojson.io is an excellent free tool for creating shapefiles, the following is a very brief getting started guide, however, we recommend reading their help to fully understand the capabilities.
- Visit geojson.io, and start building the shape you would like to add to your map by using the toolbar on the right-hand side.
- Once complete, click Save then Shapefile. A .zip file of your Shapefile will be downloaded and saved to your computer.
Option 2. Use a GeoJSON URL
GeoJSON is a format for storing geospatial data that can be added to a map as a layer. It is a standardised structure and can be recognised or generated by most mapping services.
Adding GeoJSON to maps
Maps in District Engage support adding GeoJSON via a remote URL. This means the GeoJSON is hosted elsewhere, and the maps will fetch and load the data when the map is rendered on the page.
How to create GeoJSON
If you already use a map service for interacting with geospatial or mapping data, it likely supports GeoJSON. Read the documentation or ask support for how to create a GeoJSON URL for the data you want to add to your map.
Option 3. Use JSON in Layer Builder
When your external layer contains pins, and you wish to display descriptive information per individual pin on the map, we recommend you to follow the below steps instead of using the shape file or GeoJSON URL:
- Create a map in the maps content and save it, or open an existing map you want to edit.
- To open the new or existing map, use the top-level menu to navigate to the Projects tab.
- Select the relevant project; this opens your project overview page.
- In the project sub-menu, under Content, click Maps. This shows all the maps available for this project. Select the map you would like to add a layer to.
- Click the Edit tab.
- Scroll down and click +Add layer.
- Select the GeoJson Builder type from the dropdown.
- Click Configure new map layer.
- This will open a lightbox window. On the right hand side of the lightbox, click the JSON tab. Paste the JSON of your pin layer in the field.
- Click save. The lightbox will now close. The pins have now been added to the layer.
- To add a title and description to each individual pin on the map, click Edit map layer. This will open the map builder lightbox. Click on an individual pin on the map and add a Title and Description in the right-hand sidebar. Click Done. Repeat this process for each pin.
- When you are done, click save. The lightbox will close, and the titles and descriptive text that you have added to the pins will be visible.
- Click Add new GeoJson Builder layer.
- Click Publish to publish the map and its layer(s).
Option 4: Use JSON raw
You can also choose to copy and paste the JSON of your pin layer without accessing the Edit map layer functionality: this means that you won't be able to customise any pin on the map.
To use the JSON raw:
- Create a map in the maps content and save it, or open an existing map you want to edit.
- To open the new or existing map, use the top-level menu to navigate to the Projects tab.
- Select the relevant project; this opens your project overview page.
- In the project sub-menu, under Content, click Maps. This shows all the maps available for this project. Select the map you would like to add a layer to.
- Click the Edit tab.
- Scroll down and click +Add layer.
- Select GeoJson Raw.
- Add a Title and paste the JSON of you pin layer in the GeoJson field.
- Style your map layer. Note: The styling of map layers is only applicable to polygons and shapes.
- Adjust the Border colour and Border opacity using the colour picker and slider.
- Adjust the Fill colour and Fill opacity using the colour picker and slider.
- Adjust the Border width and Border style using the dropdown field.
- Click Add new GeoJson Raw layer.
- Click Publish to publish the map and its layer(s).