diff options
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/administration/configuration.rst | 29 | ||||
| -rw-r--r-- | doc/developer/module/hittekaart_py.rst | 25 |
2 files changed, 51 insertions, 3 deletions
diff --git a/doc/administration/configuration.rst b/doc/administration/configuration.rst index 98f3592..99ce4d1 100644 --- a/doc/administration/configuration.rst +++ b/doc/administration/configuration.rst @@ -218,6 +218,35 @@ true``. This will cause the tiles to be loaded directly by the client. your users that third party content is included in your site, and that their IP will be accessible to the third party. +Overpass API +------------ + +Fietsboek uses Overpass_ to name climbs. You can set custom Overpass instances +in the config: + +.. code:: ini + + overpass.url = https://overpass.example.com/api/interpreter + # HTTP Basic auth, if needed: + overpass.basic_auth.username = fietsboek + overpass.basic_auth.password = super5ecre7 + +By default, Fietsboek uses the API instance at +https://maps.mail.ru/osm/tools/overpass/api/interpreter, however, it is often +overloaded and will respond with timeouts. + +.. note:: + + The URL needs to include the whole path to the interpreter script, so + usually it ends with ``/api/interpreter``. + +.. note:: + + Overpass has no standard way to do authentication. Commonly, the API key is + included in the URL. Fietsboek also has support for HTTP Basic auth. + +.. _Overpass: https://wiki.openstreetmap.org/wiki/Overpass_API + Hittekaart Integration ---------------------- diff --git a/doc/developer/module/hittekaart_py.rst b/doc/developer/module/hittekaart_py.rst index 052c2b0..f665799 100644 --- a/doc/developer/module/hittekaart_py.rst +++ b/doc/developer/module/hittekaart_py.rst @@ -24,7 +24,7 @@ Example Track.from_file(b"Documents/track.gpx", None), Track.from_coordinates([(45.0, 47.0)]), ] - storage = Storage.Sqlite(b"/tmp/tiles.sqlite") + storage = Storage.OsmAnd(b"/tmp/tiles.sqlite") generate(settings, tracks, HeatmapRenderer(), storage) Input and output @@ -74,15 +74,34 @@ Input and output :return: The created storage. :rtype: Storage - .. staticmethod:: Sqlite(path) + .. staticmethod:: OsmAnd(path) - Output the tiles to the given SQLite database. + Output the tiles to the given SQLite database. The table format is + compatible with OsmAnd. See `the Rust crate`__ for more information. :param path: Path to the database. :type path: bytes :return: The created storage. :rtype: Storage + .. staticmethod:: MbTiles(path, name, description) + + Output the tiles to the given MbTiles database. Optionally, sets the + ``name`` and ``description`` metadata as given. See `the Rust crate`__ + for more information about the format. + + :param path: Path to the database. + :type path: bytes + :param name: Name of the resulting map layer. + :type name: str | None + :param description: Description of the map layer. + :type description: str | None + :return: The created storage. + :rtype: Storage + +.. __: https://docs.rs/hittekaart/latest/hittekaart/storage/struct.OsmAnd.html +.. __: https://docs.rs/hittekaart/latest/hittekaart/storage/struct.MbTiles.html + Renderers --------- |
