AnsweredAssumed Answered

Adding layer

Question asked by jbatbayarmonmap-mn-esridist Employee on Dec 18, 2014
Latest reply on Dec 18, 2014 by jbatbayarmonmap-mn-esridist

I'm trying to add layer to my map.

I can see base map but not added layer. here's my script. what did I wrong?

 

<script>

      var map;

 

      require([

        "esri/map",

        "esri/layers/FeatureLayer",

        "dojo/domReady!"

        ], function(Map,FeatureLayer) {

     

        map = new Map("map", {

          basemap: "satellite",

          center: [106.895, 47.920], // longitude, latitude

          zoom: 16

        });

       

        var parcelsOnline = new FeatureLayer("http://services.arcgis.com/HJzgwvlNIXssnQar/arcgis/rest/services/Ulas_1215/FeatureServer/0", {

          mode: FeatureLayer.MODE_ONDEMAND,

          outFields: ['*']

        });

 

      map.addLayer([parcelsOnline]);

     

     });

    </script>

Outcomes