Coverage for gws-app/gws/plugin/annotate_tool/__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"""Annotate tool.
3Client tool for drawing shapes on the map (points, lines, polygons, circles,
4boxes) and labeling them with measurements, such as coordinates, length,
5perimeter, area or radius. The annotations are listed in a sidebar, where
6their labels and styles can be edited. If a storage is configured, they can be
7saved on the server and loaded again.
9Submodules
10----------
12- ``action`` - the ``annotate`` action. It passes the label templates
13 (``labels``) and the storage settings to the client and implements the API
14 command ``annotateStorage``, which reads and writes saved annotations.
15- ``js`` - the client part: the elements ``Sidebar.Annotate``,
16 ``Toolbar.Annotate.Draw`` and ``Task.Annotate``.
18The ``permissions`` of the storage define who may read, overwrite and create
19saved annotations.
21Example::
23 actions+ {
24 type "annotate"
25 storage {
26 permissions {
27 read "allow all"
28 write "allow all"
29 create "allow all"
30 }
31 }
32 }
34 client.addElements+ { tag "Sidebar.Annotate" }
35 client.addElements+ { tag "Toolbar.Annotate.Draw" }
36 client.addElements+ { tag "Task.Annotate" }
37"""