In a virtualcityMAP, you can create a link using the "Generate Link (Share Current View of the Map)" function that allows the map to return to the exact view you had when the link was created. This means that the map's current view, active layers (things you can see on the map), and information for certain plugins will be restored when the link is used to open a new map. The link can also be manually modified or created to open a map. Specifically, the Viewpoint can include an EPSG Code that references the default coordinate system of the map. If no EPSG Code is included, it assumes the coordinates are in WGS84. Additionally, a simple Extent with an EPSG Code of the default coordinate system can be used to open the map at a specific location.
The URL generated for this purpose includes several parameters in a json format, which are explained below.
It uses regular URL encoding to describe the state of the Map. Here is the example in a decoded format:
Alternatively, a second example with a EPSG Code in the URL:
This is how the URL looks schematically:
If on of the names contains empty spaces they are connected via +
.
These parameters describe the viewpoint of the map, how far the camera is, and how the camera is positioned:
Parameters marked with * can optionally be used in the URL by the user to open a map at a specific location.
The first two sets of coordinates describe the start and end points for the camera's focus. The map centers around these points, with the camera being placed at the position of the first point, the Camera Position, and focusing on the position of the second point, the Ground Position. These Coordinates are partially optional, only one has to be given. The Coordinates are given in x,y,z format and are seperated by comma and given in the WGS84 coordinate system.
- Example:
[[13.374111020006039,52.5126411114975,1039.4376606886788],[13.371271496304264,52.52529109057904,31.074206921777545]]
- Start: Longitude
13.3741
, Latitude52.5126
, Altitude1039.44
- End: Longitude
13.3713
, Latitude52.5253
, Altitude31.07
- Start: Longitude
The camera's distance from the ground point to the camera position in meters indicates the zoom level or how far away the camera is positioned.
- Example:
1742.35
(The camera is 1,742.35 meters away from the ground point.)
The heading defines the direction in which the camera (azimuth) is facing, in degrees, relative to north (0 or 360 degrees).
-
Example:
O
(The camera is facing north.)90
(The camera is facing east.)180
(The camera is facing south.)270
(The camera is facing west.)
Specifies the tilt angle of the camera. With a value of 0, the camera points towards the horizon. With a value of -90, the camera points directly to the ground. The values must be in the range between 0 and -90.
-
Example:
-90
(The camera is pointing to the ground.)0
(The camera is pointing to the horizon.)
A subtle adjustment to the camera's roll refers to how level the camera is. It's typically close to 0 or 360 degrees, as the roll cannot be manually controlled and usually remains level.
- Example:
359.97
(A very slight adjustment roll of the camera.)
An optional parameter that specifies the EPSG code of the coordinate system used in the Map as default. If no EPSG code is given, the coordinates are assumed to be in WGS84.
- Example:
25832
An optional way of providing a location to the map is by using an Extent. It needs two coordinates that describe the lower left and upper right corner of the extent. The coordinates are given in x,y format and are seperated by comma. Here is a partial Example of a URL with an Extent:
This parameter decides which type of map appears when the scene loads. Maps can be shown in 3D, 2D, or as oblique aerial views (which are angled pictures taken from a plane or drone).
-
Example:
CesiumMap
(The scene starts with a 3D map.) -
Example:
OpenlayersMap
(The scene starts with a 2D map.) -
Example:
ObliqueMap
(The scene starts with angled aerial images.)
The next Element in the Link contains one or multiple IDs that reference the Modules that are currently loaded in the Map. The Module IDs are listed in an array and separated by a comma. Their states are cached, but they are not automatically added to the map if they are in the URL, only when they are manually added (via API or activated by a user) back to the map again they retain their settings.
- Example:
["VC+Map+Demo"]
These parameters control which map layers are visible when the scene is loaded. Can be used to deactivate layers that are active when the application is started as well as activate layers that are usually inactive when the scene is loaded. (The names of the layers can be found out using the "Generate Link" function. The names are different for each virtualcityMAP).
To describe this an array is used. The first places describes the name of the layer, the second is either 0
(for inactive) or 1
(for active) and the third place describes the name of the active Style (if there is no style it is 0
).
- Example:
["osmBuildingFootprints",1, 0 ]
The following section of the URL specifies settings for certain Plugins. These Parameters are plugin-specific. First the plugin name is specified and then an object defines the information for the plugin.
- Example:
["@vcmap/cesium-filters", { "baw":{ "enabled":true }, "lig":{ "lightIntensity":3 } } ]
(In this case the Cesium filters Plugin, has the baw (black and white) filter enabled and the light intensity is set to 3)
The last parameter in the URL describes the currently active Oblique Collection. If the Oblique Map is not selected the standard value is 0
otherwise it is a string of the name of the oblique collection.
- Example:
"obliques"