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.
The default markup and styling for popups isn't quite what I need, and was wondering how I may change the following;
1. I'd like to toss the divs with id='popup_FrameDecorationDiv_#'. For me, these are adding unnecessary bloat - visuals which CSS alone is very well able to produce.
2. How can I change/remove some/all of the gross inline styling on the popup block elements (elements like, '#popup, #popup_GroupDiv, #popup_contentDiv)?
I'm keen on using any css/js/php methods, but I can't find where these things are constructed. Thanks!
Comments
Comment #1
friedjoff CreditAttribution: friedjoff commentedThis is the default OpenLayers markup that can't be modified without going into the OpenLayers library. My advice is to work around this markup, if possible.
If you want to modify the popup content try to override
Drupal.theme.prototype.openlayersPopup
.Comment #2
PolComment #4
bcobin CreditAttribution: bcobin commentedIn case anyone else runs into this, you can also override the styling by deploying the OpenLayers library locally (as per the instructions on admin/structure/openlayers) and then you can override by using !important in your CSS declarations. The below is a quick and dirty improvement for the popups that I'll likely refine:
Happy mapping!
Comment #5
bcobin CreditAttribution: bcobin commentedOr... you could use OpenLayers Feature Popups. Duh... sorry.