samedi 19 juin 2021

Flutter mapbox mobile, web and mobile web - long click implementation not consistent

Scenario: I am using mapbox (mapbox_gl: ^0.12.0) in a flutter app development and seeing different reactions to click and long click when moving from mobile to desktop browser to mobile browser with the same code base.

I am using the Mapbox instance in full screen with scroll and zoom gestures enabled.

Normal clicks are recognized (callback triggered) on mobile, desktop web and mobile web.

Long click and double click: Mobile - long click events recognized and double click zooms in on map. Web on desktop - long click recognized as short click (sometimes), double click recognized as long click but also zooms in on map. Web on mobile - long click not recognized, double click recognized as short click but also zooms in on map.

The difference in implementation makes it difficult to use consistent custom control (ie FAB) and dialogue box on top of the map.

I would appreciate some feedback on this behavior (has any one else observed it?) and if it is a current issue, any remedies on the horizon.




Aucun commentaire:

Enregistrer un commentaire