dojo.connect(myMap, "onclick", function(evt) { myMap.infoWindow.setTitle("Some title"); dijit.byId("infowinID").setContent("<img src='something.png' />'); myMap.infoWindow.resize(355, 140); myMap.infoWindow.show(evt.screenPoint, myMap.getInfoWindowAnchor(evt.screenPoint)); });
myMap.infoWindow.resize(300, 200); myMap.infoWindow.setContent(dijit.byId("infowinID").domNode); dojo.connect(myMap.infoWindow, "onShow", function() { dijit.byId("infowinID").resize(); });
<div id="infowinID" dojoType="dijit.layout.ContentPane" title="Something"> <img src="/your/path/toAnImage.png" alt="asdf" /> </div>
#infowinID { overflow: hidden; }
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.