5.8. How to administrate Web Maps¶
There could be several Web Maps in NextGIS Web. For example one map is for work, another is for public access and third is for testing of layer styles.
Each Web Map has its own URL address. Different access permissions for Web Map viewing can be set for users and groups.
Web Map displays layers. They can be turned on or off by the user. You can set the order of the layers, default layer visibility and create layer groups. Groups on a map do not relate to resource groups in the Control Panel. There is no option to transfer layers between groups. Groups may be nested.
5.8.1. Creating a Web Map¶
To create a Web Map, open the resource group where you want to add it, then in the actions pane “Create resource” select “Web Map”. (see Pic. 5.101.).
Create resource dialog for a Web Map will open, see Pic. 5.102..
Enter Web Map display name that will be visible in the administrator interface and in the Web Maps viewer.
“Keyname” field is optional.
You can also add resource description and metadata on the corresponding tabs.
Switch from “Resource” tab to “Extent and bookmarks” tab, presented on Pic. 5.103..
Use the four fields to set the extent measured in degrees.
The field “Extent from layer” allows to set Web Map extent from the layer’s extent. Next to the field, there is a folder icon with a plus on it. Click it to open the “Select resource” window, where you can select a layer to use for setting the Web Map extent (four fields with the extent coordinates will be filled in, see Pic. 5.104.).
In the “Bookmark resource” field you can select a vector layer with any type of geometry to use for bookmarks. If a layer is set, the Web Map will show bookmarks panel (see Pic. 5.105.) with names defined by “Label attribute” (see Pic. 5.106.).
22.214.171.124. Web Map Layers¶
In the “Layers” tab you can add layers, group or remove them using the buttons “Add layer”, “Add group” and “Remove” respectively (see Pic. 5.107.).
To view the data of the layer on a map, you need to create at least one layer style. More on creating styles for different layer types here.
Layers of a particular map have several settings, see Pic. 5.108..
“Enabled” checkbox sets default visibility of a layer.
The “Transparency” field sets the layer transparency on a map between 0% (opaque) and 100% (completely transparent).
We recommend setting the “Adapter” field to “Image”.
You can also set up a scale range. Min scale corresponds to the smaller image, max scale - to the larger, more detailed image. For example, if you want a layer to be displayed in scales between 1 : 250,000 and 1 : 5,000, the higher number (250,000) is the minimal scale.
Max and min scale can be set not only using the Web Map’s Layers tab, but also in the layer style itself (See an example). If the layer should not be displayed in a certain range of scales, we recommend to mark it in the Web Map’s layer settings. If the scale limit is only set within the style, empty tiles will be generated in other scales, which is less efficient.
The order of the layers on a map can be different from the order in which they appear in the tree. Click “Layer order” in the “Layers” tab of the map settings. It allows to choose the order of the displayed layers without affecting the groups.
“Basemaps” tab allows to add and remove basemaps using corresponding buttons “Add” and “Remove” (see Pic. 5.111.).
“Enabled” checkbox sets default visibility of a basemap.
“Opacity” field sets basemap transparency on a map in a range between 0 (transparent) and 1 (opaque) with decimals separated by a full stop (ex. 0.2).
126.96.36.199. Web Map with no basemap¶
By default a Web Map is created with OpenStreetMap basemap. If you need a map without a basemap: create a new basemap, put ‘blank’ in name and URL fields, and add it to your Web Map. Then turn this newly created basemap off.
After creating the map content and adjusting settings for all the layers, click “Save” button. A saved map will be shown in the list of maps. Click an icon with a map in the list of Web Maps or a “Display” link in a window with Web Map properties to open the Web Map in the Web Maps viewer. While the Web Map resource page is open, you can also open the map by clicking the “View” button on the right. Web Maps viewer is described here. A Web Map URL displayed in the viewer may be shared with other users because it is static.
After a map is deleted, its URL will no longer be available.