"Along Line" Marker Placement for VectorMarkerSymbolLayer

351
1
07-26-2022 02:17 AM
AnthonyWalsh3
New Contributor II

In ArcGIS PRO, I can create a polygon symbol which has a Marker Layer, and I can set its "Marker Placement" property to be "along line", which puts the markers along the polygon's circumference line. I can also use this symbol in a Runtime project by loading the .stylx file, so everything works fine when I use ArcGIS PRO. 

However, I want to create this same symbol in the code, using ArcGIS Runtime classes. I can create a marker layer using VectorMarkerSymbolLayer, but it doesn't have a marker placement property. I cannot set it to be placed along the line, the markers automatically fill the polygon by default. Is there a way to change this? If so, how? Does Runtime not support this? Also are there any other features that can be done via ArcGIS PRO but not on Runtime code? 

Thanks in advance.

0 Kudos
1 Reply
PreetiMaske
Esri Contributor

>I can create a marker layer using VectorMarkerSymbolLayer, but it doesn't have a marker placement property

We acknowledge that there is no public API available to set the MarkerPlacement yet. This is on our to do list in one of the future releases. I will add your request to our internal issue to add some weight 🙂

So basically if you are creating symbol programmatically using API classes, you might not be able to do this because markerplacement property is not publicly available. One way around this to get symbol json and create symbol.FromJson()

However, a better/recommended workflow is to create a stylx of symbols in ArcGIS Pro, and use SymbolStyle API  to open that stylx in runtime and fetch/get desired symbol by searching the associated key. 

For the most part ArcGIS Pro symbolization and symbol properties are honored in Runtime via authored content, like if you are using a stylx or accessing a mobilemappackage etc. But not all properties are exposed as public APIs.

Hope that helps.