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

tap does not work on smart phones #8

Open
Gubancs opened this issue May 14, 2020 · 2 comments
Open

tap does not work on smart phones #8

Gubancs opened this issue May 14, 2020 · 2 comments
Assignees
Labels
bug Something isn't working mobile
Milestone

Comments

@Gubancs
Copy link
Owner

Gubancs commented May 14, 2020

It seems to me that the tap does not work on smart phones also if I add setTap(true) on MapOptions, for example:

MapOptions options = new DefaultMapOptions(); options.setTap(true); LeafletMap leafletMap = new LeafletMap(options); leafletMap.setBaseUrl("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"); leafletMap.onClick((e) -> { Notification.show("New marker added to map.", 3000, Position.TOP_CENTER); });

Environment

Leaflet version: 1.6.0
Browser (with version): Safari
OS/Platform (with version): iOS 13.3.1

@Gubancs Gubancs added bug Something isn't working mobile labels May 14, 2020
@Gubancs Gubancs added this to the v0.3.0 milestone May 24, 2020
@Gubancs Gubancs self-assigned this May 24, 2020
@Gubancs
Copy link
Owner Author

Gubancs commented May 24, 2020

it seems to a 'mousedown' event fired on iPhone 8 instead of 'click' event. You can use temporarily the onMouseDown(...) event handler as a workaround.
I'm not sure why the map does not fire the click event, maybe a leaflet issue.
By the way, in the leaflet GitHub repository, there is a project in connection with refactoring the touch events https://github.com/Leaflet/Leaflet/projects/1

Relating to the leaflet documentation the "tap" is enabled by default so you don't have to enable it.

@Gubancs
Copy link
Owner Author

Gubancs commented May 24, 2020

Releated issue -> Leaflet/Leaflet#6705

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working mobile
Projects
None yet
Development

No branches or pull requests

1 participant