Hello,
mapkit js doesn't seem to get a lot of traction on the forum. Is this the right place to talk about it?
Anyway, I am facing something very weird and I'd like to share it to try to find a solution. I am developing a website using mapkit js. I need to perform a certain action on the click (or tap) event. It works perfectly on desktop (safari, chrome and firefox), but somehow the click event doesn't fire on iphone or ipad (with safari and chrome).
The code looks like that:
map.element.addEventListener("click", function(event) {
if (event.target.parentNode !== map.element) {
// This condition prevents clicks on controls. Binding to a
// secondary click is another option to prevent conflict
return;
}
alert("click on map");
});
The double tap is triggering a zoom, so the framework is catching the taps, but somehow the tap doesn't trigger the click (all other map framework I use do). Is this a normal behavior? Is there a way to make the tap work as a click, or to catch the tap event?
Thank you for help!