• Resolved armix

    (@armix)


    Hi, I was wondering – is there a way to make the google map as “static” so the mouse doesn’t get trapped in the map until you click.

    There is an option to display: “data-static-map-url” for google.

    Can you point me out in the code where to update this if possible of course.

    thanks

    https://ww.wp.xz.cn/plugins/wp-store-locator/

Viewing 3 replies - 1 through 3 (of 3 total)
  • This would be handy as I often find myself attempting to scroll the page and inadvertently zooming the map by mistake.

    Plugin Author Tijmen Smit

    (@tijmensmit)

    You will be able to disable the scroll wheel action on the map through the settings page in 2.0. But until then you will have to edit the code to disable it.

    Open the /js/wpsl-gmap.js file and look or ‘myOptions =’, this is near the top of the file inside then ‘function initializeGmap()’.

    Replace the myOptions with this, I added ‘scrollwheel: false’.

    myOptions = {
          zoom: zoomLevel,
          center: startLatLng,
          mapTypeId: mapType,
          mapTypeControl: false,
          panControl: false,
          scrollwheel: false,
                streetViewControl: streetViewVisible,
                      zoomControlOptions: {
                            style: zoomControlStyle,
                            position: zoomControlPosition
                      }
       };
    Thread Starter armix

    (@armix)

    I’ve made the changes you mentioned (added scrollwheel: false) but still see map traps when scrolling on the site or especially mobile. Any other recommendations? I know the website like airbnb.com has a map on a listing that is “static” map until you click there.

    any advice?

    thanks

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Static google map’ is closed to new replies.