Page 2 of 3

Problem posting GeoPoint to parse.com

Posted: Fri Dec 14, 2012 1:38 pm
by Maryna Brodina

Hello! In mapping please try to add JS code for "location"

Image

Image

Also check whether you secret keys from parse.com are correct
Using FireBug or Chrome Developer Tools check what did you get from server


Problem posting GeoPoint to parse.com

Posted: Fri Dec 14, 2012 2:45 pm
by David Fung

I am sure the secret keys are correct due to to other data fields could be submitted. The java script is inserted and googlemap1 object is created but no success. The app. is shared and you are welcome to visit it. Thanks!


Problem posting GeoPoint to parse.com

Posted: Fri Dec 14, 2012 2:56 pm
by Maryna Brodina

Ok, thank's. We'll take a look. Did you check the responce from parse.com using FireBug or Chrome Developer Tools?


Problem posting GeoPoint to parse.com

Posted: Fri Dec 14, 2012 4:43 pm
by David Fung

I found the user id data could be posted to the db but the geopoint data could not be posted.


Problem posting GeoPoint to parse.com

Posted: Fri Dec 14, 2012 4:56 pm
by Nathan Kahl

I think this is the same issue with posting PUSH data to parse....an array isn't supported in the REST UI of tiggzi


Problem posting GeoPoint to parse.com

Posted: Sat Dec 15, 2012 4:09 pm
by maxkatz

You can create the array in JavaScript, as Marina posted here: https://getsatisfaction.com/tiggzi/to...


Problem posting GeoPoint to parse.com

Posted: Tue Dec 18, 2012 8:34 am
by David Fung

Due to the uid could be updated in the DB, ie the secret key are correct. Three syntax are tried without the Geopoint data submission successful.

return {"type":"GeoPoint", "latitude": theLat, "longitude": theLng};
return {"type":"GeoPoint", "latitude": "'+theLat+'", "longitude": "'+theLng+'"};
return {"__type":"GeoPoint", "latitude": '+theLat+', "longitude": '+theLng+'};

However, if the fix value are replaced, the GeoPoint could be updated
return{ "__type":"GeoPoint", "latitude":40.0, "longitude":-30.0 };


Problem posting GeoPoint to parse.com

Posted: Tue Dec 18, 2012 6:27 pm
by maxkatz

Try this:

code
var jsonback = {};
jsonback ["__type"] = "Geopoint&quot
jsonback ["latitude"] = theLat;
jsonback ["longitude"] = theLng;

return JSON.stringify(jsonback);
/code


Problem posting GeoPoint to parse.com

Posted: Wed Dec 19, 2012 3:19 pm
by David Fung

Sorry, it doesn't work.


Problem posting GeoPoint to parse.com

Posted: Wed Dec 19, 2012 7:54 pm
by maxkatz

Looked at this more...

This is what is sent from the browser:
code
{ " location":"{ \ "__type \ ": \ " GeoPoint \ ", \ " latitude \ ": 10,\ "longitude \ ":20 } "}
/code

It's a valid JSON string. I believe Parse should decode it on their side. I'll find out. Or, it's something we would fix.