Get SimpleMarkerStyle of Point Symbol

611
3
08-29-2018 05:31 PM
DominicChen1
New Contributor II

Currently I can construct the point symbol through SymbolFactory.Instance.ConstructPointSymbol() Method and set SimpleMarkerStyle to create the simple marker. But after creating, I need to get the marker style (circle, rectangle, cross, etc) of the point symbol. I wonder if there is any corresponding property for it.

Thank you very much.

0 Kudos
3 Replies
UmaHarano
Esri Regular Contributor

Hi Dominic

Check out the ConstructMarker method - It has a few overloads that might be what you are looking for.

This one gives you a marker directly by passing in SimpleMarkerStyle:  

public CIMMarker ConstructMarker( 
   CIMColor color,
   double size,
   SimpleMarkerStyle markerStyle
)

Thanks

Uma

0 Kudos
DominicChen1
New Contributor II

Hi Uma,

Thanks for your reply. I can use this method to construct a simple marker with specific style. But I need to get the style property later on -- after I create the symbol object. Currently I cannot find the corresponding property from CIMPointSymbol or CIMVectorMarker. Can you give me ideas? Thank you very much.

Best,

Dominic

0 Kudos
UmaHarano
Esri Regular Contributor

Hi Dominic

The marker used to create the point symbol is stored inside the point symbol as a symbol layer.

You could get it like this:

var pointSymbol = SymbolFactory.Instance.ConstructPointSymbol(ColorFactory.Instance.GreenRGB, 10.0, SimpleMarkerStyle.Diamond);
 var marker = pointSymbol.SymbolLayers[0] as CIMVectorMarker;

Thanks

Uma

0 Kudos