图层插队
/*
* 图层插队
* 参数1:要插队的图层layer
* 参数2:插队在谁之后图层的id
* 用法:that.StaticMap.LayerJump(layer,'id')
* */
function LayerJump(layer,fatherid) {
var that=this;
that.NewMap.getLayers().forEach(function (lyr,index) {
if (lyr.get('id')==fatherid) {
var layersArray = that.NewMap.getLayers();
layersArray.insertAt(index-1,layer);
}
});
}
浙公网安备 33010602011771号