I have a qooxdoo mobile app where I am trying to implement a google map. I have looked at the openlayers example,but it does not suit my needs. The issue I have is that the events attached to google map do not get triggered or at least do not reach the handlers i defined. Stand alone, outside qooxdoo mobile, it works fine. I've trigered the loadMapLibrary directly from inte _initialize function and as a listener on the appear event of the page. Both times the map gets displayed fine, but no events are handled.
I understand I can trigger qx events on the div, but they lack the google.maps properties i need, like lat/lon etc. What am I doing wrong.
The example at http://demo.qooxdoo.org/current/demobrowser/#showcase~Maps.html for desktop seems to operate in the way i implemented it. Am I missing something?
_loadMapLibrary: function() {
var self = this;
var req = new qx.bom.request.Script();
req.onload = function() {
self._G = google.maps;
self._createMap();
}
req.open("GET", self._mapUri);
req.send();
},
_createMap: function() {
var mapContainer = document.getElementById("googleMap");
var chicago = new this._G.LatLng(41.850033, -87.6500523);
var myOptions = {
zoom: 7,
mapTypeId: this._G.MapTypeId.ROADMAP,
center: chicago
// draggable: false,
// panControl: false
}
this._map = new this._G.Map(mapContainer, myOptions);
google.maps.event.addListener(this._map, 'click', this._startDrawing);
google.maps.event.addListener(this._map, 'mousemove', this._mapMouseMove);
// document.addEventListener("touchmove",function(e) {
// //log('touchmove');
// e.preventDefault();
// });
},