I can get the maps to be responsive with the shortcode [map

I can get the maps to be responsive with the shortcode [map id="1" is_responsive="true"]

Works perfectly but the issue is there is no where to select if you want the map to be responsive and have it automatically be 100% width.

I don't want my client to have to manually type int is_responsive="true" everytime they use the map. Is there a way to force the map to always be responsive?

  • Vinod Dalvi
    • WP Unicorn

    Hi @Jasonhebert,

    I hope you are well today and thank you for your question.

    You can achieve this by checking the option "All my maps (except the ones I manually exclude with is_responsive="no" shortcode attribute)" in the Google Maps Plugin Options on the following path as shown in the attached screenshot.

    Admin Area -> Settings -> Google Maps -> Responsive Maps

    Regards,
    Vinod Dalvi

  • Vinod Dalvi
    • WP Unicorn

    Hi @Jasonhebert,

    Have you added width attribute to the map shortcode?

    If yes then try removing it.

    Please share me the page URL from your site where you are using shortcode with responsive attribute without any issue.

    Would you mind if I logged in to your site and did some troubleshooting? This might help get to the bottom of this faster. If this is ok, just grant me temporary admin access to your site by clicking "Grant Access" button in the WPMU DEV Dashboard Settings as described on the following page and reply on this thread after granting it?

    https://premium.wpmudev.org/manuals/wpmu-dev-dashboard-enabling-staff-login/

    Regards,
    Vinod Dalvi

  • Jasonhebert
    • Site Builder, Child of Zeus

    I just granted you access. I'm working with custompress so the one item is in "rentals" I haven't even begun to put in real content or design styles at all so feel free to do what you want. Add new maps or whatever you need. I can delete them later.

  • Vinod Dalvi
    • WP Unicorn

    Hi @Jasonhebert,

    I could confirm the issue on my test site using latest version of Google Maps plugin that the maps are not getting responsive even checking the option "All my maps (except the ones I manually exclude with is_responsive="no" shortcode attribute)" in the Google Maps Plugin Option.

    I have notified the plugin developer about this so that it can be fixed.

    The issue will be fixed ASAP.

    In the meanwhile you can fix the issue by editing the following Google Maps plugin file on line number 56 as displayed below.

    Google Maps plugin file :
    /wpmu_dev_maps_plugin/inc/addons/responsive-maps.php

    Before Editing :

    public function process_overrides( $overrides, $args ) {
    	if ( agm_positive_values( $args['is_responsive'] ) ) {
    		$overrides['is_responsive'] = true;
    	}
    	else if ( agm_negative_values( $args['is_responsive'] ) ) {
    		$overrides['is_responsive'] = false;
    	}

    After Editing :

    public function process_overrides( $overrides, $args ) {
    		if ( agm_positive_values( $args['is_responsive'] ) ) {
    			$overrides['is_responsive'] = true;
    		}
    		else if ( $args['is_responsive'] != '' && agm_negative_values( $args['is_responsive'] ) ) {
    			$overrides['is_responsive'] = false;
    		}

    Alternatively you can just use the attached modified plugin file responsive-maps.php that contains the above change so you can just overwrite the above Events+ plugin file in the plugin directory using the attached modified file.

    Best Regards,
    Vinod Dalvi

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.