I would like an example of how to create a point with say a circle and then offset a square. I see how you can do it with a LineSymbology(Symbology Sample Project) but I get an error trying to do something similar with the CIMPointSymbol. Below is code that doesn't work but may help clarify what I would like to do. Any help steering me in the right direction is appreciated.
internal static Task<CIMPointSymbol> CreatePointTwoMarkersAsync()
{
return QueuedTask.Run<CIMPointSymbol>(() =>
{
var twoPointMarkers = new CIMPointSymbol();
var circleMarker = SymbolFactory.Instance.ConstructMarker(ColorFactory.Instance.GreyRGB, 5, SimpleMarkerStyle.Circle) as CIMVectorMarker;
var squareMarker = SymbolFactory.Instance.ConstructMarker(ColorFactory.Instance.WhiteRGB, 5, SimpleMarkerStyle.Square) as CIMVectorMarker;
CIMSymbolLayer[] mySymbolLyrs =
{
new CIMVectorMarker() //circle marker
{
MarkerGraphics = circleMarker.MarkerGraphics,
Frame = circleMarker.Frame,
Size = circleMarker.Size,
OffsetX= 0
},
new CIMVectorMarker() //square marker
{
MarkerGraphics = squareMarker.MarkerGraphics,
Frame = squareMarker.Frame,
Size = squareMarker.Size,
OffsetX= 5
}
};
twoPointMarkers.SymbolLayers = mySymbolLyrs;
return twoPointMarkers;
});
}
Solved! Go to Solution.
As usual, after sleeping on it, I found my dumb mistake. The above code works I just wasn't overwriting properly into the style where I was saving.
As usual, after sleeping on it, I found my dumb mistake. The above code works I just wasn't overwriting properly into the style where I was saving.