diff --git a/config/config.exs b/config/config.exs index 0424a0342..9682b34c3 100644 --- a/config/config.exs +++ b/config/config.exs @@ -143,6 +143,14 @@ config :mobilizon, Mobilizon.Service.Geospatial.Mimirsbrunn, config :mobilizon, Mobilizon.Service.Geospatial.Pelias, endpoint: System.get_env("GEOSPATIAL_PELIAS_ENDPOINT") || nil +config :mobilizon, :maps, + tiles: [ + endpoint: + System.get_env("MAPS_TILES_ENDPOINT") || + "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", + attribution: System.get_env("MAPS_TILES_ATTRIBUTION") + ] + config :mobilizon, Oban, repo: Mobilizon.Storage.Repo, prune: {:maxlen, 10_000}, diff --git a/config/dev.exs b/config/dev.exs index ac5f5a921..8b9d4f621 100644 --- a/config/dev.exs +++ b/config/dev.exs @@ -52,7 +52,7 @@ config :mobilizon, MobilizonWeb.Endpoint, # Do not include metadata nor timestamps in development logs config :logger, :console, format: "[$level] $message\n", level: :debug -config :mobilizon, Mobilizon.Service.Geospatial, service: Mobilizon.Service.Geospatial.Nominatim +config :mobilizon, Mobilizon.Service.Geospatial, service: Mobilizon.Service.Geospatial.Mimirsbrunn # Set a higher stacktrace during development. Avoid configuring such # in production as building large stacktraces may be expensive. diff --git a/docs/administration/configure/geocoders.md b/docs/administration/configure/geocoders.md index ee9349eaf..3f636ed84 100644 --- a/docs/administration/configure/geocoders.md +++ b/docs/administration/configure/geocoders.md @@ -7,8 +7,8 @@ This is needed to set correct address for events, and more easily find events wi However, providing a geocoding service is quite expensive, especially if you want to cover the whole Earth. -!!!note - To give an idea of what hardware is required to self-host a geocoding service, we successfully used Addok, Pelias and Mimirsbrunn on a 8 core/16GB RAM machine without any issues **on French data**. +!!! note "Hardware setup" + To give an idea of what hardware is required to self-host a geocoding service, we successfully installed and used [Addok](#addok), [Pelias](#pelias) and [Mimirsbrunn](#mimirsbrunn) on a 8 cores/16GB RAM machine without any issues **importing only French addresses and data**. ## List of supported geocoders @@ -27,9 +27,12 @@ This is the list of all geocoders supported by Mobilizon. The current default on [Nominatim](https://wiki.openstreetmap.org/wiki/Nominatim) is a GPL-2.0 licenced tool to search data by name and address. It's written in C and PHP and uses PostgreSQL. It's the current default search tool on the [OpenStreetMap homepage](https://www.openstreetmap.org). -!!! warning +!!! warning "Terms" When using the official Nominatim OpenStreetMap instance (default endpoint for this geocoder if not configured otherwise), you need to read and accept the [Usage Policy](https://operations.osmfoundation.org/policies/nominatim). +!!! danger "Limitations" + Autocomplete is not possible using Nominatim, you'll obtain no suggestions while typing. + Several companies provide hosted instances of Nominatim that you can query via an API, for example see [MapQuest Open Initiative](https://developer.mapquest.com/documentation/open/nominatim-search). ### Addok @@ -37,14 +40,14 @@ Several companies provide hosted instances of Nominatim that you can query via a [Addok](https://github.com/addok/addok) is a WTFPL licenced search engine for address (and only address). It's written in Python and uses Redis. It's used by French government for [adresse.data.gouv.fr](https://adresse.data.gouv.fr). -!!! warning +!!! warning "Terms" When using France's Addok instance at `api-adresse.data.gouv.fr` (default endpoint for this geocoder if not configured otherwise), you need to read and accept the [GCU](https://adresse.data.gouv.fr/cgu) (in French). ### Photon [Photon](https://photon.komoot.de/) is an Apache 2.0 licenced search engine written in Java and powered by ElasticSearch. -!!! warning +!!! warning "Terms" The terms of use for the official instance (default endpoint for this geocoder if not configured otherwise) are simply the following: > You can use the API for your project, but please be fair - extensive usage will be throttled. We do not guarantee for the availability and usage might be subject of change in the future. diff --git a/js/src/components/Event/AddressAutoComplete.vue b/js/src/components/Event/AddressAutoComplete.vue index cef479190..2fd40f7d8 100644 --- a/js/src/components/Event/AddressAutoComplete.vue +++ b/js/src/components/Event/AddressAutoComplete.vue @@ -7,12 +7,12 @@ {{ $t('Getting location') }} @@ -24,7 +24,7 @@