text graphics in scenes bug?

206
0
05-22-2019 12:08 PM
iR1
by
New Contributor

I don't know if it is a bug or something else, but it's definetely unatural regarding text graphics in scenes and graphicsoverlays.

We are developing an app, it needs to be localized in various languages, so the text is added as a graphic in a graphicsoverlay.

I noticed profiling/debugging the app, that one sigle text label fora single pin after being rendered on the map adds about 300MB!!! of RAM to the app's total memory.

If the text graphic is created but not displayed the app memory is its normal size.

Styling settings don't make any difference.

This is some c#  sample code for UWP 100.5 runtime, but it happened with 100.4 also.

TextSymbol textSymbol = new TextSymbol                                              //create text
                {
                    Color = System.Drawing.Color.White,
                    Size = 18,
                    Text = location.Name,                                                         //localized string
                    OutlineColor = System.Drawing.Color.Black,
                    OutlineWidth = 1.0,
                    OffsetY = 42.0,
                    HorizontalAlignment = Esri.ArcGISRuntime.Symbology.HorizontalAlignment.Center,
                    VerticalAlignment = Esri.ArcGISRuntime.Symbology.VerticalAlignment.Top
                };

                Graphic textGraphic = new Graphic(point, textSymbol);                               //create text graphic
                _graphicsOnScene.Graphics.Add(siteGraphic);                                         //add location graphic to collection
                _graphicsOnScene.Graphics.Add(textGraphic);                                         //add location name to collection
                
                _sceneView.GraphicsOverlays.Add(_graphicsOnScene);                        //add collection to scene

Unless the overaly does some kind of buffering, it's weird, I would appreciate if anyone else has noticed or maybe some kind of explanation.

Thanks

0 Kudos
0 Replies