Creating styles and style layers
To customize the appearance of a map in the Style editor, you need to create a style, and then customize the style layers within it. You can either customize existing layers or add new layers.
Creating a style
You can create a style for a map in several ways: from a basic style template, from scratch, or from copies of styles.
From a basic style
To create your own style, you can use prepared templates with basic styles and edit them.
Styles for web applications (MapGL JS API) and mobile applications (Mobile SDK) in day and night themes are available. Each style includes more than 200 configured layers.
To create a style from a template:
-
Open the Style editor.
-
Select a prepared template from a list of style templates.
-
Apply changes to the basic style.
A style is automatically saved as new and displayed in the My Styles block.
From scratch
You can customize your own style from scratch by creating the layers you need.
To create a style from scratch:
-
Open the Style editor.
-
Select the New style from a list of styles.
-
Select the type of map for which you create a style:
- MapGL JS API — for web applications
- Mobile SDK — for mobile applications
-
Click Create.
-
Add style layers: see the Adding a layer instruction.
A style is automatically saved as new and displayed in the My Styles block.
From your style copy
To create a new style from a copy of style you created:
-
Open the Style editor.
-
In the My styles block, in a card of the required style, click the icon and select Make a copy.
A style is automatically saved as new and displayed in the My Styles block.
From a style copy of another user
To copy a style of another user:
-
Request a link from the project owner to make a copy of a style: see the Share a link to a style instruction.
-
Follow the link.
-
Click Create a copy in the top menu.
A style is automatically saved as new and displayed in the My Styles block.
Adding a layer
Standard layers
-
Open the Style editor.
-
In the My styles block, select the required style.
-
In the Layers section, click icon.
-
Select a layer type (e.g. polygon, line, point). The type determines the layer appearance and its customization options.
-
Select the data for the layer. For each layer, only specific sets of map data are available. For example, street data is available for a layer with the line type. Areas, blocks, and buildings are available for a layer with the polygon type.
-
Specify the remaining layer settings (e.g. zoom, visibility, style). Available settings depend on the layer type.
A new layer is automatically added to the style.
Dynamic layers
A dynamic layer allows you to customize the appearance of elements that overlay the map, such as gradient lines, to visualize traffic jams or user location markers. You can add a dynamic layer only for maps with the Mobile SDK type.
Dynamic layers are configurable, but they are not visible on the map in the Style editor. You can view dynamic layers only in the assembled mobile application or in the demo application.
-
Open the Style editor.
-
In the My styles block, select the required style.
-
In the Layers section, click icon.
-
Enable the Dynamic layers option.
-
Select a layer type (e.g. gradient line, circle in the map plane). The type determines the layer appearance and its customization options.
-
Select the data for the layer. For each layer, only specific sets of map data are available.
-
Specify the remaining layer settings (e.g. zoom, visibility, style). Available settings depend on the layer type.
A new dynamic layer is automatically added to the style.
What's next?
- Connect a style to a map.
- Publish changes if you changed a connected style.