AnsweredAssumed Answered

Identify Results in PopupMobile

Question asked by glenreid on Feb 13, 2015
Latest reply on Feb 17, 2015 by glenreid

I'm trying to display identify results in a PopupMobile:

 

addResults : function (evt, lo, results) {


 mvMapProperties.map.graphics.clear();




 var s = '<table>';





 var feature = results[i].feature;





 for (var j=0; j<lo.dataRenderer.columns.length; j++) {




 var col = lo.dataRenderer.columns[j];






 for (var attr in feature.attributes) {






 if (col === attr) {







 if (col === "STATION_NAME") {








 s += '<td style="font-size:14px; font-weight:bold;">' + feature.attributes[attr] + '</td></tr>'







 s += '<tr><td style="font-size:12px;">' + ghcnDailyMenu.currLabel + '</td></tr>';







 s += '<tr><td style="font-size:12px;">' + ghcnDailyMenu.currLabelDate + '</td></tr>';







 s += '<tr><td style="font-size:12px;"><b>';






 } else {








 s += feature.attributes[attr];






 }







 if (col === "METRIC" && ghcnDailyMenu.isTemp) s += " &#176;C</b> / <b>";







 if (col === "METRIC" && !ghcnDailyMenu.isTemp) s += " mm.</b> / <b>";







 if (col === "IMPERIAL" && ghcnDailyMenu.isTemp) s += " &#176;F</b>";







 if (col === "IMPERIAL" && !ghcnDailyMenu.isTemp) s += " in.C</b>";







 break;






 }





 }




 }




 mvMapProperties.map.infoWindow.setFeatures([feature]);



 }



 s += "</td></tr></table>\n\r";





 mvMapProperties.map.infoWindow.setTitle("Test");


 mvMapProperties.map.infoWindow.setContent(s);


 mvMapProperties.map.infoWindow.show(evt.mapPoint, mvMapProperties.map.getInfoWindowAnchor(evt.screenPoint));

 }



 

On the first identify, when I try to look at the results, the content is empty (attached images 1 and 2).  When I click a second time, the data will show up (attached image 3)

Attachments

Outcomes