[英]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.