I have been able to replicate the problem you are reporting above, and
seems to be only on the iPhone (all PC browsers ok).

Seems like an event conflict.

Perhaps you could use an iphone specific listener (touchstart or
touchend) to override certain behaviours or add/remove listeners

emergencyControl.ontouchstart = function(event) {
     alert("TOUCH START");
}

emergencyControl.ontouchend = function(event) {
     alert("TOUCH END");
}





On Feb 7, 5:58 am, mbernasocchi <[email protected]> wrote:
> hi all,
> I've a custom control that works correctly in firefox 3.5 (on ubuntu
> 9.10). when i click it it fires the eventlistener set to listen to it
> (i.e if you look ath the code below it only alerts "emergency cntrol
> clicked").
> on the other hand, if i use the map with the iphone, clicking on the
> control fires the map event listener as well....
> any suggestions?
>
> // call the EmergencyControl constructor
>   var emergencyControl = new EmergencyControl();
>
> map.controls[google.maps.ControlPosition.RIGHT].push(emergencyControl.html);
>   // Setup the click event listeners
>   google.maps.event.addDomListener(emergencyControl.eventReceiver,
> 'click',  function() {
>      alert('emergency control clicked');
>      emergencyControl.switchStatus();
>   });
>
>   // Setup the click event listeners to close the custom controls if
> the map is clicked
>   google.maps.event.addDomListener(map, 'click', function() {
>     alert('map clicked');
>     emergencyControl.switchStatus(force_close);
>   });

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to