AnsweredAssumed Answered

Simple Line Graphic ?

Question asked by coaanalyst on Apr 18, 2014
Latest reply on Apr 18, 2014 by coaanalyst
I am trying to draw a simple line graphic. I am not sure what I am missing.

 <!DOCTYPE HTML> <html> <head>   <meta charset="utf-8">   <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">   <title>SimpleLineGraphic</title>   <link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.9/js/esri/css/esri.css">   <style>     html, body, #map {       padding:0;       margin:0;       height:100%;     }      </style>   <script src="//js.arcgis.com/3.9/"></script>   <script> var map;     require([       "esri/map",              "dojo/ready", "dojo/on", "esri/geometry/Polyline", "esri/graphic", "esri/symbols/SimpleLineSymbol",       "dojo/domReady!"     ], function(       Map, ready, on, Polyline, Graphic, SimpleLineSymbol     )  {        map = new Map("map", {         center: [-82.6508, 34.1452],         zoom: 6,         basemap: "topo"       });                                ready(function drawPath () {                 var polylineJson = { "paths":[[[-82.68,33.53], [-80.58,35.55], [-81.00,34.00],[-79.53,37.6]]], "spatialReference":{"wkid":4326}};             var polyline = new Polyline(polylineJson);             var polylineSymbol = new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255,0,0]), 3);             var myLineGraphic = new Graphic(polyline, polylineSymbol, null, null);             map.graphics.add(myLineGraphic);     });            });   </script> </head> <body>   <div id="map" class="map">       </div> </body> </html>

Outcomes