Hello everyone, Yesterday, I made my first Android-OpenStreetMap application with Eclipse and the AVD Emulator. I used Osmdroid library and everything worked fine. Map was show. The application was the most simple one, I just made what many tutorials recomend. Very very simple application. And it worked fine. Everything is OK: manifest, permissions, .java code, libraries, everything. But today, the exactly same code (I just turned on Eclipse and executed the app) does not work. Map is empty. No maps. I have installed again eclipse, change debug key, try app on a mobile device, change example, many many things... But it doesn't work. Map is not show. And the code is exactly the same as yesterday. In logCat I read this:
Could it be the problem? The app is very very simple and I just proved it for 2 minutes. I don't know what to do and I have to present the project in 5 days. Please, help. Thanks very much asked 18 Jan '14, 15:46 AppNor aseerel4c26 ♦ |
Even I faced this issue after some googling I came across a solution, we need to set User agent value in configuration. Please refer to this link for furthermore clarification https://github.com/osmdroid/osmdroid/wiki/Important-notes-on-using-osmdroid-in-your-app answered 20 Mar '19, 11:54 SyedSaqibRuman 1
See this question for why this has become a particular issue now. The answer remains the same though.
(20 Mar '19, 12:16)
SomeoneElse ♦
|
(In addition to what Simon Poole says) - you've probably got something like this in your code:
if you change it to a different tile provider such as:
it'll work. You must, of course, adhere to the terms of use of whatever tiles you are using, which in the case of these Mapquest open tiles seems to be here. The source, FWIW, seems to be here. I guess that you could also overload TileSourceFactory and define a source of other tiles too, such as some you've created yourself via something like switch2osm. answered 18 Jan '14, 18:43 SomeoneElse ♦ 2
Thanks a lot. It worked. Other person told me that MAPNIK was not working and that was the problem. So, as you said, I changed to MAPQUESTOSM and it worked. About the terms, my aplication was very very simple, the typical first steps application, so I think that the reason of not working was MAPNIK and their servers or something like that. Thanks again!
(19 Jan '14, 12:40)
AppNor
Whilst MAPQUESTOSM worked in 2014 it won't now, since Mapquest tiles are no longer produced. Creating your own tiles and getting OsmDroid to use this will still work, of course.
(20 Mar '19, 12:14)
SomeoneElse ♦
|
You should check that you are setting your User-Agent to something unique and valid for your application. Fake (aka trying to impersonate a browser) user agent strings will get your application blocked. answered 18 Jan '14, 16:00 SimonPoole ♦ Info (in the osmdroid Google group) about setting the user agent properly is here.
(23 Jan '14, 00:22)
SomeoneElse ♦
|