Leaflet mobile browser gesture handling

Home Forums MapPress Support Leaflet mobile browser gesture handling

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #19490
    axs01
    Participant

    Hi,

    When the Leaflet map is viewed on a page through a mobile browser, it is quite frustrating when the user tries to scroll the page but ends up dragging the map.

    I’m wondering if it is possible to enable gesture handling for Leaflet map, like in Google map, in MapPress?

    E.g., something like this https://www.npmjs.com/package/leaflet-gesture-handling

    Thanks!

    #19491
    Chris
    Keymaster

    Hi,

    Thanks for writing.  I replied to your earlier email on this but the email address was invalid.

    Leaflet unfortunately doesn’t support 2-finger panning.  It’s possible to do with various plugins, but I don’t have any plans yet to integrate those into MapPress.  If you need custom development, please feel free to reach out with the contact form.

    Otherwise, you can try using Google, which has excellent 2-finger support.  Or, make the Leaflet map less than full-screen (i.e. use a width of 80% instead of 100% to allow for a “gutter” where the users can scroll the page).

    You can also submit a request to the Leaflet team here.  It would be useful, since it’s best if they add this to their core library:

    https://github.com/Leaflet/Leaflet/issues

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.