ios - 如何在 iOS 中通过 HereMap SDK 使用 `extrudedBuildingsVisible` 属性
问题描述
我正在使用适用于 iOS 的 here-SDK 实现 3d 地图(建筑物视图),但我找不到实现此目的的方法。我已经看到了适用于 Android 的 HERE Maps 3D 建筑物的工作,但它不适用于 iOS
我跟着这个链接
这是我的示例代码
func mapSetup() {
// Setup map viewx
self.mapView.positionIndicator.isAccuracyIndicatorVisible = true
self.mapView.positionIndicator.type = .current
self.mapView.positionIndicator.isVisible = true
self.mapView.extrudedBuildingsVisible = true
self.mapView.landmarksVisible = true
self.mapView.alpha = 1
self.mapView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
self.mapView.translatesAutoresizingMaskIntoConstraints = false
self.mapView.padding = UIEdgeInsets.init(top: 15, left: 15, bottom: 15, right: 15)
self.mapView.zoomLevel = 0
self.navigationManager.delegate = self
self.mapView.gestureDelegate = self
}
问题:
如何在 iOS 中实现 3d 地图(建筑物视图)?
谢谢
解决方案
如果没有指定倾斜,地图必须看起来平坦。
这就是我通过以下代码得到的
let geoCoordCenter = NMAGeoCoordinates(latitude: 49.260327, longitude: -123.115025)
self.mapView.set(geoCenter: geoCoordCenter, animation: .none)
self.mapView.positionIndicator.isAccuracyIndicatorVisible = true
self.mapView.positionIndicator.type = .current
self.mapView.positionIndicator.isVisible = true
self.mapView.extrudedBuildingsVisible = true
self.mapView.landmarksVisible = true
self.mapView.alpha = 1
self.mapView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
self.mapView.translatesAutoresizingMaskIntoConstraints = false
self.mapView.padding = UIEdgeInsets.init(top: 15, left: 15, bottom: 15, right: 15)
self.mapView.zoomLevel = 19
self.mapView.tilt = self.mapView.maximumTilt(atZoomLevel: 19)
罗马:
巴黎:
推荐阅读
- microsoft-graph-api - 列出在 Microsoft Graph 中有直接下属的用户
- python - 使用 Tensorflow2 组合并返回多个数据集
- python - 硒的 ModuleNotFoundError
- python - 按值和按引用数据类型的问题
- amazon-dynamodb - 如何在不指定 gsi 键的情况下创建 dynamo db 项目
- c++ - 何时考虑对不合格的从属名称进行 ADL 查找?
- tensorflow - 我在这个没有预定义输出类的神经网络中使用哪个激活函数?
- javascript - 电子渲染器进程:我什么时候应该清理 IPC 监听器
- mypy - 为什么 NeoVim、Coc、Jedi、Mypy、... 生成 some_name.py.[git hash].py 文件?
- python-3.x - 如何使用 python 删除 selenium 中的只读属性?