0

I have gps points which sent from tacker device I need to draw a line in openstreet map ArcGIS with Javascript, How can I do this. I can convert gps points to any format that needs to be (XML, JSON, GPX...) and I have time with lat and lon if needed.

I am new with ArcGIS API for Javascript.

34.673876,68.790897
34.673876,68.790897
34.673876,68.790897
34.673876,68.790897
34.673876,68.790897

I want something like this but ArcGIS its google:

http://jsfiddle.net/pintu31/EPM6A/2/

0

firstly, create a polyline

 var polyline = new Polyline(new SpatialReference({wkid:4326}));

after define path array,

var path = []
path.push(new Point(34.673876,68.790897));
path.push(new Point(34.673876,68.790897));
path.push(new Point(34.673876,68.790897));
path.push(new Point(34.673876,68.790897));
path.push(new Point(34.673876,68.790897));

and finally add path to polyline

polyline.addPath(path);
//add to map
map.graphics.add(new Graphic(polyline,new SimpleLineSymbol());
|improve this answer|||||
0

Try this:
https://jsfiddle.net/e7k5cykL/

you can find other documentation here:
https://developers.arcgis.com/javascript/

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.