AnsweredAssumed Answered

FeatureLayer not displayed and infoWindow not popup

Question asked by shaningesri on Jan 24, 2014
Latest reply on Apr 10, 2015 by rscheitlin
By referring ESRI's sample, I added a FeatureLayer layer.  But the FeatureLayer does not display and the infoWindow does not popup.  The related code is below:

          var content = "<b>Service Line</b>: ${SERVICE_LINE} <br/>" +
                              "<b>Segment</b>: ${TRACK_SEGMENT}" +
         "<b>Length (ft)</b>: ${Shape_Length}";
          var infoTemplate = new esri.InfoTemplate("${TRACKNAME}", content);
          map.infoWindow.resize(200, 80);
          var featureLayer = new esri.layers.FeatureLayer(serverURL + "/0", {
              mode: esri.layers.FeatureLayer.MODE_ONDEMAND,
              outFields: ["OBJECTID", "TRACKNAME", "Shape_Length", "TRACK_SEGMENT", "SERVICE_LINE"],
              infoTemplate: infoTemplate     });
          map.addLayers([basemap, featureLayer]);
I doubled checked and am sure the URL is correct.  I also load the required dojo items.  Did I miss something?  Thanks if you help.

Outcomes