var template = new esri.InfoTemplate(); template.setContent(getTextContent); function getTextContent(graphic) { var attribute1 = graphic.attributes.Attribute1; var attribute2 = graphic.attributes.Attribute2; if (attribute1.length > 20 || attribute2.length > 20) { map.infoWindow.resize(x,y); //Resize the infoWindow } var content = "<b>Attribute 1</b>: " + attribute1 + "<br>"; content += "<b>Attribute 2</b>: " + attribute2; 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.