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.feature;
for (var j=0; j<lo.dataRenderer.columns.length; j++) { var col = lo.dataRenderer.columns;
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 += " °C</b> / <b>"; if (col === "METRIC" && !ghcnDailyMenu.isTemp) s += " mm.</b> / <b>"; if (col === "IMPERIAL" && ghcnDailyMenu.isTemp) s += " °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)