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.152.).

../../_images/admin_layers_create_webmap_eng_2.png

Pic. 5.152. Selection of “Web Map” action

Create resource dialog for a Web Map will open, see Pic. 5.153..

../../_images/admin_webmap_name_eng_3.png

Pic. 5.153. “Create resource” dialog for Web Map

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.

5.9.1.1. Extent

Switch from “Resource” tab to “Extent and bookmarks” tab, presented on Pic. 5.154..

../../_images/admin_webmap_bbox_eng_3.png

Pic. 5.154. “Extent and bookmarks” tab

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.155.). The four fields for the extent coordinates will be filled in.

../../_images/ngw_select_resource2_eng_3.png

Pic. 5.155. “Select layer” window

Tip

Extent coordinates could be generated using third-party services, for example http://boundingbox.klokantech.com/ (select csv in a list).

5.9.1.2. Bookmarks

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.156.) with names defined by “Label attribute” if it is set (see Pic. 5.157.).

../../_images/ngw_bookmarks_en.png

Pic. 5.156. “Bookmarks” tab and the bookmarks viewed on the map

../../_images/bookmark_attribute_en.png

Pic. 5.157. Setting attributes for the vector layer containing boundaries

5.9.1.3. 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.158.).

../../_images/admin_webmap_layers_eng_2.png

Pic. 5.158. “Layers” tab

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.

../../_images/admin_webmap_add_layers_en.png

Pic. 5.159. Using style to add a layer to the Web Map

Layers of a particular map have several settings, see Pic. 5.160..

../../_images/admin_webmap_create_layers_eng_2.png

Pic. 5.160. “Layers” tab of the “Create Resource” dialog

“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.

Note

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.

../../_images/admin_webmap_layerorders_1_cut.jpg

Pic. 5.161. Layer order as is: satellite images obscure the layer where the buildings are marked

../../_images/admin_webmap_layerorders_2_cut.jpg

Pic. 5.162. Different layer arrangement: the layer marking the buildings is above the satellite images, while the layer groups on the left remain unchanged

5.9.1.4. Settings

The “Settings” tab is used to allow layer editing and enable annotations (more on annotations see here).

../../_images/admin_webmap_settings_tab_en.png

Pic. 5.163. “Settings” tab

5.9.1.5. Basemaps

“Basemaps” tab allows to add and remove basemaps using corresponding buttons “Add” and “Remove” (see Pic. 5.164.).

../../_images/admin_webmap_basemaps_eng_2.png

Pic. 5.164. “Basemaps” tab

“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).

5.9.1.6. 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.

5.9.1.7. Social

The “Social” tab is used to upload an image to be used as preview in social media.

../../_images/admin_webmap_social_en.png

Pic. 5.165. “Social” tab

5.9.1.8. 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.

Warning

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.

../../_images/webmap_clone_page_en1.png

Pic. 5.166. “Clone Web Map” page

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:

  1. Search bar and path to the resource the copy will be created in

  2. Return to the initial folder (the one containing the original Web Map), refresh the resource tree state and close the window

  3. Option button to select a group (folder)

  4. Open the selected group (folder)

  5. Create new resource group (folder)

  6. Clear selection

  7. 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).

../../_images/webmap_clone_selected_group_elements_en1.png

Pic. 5.167. Group selection window