Hey,
the data binding requires a data event to be bindable. As the GeoLocation event 
is not a data event, It is by default not bindable. If you want to have that 
bound, I would suggest to add the properties to your application you want to 
bind and connect these properties by hand with the geolocation events using 
event listeners.
Regards,
Martin


Am 28.11.2012 um 12:44 schrieb Alex 
<[email protected]<mailto:[email protected]>>:

Dear List,

I have a mobile app for which I want to use geolocation.
My problem is that I don't understand how to assign the lat / lon to a property 
in Application.js so I can bind other pages to it.

When I bind the position to a latLon property in Application.js is get:
004930 Assertion error! position is not an data (qx.event.type.Data) event on 
qx.bom.GeoLocation[99-0].: Expected 'qx.event.type.Data' but found 
'qx.event.type.GeoPosition'!

I have tried some variations, but I just can't bind to the property.

I got it working so far that I can debug the location:

      var loginPage = new sgmobile.page.Login();
      manager.addDetail(loginPage);

      loginPage.addListener("appear", function(evvt) {
        this.__getPosition();
      }, this);

      loginPage.show();

     ................

 __getPosition : function() {
      var geoLocation = qx.bom.GeoLocation.getInstance();
      var pos = geoLocation.getCurrentPosition();
      geoLocation.addListener("position", this.__applyPosition);
    },

    __applyPosition : function(position) {
      this.latlon = {
        "lat" : position.getLatitude(),
        "lon" : position.getLongitude()
      }
      this.debug("latlon: " + qx.lang.Json.stringify(this.latlon));
    },

Best Regards,
Alex
------------------------------------------------------------------------------
Keep yourself connected to Go Parallel:
INSIGHTS What's next for parallel hardware, programming and related areas?
Interviews and blogs by thought leaders keep you ahead of the curve.
http://goparallel.sourceforge.net_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
Keep yourself connected to Go Parallel: 
INSIGHTS What's next for parallel hardware, programming and related areas?
Interviews and blogs by thought leaders keep you ahead of the curve.
http://goparallel.sourceforge.net
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to