Flexible Map v1.16.0

Flexible Map v1.16.0 has just been released. This release adds a setting that prevents the plugin from loading the Google Maps API; and deprecates attributes scrollwheel, draggable, and dblclickzoom in favour of gesturehandling.

Gesture Handling

Current versions of the Google Maps API handle things like finger-dragging and zooming with the mouse’s scroll wheel more intelligently than it used to. To take advantage of this, I’ve deprecated some old attributes and added a new one: gesturehandling.

Google Map showing the CTRL + scroll prompt

Google Map showing the CTRL + scroll prompt

There are four possible values for the gesturehandling attribute:

  • cooperative: the scroll wheel does not zoom the map without also holding down the CTRL key or ⌘ key, and dragging on touch devices requires two fingers
  • greedy: all touch and scroll events work
  • auto: the Maps API chooses whether to use greedy or cooperative based on the page size
  • none: no zooming or panning / dragging the map with gestures; add controls to allow zooming / panning

The new gesturehandling attribute effectively replaces attributes scrollwheel, draggable, and dblclickzoom. These continue to work as legacy shortcode attributes, but please don’t use them for new maps.

Don’t load the Google Maps API script

Sometimes a website can run into problems when there are a couple of different plugins loading the Google Maps API. I have a little plugin that can make sure that only Flexible Map is loading the Maps API on pages with a map shortcode, but sometimes it would be simpler if the map plugin just didn’t load the Maps API and let another plugin or the theme do it. To help with that, I’ve added a new setting: Don’t Load API. Tick this if you’re having conflicts due to multiple Maps API scripts being loaded, and hopefully it will fix your conflicts.

You can update to the latest version from your WordPress plugin admin page. Here’s the full changelog for Flexible Map.

Posted on