click event not firing on Blackberry

81 views
Skip to first unread message

Jerry Skor

unread,
May 3, 2011, 9:03:29 PM5/3/11
to Google Maps JavaScript API v3
Cannot seem to get a click Event Handler to work on my Blackberry
Curve running OS 6.

Attached code works in Firefox on my laptop but not on my Blackberry

<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
html { height: 100% }
body { height: 100%; margin: 0px; padding: 0px }
#map_canvas { height: 100% }
</style>
<script type="text/javascript"
src="http://maps.google.com/maps/api/js?sensor=true">
</script>
<script type="text/javascript">
var map;
var markersArray=[];


function initialize() {
var latlng = new google.maps.LatLng(41.06716,-74.19799);
var myOptions = {
zoom: 14,
minZoom: 7,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP,
disableDefaultUI: true,
draggable: true

};


map = new google.maps.Map(document.getElementById("map_canvas"),
myOptions);

google.maps.event.addListener(map, 'click', function(event) {
placeMarker(event.latLng);
});




}


// Removes the overlays from the map, but keeps them in the array
function clearOverlays()
{ if (markersArray) {
for (i in markersArray) {
markersArray[i].setMap(null);
}
}
}




function placeMarker(location) {
clearOverlays();
var marker = new google.maps.Marker({
position: location,
map: map
}



);



markersArray.push(marker);


}


</script>
</head>
<body onload="initialize()">
<div id="map_canvas" style="width:100%; height:100%"></div>

</body>
</html>

Kalun

unread,
Jan 6, 2012, 5:25:23 AM1/6/12
to google-map...@googlegroups.com
I am having the same issue.  It doesn't even work on google's official example site....

Did you find a workaround?

Thanks,
Kalun
Reply all
Reply to author
Forward
0 new messages