Are there any samples of MultilayerSymbol json files. All help really seems to indicate is that you can only load these from json, but not seeing any sample of what this json would like like and how to compose.
Thanks
-Joe
I see what Update 5 has, because I work on the product 🙂
As it hasn't shipped yet, I don't have exact release dates to share. We're getting close though...
Hi, Where do you see what update 5 will have and when it will be available?
Good news: Update 5 will also ship with many more APIs available for you to do a lot of this programmatically, so you don't have to do it all via JSON.
I do still recommend using Pro to author symbols in though.
Hello,
If in case, you use ArcGIS Pro symbol style to create your own symbol and prefer to use in Runtime, please look at this sample:
DotNetRuntimeSamples/DicSymbolStyle at master · nagmayasmin/DotNetRuntimeSamples · GitHub
ShapefileFeatureTable myShapefile = await ShapefileFeatureTable.OpenAsync(file_shapefile_location); // Create a feature layer to display the shapefile FeatureLayer newFeatureLayer = new FeatureLayer(myShapefile);
string file_to_stylx = parent.FullName + "\\Data\\style.stylx"; symbolStyle = await SymbolStyle.OpenAsync(file_to_stylx);
IList<String> stringList = new List<string>(); stringList.Add("shoppingcenter01"); stringList.Add("marker01");
SimpleRenderer simpleRenderer = new SimpleRenderer(await symbolStyle.GetSymbolAsync(stringList)); newFeatureLayer.Renderer = simpleRenderer;
// Add the feature layer to the map myMap.OperationalLayers.Add(newFeatureLayer);
As Kris mentioned, this is .sqlite geodatabase and you need to get the "key" file to identify what symbol layer you wnat to add in Runtime.
Hope that helps.
Hi,
I recently had this issue and my approach was to use ArcGIS Pro to author the symbol save the symbol style. The style files seem to be Sq-lite database files, using a Sq-Lite browser you can find in one of the tables the JSON. The symbols seem to be built from the CIM classes (e.g. ArcGIS Pro 2.3 API Reference Guide ).
Here is an example of a layered symbol for a pointMarker consisting of triangle and picture (I removed the actual base64 picture)
{ "type": "CIMPointSymbol", "symbolLayers": [{ "type": "CIMVectorMarker", "enable": true, "anchorPoint": {"x": 0,"y": 0,"z": 0 }, "anchorPointUnits": "Relative", "dominantSizeAxis3D": "Y", "offsetY": 14, "rotation": 180, "size": 17, "billboardMode3D": "FaceNearPlane", "frame": {"xmin": -5.0,"ymin": -5.0,"xmax": 5.0,"ymax": 3.74}, "markerGraphics": [{ "type": "CIMMarkerGraphic", "geometry": {"x": 0,"y": 0}, "symbol": { "type": "CIMPointSymbol", "symbolLayers": [{ "type": "CIMVectorMarker", "enable": true, "anchorPoint": {"x": 0,"y": 0,"z": 0}, "anchorPointUnits": "Relative", "dominantSizeAxis3D": "Y", "size": 5, "billboardMode3D": "FaceNearPlane", "frame": {"xmin": 0.0,"ymin": 0.0,"xmax": 17.0,"ymax": 17.0}, "markerGraphics": [{ "type": "CIMMarkerGraphic", "geometry": { "rings": [[[0.0,0.0],[8.61,14.85],[17.0,0.0],[0.0,0.0]]]}, "symbol": { "type": "CIMPolygonSymbol", "symbolLayers": [{ "type": "CIMSolidStroke", "enable": true, "capStyle": "Round", "joinStyle": "Round", "lineStyle3D": "Strip", "miterLimit": 10, "width": 0, "color": {"type": "CIMRGBColor","values": [0,0,0,100]} }, { "type": "CIMSolidFill", "enable": true, "color": { "type": "CIMRGBColor", "values": [0,0,0,100] } }] } }], "scaleSymbolsProportionally": true, "respectFrame": true }], "haloSize": 0, "scaleX": 1, "angleAlignment": "Display" } }], "scaleSymbolsProportionally": true, "respectFrame": true }, { "type": "CIMPictureMarker", "enable": true, "anchorPoint": {"x": 0,"y": -6,"z": 0}, "anchorPointUnits": "Absolute", "dominantSizeAxis3D": "Y", "offsetY": 17, "size": 32, "billboardMode3D": "FaceNearPlane", "invertBackfaceTexture": true, "scaleX": 1, "textureFilter": "Picture", "tintColor": {"type": "CIMRGBColor","values": [255, 255,255,100]}, "url": "data:image/png;base64, <REMOVED>" }], "haloSize": 1, "scaleX": 1, "angleAlignment": "Display"}
Joe Hershman were you able to figure this out this one?
Usually I would use CompositeSymbol to combine multiple symbols, such as a vehicle symbol with a fixed rotation, and an arrow or similar indicator for direction. Using CompositeSymbol, the whole symbol is rotated. What I was hoping for, was that MultilayerPointSymbol could handle this situation where one symbol is rotated, and the other is not. However, the documentation has no real documentation on what the json would look like, or what the symbol type is used for, or if it applies for my needs. I know I can use two layers with different symbology, but that eats an extra bit of extra unmanaged memory for the renderers (and it adds up), and added hassle of updating them both.
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.