-
Notifications
You must be signed in to change notification settings - Fork 91
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
Mapsforge: large query zoom levels have polygon artifacts #391
Conversation
Can you share an area to test that behavior before and after? |
Simply allow the MapFileTileSource to load up to Zoomlevel 20+ and then load some map. |
Coordinates (to avoid searching) ? 🙂 |
lat: 50.069218, lon: 8.719738 using the normal "hessen.map" from Mapsforge Download Server for example. The only changes I did to the mapsforge sample is allowing Zoomlevels up to 21. After applying my patch, the issue is gone. |
Thanks for the additional info, will review it. BTW any tile clip buffer probably should be based on dpi, like in MapDatabase. |
The issue with dpi based buffers is, that no dpi is known in gwt applications what can lead to render artifacts again. |
Library is platform agnostic, running on mobile and desktop, so should support all. We use dpi scaling (e.g. |
I know. Still it results in bad render quality on some browser plattforms, but feel free to change it and change the buffer to some dpi dependent value. |
Why? It's the ratio we use, not the actual dpi value. |
Exactly. It makes lines disappear and produces a lot of alias. But this is all totally off-topic. |
Cannot reproduce the case (even with tilt), what else is needed? Used mMap.viewport().setMaxZoomLevel(22);
mMap.setMapPosition(new MapPosition(50.069218, 8.719738, 1 << 21)); |
Nothing else. The effect is the strongest when you have some large polygons with highlighted boundaries... My screenshot is from a clean pull of the master branch with no changes... |
Still we need a test case. Cannot see anything strange at those coordinates. |
On the Samsung Galaxy S7 Edge it is really intense here: |
Very strange.. using the same map file and default theme, see nothing. mMap.viewport().setMaxZoomLevel(30);
mMap.setMapPosition(new MapPosition(50.0808835, 9.0028989, 1 << 21)); Where is the image position, is it the above? |
Did you allow the Maploader to generate Tiles to that degree, too? Otherwise it will simply not render the tiles in that zoomlevel and the issue does not appear, as I wrote earlier. You can enable the debugoverdraw in "VectorTileRenderer" and all tiles should be rendered in green. The position does not matter to much, it happens everywhere on the map.
|
No, of course not. Such information did not exist in issue description, so obviously hadn't all the required information for a proper testing. 🙁 BTW there is #231 about changing Mapsforge default settings, in most cases not needed since the tiles over zoom to max zoom of the map view and map files max base zoom is 14. |
And it is a completly different issue |
A test code is a thousand words. Now that the issue is more informative, can test what happens. |
Behavior seems Mapsforge specific, so if can handle it inside Mapsforge classes, to not break rest lib GL rendering. The buildings could cause the issue (as seen in urban areas), since commenting them here in In Mapsforge So pushed in issue_391 branch also an additional check for map file tile source max zoom that clips also the buildings and the render artifacts disappear. Additional work can be done in MapDatabase.setTileClipping optimizing the tile clip buffer for map files. |
That should also do it for the MapFileTileSource, but I am convinced that your assumption is wrong, and it does simply not effect other Tilesources because they do not deliver tiles on such a high zoom level, so the parent tiles are rendered. |
Each tile source has its own tile decoder and we can check each one when can be actually tested. |
Closing as handled inside Mapsforge classes. |
When trying to render large Polygons from Mapsforge Mapsource, the Polygons and their outlines got destroyed, due to coordinates that break the linits of the shortBuffer.
Clipping these coordinates does improve rendering performance a little and prevents rendering artifacts on high zoomlevels (18+ for me).