You are not logged in.

#1 2020-06-18 11:46:49

Manfrediny
New Member
Registered: 2020-06-18
Posts: 1

Problem introducing the map to android app

Hello, im new to programming and im developing an android app for a school project that consists on me creating some waypoints on certain spots, and give the user the choice to select one of them, and then mark the route.
I first though on using Google Maps, but after some quick searches around I found out that i couldn't use it because it have some kind of limit on the amount of waypoints that we can use without paying for license, so I decided to use OpenStreetMap.
I found a basic tutorial on the internet teaching how to introduce the map, create waypoints and create the route, and after following that tutorial the program wasn't working like it should. The app was opening and showing the waypoints, but the map wasn't loading itself.
I'm programming with Java on Android Studio, using the virtual device system from android studio to run it, but also tried with my own phone, and had the same result.
The console was showing  "W/OsmDroid: Problem downloading MapTile: /15/12611/17026 HTTP response: Too Many Requests" while the app was running and i tried to move the map.

I would appreciate some help smile
Thank you

Offline

#2 2020-06-18 15:24:46

SomeoneElse
Member
Registered: 2010-10-13
Posts: 1,392

Re: Problem introducing the map to android app

Perhaps you have downloaded a lot of tiles already?  As https://operations.osmfoundation.org/policies/tiles/ says: "OpenStreetMap data is free for everyone to use. Our tile servers are not".

I'm assuming, of course, that you're trying to use OpenStreetMap's "standard" tiles - the ones that you see at at https://www.openstreetmap.org/#map=14/-7.0787/-41.4369.  Try using a different tile server to see if that message goes away.  Have a look at https://wiki.openstreetmap.org/wiki/Lis … d_services to see if anything there helps you.  If you want to create your own tiles, have a look at https://switch2osm.org/serving-tiles/.

If you're thinking "hang on - I'm just using OsmDroid - I haven't said anything about which tile servers to use" have a look at https://github.com/SomeoneElseOSM/AJTS0 … y.java#L47 - that is a really simple OsmDroid example that uses a different tile source.

Offline

Board footer

Powered by FluxBB