5.9. 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.9.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.146.).
Create resource dialog for a Web Map will open, see Pic. 5.147..
Enter Web Map display name that will be visible in the administrator interface and in the Web Map 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.148..
In this tab you can set up:
Initial extent - part of the Web Map that is shown upon its opening
Constraining extent - users will not be able to zoom out or scroll past this extent
Use the four fields to set the extent measured in degrees.
Extent from layer button allows to set Web Map extent from the layer’s extent. Click it to open the “Select layer” window, where you can select a layer to use for setting the Web Map extent (see Pic. 5.149.). The four fields for the extent coordinates will be filled in.
Extent coordinates could be generated using third-party services, for example http://boundingbox.klokantech.com/ (select csv in a list).
In the “Bookmark resource” field you can select a vector layer with any type of geometry to use for bookmarks. The Web Map will show bookmarks panel (see Pic. 5.150.) with names defined by “Label attribute” if it is set (see Pic. 5.151.).
22.214.171.124. Web Map Layers
In the “Layers” tab you can add, group or remove layers and change their order using the buttons “Add layer”, “Add group”, “Remove” and “Layer order” respectively (see Pic. 5.152.).
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.154..
“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” (a single image for the entire map), unless there are some special requirements. Alternatively, you can choose “Tiles” (images of 256 x 256 pixels).
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.
The “Settings” tab is used to allow layer editing and enable annotations (more on annotations see here).
“Basemaps” tab allows to add and remove basemaps using corresponding buttons “Add” and “Remove” (see Pic. 5.158.).
“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 comma separated (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.
188.8.131.52. Final steps
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 select “Display” action in the tab on the Web Map properties page to open it in the 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.
5.9.2. Web Map Cloning
With NextGIS Web you can create a copy of an existing Web Map by cloning it. To copy a Web Map, select “Clone” in the actions pane of its resource page. You will be redirected to “Clone Web Map” page to set up the location of the copy in the resource tree and the name for it.
A magnifying glass icon in the right end of the “Resource group” field opens the group selection pop-up window.
This window contains the following elements:
Search bar and path to the resource the copy will be created in
Return to the initial folder (the one containing the original Web Map), refresh the resource tree state and close the window
Option button to select a group (folder)
Open the selected group (folder)
Create new resource group (folder)
Button that complets group selection. If a group (folder) is selected, the button reads “Clone to selected group”. If no group is selected, it reads “Clone to this folder”, in this case the copy will be created in the group currently open (the path to it is indicated in the top panel of the pop-up window).