From c7b25474d3426065b1e65e55ab1a990ab01ef9fd Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 19 Nov 2019 17:59:04 +0100 Subject: [PATCH] Introduce support for Pelias geocoder Signed-off-by: Thomas Citharel --- config/config.exs | 3 + .../components/Event/AddressAutoComplete.vue | 3 +- js/src/i18n/de.json | 2 - js/src/i18n/en_US.json | 5 +- js/src/i18n/fr_FR.json | 4 +- js/src/i18n/nl.json | 1 - js/src/i18n/oc.json | 2 - js/src/i18n/pl.json | 1 - js/src/i18n/sv.json | 1 - js/src/types/address.model.ts | 4 +- lib/service/geospatial/pelias.ex | 126 ++++++++++++++++++ 11 files changed, 139 insertions(+), 13 deletions(-) create mode 100644 lib/service/geospatial/pelias.ex diff --git a/config/config.exs b/config/config.exs index 8bf3b54e3..0424a0342 100644 --- a/config/config.exs +++ b/config/config.exs @@ -140,6 +140,9 @@ config :mobilizon, Mobilizon.Service.Geospatial.MapQuest, config :mobilizon, Mobilizon.Service.Geospatial.Mimirsbrunn, endpoint: System.get_env("GEOSPATIAL_MIMIRSBRUNN_ENDPOINT") || nil +config :mobilizon, Mobilizon.Service.Geospatial.Pelias, + endpoint: System.get_env("GEOSPATIAL_PELIAS_ENDPOINT") || nil + config :mobilizon, Oban, repo: Mobilizon.Storage.Repo, prune: {:maxlen, 10_000}, diff --git a/js/src/components/Event/AddressAutoComplete.vue b/js/src/components/Event/AddressAutoComplete.vue index 8b3e6f246..cef479190 100644 --- a/js/src/components/Event/AddressAutoComplete.vue +++ b/js/src/components/Event/AddressAutoComplete.vue @@ -25,7 +25,8 @@