I have a wonderful Openlayers map with some custom markers that works really well. I have the 'Pop Up for Features' behavior enabled and it displays the title and description of my mapped companies.
Everything works really well, except for the fact that the pop-ups are, by default, extreeeemely wide, and do not stay within the current map window. Every time I click on a pin, the window moves way off from the center of the cluster of pins. The user then has to move the map back to center it, clicks on another pin to get information and again -- whoosh -- the screen moves way off to accommodate the long pop-up with the pins again ending up on the very side of the screen, while most are out of view.
Does that make sense? The pop-ups are extremely wide and move the map around a ton. Because they take up pretty much the entire screen width-wise and pan the map around to accommodate their width, the screen pretty much moves 100% of the time, unless you click on the exact same pin twice.
I'm including a patch to the openlayers_behavior_popup.js file, in which I set the popup's keepInMap and panMapIfOutOfView properties.
With the patch, all works wonderfully and the pop-up boxes look so much better because they're not just one really long line of text.
Would you all considering applying this patch for the next version of openlayers?
I'm attaching a couple of screenshots to show before and afters!
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch openlayers-popup_keep_in_map-1808964_0.patch. Unable to apply patch. See the log in the details link for more information.
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch openlayers-popup_keep_in_map-1808964.patch. Unable to apply patch. See the log in the details link for more information.
PASSED: [[SimpleTest]]: [MySQL] 236 pass(es).