Select to view content in your preferred language

Add graphic not successufl

4205
30
Jump to solution
01-03-2014 05:07 AM
ShaningYu
Honored Contributor
I tested my 1st JS API application.  My code is below:
            var polylineJson = {      'paths': [     [
                  [201394.01178484457,173661.08635829584],
                  [201392.0117168416,173661.08690949593],
                  ...
                ]  ]   };
            var polyline = new esri.geometry.Polyline(polylineJson);
            var polylineSymbol = new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([46, 139, 87, 1]), 5);
            map.graphics.add(new esri.Graphic(polyline, polylineSymbol));
But the polyline is not added on the map.  What's wrong in the code? Thanks if you can help.
0 Kudos
30 Replies
ShaningYu
Honored Contributor
Jon:  My prob. got solved.  The reason was the incorrect SR in my MapService that generates some incorrect map point values.  Thanks for your help.
0 Kudos