Ionic map demo: touch events


I am using the map demo in my app. Now, I added some markers and I want that when you tap in them, the infowindow opens.

In my desktop browser it works. But on my cellphone, doesn’t. I know that the “problem” is this part in the demo:

// Stop the side bar from dragging when mousedown/tapdown on the map
        google.maps.event.addDomListener(document.getElementById('map'), 'mousedown', function(e) {
          return false;

because I am attaching an event to each of my markers using mousedown too. How can I do that and still stop the side bar from dragging?

Also, I don’t know why if I comment the preventDefault part my first marker opens well, but my second doesn’t.

Here is a Pen with my code.



see this Google Maps Info Box works fine in browser but fails in emulator


I think using that is the same that the e.preventDefault() and didn’t help me…


it is not the same… and your sample doesnt reflect the change suggested


Sorry, I was really busy the lasts days. Here is an upadted Pen: