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.
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
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
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