AnsweredAssumed Answered

polyline not visibel

Question asked by lkoumis on Jul 9, 2015
Latest reply on Jul 10, 2015 by lkoumis

       I have this simple code but the polyline is not drawing. The answer, I suspect is simple...but not for a novice in js. Thanks.


<!DOCTYPE html>



    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">


    <link rel="stylesheet" href="//">


      html, body, #map {

        height: 100%; width: 100%; margin: 0; padding: 0;





    <script src="//"></script>


      var map;












      ], function(

        Map, Point, SimpleMarkerSymbol, SimpleLineSymbol, Graphic, Polyline, SpatialReference, GraphicsLayer

      ) {

        map = new Map("map", {

          basemap: "streets",

          center: [-122.16,37.7238],

          zoom: 10


        map.on("load", function() {

          var gl = new GraphicsLayer();

  var myspatialref = new SpatialReference({wkid:102100});

          var p = new Point((-122.159, 37.724),new SpatialReference(102100));

  var t = new Point((-122.169, 37.721),new SpatialReference(102100));

  var coords=[];


  var polyline = new Polyline(myspatialref);

  var polylineSymbol = new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, 0xFF3333,1,3);


  var polylineGraphic = new Graphic(polyline, polylineSymbol);








    <div id="map"></div>