6.14. A viewer for Web Maps
A special web application for viewing Web Maps is included in NextGIS Web (see Pic. 6.199.).
To view the Web Map press next to its name in the resource list or open the resource page and select Display in the Actions panel on the right. The following page will open:
Numbers indicate: 1 – map; 2 – map panels; 3 - layer tree with layer menu buttons; 4 – dropdown list of basemaps; 5 - zoom tools; 6 - map tools; 7 - status bar and copyright.
Web client includes three main components: a map, panels, map tools.
6.14.1. Zoom and rotation
The status bar (see Pic. 6.199.) displays the current scale of the map. If you use the identify tool to click on the map, a pop-up window will show the coordinates of the point you clicked on and list map features if present in this point of the map.
You can change the scale of the map using zoom tools (see item 5 in Pic. 6.199.). To reset the map to its initial extent, press the house icon.
There are some options to work with map:
if you click on
alt + shift
simultaneously and execute round cursor movements around a monitor, a map will turn for a certain degrees to the right or to the left,if you simultaneously click on
shift
and select of the necessary part of a map on a monitor by a cursor, you will highlight this part and zoom in it on the map.
6.14.2. Panels
On the left side of the workspace are the functional panels:
Layers
Share
Print
The layer tree contains a list of all layer styles added to the web map. The panel allows:
Disable/Enable layer visibility. You can also hide parts of a layer by selecting items in the Web Map lengend. It’s helpful for big projects where one layer may contain a variety of features grouped by value of an attribute.
Open layer attribute table
Zoom map to layer
Open layer description
Search is performed using three sources:
Coordinates.
Attributes of layers added to a map.
Address database (OpenStreetMap or Yandex.Maps, depending on address search settings).
Results are shown as user inputs text and are sorted in this order: points on the map matching the coordinates, then feature numbers for attribute search and finally full addresses. After a click on a search result map changes extent to show selected feature.
Note
To find a point using the coordinates, enter the latitude and longitude in degrees, minutes and second, degrees and decimal minutes or decimal degrees (make sure to use straight single and double quotes), for example:
79 W 43 N
W 79 N 43
-79 43 (the results will contain two points: 79 W, 43 N and 43 E, 79 S)
79- 43
-79 W 43 N
79°4'14.08" W 43°4'59.37" N
-79°4'14.08" 43°4'59.37"
-79 4.25 W 43 4.95 N
-79 4.25 43 4.95
79.068493 43.079920
79.068 W 43.08 N
When the feature table is opened on the Web Map, you can filter features by area (read more).
To share a link to a map or generate embed code use the function “Share” (see item 9 in Pic. 6.199., learn more), to print a map use the function “Print map” (see item 10 in Pic. 6.199., learn more).
6.14.4. Basemap
To change a basemap use the dropdown list (see Pic. 6.199.). By default there are the following basemaps:
None
OpenStreetMap
Basemap is a map image that is shared by thrid-party services in the Internet. Users can not influence their content. You can disable the basemap so that a white background is shown instead. If the Internet access is expected to be poor or if the Web GIS is deployed in local network without access to the Internet, it is possible to work without a basemap adding base data as WebGIS layers.
You can add other basemaps, see the instructions in Adding resources.
Note
If the Web Map is supposed to work without Internet access, edit the file with basemap settings and delete records about Google basemaps.
6.14.5. Map tools
Tools to work with the Web Map (see Pic. 6.199. item 6) named from left to the right:
Zoom in
Zoom out
Measure distance
Measure area
Vertical swipe
Show cursor coordinates/extent
6.14.5.1. Vertical swipe
Vertical swipe makes the selected layer transparent to the right of it.
To select a layer click on it in the layer tree (it will be highlighted in blue) (see Pic. 6.203.).
This makes it possible to “peek” under the selected layer and compare it with the substrate or another layer on the map. The tool will be useful if we want to compare changes in the terrain by satellite images for different dates (for example, to identify forest felling or floods).
6.14.5.2. Show extent or cursor coordinates
A field can be added to the Web Map interface to show the coordinates of the current cursor position or the extent of the visible map area. To activate it, press the button in the map tools panel.
The icon on the right indicates what is displayed. Click on it to switch between modes.
6.14.6. Link to a Web Map feature
The easiest way is to zoom in on the area and copy the link via the Share panel (Pic. 6.199.)
Using specially generated GET queries you can share a link to a particular feature of a layer. The link will open with the geographical context that you can select in the Web Map settings.
All you need to do is create links in the information systems. By clicking on them users will be directed to the map with the selected feature and context.
Such links can be automatically generated by your system integrated with NextGIS Web.
Example:
You can make such a link manually. Here’s what you need:
Link to the Web Map: https://demo.nextgis.com/resource/7023/display?panel=layers
For the feature:
hl_lid - layer ID (open the layer resource page and see the number in the URL, for example https://demo.nextgis.com/resource/7018, here hl_lid=7018
hl_attr – the name of the ID attribute field;
hl_val – the value of the ID field.
You can also add:
zoom - value in numbers with 1 being the minimum.
Here’s the resulting link: