I can get the value from the map and put it into a text element. But that will require me to write more logic handling the scale changes. Is there a component I can use?
You can create a Dynamic Text element to write out the Map Frame's scale.
var layout = LayoutView.Active.Layout; if (layout == null) return; //Construct the dynamic text string. //You can create the dynamic text in the UI to get a hint as to how to compose the string in code. String title = @"Scale: <dyn type=""mapFrame"" name=""Map Frame"" property=""scale"" preStr=""1:""/>"; Coordinate2D llTitle = new Coordinate2D(6, 2.5); await QueuedTask.Run( () => { TextElement titleGraphics = ElementFactory.Instance.CreateTextGraphicElement( layout, TextType.RectangleParagraph, llTitle.ToMapPoint(), null, title) as TextElement; });
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.