• Resolved TiagoPires

    (@tiasch)


    We have a wide Google map on our site and users trying to scroll down the page using a scroll wheel or scroll swiping on a tablet or phone end up zooming the map and cannot move down the page.

    1. is it possible to disable zooming on scroll?
    2. let them zoom using regular double click or zooming?

    This is the current code using the “‘scrollwheel’ => false” argument which we can’t get to work. Thanks for the plugin!

    if ( function_exists( 'pronamic_google_maps_mashup' ) ) {
        pronamic_google_maps_mashup(
            array(
                'post_type' => 'city'
            ),
            array(
                'width'          => '100%',
                'height'         => 600,
                'map_type_id'    => 'terrain',
                'navigationControl' => false,
                'scrollwheel' => false,
    			'mapTypeControl' => false,
    			'scrollwheel' => false,
                'marker_options' => array(
                    'icon' => get_template_directory_uri(). '/images/marker.png'
                )
            )
        );
    }

    http://wordpress.org/plugins/pronamic-google-maps/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Remco Tolsma

    (@remcotolsma)

    You have to place the map option under the ‘map_options’ key.

    if ( function_exists( 'pronamic_google_maps_mashup' ) ) {
        pronamic_google_maps_mashup(
            array(
                'post_type' => 'city'
            ),
            array(
                'width'          => '100%',
                'height'         => 600,
                'map_type_id'    => 'terrain',
                'map_options' => array(
    			'navigationControl' => false,
    			'scrollwheel' => false,
    			'mapTypeControl' => false,
    			'scrollwheel' => false
                ),
                'marker_options' => array(
                    'icon' => get_template_directory_uri(). '/images/marker.png'
                )
            )
        );
    }

    See also the following example:
    https://github.com/pronamic/wp-pronamic-google-maps/blob/develop/examples/map-disable-map-controls.php

    Thread Starter TiagoPires

    (@tiasch)

    And it was a simple as that… works great for desktops.

    Since swiping on mobile moves the map around in its frame instead of scrolling the page there is still a problem on phones and tablets as users find it hard to get to bellow-map content.

    if the site is visited on a mobile:
    http://novazelandiabrasil.com.br/cidades/

    Thanks again for the help! got us in much better place!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Disable zoom on scroll using mashup’ is closed to new replies.