Closed (won't fix)
Project:
Openlayers
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Jun 2010 at 14:25 UTC
Updated:
10 Oct 2014 at 15:14 UTC
Jump to comment: Most recent
Comments
Comment #1
tmcw commentedSetting the width and height of the map preset isn't working? Maps with width: auto; are known to not work inside divs with
display: none;because the browser doesn't actually calculate width - it returns NaN.Comment #2
marco.giaco commentedYou're right, setting map width into presets to a fixed value or to 100%, solves this problem
Comment #3
strk commentedWhat are the drawbacks of using 100% by default rather than auto ?
Comment #4
tmcw commentedFrom http://archivist.incutio.com/viewlist/css-discuss/64711
Comment #5
tmcw commentedMarking as won't fix - this is an upstream bug.
Comment #6
henrijs.seso commentedSame error message in Vertical Tabs. When width and height is set in Presets, error is gone but still NO map. Maybe it is worth looking into, since Vertical Tabs are in Core in D7?
Comment #7
henrijs.seso commentedSorry, something else is wrong, no map outside VT too.
Comment #8
henrijs.seso commentedI have to open this again, since problem still exists in some form and will get worse with D7. Problem is that maps (js) behaves strange when rendered in hidden div. Some maps are simply off center and sprigs in place as soon as map is moved (mapnik), others are way off center and kind of cropped (gmaps) and some are even around the globe off (default center for US I guess) and when moved, map is not moving but feature layer is. Zooming with zoom bar makes object in featured layer move diagonally.
Comment #9
tmcw commentedAs I stated before (but didn't give enough detail), this is an upstream problem: so, despite the fact that this is a problem with panels and D7, it's not a problem that can be fixed within the scope of this module. If you want to submit a bug report at openlayers.org, go for it - and this may in fact be fixed by OpenLayers 2.10, although I suspect that it isn't entirely fixable, since it's a browser / DOM restriction that hidden divs have NaN width and height.
Comment #10
tmcw commentedMarking again as won't fix, because this is again an unstream bug. Feel free to post an issue on openlayers.org, but this isn't going to be fixed in this module because it isn't a problem created by this module.
Comment #11
joshuabud commentedHas anyone been able to fix the map load issue? I experience the same problem with regards to no map showing when width is set to auto, but with a defined pixel width it seems to allow the map to show however upon first load it's not displayed properly. With a simple drag or zoom it snaps into place and looks as expected.
Looking for some direction.
Comment #12
sjs commentedI got this fixed by using the "off-left" workaround documented here:
http://jqueryui.com/demos/tabs/
Replace
.quicktabs-hide {
display: none;
}
with:
.quicktabs-hide {
position: absolute;
left: -10000px;
}
in quicktabs/css/quicktabs.css
Comment #13
sstose commentedleft: -10000 didn't work for me (mapnik), but top: -10000 did work. With map preset at 'auto'.
cheers, thanks for help.
Comment #14
jglynn commentedIt's not immediately clear from reading the above comments, but if you go to your OpenLayers -> Maps page, then edit your map, you can change the width setting from 'auto' to a fixed pixel dimension. This will fix the rendering in tabs.
Comment #15
dude74 commentedThks jglynn !!!
Your tip is fantastic to solve quicktabs and openlayers compatibility !
Comment #16
ron williams commentedI want to extend https://www.drupal.org/node/834660#comment-4444274 to resolve an issue I had with panels in conjunction with quicktabs and openlayers.
In my case after hunting for the fix, I was able to figured it out using the following:
/* Fixes issue with map */
.quicktabs-hide {
position: absolute;
top: -10000px;
display: block;
left: 0;
right: 0;
}
Comment #17
dr_thomas64 commentedThat sort of works for me - I can use auto to set the map width again but only if I select "Yes: Load only the first tab on page view" in the Quicktab settings. Otherwise I get no map at all. Still - at least I can now get my tabs to behave consistently. Many thanks.