Open Lineflyer opened 4 years ago
duplicate to #15
Lars, you must be overworked, the duplicate was also created by you. You are right that this is important though.
Lars, you must be overworked, the duplicate was also created by you. You are right that this is important though.
Mmh..just trying not to forget something....and too lazy to check if I already forgot, that I did not forget it ;) Lets take the newer one as I was more specific here.
I have read somewhere over here, that it is difficult to upgrade the support. But ..just asking: To me it looks like the original author just took 1:1 the mapsforge engine code and pasted it in here. It really looks like two seperate apps in the UI. Can't we do the same approach for the newer code base (at least in a first step)?
Can't we just use the c:geo code for displaying the map itself? I didn't have a look at the code but that seems not unreasonable to me.
This is the boilerplate code from the official library
Just FYI: since I recently stepped into mapsforge (for Map Theme migration for SAF, see https://github.com/cgeo/cgeo/issues/9607, https://github.com/mapsforge/mapsforge/pull/1186 and https://github.com/cgeo/WhereYouGo/issues/250) and had some hours to spare this afternoon, I started upgrading mapsforge to 0.14.
I am in the middle of this, my code does currently not compile and I have to stop for today. Let's see when I find time to continue...
Time did not permit working on this this weekend again I am afraid. I am assigning this to me for now, but if anyone wants to step in feel free to do so.
While migrating WhereYouGo to newer version I discovered some very special map options in WhereYouGo which I don't know from c:geo and which at least partly seem not to be available any more (esp the "Developer options"). Is it mandatory that those options are still available?
I did some tests with cache persistence some time after WhereYouGo was switched to cgeo. My result (or impression?) was that this did not work (or I was wrong in using this options?). But nevertheless, we should migrate to MF > 3 and then make WYG work. A persistent caching function would be imho interesting also for c:geo. :-)
I did some tests with cache persistence some time after WhereYouGo was switched to cgeo. My result (or impression?) was that this did not work (or I was wrong in using this options?). But nevertheless, we should migrate to MF > 3 and then make WYG work. A persistent caching function would be imho interesting also for c:geo. :-)
Hi @bekuno, I assume you refer to the two "Karten-cache Einstellungen"? I can look into this, my impression was that the caching system was chaned in mapsforge somewhere between 0.3 and 0.15...
Do you know whether the other settings ("Entwicklungseinstellungen") are still necessary? I have the impression that at least some of them are referring to "DebugSettings" of mapsforce which probably don't exist any more in this form.
Hi @bekuno, I assume you refer to the two "Karten-cache Einstellungen"? I can look into this, my impression was that the caching system was chaned in mapsforge somewhere between 0.3 and 0.15...
Yes, I meant it.
Do you know whether the other settings ("Entwicklungseinstellungen") are still necessary? I have the impression that at least some of them are referring to "DebugSettings" of mapsforce which probably don't exist any more in this form.
I never tested this. As these are only named as "developer settings" you should ignore them.
Hi all,
any progress here?
Cgeo is downloading offline maps in v5, which couldn't be used within whereyougo.
The implementated offline map typ is as well not the best one.
Could you adopt the Google maps access from cgeo to wyg?
Cheers,
While working on this, I realized that this task would largely have to duplicate efforts already done for c:geo map viewer while in the end it would still result in a map viewer feature set much less rich than the one in c:geo. This does not make sense to me.
I propose a discussion whether and how it makes sense to keep WhereYouGo map viewer as separate implementation from c:geo in the future. I will for now stop working on this task. Upon conclusion of discussion, it might be reevaluated how to proceed here.
What is the current state on this ticket? Is anybody working on it? Is it planned to integrate the new mapsforge version or like @eddiemuc mentioned to focus on the integration in c:geo map viewer?
This topic was discussed a while ago. I suggested at the time to integrate WhereYouGo into c:geo (like in GeeohGo) but this had no majority behind it back then.
Other two possibilities would be to:
As far as I know there's no decision about this yet, also no volunteer to implement either of it.
Correct as @eddiemuc posted it.
I am asking myself: The current mapsforge implementation in WhereYouGo somehow looks like some "default" 1to1 copied from Mapsforge. Can that be the case? If yes, I am wondering whether this just can be updated from where it came?
Given the fact, that I do not expect spectacular feature bumps in WheriGo I guess functionwise there is not much custom stuff needed in future.
@Lineflyer it doesn't seem to me that the WhereYouGo implementation is copied from Mapsforge or at least it must have changed at lot.
I updated the mapsforge version to the current version 0.17.0 to see what incompatibilities occur. It seems to me that Overlays are handled differently and there are many differences in the MapsforgeActivity because the Mapsforge MapActivity is not available any more.
For me, having no experience with Mapsforge lib, it is quite difficult to figure out what has changed in Mapsforge since no documentation is provided.
Does anybody have any idea how I could refactor it without having to guess what I have to do? I thought about looking at the changes made in c:geo but this implementation is probably too different from the WhereYouGo Mapsforge implementation.
subscribe
Since my parents and friends annoyed me enough that WhereYouGo is broken I will give this a try. Depending on the willingness of the main maintainers I would be open to do it in a way that would improve their willingness to merge the PR quicker.
Edit: To improve the file choosing experience would it maybe make more sense to first do #309?
First problem: We use https://github.com/jspricke/mapsforge-map-whereyougo/tree/master as a dependency and it didn't receive any updates since back then... As such someone - aka me - needs to replace not only the Mapsforge implementation but also the functionality that this library provided.
@SchoolGuy Please do not try to work on the super old maspforge library. Also a switch to the latest maspforge library would probaly be a complete rework. Instead I suggest to switch to the mapsforge vtm (https://github.com/mapsforge/vtm) library. Currently we implement this in c:geo. Please have a look there. You should contact the developer there, if you will start to work on the WhereYouGo implementation.
@bekuno Thanks for the pointers. I will try to do so. It will take me a very good while to do all this but I am certain I want to start and finish this. As such please assign me to this issue if you can.
Edit: I expect to start a WIP PR by end of next week. It will not be usable but it should enable you to monitor my progress. As always cleaning the Git history will be done right before it is ready for review.
@bekuno Is it acceptable to remove the functionality of taking screenshots? Mapsforge seems to have/had support for this and oscim
doesn't seem to have support for this. The functionality seems also not to be present in c:geo.
Please start implementing VTM as additional map provider here:
Then go step by step. Maybe it is ok to not implement the snapshot functionality. The first goal is the function to play the game. You should create a roadmap to this goal.
@bekuno That won't be possible due to the overlap of:
com.github.jspricke.mapsforge-map-whereyougo:mapsforge-map
org.mapsforge:mapsforge-map:0.19.0
Edit: Error message can be expanded below.
That won't be possible due to the overlap of:
* `com.github.jspricke.mapsforge-map-whereyougo:mapsforge-map` * `org.mapsforge:mapsforge-map:0.19.0`
Correct. One more plus point to use VTM instead:
org.mapsforge:vtm:0.19.0
@bekuno I now see my error. I tried copying the mapsforge dependencies over as well since I wanted to align to cgeo but they are actually not needed to get vtm work. In that case I can progress tomorrow some more.
@SchoolGuy I really appreciate your efforts to bring WhereYouGo to an up-to-date map implementation, thanks for your willingness.
Before you start to deep-dive into it, may I drop a different idea? We had discussed on how to modernize WhereYouGo several times in the c:geo team, but did not come to a final conclusion, available time (or lack of) being one of the main reasons. Having to maintain two apps with completely different architectures is quite a burden for such a small team. So the proposal was born to integrate Whereigo functionality into c:geo (see https://github.com/cgeo/cgeo/issues/10087), probably based on the new VTM map already available "under the hood" (though not yet feature complete for geocaching). It's probably the same effort as implementing a recent version of Mapsforge or VTM in WhereYouGo, and you would get SAF "for free".
Just an idea. If you'd rather follow the path within WhereYouGo, that'd be fine as well, it's up to you.
Again, thanks for your efforts, highly appreciated!
@moving-bits I think this is a viable option in theory. If this happens I would be willing to be named as maintainer for the WhereYouGo part in the Codeowners file, so you have a default assignee for issues. Maintaining a whole app is not possible but just the WhereYouGo part inside of c:geo would be fine to me.
However, as you said the app structure is completely different. I will try to create a PoC instead of implementing VTM inside WhereYouGo for a while. If it works I will open a Draft PR in c:geo for this. If not I will comment my findings on the mentioned issue and link my work in mentioned comment.
That's great news, thanks for considering it.
Our VTM implementation is part of the new so-called UnifiedMap
, which is already part of current releases of c:geo, but not visible on the UI.
~To make UnifiedMap
visible on the UI, go to settings => system => view settings and create a new setting labelled showUnifiedMap
with preference type boolean
and value true
. A new button should then appear on c:geo's homescreen, by which you can enter UnifiedMap
without changing the used map implementation for other parts of the app.~
(No longer necessary for nightly versions of c:geo starting mid of December 2023)
For more info on UnifiedMap
see our Wiki page on UnifiedMap
and the Project for UnifiedMap
.
@Lineflyer Worked like a charm. Since vacation is starting I will open a PR after my holiday. Sadly, I won't be able to work during vacation, as mobile service will not be available where I will be going.
First problem: We use https://github.com/jspricke/mapsforge-map-whereyougo/tree/master as a dependency and it didn't receive any updates since back then... As such someone - aka me - needs to replace not only the Mapsforge implementation but also the functionality that this library provided.
To give some background here: I created that fork in 2016 to integrate WhereYouGo into F-Droid and have no intent to develop it further. Back then this was only available as a binary .jar in the WhereYouGo repository. As F-Droid requires the source code, I recovered it. See also https://github.com/biylda/WhereYouGo/issues/10
Hi @SchoolGuy, we just activated UnifiedMap as our default map in c:geo's nightly versions this week, which brings me back to this issue. Did you find time to play a bit with VTM / UnifiedMap in c:geo? Are there any questions with which we might help you in the context of WhereYouGo / UnifiedMap? Thanks for your efforts!
Just for documentation (and to avoid doubled work):
@eddiemuc has started an integration of WhereYouGo functionality into c:geo, see https://github.com/cgeo/cgeo/issues/10087 and PRs listed there. This would not only solve this issue of newer Mapsforge versions (by supporting Mapsforge/VTM and Google Maps as base), but also resolve #309 implicitly, as c:geo already supports SAF.
Currently WhereYouGo does only support maps of version 0.3.
Mapsforge stopped updating the v3 maps on their server in 2018. Most other provider of compatible maps also do not longer offer v3 maps.
In order to keep the offline map feature usable (and BTW also use the same map as for c:geo) a support of newer mapsforge versions is needed.