Enabling Open Street Maps
Quick guide to enable OSM in staging servers
To enable OSM on a staging server, you'll need:
ssh access to the server (with admin rights)
an OFN user account (with superadmin rights)
a geocoder API key
Then, follow the steps:
Log in to the staging server via ssh and edit the configuration file for the respective environment. For OFN staging servers that should be
~/apps/openfoodnetwork/current/.env.stagingComment or delete existing Google Maps and replace it with the Mapbox key.
#GOOGLE_MAPS_API_KEY=...Add the
GEOCODER_API_KEY=pk.eyJ1IjoiZmZ1cnR...<look within the testing section of Bitwarden>
restart puma
sudo systemctl restart puma.serviceLog in as superadmin and visit the Content section (under Configuration).
Find the MAP section and tick the
Open Street Map enabledcheckboxUnder
Open Street Map provider name:addOpenStreetMap.MapnikSave the changes by clicking
Update

Visit /map ; you should be looking at an OSM map 🎉
You can check it in the bottom-right corner of the map:

Last updated
Was this helpful?