AnsweredAssumed Answered

Same symbol definition renders differently in MapView and Scene (100.4)

Question asked by mangoyoga on Dec 20, 2018
Latest reply on Dec 26, 2018 by JNery-esristaff

Hey,

 

While expanding some functionality to support MapView and SceneView, I ran into some inconsistencies between the two. While not a major issues, I figured I'd mention it, in case it is not yet on your bucket list.

 

CompositeSymbol with text renders differently in MapView and SceneView. 

 

Summary

  • MapView, Text outline are not respected (or at least does not render the same)
  • SceneView: Default TextSymbol alignment is different. Can be modified with OffsetY.
  • SceneView: Overlapping symbols merge texts - apparently (second image - A + 2 and 3 + 1).
  • SceneView: Label not displayed (actually rather inconvenient)

 

var compositeSymbol = new CompositeSymbol();
compositeSymbol.Symbols.Add(new SimpleMarkerSymbol
{
    Color = GetBrush(state).Color.ToDrawing(),
    Style = SimpleMarkerSymbolStyle.Circle,
    Outline = new SimpleLineSymbol
    {
        Style = SimpleLineSymbolStyle.Solid,
        Width = 1,
        Color = Colors.Black.ToDrawing()
    },
    Size = 18
});

compositeSymbol.Symbols.Add(new TextSymbol
{
    Text = priorityText,
    Color = Colors.White.ToDrawing(),
    OutlineColor = Colors.Black.ToDrawing(),
    OutlineWidth = 2,
    FontFamily = "Segoe UI Black",
    Size = 16
});

ToDrawing() just converts System.Windows.Color to System.Drawing.Color

Outcomes