javascript - 如何确定 HERE 中的地图类型(例如普通、卫星)?
问题描述
我需要确定当前的地图类型(普通、卫星)。在 Bing 中,这就像 map.getMapTypeId() 一样简单。
解决方案
要获取地图类型,我们可以使用getBaseLayer
应该返回具有type_name
如下属性的对象的方法:
map.getBaseLayer().type_name; // normal, satellite
可以在此处找到文档https://developer.here.com/documentation/maps/3.1.22.1/api_reference/H.Map.html#getBaseLayer。
推荐阅读
- monitoring - 使用 kubernetes 堆栈部署 prometheus operator 后未创建 Prometheus statefulset
- assembly - ARM M4-F 上用于从浮点转换为定点的 VCVT 指令无法识别
- ruby - 使用来自 sh 脚本文件的 erb 文件中的变量
- c# - 如何从outlook c#中的特定文件夹获取邮件
- python - 使用 tabpy 预测性别计数的结果
- java - 如何将一个活动的输入输入到另一个活动的回收视图中?
- angularjs - 使用 Vue 3 和 Razor 页面作为模板:数据传入/传出
- mongodb - 有没有办法为 mongoDB 集合设置 post hooks?
- php - Laravel:如何在 laravel 中显示从项目存储到另一个项目的图像
- flutter - 尝试直接从 FLUTTER 发出呼叫:MissingPluginException(未找到方法 callNumber 的实现