I wasn't satisfied with the way Static Maps and reverse geocoding works in Poracle, so I made this. Everything here is very opiniated. If you agree with my opinion, feel free to use this.
- Host Static Maps on the Discord CDN
- Replace hardcoded template names with your own names
- Use Mapbox with public Nominatim as a fallback
- Produces a hardcoded format:
Suburb: Streetname 10, City
or if there's no suburb:City: Streetname 10
- Provide your own GeoJSON to overwrite suburb data
- Provide your own GeoJSON with POIs.
Format if a POI exists:
Suburb POI: Streetname 10, City
cp config.example.toml config.toml
- Install Poetry
poetry install
once and thenpoetry run middleman
to start- You can get the Python executable with
poetry env info
- Config should be self-explainatory.
tileserver.replace
can look something like this:
[tileserver.replace]
"poracle-multi-monster" = "your-template-name"
"poracle-areaoverview" = "your-areoverview"
- In your Poracle config, set this:
{
"staticProvider": "tileservercache",
"staticProviderURL": "http://127.0.0.1:3031/tileserver"
}
suburb_geojson
andpoi_geojson
have to be paths to valid GeoJSON files. You can use the providedfiles/
directory. Make sure that these GeoJSONs only consist of Polygons that have aname
property. If you provide invalid GeoJSONs you'll get an error on start.- In your Poracle config, set this:
{
"geocoding": {
"provider": "nominatim",
"providerURL": "http://127.0.0.1:3031/geocoder/"
},
"locale": {
"addressFormat": "{{formattedAddress}}"
}
}
- In your Poracle DTS, you can use
{{{addr}}}
to get the correct address