[OpenLayers-Users] Switching from OL 2.5 to OL 2.6 RC1 Popups
Peterson Eric-EEP002
Eric.Peterson at motorola.com
Wed Apr 9 11:15:42 EDT 2008
I have an application that I've developed using OL 2.5 which displays
popups associated with markers, using this sort of approach:
var popup = new OpenLayers.Popup (popupName, popupLonLat, popupSize,
popupContent, false);
popup.setBorder ("1px solid");
popup.setBackgroundColor (colorCode[nextColor]); // colorCode is an
array of color strings
popup.setOpacity (1);
popup.hide ();
// Set mouseover and mouseout event handlers, etc.
I want to upgrade to 2.6 to pick up bug fixes and to take advantage of
the autoSize feature of the new popup boxes.
I tried pointing my application at the OL 2.6 RC1 code to see if it
would work without modification, but it doesn't. My popup boxes are
positioned correctly at the upper left, but their sizes are huge -
extending all the way down and right to the edge of my map. Also, none
of them are hidden nor respond to the mouseover/mouseout events.
Either I'm doing something wrong with the way I've created popups in 2.5
or something has changed in 2.6.
I assumed that there would be a popup.setAutoSize() method that I could
add to the above code snippet, but there doesn't seem to be one in the
current trunk. I also didn't see an options argument in the initialize()
function. But I did see an example that shows how to create a new popup
class and add an autoSize value at that point, along with using the
feature.createPopup() method, neither of which I'm doing with the 2.5
code - is that the right way to go about doing it?
What exactly is the proper method for constructing a popup and setting
the autoSize param in OL 2.6?
Thanks ...
-eP
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080409/418a6e1c/attachment.html
More information about the Users
mailing list