New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android: Multiple MapView's apparently not supported? #194
Comments
Could be due to shared static data among the map views. If you want to provide a pull request example for Samples, in order to have it live and check it. |
As proposed in mapsforge#194
Set of screenshots done using the new sample just provided via PR: http://imgur.com/a/2b4TW |
I improved slightly the multi map example with separate preferences. |
MapView on Android uses GLSurfaceView. GLSurfaceViews can not overlap: |
Hi Andrey, you can use |
@andreynovikov thanks for the info. |
Hi guys, I made a working sample of fragments stack showing different mapviews (as previously said, using Any ideas ? Where can I find the possible shared data in order to debug ? |
Hi, Where mLabelLayer is a LabelLayer instance and mMap is a Map |
@ocsike where do you use those statements, have you managed to work with MultiMapActivity example? |
Yes, but is not perfect solution. Black labels are show when move or zoom the map, but not continuous and not all situation.
|
I tried your solution @ocsike but for me it's same with or without update()/clear() Do anyone have any idea of when this issue will be addressed ? |
@mathieudebrito doesn't the fragment example in samples work? |
@devemux86 Indeed, it works with a single fragment. But it's also very annoying when using a main map as first fragment, and use secondary maps in others fragments. At this time, the map is always messed up. NOTE: Because the map breaks out using fragment backstack, I'm forced to use another map libraries (osmdroid) for secondary maps |
I'll try to solve. But cannot give any promises. |
There is MultiMapViewActivity sample to play. It never got any traction due to small interest and as any solution must not affect rest library functionality. |
As Note: I noticed that make |
Indeed, one feature can never justify such huge intervention and the possible negative outcome. |
Not supported by library. |
Hi @devemux86 ! Sorry for the question, but I just want to clarify : Is this a "Not supported by library for now" or a "will Not be supported by library" ? thank you ! |
"Not supported by library", the future is unknown... It remains open source, but if changes are so huge, then like mentioned above: "one feature can never justify such huge intervention and the possible negative outcome" |
Hello @Gustl22, could you provide some context or background regarding what variables need to be synchronized, and whats the root cause in laymen's term? Would like to spend some personal time here to help solve this issue |
Hi @vvavepacket, like @devemux86 mentioned the main reason is that library uses static variables (especially the GLState and some Pools, and may TileData) which is shared between multiple map instances but accessing the same indices. I came to the conclusion, that it's very hard to find all shared (static) resources and properly separate them for each map view (uploaded my attempt here, which I wouldn't recommend). You may have luck if you synchronize the Sorry haven't worked on VTM for a while to give you more insight. Unfortunately I'm busy with other projects, so can't afford much time for this issue. Maybe there's an easier proper solution, too, which I overlooked. Hope you can continue with these infos. |
I see various issues when having multiple MapView's on Android at the same time:
Is it intended to support multiple map views at the same time?
The text was updated successfully, but these errors were encountered: