Skip to content

Commit

Permalink
Add user documentation for map
Browse files Browse the repository at this point in the history
  • Loading branch information
jajm committed Sep 22, 2021
1 parent 7bc7209 commit 6426c9e
Show file tree
Hide file tree
Showing 7 changed files with 87 additions and 0 deletions.
7 changes: 7 additions & 0 deletions doc/user/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,10 @@ Supported databases
configuration
start-the-server
upgrade

.. toctree::
:caption: Reports
:maxdepth: 2
:hidden:

report-types
6 changes: 6 additions & 0 deletions doc/user/report-types.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Report types
============

.. toctree::

report-types/map
Binary file added doc/user/report-types/image/map-empty.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/user/report-types/image/map-result.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
74 changes: 74 additions & 0 deletions doc/user/report-types/map.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
Map
===

The *map* report type allows to display `GeoJSON <https://geojson.org/>`_ objects on a map.

.. figure:: image/map-result.png

Example of a map report

To use it, select the map marker icon.

.. figure:: image/map-empty.png

Screenshot of an empty map report

There are six different places where you can put your columns:

GeoJSON column
This is the most important one. Place the column containing GeoJSON data here.

If your database does not contain GeoJSON data, you can probably convert
other formats to GeoJSON using SQL functions. For instance, MySQL has
`ST_AsGeoJSON <https://dev.mysql.com/doc/refman/5.7/en/spatial-geojson-functions.html#function_st-asgeojson>`_
(you may need to modify the layer to use those functions).

Label column
If you drop a column here, its text content will be shown next to the map marker.

Value column
If you drop a column here, its numeric content will be used to calculate a
color intensity. Low values get low intensity and high values get high
intensity.

Group column
If you drop a column here, its content will be used to group markers
together. If two rows have the same value in this column, they belong to the
same group. Each group is then assigned a unique color hue for the map
marker.

Type column
If you drop a column here, its content will be used to assign a type to a
row. Each type can then be associated with a specific icon to change the map
marker appearance.

Filters
These are regular filters and work the same as for other report types.


Report settings
---------------

.. figure:: image/map-report-settings.png

Screenshot of the map report settings modal window

In the report settings you can change the map layer. It's the map that will be
drawn under the GeoJSON objects. You can find different map layers on `the
OpenStreetMap Wiki <https://wiki.openstreetmap.org/wiki/Tile_servers>`_.


Configure icons
---------------

If you use a *type* column, you can associate an icon with each type. To do
that, click on the gear wheel icon next to the type column.

.. figure:: image/map-type-column-settings.png

Screenshot of the map type column settings modal window

Each distinct value contained in the type column will be displayed in the form.
Associate an icon with a type by entering the icon's name. Only
`Font Awesome 4 icons <https://fontawesome.com/v4.7/icons/>`_ are available at
the moment.

0 comments on commit 6426c9e

Please sign in to comment.