cesium多边形描边_Cesium实现⽂字、点、多段线、多边形的
实时绘制
functiondrawPolygon() {varfloatingPoint;varactivePolygon;var handler =
newCesium.ScreenSpaceEventHandler(viewer.canvas);微服务前端框架有哪些
handler.setInputAction(function(click) {var position
=viewer.scene.pickPosition(click.position);if(Cesium.defined(location.cartesian)){var cartesian
=location.cartesian;if(activeShapePoints.length === 0){
floatingPoint=creatPoint(cartesian);
activeShapePoints.push(cartesian);var dynamicPositions = new Cesium.CallbackProperty(function() {returnactiveShapePoints;
},false);
activePolygon=createPolygon(dynamicPositions);
}
activeShapePoints.push(cartesian);
creatPoint(cartesian);
}
},Cesium.ScreenSpaceEventType.LEFT_CLICK);
handler.setInputAction(function(movement) {if(Cesium.defined(floatingPoint)){if(Cesium.dPosition)){
floatingPoint.position.dPosition);
activeShapePoints.pop();
activeShapePoints.dPosition);
}
}
大数据应用在哪些方面},Cesium.ScreenSpaceEventType.MOUSE_MOVE);文字转xml代码软件手机版
handler.setInputAction(function(movement) {
handler.destroy();for(var i=0;i
主数据管理系统
}
Points=[];
},Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK);functioncreatePolygon(positionData) {varpolygon;
ities.add({
name:'polygon',
lable的for属性表示positions : positionData,
polygon:{
hierarchy : positionData,position和location的区别
perPositionHeight:true,
material: Cesium.Color.RED.withAlpha(0.7), outline:true,
outlineColor: Cesium.Color.YELLOW.withAlpha(1) }
});returnpolygon;
}
}
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论