- let clipPolygon = new Polygon(graphicson.geometry);
- let bufferPolygon = geometryEngine.buffer(clipPolygon, 50, "meters")
-
- console.log(clipPolygon)
- let graphic = new Graphic({
- geometry: bufferPolygon,
- symbol: {
- type: "simple-fill", // autocasts as new SimpleFillSymbol()
- color: [255, 255, 255, 1],
- style: "solid",
- outline: { // autocasts as new SimpleLineSymbol()
- color: "red",
- width: 2
- }
- }
- })
- console.log(graphic)
-
-
-
- let layer = new GraphicsLayer({
- blendMode: "destination-atop",
- title: "layer"
- });
- layer.add(graphic);
实现掩膜边界样式主要是设置blenmode为"destination-atop",并且设置graphic样式;注意图层加到最上层;