Android Question Offline maps (tiles) from georeferenced images

zava

Member
Hello,
totally new here, so excuse if I am asking something stupid.
After struggling with Android Studio + OSMDroid (with hardly a success and much frustration...), this B4X environment seems refreshingly simple! (You really can build an Android App designing YOUR code and not spending 99% of time trying to understand and manage lifecycle issues and gazillions nested functions?! Great!)

I'd now need to check if cvMap can replace OSMDroid for all my need (or maybe using some other available lib?); aside of basic functions (display OSM mapst etc), I'd specifically need:
- any chance to use offline maps made from georeferenced images (such as produced with Maptiles or similar?)
- any chance to display gpx (or other similar track format) tracks and waypoints?
- any specific tutorial or literature or book to learn to use this lib? (If "B4A for dummies" is not enough, I'd go for "B4x for Zava"...
Or, maybe: any BETTER way to do this, maybe using some more appropriate tool or lib?
Or, maybe, use (import? wrap?) OSMdroid directly? (but with it's gazillion undocumented methods, something simpler, b4X-style woule make me breathe more lightly! ;)

Thank you for any help!
 

zava

Member
A further (couple) question...
  • I appreciate that any piece of useful java code can be used in B4X by "wrapping"; as far as I understand, wrapping implies that somebody takes the original source and somehow cooks it up so that it's usable in B4X. While the operation may be relatively easy (for experienced users), I understand it is not "automatic" when source code later changes. Does this translate into having wrapped code that may lag far behind the original package's new releases?
    With the example of the wrapped OSMdroid package, it appears that the wrapped lib refers to V 3.0.8 while the original project, although frozen at Mar 2019, is at V 6.1.0
    Does this mean that any new version would require repeating the wrapping process anew?
  • I stumbled upon some thread mentioning a cvMap (similar to osmdroid), but then failed to find a repository with an organic doc, while this lib was apparently not listed among the B4X available libraries. Surely I am missing something... Where can I find it?
  • Do I understand correctly that lib packages in general do not have a "central" location where all (most up to date) lib+doc+samples are conserved, but all tutorials are spread across several forum threads? (I tried to figure by following warwound terrific work with ormdroid - awesome! but very dispersed and difficult to pick the latest update of code). Maybe simple if a "central" repository was made available for each package? (But it's probably just me, emerging from the 90ties C++ world...)

    Thanks anybody!
 
Upvote 0

Kevin Hartin

Active Member
Licensed User
I built my first Android app about 5 years ago using OSMdroid with offline maps and found it was quite flexible and easy to use. The only drawback that I can see is it does not work in iOS.

I would be happy to share my (messy) source if you IM me directly.

Kev
 
Upvote 0

zava

Member
Thank you Kevin Hartin, no doubt osmdroid was flexible 5 years ago, my point was that whatever improvement or new feature was added to OSMdroid in the past five years and several new releases is now missing unless some heroic volunteer did not wrap and make available the new version. It is hard to believe that osmdroid dvelopers didn't add significant improvements across some years and new releases.
I am concerned about this consequence deriving from a "manual" wrap mechanism that heavily relays on some individual's voluntary effort, which may never come for many reasons.
On the other hand, B4A's approach is so refreshingly simpler than my (small) experience with Android Studio, that I still may tolerate using "old" libraries in exchange of easier life...
I would be delighted to see a real app source code, so instructive for a beginner, thanks for your offer to share!
May I start by downloading your app from store to sse what it does?
Thank you!
 
Upvote 0

zava

Member
Hmm... dome some further investigations on OSMDroid library...
It appears that a slightly more recent version than V_3 was wrapped, namely V_4_1; this one seems barely mentioned in the forum and comes with just a couple of examples (one of which doesn't seem to run); older examples available for V_3 don't run either, due to several changes in names and whatever...

In the meanwhile, OSMDroid is at V_6

All in all, sounds like building a new project on an obsolete library, showing hardly a sign of being used/maintained since 2012... sounds spooky...

Is the situation the same for other B4X libraries?

Invested a couple of days investigating this opportunity with B4X...
Overall, great IDE, very attractive and effective, but codebase and echosystem seem less promising...

Hate to go back to a much more uncomfortable Android Studio...

Very difficult decision...

Thanks for any help or insight!
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Is the situation the same for other B4X libraries?
No. There are many libraries developed by many developers over the last 11 years. Some of them are still maintained and some aren't.

As a general rule, if it is not an internal library and it isn't listed in the libraries table (no online version in the IDE) then you should be careful with it.
 
Upvote 0

Magma

Expert
Licensed User
Longtime User
@zava If I was starting now a new project I would prefer GoogleMaps... OSMDroid was good but not like Google...

personal view: For the offline - if needed -> for specific areas (using a lot) i would make snapshots from Google or a Free Map (sorry google - small part of maps <--> i know that is not so right) and converting pixels to lat/lng or reverse... already did that at some of my projects... I think it is faster too !
caution may be this will only for personal use because of snapshot - i don't know if it is possible caching someway like Google Maps App doing.

The problem/(solution) with GPS - Maps is to find something that will always work... may be you must pay for some services - may be not...
 
Last edited:
Upvote 0

zava

Member
As a general rule, if it is not an internal library and it isn't listed in the libraries table (no online version in the IDE) then you should be careful with it.
Thank you @Erel ,
pls let me express my awe for the huge project you set up! Very rational and neat, really a breathe!
Thank you for the very frank reply, you are essentially confirming my concern.
Since I wish to set up a simple app based on displaying maps coming from my collection of historical maps from WWI, it appears that relying on wrapped osmdroid package is a bit too risky given the apparently "idle" condition of that package.
On the other hand, I haven't been able to find a more lively equivalent in the B4X environment, nor a native library supporting the same (maybe it was just me not seeing one? Corrections much appreciated!)
I am really reluctant to drop the B4X approach and return to AS, where each small step costed me days of investigation...

Thank you!
 
Upvote 0

zava

Member
@zava If I was starting now a new project I would prefer GoogleMaps... OSMDroid was good but not like Google...
Thank you @Magma, I hardly sympatize with google maps, partly due to their licensing policy and mainly because my area of interest is mostly in remote areas in the mountains, where WWI fortifications are installed, and google maps are basically just a featureless green expanse around there, while OSM and dreivates show all sorts of small paths.

My requirement is to display (offline) osm maps + offline custom tiles (from my historical maps) and be able to overlay itineraries to interesting fortifications that I surveyed (1000+ of them...) so that tourist can find them (to get the idea....) Not much more functionality, I am pretty sure OSMdroid can do it (much less sure I can do it... ;)

Thank you!
 
Upvote 0

Kevin Hartin

Active Member
Licensed User
@Kevin Hartin Thank you for your offer to share, how may I get in touch about this? (How do I IM you?! ?)
Hover over the username and start a conversation
1642361827439.png
 
Upvote 0
Top