2 Replies Latest reply on Oct 4, 2011 6:20 PM by andyb RSS
    sinhd Explorer

    Unable to store location in a data table

    I have a data table with a field called location but I'm not able to store location value.  It seems like location is read-only field.  At run-time I uuse google GEO API and translate the address to geolocation.  Before a call AddDataTableEntry I placed a warning log and my location.longitude and location.latitude exist and have valid data; however, when I query my table it only shows location of 0.0,0.0,0.0,WGS84.  Why?

    Here's step to reproduce
    1) Create a DataShape with a field call location of type Location
    2) Create a DataTable with DataShape from 1
    3) Create a Thing with a service, say, called PopulateData
    4) In service PopulateData put this code:
    var location=new Object();
    location.longitude=[get valid longitude from google and hard-code it here]
    location.latitude=[get a valid latitude from google and hardcode it here]
    location.units = 'WGS84';
    5) Assign location to params
    6) Invoke service AddDataTableEntry (params)
    7) Retrieve you DataTable entries and the location always have the value of 0.0,0.0,0.0,WGS84