Reputation: 39
i have created an app with the openstreetmap api and i'm using the OsmBonusPack library when i tried to get location with getFromLocationName() fontion i get a forbiden error
BONUSPACK: Invalid response from server: HTTP/1.1 403 Forbidden
thanks in advance.
Upvotes: 0
Views: 2243
Reputation: 3258
Known issue. Inconsiderate users of osmdroid have failed to set the user agent correctly and as such, have gotten everyone banned from osm's tile servers.
Documented here: https://github.com/osmdroid/osmdroid/issues/366
Put this in your activity before loading the map.
OpenStreetMapTileProviderConstants.setUserAgentValue(BuildConfig.APPLICATION_ID);
Upvotes: 1