Coverage for gws-app/gws/plugin/mapshare/__init__.py: 100%
0 statements
« prev ^ index » next coverage.py v7.16.2, created at 2026-10-05 13:35 +0200
« prev ^ index » next coverage.py v7.16.2, created at 2026-10-05 13:35 +0200
1"""Map share tool.
3The client tool ``Toolbar.MapShare`` creates a link to a clicked map position,
4with the current scale and an optional title, and shows it together with a QR
5code. Opening the link shows the shared position on the map.
7Links have the form ``/project/<uid>?s=<link>``, where ``<link>`` is
8``<scale>x<x>y<y>`` for points or ``<scale>w<wkb hex>`` for other geometries,
9optionally followed by ``_<title>``. Coordinates are in the CRS of the project
10map, rounded to meters (5 decimals for geographic CRS). Titles are cut to 200
11characters.
13Submodules
14----------
16- ``action`` - the ``mapshare`` action. Implements ``mapshareCreateLink``,
17 which creates the link and its QR code, and ``mapshareDecodeLink``, which
18 decodes the ``s`` parameter of a link.
19- ``js`` - the client part.
21Example::
23 actions+ { type "mapshare" }
25 client.addElements+ { tag "Toolbar.MapShare" }
26"""