iOS 和 Android Google 地图 SDK 之间的缩放不一致
我们正在开发适用于 IOS 和 Android 平台的导航应用程序。
在 IOS 上,我通过 mapView.setMinZoom(4, maxZoom: 16)
限制地图缩放级别。为了加载地图图块,我使用 GMSSyncTileLayer,因为图块存储在本地。我发现奇怪的是,在函数 tileFor(x: UInt, y: UInt, Zoom: UInt)
中,我得到的缩放级别为 5 ... 17,与我设置的允许缩放范围相比,它偏移了 1 (4 ... 16)。
在 Android 上,我通过以下方式限制地图缩放级别
map.setMinZoomPreference(4)
map.setMaxZoomPreference(16)
要加载地图图块,我使用 TileProvider 加载自定义地图图块。然而,在 TileProvider 的函数 getTile(x: Int, y: Int, Zoom: Int): Tile?
中,我得到了与 IOS 版本的应用程序相反的正确缩放级别范围(4 ... 16) 。
我相信 TileProvider 和 GMSSyncTileLayer 在功能上是类似的。谁能解释一下为什么我会得到不同的缩放级别范围?
提前致谢 :)
We are developing navigation app for both IOS and Android platforms.
On IOS I restrict map zoom levels by mapView.setMinZoom(4, maxZoom: 16)
. To load map tiles I use GMSSyncTileLayer as tiles are stored locally. What I found weird that in function tileFor(x: UInt, y: UInt, zoom: UInt)
I get zoom levels 5 ... 17 which is offsetted by 1 comparing to range of allowed zooms I set (4 ... 16).
On Android I restrict map zoom levels by
map.setMinZoomPreference(4)
map.setMaxZoomPreference(16)
To load map tiles I use TileProvider to load custom map tiles. In TileProvider's function getTile(x: Int, y: Int, zoom: Int): Tile?
, however, I get correct range of zoom levels (4 ... 16) opposing to IOS version of app.
I believed that TileProvider and GMSSyncTileLayer are analogous functionality wise. Can anyone explain me why I get different zoom level range?
Thanks in advance :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论