-
Notifications
You must be signed in to change notification settings - Fork 989
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
Pathoverlay does not work with 512x512 tiles. #13
Comments
- This does solve all your problems when using tiles with a size of 512px for example in combination with Overlays and more.
Issue #13 - Pathoverlay does not work with 512x512 tiles.
Fixed in commit 22677d6 |
I think 22677d6 is a bad idea and it will crash. If we start to use longs in MapSize() that means we support a much larger map size - one that Android's canvas does not support since it uses integers for its coordinate system. I suspect that this will break if you zoom in far and travel to the edges of the map. Also it doesn't compile with Java 8 since it appears that implicit conversions from long to int are errors now (I think that's what is happening to me). |
What should we do instead? Argument check to prevent tiles larger than 256? |
I think I need to take some time to reproduce and explore the problem more, but calling TileSystem.setTileSize(512) might be all that is needed. Can OP try that and confirm? I think most people are interested in scaling the tiles to the device's dpi which is why they are doing this (it has been proposed as a sort-of-working solution for that). Maybe that's the real problem to solve. |
I agree! Tiles are too small on high dpi devices like Nexus 5 and posted workaround: |
Please take a look at #81 where we have a potential solution ready for testing. |
- The issue is already solved, but to hold it consistent, the problem even has to be solved in the TileSystem wrapper class of osmdroid. Now it is alright.
I have merged the fix_dpi_scaling branch. Call |
I am trying to use
public static final OnlineTileSourceBase MAPNIK = new XYTileSource("Mapnik",
ResourceProxy.string.mapnik, 0, 18, 512, ".png", "http://tile.openstreetmap.org/");
but it seem with 512x512 size tiles.
1.Pathoverlay does not appear with 512x512 tiles.Its working fine with 256x256 though.
2. myLocationoverlay is not visible
3. if i am setting setScrollableAreaLimit it does not show any of tiles at all.
4. itemizedoverlays can be drawn.
@kurtzmarc @neilboyd any workaround??
The text was updated successfully, but these errors were encountered: