Hi,
I want to know how to program to implment a feature same as "Layer Effects" in ArcGIS pro as the picture shown below?
I probably need the Extention effect in my product.
Can anyone help please?
Thanks.
Solved! Go to Solution.
There are currently no public API types for working with Symbol Layer Effects (they're on the future roadmap), but it looks like you have ArcGIS Pro therefore in the short-medium term you can...
Code example:
string drawingInfoJson = "{ \"type\":\"simple\",\"symbol\":{ \"type\":\"CIMSymbolReference\",\"symbol\":{ \"type\":\"CIMPointSymbol\",\"haloSize\":1,\"scaleX\":1,\"angleAlignment\":\"Display\",\"symbolLayers\":[{ \"type\":\"CIMVectorMarker\",\"effects\":[{ \"type\":\"CIMGeometricEffectCircularSector\",\"endAngle\":45,\"radius\":30}],\"enable\":true,\"anchorPoint\":{ \"x\":0,\"y\":0,\"z\":-0.5},\"anchorPointUnits\":\"Relative\",\"dominantSizeAxis3D\":\"Z\",\"size\":30,\"billboardMode3D\":\"FaceNearPlane\",\"markerPlacement\":{ \"type\":\"CIMMarkerPlacementInsidePolygon\",\"gridType\":\"Fixed\",\"seed\":13,\"stepX\":15,\"stepY\":15,\"clipping\":\"ClipAtBoundary\",\"stdDeviationX\":7.5,\"stdDeviationY\":7.5},\"frame\":{ \"xmin\":-2.0,\"ymin\":-2.0,\"xmax\":2.0,\"ymax\":2.0},\"markerGraphics\":[{ \"type\":\"CIMMarkerGraphic\",\"geometry\":{ \"rings\":[[[0.0,2.0],[0.35,1.97],[0.68,1.88],[1.0,1.73],[1.29,1.53],[1.53,1.29],[1.73,1.0],[1.88,0.68],[1.97,0.35],[2.0,0.0],[1.97,-0.35],[1.88,-0.68],[1.73,-1.0],[1.53,-1.29],[1.29,-1.53],[1.0,-1.73],[0.68,-1.88],[0.35,-1.97],[0.0,-2.0],[-0.35,-1.97],[-0.68,-1.88],[-1.0,-1.73],[-1.29,-1.53],[-1.53,-1.29],[-1.73,-1.0],[-1.88,-0.68],[-1.97,-0.35],[-2.0,-0.0],[-1.97,0.35],[-1.88,0.68],[-1.73,1.0],[-1.53,1.29],[-1.29,1.53],[-1.0,1.73],[-0.68,1.88],[-0.35,1.97],[0.0,2.0]]]},\"symbol\":{ \"type\":\"CIMPolygonSymbol\",\"symbolLayers\":[{ \"type\":\"CIMSolidStroke\",\"enable\":true,\"capStyle\":\"Round\",\"joinStyle\":\"Round\",\"lineStyle3D\":\"Strip\",\"miterLimit\":10,\"width\":0,\"color\":[0,0,0,0]},{ \"type\":\"CIMSolidFill\",\"enable\":true,\"color\":[138,73,50,255]}]} }],\"scaleSymbolsProportionally\":true,\"respectFrame\":true}]} } }";
GraphicsOverlay graphicsOverlay = new GraphicsOverlay();
graphicsOverlay.Renderer = Renderer.FromJson(drawingInfoJson);
Graphic graphic = new Graphic(new MapPoint(0, 0, 0, SpatialReferences.Wgs84));
graphicsOverlay.Graphics.Add(graphic);
mapView.GraphicsOverlays.Add(graphicsOverlay);
You could go further too... and create a C# class for the JSON then export that to JSON and use in conjunction with the Renderer.FromJson method.
Are you trying to implement a custom effect beyond the out-of-the-box symbol layer effects?
Use symbol effects—ArcGIS Pro | Documentation
Thanks for reply..
I want to do it with arcgisruntime.net wpf.
There are currently no public API types for working with Symbol Layer Effects (they're on the future roadmap), but it looks like you have ArcGIS Pro therefore in the short-medium term you can...
Code example:
string drawingInfoJson = "{ \"type\":\"simple\",\"symbol\":{ \"type\":\"CIMSymbolReference\",\"symbol\":{ \"type\":\"CIMPointSymbol\",\"haloSize\":1,\"scaleX\":1,\"angleAlignment\":\"Display\",\"symbolLayers\":[{ \"type\":\"CIMVectorMarker\",\"effects\":[{ \"type\":\"CIMGeometricEffectCircularSector\",\"endAngle\":45,\"radius\":30}],\"enable\":true,\"anchorPoint\":{ \"x\":0,\"y\":0,\"z\":-0.5},\"anchorPointUnits\":\"Relative\",\"dominantSizeAxis3D\":\"Z\",\"size\":30,\"billboardMode3D\":\"FaceNearPlane\",\"markerPlacement\":{ \"type\":\"CIMMarkerPlacementInsidePolygon\",\"gridType\":\"Fixed\",\"seed\":13,\"stepX\":15,\"stepY\":15,\"clipping\":\"ClipAtBoundary\",\"stdDeviationX\":7.5,\"stdDeviationY\":7.5},\"frame\":{ \"xmin\":-2.0,\"ymin\":-2.0,\"xmax\":2.0,\"ymax\":2.0},\"markerGraphics\":[{ \"type\":\"CIMMarkerGraphic\",\"geometry\":{ \"rings\":[[[0.0,2.0],[0.35,1.97],[0.68,1.88],[1.0,1.73],[1.29,1.53],[1.53,1.29],[1.73,1.0],[1.88,0.68],[1.97,0.35],[2.0,0.0],[1.97,-0.35],[1.88,-0.68],[1.73,-1.0],[1.53,-1.29],[1.29,-1.53],[1.0,-1.73],[0.68,-1.88],[0.35,-1.97],[0.0,-2.0],[-0.35,-1.97],[-0.68,-1.88],[-1.0,-1.73],[-1.29,-1.53],[-1.53,-1.29],[-1.73,-1.0],[-1.88,-0.68],[-1.97,-0.35],[-2.0,-0.0],[-1.97,0.35],[-1.88,0.68],[-1.73,1.0],[-1.53,1.29],[-1.29,1.53],[-1.0,1.73],[-0.68,1.88],[-0.35,1.97],[0.0,2.0]]]},\"symbol\":{ \"type\":\"CIMPolygonSymbol\",\"symbolLayers\":[{ \"type\":\"CIMSolidStroke\",\"enable\":true,\"capStyle\":\"Round\",\"joinStyle\":\"Round\",\"lineStyle3D\":\"Strip\",\"miterLimit\":10,\"width\":0,\"color\":[0,0,0,0]},{ \"type\":\"CIMSolidFill\",\"enable\":true,\"color\":[138,73,50,255]}]} }],\"scaleSymbolsProportionally\":true,\"respectFrame\":true}]} } }";
GraphicsOverlay graphicsOverlay = new GraphicsOverlay();
graphicsOverlay.Renderer = Renderer.FromJson(drawingInfoJson);
Graphic graphic = new Graphic(new MapPoint(0, 0, 0, SpatialReferences.Wgs84));
graphicsOverlay.Graphics.Add(graphic);
mapView.GraphicsOverlays.Add(graphicsOverlay);
You could go further too... and create a C# class for the JSON then export that to JSON and use in conjunction with the Renderer.FromJson method.