//创建缓冲区
var bufferLayer=new GraphicsLayer({id:'bufferLayer'});
function creatBuffer(lon,lat,distance,eventColor) {
var bufferPoint=new Point(lon,lat,new SpatialReference({wkid:4326}));
var bufferPolygon=geometryEngine.geodesicBuffer(bufferPoint,distance,"kilometers");
var bufferSymbol = new SimpleFillSymbol(
SimpleFillSymbol.STYLE_SOLID,
new SimpleLineSymbol(
SimpleLineSymbol.STYLE_SOLID,
new Color(eventColor), 2
),
new Color(eventColor)
);
var bufferGraphic=new Graphic(bufferPolygon,bufferSymbol);
bufferLayer.add(bufferGraphic);
map.addLayer(bufferLayer);
}
ArcGIS JS使用geodesicBuffer()创建缓冲区
最新推荐文章于 2024-02-25 20:58:56 发布