Event Organiser
[resolved] Feature Request: disable scrolling on map embed (5 posts)

  1. jas8522
    Posted 3 years ago #

    Can't stand when I'm scrolling down a page and my cursor just happens to hover over a map or flash element and scrolling stops or starts causing some other effect I didn't intend; such as zooming a map!

    I'd like either an option to disable it for map embeds (particularly when using the function to display it on the front-end) or better yet, to simply have it disabled altogether.


  2. Stephen Harris
    Posted 3 years ago #

    Google Maps allow you to do this http://stackoverflow.com/questions/2330197/how-to-disable-mouse-scroll-wheel-scaling-with-google-maps-api

    So I'll be adding in an additional attribute/argument for the map shortcode and eo_get_venue_map() function. You can expect this in 1.6 (due end of October - November ).

  3. jas8522
    Posted 3 years ago #

    Indeed it does! Sorry, I should have included that, though I'm sure it didn't take you long to find.

    Sounds great! You rock.

  4. Stephen Harris
    Posted 3 years ago #

    This will be in 1.6, which is currently in beta testing: https://github.com/stephenh1988/Event-Organiser/tree/dev (dev Branch).

    The option is available as a shortcode: [eo_venue_map scrollwheel=false] or can be used with the function eo_get_venue_map():

    echo eo_get_venue_map('edinburgh-castle', array('scrollwheel'=>false));

    Other Google option attributes added along with scrollwheel:

    • zoomcontrol
    • rotatecontrol
    • pancontrol
    • overviewmapcontrol
    • streetviewcontrol
    • maptypecontrol
    • draggable
    • maptypeid - (e.g. 'ROADMAP', 'SATELLITE')

    All but the last take true/false values and default to true. The last accepts a string (see Google map type IDs) and defaults to 'ROADMAP'.

    There is also 'tooltip' option (defaults to false) which displays a tooltip with the venue's address. The content of this tooltip is filterable using the hook eventorganiser_venue_tooltip.

    Finally multiple venues can be displayed on one map. With the shortcode use a comma delimited string:

    [eo_venue_map venue="slug-1,slug-2"]

    With the function pass an array:

    echo eo_get_venue_map(array('slug-1','slug-2'), array('scrollwheel'=>false));

    Note the array may contain either slugs or IDs (*must* be passed as integers).

  5. Stephen Harris
    Posted 3 years ago #

    Closing this as 1.6 was released earlier today - you can find out more here: http://wp-event-organiser.com/blog/1-6-released/

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Event Organiser
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.