tfman716

InfoWindow opens but the field values are not there

Discussion created by tfman716 on May 23, 2014
I have a simple mapping site working on my machine which just plots some points and then has an infowindow that opens up on click. It works perfectly fine on my machine but when trying to copy the javascript code directly into a preexisting webpage the map loads fine and the info window loads fine but there are no values coming back.

The only thing that is different between what I have working on my machine and what is on the webserver is just the header and footer pieces of the webpage. The web server is JBoss too if that helps. Below is my code as well...everything works except this is not returning anything: ${SHOP_LOCAT}

Here is the IdentifyTask code:

function executeIdentifyTask(event) {
     identifyParams.geometry = event.mapPoint;
     identifyParams.mapExtent = map.extent;

     var deferred = identifyTask.execute(identifyParams).addCallback(function(response) {
      // response is an array of identify result objects
      // Let's return an array of features.
      return arrayUtils.map(response, function(result) {
       var feature = result.feature;
       var layerName = result.layerName;

       feature.attributes.layerName = layerName;
       if (layerName === 'Shop_locations') {
        var LocationTemplate = new InfoTemplate("Shop Location Information", 
        "<b>Shop Name: </b>${SHOP_LOCAT}<br/>" + "<b>City: </b>${CITY}<br/>" + 
        "<b>State: </b>${STATE}<br/>" + "<b>Contact Name: </b>${CONTACT_NA}<br/>" + 
        "<b>Contact Phone Number: </b>${CONTACT_PH}<br/>" + "<b>Facility: </b>${FACILITY}<br/>" + 
        "<b>Type: </b>${TYPE}<br/>");
        
        feature.setInfoTemplate(LocationTemplate);
       }
       return feature;
      });
     });

     
     map.infoWindow.setFeatures([deferred]);
     map.infoWindow.show(event.mapPoint);

Outcomes