Map Layers

Map Layers

Compose Enterprise is going through a design update. The illustrations on this page might be of the old design, but the information is up to date. Thank you for your patience during this update!

Norsk

Map layers might be beneficial for helping end-users find the position they want to set in a map. A number of map layers displaying the locations of e.g. landmarks, properties and harbors could help end-users to navigate inside the map interface. Map layers can also have display conditions, so that the available map layers for the end-user are relevant to their previous answers in the workflow.

Add a map layer to a map element

Create or select an existing map element on the canvas in the Form Builder. Navigate to the Builder tab in the Properties panel. In the section Map Options is a button called Map Layers which opens the menu for adding map layers.

Click the Add button in the Map Layer Configuration menu. A map layer is represented in the map by a title of your choice (Text) and an API URL. The API URL must return a set of locations in a geoJSON format. (GeoJSON is a JSON model which also contains coordinates)

As an example, we'll use the Norwegian Aquaculture register. Add the URL in the URL field and provide a title for the map layer.

In the Properties panel will you be able to give the map layer a color representation, a descriptive hint text and display conditions. Check out the https://composetogo.atlassian.net/wiki/spaces/CNGD/pages/1835200 user guide to learn the basics of conditions.

Note: As of Compose version 8.4.5 the display conditions aren't reflected in a map if the condition(s) are met on the same page as the map element. The conditions must be met on a different form page so that the map can be loaded correctly based on whether the conditions are met or not. This bug will be fixed in one of the next Compose versions.

The locations from the map layer are shown in the map as colored dots. If you intend to display multiple map layers, it is recommended to give them different colors. 6-digit HEX color codes are used and must have an asterisk, #, in front of the color code.

Add the amount of map layers needed. Click OK and remember to the save the draft before previewing the form.

In the map interface is a closed menu to the right. Click the map layer icon to open the menu.

Here are the map layers you’ve added. The end user can then choose themselves which map layers they want to display by checking the checkboxes.

The locations from the different layers are indicated with their respective color codes. By clicking a location, the information available from the GeoJSON API is displayed in a pop-up.