How to handle longtap on utfgrid with leaflet

169 Views Asked by At

I'm trying to get a longtap to work on a utfgrid using leaflet/mapbox.

Normally I'd think jQueryMobiles "taphold" or leaflets "contextmenu" would work (and they do... on the map) but nothing when trying to use it with the utf gridLayer.

I currently use this for a simple tap/click on the grid which works fine.

gridlayer.on('click', function (e) {
    console.log(e.data);
});

But what I really want to do is this.

gridlayer.on("contextmenu", function(e){
   //do something else
}); 

or

gridlayer.on("taphold", function(e){
   //do something else
});
0

There are 0 best solutions below