Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i18n: gestureHandlingOptions > text not working #47

Open
sven-ahrens opened this issue Jan 6, 2020 · 4 comments
Open

i18n: gestureHandlingOptions > text not working #47

sven-ahrens opened this issue Jan 6, 2020 · 4 comments

Comments

@sven-ahrens
Copy link

I've been using this plugin for the first time and followed the instructions of the readme file. When initializing the map, I've set gestureHandling: true and set the following options:

gestureHandlingText: {
     scroll: 'Test scrolling',
     touch: 'Test touch',
     scrollMac: 'Test scrolling on mac'
}

after I've set those options, nothing appears. Not even the background tho the scroll behaviour is fine.

As in the documentation mentioned, for "older" versions gestureHandlingText should work too, which it does but I'm using the most recent version of this plugin. So both versions should work perfectly fine.

Is this just me or can someone reproduce this problem?

@leverglowh
Copy link

I'm using this with React, just installed it from npm so it's the newest version.
gestureHandlingOptions does not work at all, no text is shown when using text: {...} and duration: 3000 does not work either.
When no gestureHandlingOptions is given, everything default works fine.
gestureHandlingText works fine too.

@t-cadei
Copy link

t-cadei commented Jun 18, 2020

Same issue here (Angular 9)...
Anyone solved that ?

@enrtama
Copy link

enrtama commented Oct 1, 2020

Same issue here........
Some progress on this?

Does it work for you @leverglowh?

@szympol
Copy link

szympol commented Feb 8, 2021

It seems that not passing duration property breaks the plugin. Adding duration helped me.

var map = L.map("map", {
    center: [-25.2702, 134.2798],
    zoom: 3,
    gestureHandling: true,
    gestureHandlingOptions: {
        text: {
            touch: "Hey bro, use two fingers to move the map",
            scroll: "Hey bro, use ctrl + scroll to zoom the map",
            scrollMac: "Hey bro, use \u2318 + scroll to zoom the map"
        },
        duration: 1000
    }
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants