Select to view content in your preferred language

MultiLayerPointSymbol containing SimpleMarkerSymbol not visualized in Runtime 100.11+ versions

6300
32
09-27-2022 04:18 AM
stuartkerkhof
Emerging Contributor

Hi,

In my application I am using multilayerpointsymbols to create complex symbols. Sometimes one of these layers may even contain a simplemarkersymbol.  This is for example useful if the symbol should contain one or more circles, connected by lines for example.

Below code shows how I use the simplemarkersymbol combined with multilayerpointsymbols. This used to work fine. For readability I simplified a bit of the code. In the actual code I read symbol geometry elements from a JSON file, but that will be harder to analyze. 

            SolidStrokeSymbolLayer lineSymbol = new SolidStrokeSymbolLayer(1, Color.Black);

            List<SymbolLayer> symbolLayers = new List<SymbolLayer>
                {
                    lineSymbol
                };

            MultilayerPolylineSymbol multilayerPolylineSymbol = new MultilayerPolylineSymbol(symbolLayers);

            List<MapPoint> mapPoints = new List<MapPoint>();

            Coordinate[] coordinatesArray = new Coordinate[] { new Coordinate(0, 0), new Coordinate(5, 0), new Coordinate(5, 2), new Coordinate(5, -2) };

            foreach (Coordinate coordinate in coordinatesArray)
            {
                mapPoints.Add(new MapPoint(coordinate.X, coordinate.Y));
            }

            VectorMarkerSymbolElement symLyrEl = new VectorMarkerSymbolElement(new Polyline(mapPoints), multilayerPolylineSymbol);

            List<VectorMarkerSymbolElement> vectorMarkerSymbolElements = new List<VectorMarkerSymbolElement>();

            //add custom element to vectormarker symbol
            vectorMarkerSymbolElements.Add(symLyrEl);

            SimpleMarkerSymbol pointSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbolStyle.Circle, Color.Transparent, 5)
            {
                Color = Color.Transparent,
                Outline = new SimpleLineSymbol(SimpleLineSymbolStyle.Solid, Color.Black, 1)
            };

            pointSymbol.Style = SimpleMarkerSymbolStyle.Circle;
            MultilayerPointSymbol multilayerPointSymbol = pointSymbol.ToMultilayerSymbol();

            VectorMarkerSymbolElement vectorMarkerSymbolElement = new VectorMarkerSymbolElement(new MapPoint(0, 10), multilayerPointSymbol);

            //add circle symbol to vectormarker symbol
            vectorMarkerSymbolElements.Add(vectorMarkerSymbolElement);

            VectorMarkerSymbolLayer symLyr = new VectorMarkerSymbolLayer(vectorMarkerSymbolElements);

            List<VectorMarkerSymbolLayer> vectorMarkerSymbolLayers = new List<VectorMarkerSymbolLayer>();

            vectorMarkerSymbolLayers.Add(symLyr);

            MultilayerPointSymbol sym = new MultilayerPointSymbol(vectorMarkerSymbolLayers)
            {
                AngleAlignment = SymbolAngleAlignment.Map,
            };

When updating to runtime versions above 100.11 the symbols are no longer visualized in the map. Though they are still 'renderable', as I am able to visualize them as a separate picture in a non-map environment using the "GetSymbol" function.

 

Has anybody else run into this problem? Did the SDK change on this subject?

 

Tags (1)
0 Kudos
32 Replies
stuartkerkhof
Emerging Contributor

Hi Preeti,

thanks for checking this! My application is quite build around the FeatureCollectionLayers, so converting to graphics overlay would have quite the impact. I think I will just stick with 100.11 for now. Is there some way I can be notified when this bug is fixed?

 

kind regards,

 

Stuart

0 Kudos
stuartkerkhof
Emerging Contributor

Hi Preeti,

 

do you know if this has been fixed in the latest releases?

 

kind regards,


Stuart

0 Kudos
PreetiMaske
Esri Regular Contributor

Hi, Can you please retest this with latest version (200.8) of Maps SDK for .NET. We tested this recently and were unable to reproduce the problem.

0 Kudos