// What my symbol looks like Symbols.SimpleLineSymbol symbol = new ESRI.ArcGIS.Client.Symbols.SimpleLineSymbol() { Color = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Colors.Blue), Style = Symbols.SimpleLineSymbol.LineStyle.Solid, }; // the points that make up my shape PointCollection pc = new PointCollection() { new MapPoint(0,0, new SpatialReference(4326)), // first point in line new MapPoint(1,1, new SpatialReference(4326)), // second point in line }; Polyline polyline = new Polyline() { // don't for get to let the map know what spatial reference this is SpatialReference = new SpatialReference(4326) }; polyline.Paths.Add(pc); Graphic g = new Graphic() { Symbol = symbol, // add my symbol to my graphic Geometry = polyline // add my geometry to my graphic }; GraphicsLayer graphicLayer = new GraphicsLayer(); graphicLayer.Graphics.Add(g);
What am I missing here?
Is it plausible to use this route task to accomplish this or am I barking up the wrong tree?
Putting the route task aside I am back to the original query:Does anyone know how to draw a polyline displaying the shortest distance between two features???
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.