/* excerpt from function mkinfoWindowContent var infocontdiv = domConstruct.create("div"); infocontdiv.id = "wthrdiv"; infocontdiv.innerHTML = content; r9WthrApp.map.infoWindow.setContent(infocontdiv); /* excerpt from function which uses dojo/dom-geometry to determine height of content require(["dojo/_base/Deferred","dojo/dom","dojo/dom-geometry"], function(Deferred,dom,domGeom){ . . . var retdata = new Deferred(); retdata = getWthrXML(forestnum); //deferred retdata.then( function(xmldoc) { mkInfoWindowContent(xmldoc); (evt) ? r9WthrApp.map.infoWindow.show(evt.screenPoint,r9WthrApp.map.getInfoWindowAnchor(evt.screenPoint)) : null; var node = dom.byId("wthrdiv"); var coords = domGeom.position(node); var newht = coords.h + 50; //coords.h is height property r9WthrApp.map.infoWindow.resize(250,newht); } ); //end deferred then });
Hi Manish,Your code works fine for the first time when I clicked on the map. But the width of the dialog box is keep on growing upon opening.Thanks and Regards,Amaranatha
Hi Manish,I tried as you suggested by adding a div. But still the issue exists. Please find the sample text for content.<table><tr><td nowrap>1111111111</td><td>22222222222222222222222222</td></tr><tr><td>3333333333</td><td>4444444444444444444444444444444</td></tr><tr><td nowrap>555555555555555</td><td>66666666666666666666666</td></tr><tr><td>77777777777777777</td><td>8888888888888888888888888888</td></tr></table>Please help.Thanks and Regards,Amnalk
Hi Manish,The content shown in my actual implementation is generated dynamically and it's a HTML formatted string. It may contain HTML tables (<table></table>), new paragraphs (<p>) and any other HTML tags. That's the reason why I can't find the length of the lengthiest line of the content when previewing.Thanks and Regards,Amnalk
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.