基库是一个角js。
我正试图用mapael.js绘制一张地图
但是,它不是用错误创建的。
库版本:jQuery1.11.3,角1.5,jquery.mapael 2.0.0
错误消息:映射类map不存在
html
<div id="MapSearchResultPlot" class="div-theme" style="height: 450px; width: 100px; align: center;">
<div id="ChildMap" class="map">
</div>
</div>javascript
var $world = $("#MapSearchResultPlot");
$world.mapael({
map: {
//name: "usa_states",
name: "world_countries",
zoom: {
enabled: true
,maxLevel: 10
,init: {
latitude: 40.717079,
longitude: -74.00116,
level: 0
//level: 10
}
},
defaultPlot: {
type: 'circle' //'square','circle'
,size:10
,attrs: {fill: "#ff5454"}
}
},
plots: {
}
});发布于 2017-11-20 08:52:42
现在可能太晚了,但我发了这个帖子,因为我也收到了这个错误。
您的html必须如下所示:
<div class="mapcontainer">
<div class="map">
<span>Alternative content for the map</span>
</div>
</div>https://stackoverflow.com/questions/42622191
复制相似问题