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
- Supports Mapbox, self-hosted nominatim, public nominatim
- Each service is used as a fallback, they're queried until one gives data
- Produces a hardcoded format:
Suburb: Streetname 10, Cityor 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 installonce and thenpoetry run middlemanto start- You can get the Python executable with
poetry env info
- Config should be self-explainatory.
tileserver.replacecan 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_geojsonandpoi_geojsonhave to be paths to valid GeoJSON files. You can use the providedfiles/directory. Make sure that these GeoJSONs only consist of Polygons that have anameproperty. 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