FeatureLayer this._url is null

4408
1
07-29-2014 01:00 PM
KobyHastings
New Contributor

I am having trouble with creating a FeatureLayer from an ArcGISDynamicMapServiceLayer. The console gives me an error of "this._url is null" when trying to create the FeatureLayer.

 

Here is a link to my Plunker version. If you go into controllers.js you will see on lines 55-65 I am trying to create the FeatureLayer. It is commented out but you can comment it back in and see what happens.

 

http://plnkr.co/edit/w4zQJdp2fSZ64xbqE4Kb?p=preview

 

Any help is greatly appreciated! Thanks

 

Koby

0 Kudos
1 Reply
RobertScheitlin__GISP
MVP Emeritus

Koby,

  Your requires and variable declarations are out of sync in the controller.js. Here is the correct order.

require(["esri/map",
                "esri/layers/ArcGISTiledMapServiceLayer",
                "esri/layers/DynamicLayerInfo",
                "dojo/_base/array",
                "esri/tasks/IdentifyTask",
                "esri/tasks/query",
                "esri/tasks/IdentifyParameters",
                "esri/layers/FeatureLayer",
                "esri/InfoTemplate",
                "dojo/on",
                "dojo/domReady!"],

            function(Map, Tiled, DynamicLayerInfo, arrayUtils, IdentifyTask, Query, IdentifyParameters, FeatureLayer, InfoTemplate, InfoWindow) {