All-black maps with staticmaplite (OSM static map generation - Access control configuration prevents your request from being allowed)
I've been using the staticmaplite library for a while to generate static maps based on OSM tiles.
Recently I started getting the following error when downloading tiles:
Based on that info, I checked how staticmap.php was fetching tiles and noticed that the User-Agent string was hardcoded to "Mozilla/4.0". I fixed this and now I can fetch tiles again. You can get the updated version from here: https://github.com/crox-net/staticmaplite.
Recently I started getting the following error when downloading tiles:
Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect.The OSM team was very responsive when I contacted them and they pointed me to https://operations.osmfoundation.org/policies/tiles/.
Based on that info, I checked how staticmap.php was fetching tiles and noticed that the User-Agent string was hardcoded to "Mozilla/4.0". I fixed this and now I can fetch tiles again. You can get the updated version from here: https://github.com/crox-net/staticmaplite.
Comments
Display comments as Linear | Threaded