Replace MapBox with a token-less provider
This is too much hassle to require developers to register with MapBox only to test a local Pod provider.
Here is a list of alternatives: https://github.com/alexreisner/geocoder/blob/master/README_API_GUIDE.md
Here are 2 token-less alternatives from this guide: https://wiki.openstreetmap.org/wiki/Nominatim (limited to one request/second) https://photon.komoot.io/
First tests:
- Photon works well but queries take over 10s
- Nominatim works well, results in less than 1s
Example request
https://nominatim.openstreetmap.org/search?q=140%20bd%20etats-unis%20compi%C3%A8gne&format=geojson&addressdetails=1&countrycodes=fr,ch,be,lu
{
"type": "FeatureCollection",
"licence": "Data © OpenStreetMap contributors, ODbL 1.0. http://osm.org/copyright",
"features": [
{
"type": "Feature",
"properties": {
"place_id": 118137520,
"osm_type": "way",
"osm_id": 105281591,
"place_rank": 26,
"category": "highway",
"type": "tertiary",
"importance": 0.05340258258945598,
"addresstype": "road",
"name": "Boulevard des États-Unis",
"display_name": "Boulevard des États-Unis, Les Sablons, Compiègne, Oise, Hauts-de-France, France métropolitaine, 60200, France",
"address": {
"road": "Boulevard des États-Unis",
"suburb": "Les Sablons",
"town": "Compiègne",
"municipality": "Compiègne",
"county": "Oise",
"ISO3166-2-lvl6": "FR-60",
"state": "Hauts-de-France",
"ISO3166-2-lvl4": "FR-HDF",
"region": "France métropolitaine",
"postcode": "60200",
"country": "France",
"country_code": "fr"
}
},
"bbox": [
2.8172043,
49.4091308,
2.8199261,
49.4105836
],
"geometry": {
"type": "Point",
"coordinates": [
2.8181805,
49.4100626
]
}
},
{
"type": "Feature",
"properties": {
"place_id": 117021383,
"osm_type": "way",
"osm_id": 262640244,
"place_rank": 26,
"category": "highway",
"type": "tertiary",
"importance": 0.05340258258945598,
"addresstype": "road",
"name": "Boulevard des États-Unis",
"display_name": "Boulevard des États-Unis, Les Avenues, Saint-Lazare - Les Avenues, Compiègne, Oise, Hauts-de-France, France métropolitaine, 60200, France",
"address": {
"road": "Boulevard des États-Unis",
"neighbourhood": "Les Avenues",
"suburb": "Saint-Lazare - Les Avenues",
"town": "Compiègne",
"municipality": "Compiègne",
"county": "Oise",
"ISO3166-2-lvl6": "FR-60",
"state": "Hauts-de-France",
"ISO3166-2-lvl4": "FR-HDF",
"region": "France métropolitaine",
"postcode": "60200",
"country": "France",
"country_code": "fr"
}
},
"bbox": [
2.8330911,
49.4059422,
2.8359391,
49.4064353
],
"geometry": {
"type": "Point",
"coordinates": [
2.8344556,
49.4061772
]
}
}
]
}
Nominatim TOS says it does not accept auto-complete features, so we may get banned.
An alternative could be to host our own Nominatim instance: https://github.com/mediagis/nominatim-docker
Photon also has a Docker image but it's 60Gb: https://github.com/tonsnoei/photon-docker
Would this service only be needed for development or would it be used in production?
@simonLouvet Mainly for development I think. For production it will be better to get a MapBox token.
That means a call to a specific service (and the dev to get there) only for development :-/ not convinced but I understand the need Maybe a mock?
This is a ActivityPods issue. It is a big pain when you want to setup a local Pod provider.
I didn't want to interfere with the project. I had indeed misread the repository
One solution could be to hide the address input if no mapbox token is provided
Fully in favor in hiding the address input
This should be a cool optional add-on and not a required feature
Hi @thhck I had forgotten to close this issue, but this change been done here: the docs don't mention MapBox anymore :)