feat: Make geocoding API configurable
This commit is contained in:
parent
33848cbe15
commit
b2a3d910d9
@ -57,7 +57,7 @@
|
||||
}
|
||||
|
||||
try {
|
||||
const response = await fetch(`https://photon.hyteck.de/api/?q=${encodeURIComponent(query)}&limit=5`);
|
||||
const response = await fetch(`{{ geocoding_api_url }}/?q=${encodeURIComponent(query)}&limit=5`);
|
||||
const data = await response.json();
|
||||
|
||||
if (data && data.features) {
|
||||
|
@ -207,7 +207,8 @@ def search(request):
|
||||
"map_pins": [search],
|
||||
"location": search.location,
|
||||
"search_radius": search.max_distance,
|
||||
"zoom_level": zoom_level_for_radius(search.max_distance)}
|
||||
"zoom_level": zoom_level_for_radius(search.max_distance),
|
||||
"geocoding_api_url": settings.GEOCODING_API_URL,}
|
||||
return render(request, 'fellchensammlung/search.html', context=context)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user