Map click Event broken with 3.6compact version of API

742
3
08-30-2013 12:50 PM
KarenRobine
Occasional Contributor II
I think the map OnClick event is broken when using the JavaScript 3.6compact version on smartphones.

Add this to your Init function..

   map.on("click", function (evt) {
         alert("onClick Event beginning. SHOULD ONLY HAPPEN ONCE..");
  });

This happens twice when running it on my smartphone.
0 Kudos
3 Replies
GISDev1
Occasional Contributor III
Just tested your code and you are 100% correct.
On desktop browsers, it only fires once.
On all the mobile browsers (iOS4, iOS5, Android 2, 4.0.2) I can test, it fires twice.
0 Kudos
deleted-user-Jie3eyjOl9XM
Occasional Contributor
I've been fighting with this problem, too. It persists in 3.7. The double-click doesn't happen on my Android tablets (4.1), just Android phones (2.3 and 4.1).

It's pretty bad, because I am using dojox mobile Views. So, for example, when you select a basemap in the basemap gallery, the second event might fire right on the map zoom button, or show a popup infoWindow on the map!

Any progress on a fix for this?
0 Kudos
KarenRobine
Occasional Contributor II
I've been fighting with this problem, too. It persists in 3.7. The double-click doesn't happen on my Android tablets (4.1), just Android phones (2.3 and 4.1).

It's pretty bad, because I am using dojox mobile Views. So, for example, when you select a basemap in the basemap gallery, the second event might fire right on the map zoom button, or show a popup infoWindow on the map!

Any progress on a fix for this?



Here's your fix:
http://forums.arcgis.com/threads/94963-Javascript-API-map-3.7-has-no-coordinates-when-handling-map-c...
0 Kudos