问题描述
我使用OSMdroid实现地图应用程序。
I'm using OSMdroid to implement a mapping application.
我已经实现了使用瓷砖源,使缩放级别高达22自定义MapTileProvider。
I have implemented a custom MapTileProvider that uses a tile source that allows zoom levels up to 22.
默认Mapnik的供应商只允许缩放到18级。
The default MAPNIK provider only allows zooms to level 18.
问题是,任何PathOverlay情况下完美地画,直到缩放级别19,但随后
不缩放级别为20-22正确绘制。它看起来像一个人的抹掉了用橡皮擦路径在路径长度的90%(见下面的截图)。
The problem is that any PathOverlay instances draw perfectly until zoom level 19, but thenare not drawn properly at zoom level 20-22. it looks like someone's rubbed out the path with an eraser over 90% of the path length (see screenshots below).
我已经通过PathOverlay的拉伸()方法台阶和exerything的似乎的被正确计算(中间点显示校正缩放级别22,然后在XY突起22-缩放级别分割获得当前的屏幕坐标)。
I've stepped through the draw() method of PathOverlay and exerything seems to be calculating correctly (the intermediate points appear correct for ZoomLevel 22, and then the XY projections are dividing by 22-ZoomLevel to get current screen coordinates).
任何人都可以提供一些洞察力的问题是什么,以及如何解决它?
Can anyone provide some insight as to what the problem is, and how to resolve it?
同样的事情发生,如果我用调用小Cloudmade瓷砖的MapView,这使得放大,直到20级,是一个'内置'osmDroid瓷砖供应商类。
The same thing happens if I invoke the MapView using Cloudmade small tiles, which allows zooms up until level 20 and is a 'built-in' osmDroid tile provider class.
//mMapTileProvider = new HighResMapTileProvider(this);
mMapTileProvider = new MapTileProviderBasic(this,TileSourceFactory.CLOUDMADESMALLTILES);
mMapView = new MapView(this, 256, mResourceProxy,mMapTileProvider);
所以,问题不出现以与瓦片源或提供商但与帆布拉伸法。关于如何解决这个任何想法?
So the problem does not appear to be with the tile source or provider but with the canvas drawing method. Any ideas on how to resolve this?
当zoomLevel 19,我可以很好地看到我的路径:
At zoomLevel 19 I can see my paths nicely:
但这里是,在接下来的缩放级别相同的路径:
But here is that same path at the next zoom level:
推荐答案
的变通方法。
I will update the osmdroid ticket with some possible workarounds.
这篇关于OSMDroid PathOverlay绘图高缩放级别的损坏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!