What i need is to add a measure tool so that the user could be able to measure distances on the map.
Hi. I have a Map Viewer for Silverlight running and functioning well. What i need is to add a measure tool so that the user could be able to measure distances on the map. I am not a programmer and i am new to this silverlight application. What i have to do?...any help is much appreciated. Thanks.:)
   public class MeasureActionTool : ICommand    {        #region ICommand members        public void Execute(object parameter)        {            SolidColorBrush b = new SolidColorBrush();            b.Color = Colors.Orange;            SimpleLineSymbol ls = new SimpleLineSymbol();            ls.Color = b;            ls.Width = 2;            ViewerMeasureAction m = new ViewerMeasureAction()            {                LineSymbol = ls,                MeasureMode = MeasureAction.Mode.Polyline,                DisplayTotals = true,                DistanceUnit = DistanceUnit.Feet,            };            m.Attach(MapApplication.Current.Map);            m.Execute();        }        public bool CanExecute(object parameter)        {            // Return true so that the command can always be executed            return true;        }        public event EventHandler CanExecuteChanged;        #endregion    }
   public class ViewerMeasureAction : MeasureAction    {        public void Execute()        {            Invoke(null);        }    }
We are working on an "add-in" sample measure tool
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.