var spatRef:SpatialReference = new SpatialReference(102100); var pl:Polyline = new Polyline(null, spatRef); var path:Array = []; path.push(new MapPoint(15558700, 1770100, spatRef)); path.push(new MapPoint(12959100, 3238400, spatRef)); path.push(new MapPoint(11901900, 3238400, spatRef)); path.push(new MapPoint(1447100, 4244300, spatRef)); path.push(new MapPoint(-13627000, 2012200, spatRef)); path.push(new MapPoint(-13330400, 1623400, spatRef)); path.push(new MapPoint(-8733100, -24400, spatRef)); path.push(new MapPoint(-7449500, 1175400, spatRef)); path.push(new MapPoint(-6681300, -4460100, spatRef)); pl.paths = [path]; var graphic:Graphic = new Graphic(pl, null, null);
Zahid, So you are saying that this does not work? var spatRef:SpatialReference = new SpatialReference(102100); var pl:Polyline = new Polyline(null, spatRef); var path:Array = []; path.push(new MapPoint(15558700, 1770100, spatRef)); path.push(new MapPoint(12959100, 3238400, spatRef)); path.push(new MapPoint(11901900, 3238400, spatRef)); path.push(new MapPoint(1447100, 4244300, spatRef)); path.push(new MapPoint(-13627000, 2012200, spatRef)); path.push(new MapPoint(-13330400, 1623400, spatRef)); path.push(new MapPoint(-8733100, -24400, spatRef)); path.push(new MapPoint(-7449500, 1175400, spatRef)); path.push(new MapPoint(-6681300, -4460100, spatRef)); pl.paths = [path]; var graphic:Graphic = new Graphic(pl, null, null);
Zahid, Try this:var spatRef:SpatialReference = new SpatialReference(102100); var pl:Polyline = new Polyline(null, spatRef); var path:Array = []; path.push(new MapPoint(15558700, 1770100, spatRef)); path.push(new MapPoint(12959100, 3238400, spatRef)); path.push(new MapPoint(11901900, 3238400, spatRef)); path.push(new MapPoint(1447100, 4244300, spatRef)); path.push(new MapPoint(-13627000, 2012200, spatRef)); path.push(new MapPoint(-13330400, 1623400, spatRef)); path.push(new MapPoint(-8733100, -24400, spatRef)); path.push(new MapPoint(-7449500, 1175400, spatRef)); path.push(new MapPoint(-6681300, -4460100, spatRef)); pl.paths = [path];Don't forget to click the Mark as answer check on this post and to click the top arrow (promote).Follow the steps as shown in the below graphic:
var spatRef:SpatialReference = new SpatialReference(102100); var pl:Polyline = new Polyline(null, spatRef); var path:Array = []; path.push(new MapPoint(15558700, 1770100, spatRef)); path.push(new MapPoint(12959100, 3238400, spatRef)); path.push(new MapPoint(11901900, 3238400, spatRef)); path.push(new MapPoint(1447100, 4244300, spatRef)); path.push(new MapPoint(-13627000, 2012200, spatRef)); path.push(new MapPoint(-13330400, 1623400, spatRef)); path.push(new MapPoint(-8733100, -24400, spatRef)); path.push(new MapPoint(-7449500, 1175400, spatRef)); path.push(new MapPoint(-6681300, -4460100, spatRef)); pl.paths = [path];
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.