From: Towers, V. <Van...@ds...> - 2011-05-04 06:49:36
|
UNCLASSIFIED > I am having difficulty adding some extra functionality to a popup > closebox callback. > I have tried a couple of approaches. Currently I am Creating the popup > passing in the boolean "closebox" set to false in the constructor. > Then I try and add my own CloseListener Eg. > popup.addCloseListener(new CloseListener() { > public void onPopupClose(JSObject evt) > { > // my own implementation > } > }); > But this isn't working as I would have expected.The onPopupClose > method is being hit when I can click the close button and doing the > job. But the close button is being positioned oddly. Sometimes it > is positioned outside of my framed cloud (but is clickable/closable), > othertimes it is in the right spot (top right corner of the cloud) but > doesn't always let me click it because it looks like my html text that > is in the popup is on top of it. > Any ideas what is going on? > Are you using the newest GWT-OL? Notice, that according to changelog addCloseListener is depreciated and not working correctly: http://gwt-openlayers.hg.sourceforge.net/hgweb/gwt-openlayers/gwt-openla yers/ <http://gwt-openlayers.hg.sourceforge.net/hgweb/gwt-openlayers/gwt-openl ayers/> I never used it so far so not sure if its related to your problem. /Peter ________________________________ Hi Peter, Thanks for the headsup. You were correct, I was using the old 0.5 snapshot. Have moved to 0.6 and it that fixed it. I did notice this bug http://trac.osgeo.org/openlayers/ticket/3192 <http://trac.osgeo.org/openlayers/ticket/3192> but the suggested CSS in the solution provided did the trick. I am now passing in the callback via the constructor and it is working and displayed as expected. Thanks, Vanessa IMPORTANT: This email remains the property of the Department of Defence and is subject to the jurisdiction of section 70 of the Crimes Act 1914. If you have received this email in error, you are requested to contact the sender and delete the email. |