Angular 这里映射JS API 3.1-样式组的错误';无碰撞';棱角分明
在加载带有卫星基础层的HERE地图时,有时会出现以下错误:Angular 这里映射JS API 3.1-样式组的错误';无碰撞';棱角分明,angular,typescript,here-api,tangram,Angular,Typescript,Here Api,Tangram,在加载带有卫星基础层的HERE地图时,有时会出现以下错误: Tangram [error]: Error for style group 'non-collision' for tile 13/16/15542/12554/15 Cannot read property 'retain' of undefined: TypeError: Cannot read property 'retain' of undefined at https://js.api.here.com/v3
Tangram [error]: Error for style group 'non-collision' for tile 13/16/15542/12554/15 Cannot read property 'retain' of undefined: TypeError: Cannot read property 'retain' of undefined
at https://js.api.here.com/v3/3.1/mapsjs-core.js:377:259708
at Array.forEach (<anonymous>)
at https://js.api.here.com/v3/3.1/mapsjs-core.js:377:259679
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (http://localhost:4200/polyfills.js:3508:26)
at Object.onInvoke (http://localhost:4200/vendor.js:64284:33)
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (http://localhost:4200/polyfills.js:3507:52)
at Zone.push../node_modules/zone.js/dist/zone.js.Zone.run (http://localhost:4200/polyfills.js:3267:43)
at http://localhost:4200/polyfills.js:4006:34
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (http://localhost:4200/polyfills.js:3540:31)
at Object.onInvokeTask (http://localhost:4200/vendor.js:64275:33)
如何在satellite view中加载地图而不抛出此错误?此行为的一个可能问题可能是加载网页后加载了一些JS库。如果稍后在代码中添加卫星层有更好的响应,请尝试
// default map base layer
var map = new H.Map(document.getElementById('mapContainer'),
defaultLayers.vector.normal.map,{
center: {lat:52.5160, lng:13.3779},
zoom: 13
});
// set base layer later
map.setBaseLayer(defaultLayers.raster.satellite.map);
该行为的一个可能问题可能是加载网页后加载了一些JS库。如果稍后在代码中添加卫星层有更好的响应,请尝试
// default map base layer
var map = new H.Map(document.getElementById('mapContainer'),
defaultLayers.vector.normal.map,{
center: {lat:52.5160, lng:13.3779},
zoom: 13
});
// set base layer later
map.setBaseLayer(defaultLayers.raster.satellite.map);
这听起来确实像一个bug,因为据我所知,这个属性永远不会丢失。但是为了调试,有一个工作示例将非常有用。你能不能用JSFiddle或其他任何方便的方式提供它听起来确实像一个bug,因为据我所知,这个属性永远不会丢失。但是为了调试,有一个工作示例将非常有用。你能不能以方便的方式提供