I am writing a simple android application using osmdroid that work online an offline untill now I am able to display the map (online and offline), and I want to add overlay (markers) on the map, I had search for simple example for using overlay in osmdroid and I tried some of them but they didn't work, so I want any example for adding overlay or marcker using osmdroid
adding Overlay to a MapView in osmdroid
hello @AbdalwhabBakheet.... is your project solved right now ? I wonder if you would share some tutorials on the net, wouldn't you? –
Radiolucent
Look at the ItemizedIconOverlay class.
There's a few examples on the internet if you search, an example has been posted on Stack Overflow here: Adding Overylay to OSMDROID
thanks Martin Pearman, it work fine with me but I notice that it requier the use of internet and if I setUseDataConnection(false) then an error occur can it work offline, and is there are any other ways to mark points in the map –
Ducktail
If the code works and the Overlay is correctly added to the MapView when UseDataConnection is set to true then the same code should also work when UseDataConnection is set to false. What error are you getting when UseDataConnection is set to false? –
Catalogue
thanks Martin Pearman, I test my code again and it work fine with setUseDataConnection(false) I think what was wrong that maybe I was trying to display an Overlay in a part of the map that is not downloaded –
Ducktail
© 2022 - 2024 — McMap. All rights reserved.