Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
On a site with the OpenLayers module, I noticed that a freshly created Aurora sub theme (corona based) breaks the OpenLayers map in a strange way. Bartik works just fine; just compare the images attached.
Does anyone understand what's going on here? I couldn't figure out how the OpenLayers markup works, but perhaps it some max-width rule somewhere?
Comment | File | Size | Author |
---|---|---|---|
#3 | source.html_.txt | 17.38 KB | marcvangend |
map-bartik.png | 520.14 KB | marcvangend | |
map-aurora.png | 299.97 KB | marcvangend |
Comments
Comment #1
Snugug CreditAttribution: Snugug commentedWhat are your JavaScript settings for your subtheme?
Comment #2
Snugug CreditAttribution: Snugug commentedAlso, do you have source for that for me to look at?
Comment #3
marcvangendThanks for looking into this.
All settings are default, so the info file says:
I installed Modernizr 7.x-3.0-dev (today's build) and jQuery Update 7.x-2.3-alpha1. Switching from jQuery version 1.5 to 1.8 didn't solve the problem.
I am attaching the source of the page. (Just anonymized some strings containing the client name.) If you want, I can put it on a server and send you a personal message with the url.
Comment #4
marcvangendAfter digging in the source code some more, I found that:
#OpenLayers.Map_2_OpenLayers_Container
has inline style width:100pxI was able to fix the problem using a simple CSS rule in my theme:
This works great for now, but I'm not sure what the real fix should be. I don't expect Aurora to include all kinds of exceptions and hard-coded classnames to support 3rd party libraries, but on the other hand, I guess we can't expect OpenLayers to change its map widget all of a sudden.
Comment #5
iamcarrico CreditAttribution: iamcarrico commentedIf I am reading this correctly, then Aurora is working as it should by making images responsive. This seems like a weird thing for OpenLayers to do, but I dont see a way to "fix" it more than what you have already done. If there is a fix you can think of that is more comprehensive-- let us know. Until then, I will close this issue out.
Comment #6
marcvangendI think you are correct. Aurora is not broken. Open Layers is not broken either (although it's a bit weird). The two are just a little bit incompatible. Let's just hope people will find this thread when they need it.
Comment #6.0
marcvangendsome additional info