var template = new esri.InfoTemplate(); template.setTitle("${NOM}"); template.setContent("<b>Adresse</b>: ${ADR_POST} - ${COMMUNE} <br/> <b>Permanence</b> : ${JOURS_PERM} - ${HEURE} <br/> <b>Services</b> : ${SERVICE:ReplaceNull} - ${SERVICE2}"); feature.setInfoTemplate(template);
var infoTemplate = new esri.InfoTemplate("${Name}"); infoTemplate.setTitle("${Name}"); infoTemplate.setContent("Magnitude ${Magnitude:NumberFormat(round:2)} earthquake occurred on ${Date_:DateFormat(datePattern:'MMMM d, yyyy.', selector:'date')}<br/>Deaths: ${Num_Deaths:calculateDeaths}" );
function calculateDeaths(value,key,data){ return data.Num_Deaths !== null ? data.Num_Deaths : 'No Deaths'; }
var infoTemplate = new esri.InfoTemplate(); infoTemplate.setTitle("${Name}"); infoTemplate.setContent(getContent);
function getContent(graphic){ var numInjured = graphic.attributes.Num_Injured; var numDeaths = graphic.attributes.Num_Deaths !== null ? graphic.attributes.Num_Deaths : 'No Deaths'; var content = "<b>Magnitude: </b>" + graphic.attributes.Magnitude + "<br/><b>Deaths: </b> " + numDeaths ; if(numInjured !== null){ content += "<br/><b>Injured: </b>" + numInjured; } return content; }
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.