简体   繁体   English

如何确定 HERE 中的 map 类型(例如正常、卫星)?

[英]How do I determine the map type (e.g. normal, satellite) in HERE?

I am need to determine the current map type (normal, satellite).我需要确定当前的 map 类型(正常,卫星)。 In Bing, this was as simple as map.getMapTypeId().在 Bing 中,这就像 map.getMapTypeId() 一样简单。

To get map type we can use getBaseLayer method which should return object with type_name property like this:要获取 map 类型,我们可以使用getBaseLayer方法,该方法应返回 object 和type_name属性,如下所示:

map.getBaseLayer().type_name; // normal, satellite

Docs can be found here https://developer.here.com/documentation/maps/3.1.22.1/api_reference/H.Map.html#getBaseLayer .可以在此处找到文档https://developer.here.com/documentation/maps/3.1.22.1/api_reference/H.Map.html#getBaseLayer

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将卫星轨道添加到WebGLEarth地图(例如Leafletjs或Cesiumjs) - Add satellite track to WebGLEarth map (with e.g. Leafletjs or Cesiumjs) Google Maps API-如何获取地图类型常量名称(G_NORMAL_MAP,G_SATELLITE_MAP…)? - Google Maps API - How to get map type constant name (G_NORMAL_MAP, G_SATELLITE_MAP…)? 如何对 SQL 查询进行排序,但将某些 UTF-8 字符排序为正常等效字符? (例如É被视为E等) - How can I sort an SQL query but have certain UTF-8 characters be ordered as their normal equivalent? (e.g. É be regarded as E etc) 如何将文本标签附加到一个svg,例如“id = 50”的svg标签? - How do I append the text tag to just one svg e.g. svg tag with “id=50”? 如何在Javascript中打印罗马语(例如西班牙语)/特殊字符? - How do I print roman languages (e.g. Spanish) /special characters in Javascript? 如何计算给定大块(例如 5GB)的摘要? - How do I compute a digest for a given blob in big size, e.g. 5GB? 如何实现实时更新预览(例如 Stack Overflow 帖子)? - How do I implement a live-updating preview (e.g. Stack Overflow posts)? 如何将时间字符串(例如“8:02 AM”)转换为可排序字段 - How do I convert a time string (e.g. "8:02 AM") to a sortable field Javascript - 如何在方法中获取/设置? (例如 pineapple.is_a.fruit) - Javascript - How do I have a get/set in a method? (e.g. pineapple.is_a.fruit) 如何通过某个值获取 Map 密钥? 例如 Map.prototype.get -> key by the minimum value - How Can I get the Map key by a certain value? E.g. Map.prototype.get -> key by the lowest value
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM