I’ve set up the GraphHopper server on my home Linux. I got it up and running.
Now I’m trying to activate geocoding: I want to type in the address and have the system find the lat/lon. The documentation dances around the subject and drops hints here and there short of a clear explanation has one has to do to make it work.
I created an API key on the website.
I found the config file
´´´
web-bundle/src/main/resources/com/graphhopper/maps/config.js
´´´
1 const config = {
2 routingApi: location.origin + ‘/’,
3 geocodingApi: ‘xxxxxxxxxx’,
4 defaultTiles: ‘OpenStreetMap’,
5 keys: {
6 graphhopper: “xxxxxxxxxx”,
7 maptiler: “missing_api_key”,
8 omniscale: “missing_api_key”,
9 thunderforest: “missing_api_key”,
10 kurviger: “missing_api_key”
11 },
12 routingGraphLayerAllowed: true,
13 request: {
14 details: [
15 ‘road_class’,
16 ‘road_environment’,
17 ‘max_speed’,
18 ‘average_speed’,
19 ],
20 snapPreventions: [‘ferry’],
21 },
22 }
I’m guessing that the key should go into the “graphhopper” field??
What about the empty geocodingApi ‘’, what key is needed there? Same?
If somebody could share an example that would be great!
-st