Responsive maps on Events pages?

I have the Google Maps responsive add-on enabled, and it works fine on most of the maps on my site, but the maps in the Events page don’t seem to respect the responsive setting — the maps remain a static size and don’t adjust dynamically.

I’ve tried adding is_responsive “yes” to the shortcode generated by the maps form on the Event page, but it doesn’t seem to do anything on these pages.

Is there an easy way to get responsive maps working with Events pages?

  • gabriel_gadfly
    • New Recruit

    Thanks, Patrick.

    I’ve found a bit of a workaround in the meantime, but it’s not ideal.

    I was able to pull a responsive map into the event by pasting the shortcode generated by the Event Location field into the body of the event and adding the is_responsive attribute.

    This created duplicate maps within the event, though — my responsive map within the body and the default event map created by the Event Location field. I was able to hide the default map by adding display:none to my css for .wpmudevevents-map.

    That said, that’s a bit less user-friendly than just having native support for the responsive maps, so it’d be great if the devs could get that working.

  • Krisis
    • WPMU DEV Initiate

    Ok,

    I add this question in mind since some days, but just found the answer after asking the question.

    So if you encounter the same issue, paste this code in your style.css:

    .agm_google_maps, .agm_google_maps > div:first-child {

    width: 100% !important;

    }

    Hope this helps.

    Regards,

    Mat