gpt4 book ai didi

ios - swift 在 googlemaps 图层上方添加图层

转载 作者:搜寻专家 更新时间:2023-10-31 22:21:27 25 4
gpt4 key购买 nike

我试图通过谷歌地图文档中的代码在谷歌地图上添加我自己的图层:

extension MapViewController {
func addTiles() {
// Implement GMSTileURLConstructor
// Returns a Tile based on the x,y,zoom coordinates, and the requested floor
let urls = { (x: UInt, y: UInt, zoom: UInt) -> NSURL in
let url = "http://example.pl/ras/\(zoom)/\(x),\(y).v\(1).png";

return NSURL(string: url)!
}

// Create the GMSTileLayer
let layer = GMSURLTileLayer(URLConstructor: urls)
layer.tileSize = 512
layer.map = mapView
}}

我得到了这样的东西:

enter image description here

我没有看到应该在我的图 block 下方的地形。我的瓷砖是透明的。您知道哪里出了问题吗?

更新:问题只发生在 iOS 模拟器上。它在真实设备上运行。

最佳答案

问题只发生在 iOS 模拟器上。它在真实设备上运行。

关于ios - swift 在 googlemaps 图层上方添加图层,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34986994/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com