# Editing Map Style Code (Advanced)

MapHubs maps are using the open-source Mapbox GL mapping technology. Behind the scenes these maps use data coding called Style GL, to describe the map. In MapHubs it is possible to edit this code directly to:

* Customize the Layer style beyond the MapHubs defaults
* Create data-driven styling for a MapHubs layer (see the data-driven styling tutorial)

**Editing style code for a layer**

To edit the layer you need to be a member of the group that owns it.

1. Go to the page for the layer, from the menu in the bottom-right choose the \_Manage Layer \_option

![](/files/-L97PAJYplFv9-9tYMao)

1. Once on the layer manage page, go to the\_Style/Display \_tab.

![](/files/-L97PAJntrtj5iSkYE9C)

1. Open the \_Advanced \_section on the right side of the page.

![](/files/-L97PAJwtZSzRifZnIyp)

1. Click *Edit Style Code*

![](/files/-L97PAKA0mACEKOc1fX1)

1. Edit the code, the editor will warn you if you have syntax/formatting errors.

![](/files/-L97PAKLxT0T8JOx0Fto)

1. Click \_Save \_to save your style code changes, the preview map will update to show your changes
2. Click \_Save \_on the layer management page to save your changes in the layer.

![](/files/-L97PAKXQ9DPoJXlZFDC)

1. Click \_Back to Layer \_to go back to the layer page and view the larger map

![](/files/-L97PAKi2aAEwtgDvNs6)

**Editing style code for a map layer**

In MapHubs you can also customize a layer's style only inside a map. This may be useful, for example, to change the colors so that they better contrast with other layers in your map.

1. Enter the Map Maker either by clicking \_**Make a Map** \_or by editing an existing map.
2. Add the layer you want to edit to the map using ***Add Layer*** (if not already present)
3. Find the layer in the \_**Overlay Layers** \_panel on the left

![](/files/-L97PAM91AFhhLHShlrj)

1. Click the ***Change Style*** icon (color palette icon)

![](/files/-L97PAM_QA-n2hD1QL3L)

1. Open the \_**Advanced** \_section (you may need to scroll down)

![](/files/-L97PAMwuHIhn7nbE1OQ)

1. Click ***Edit Style Code***

![](/files/-L97PANHoRY9_-P0ntwz)

1. Edit the code, the editor will warn you if you have syntax/formatting errors.
2. Click \_**Save** \_to save your style code changes, the map will update to show your changes


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.maphubs.com/advanced/editing-map-style-code-advanced.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
