Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Problem posting GeoPoint to parse.com

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

David Fung
Posts: 0
Joined: Wed Nov 28, 2012 4:52 pm

Problem posting GeoPoint to parse.com

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!

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Problem posting GeoPoint to parse.com

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

David Fung
Posts: 0
Joined: Wed Nov 28, 2012 4:52 pm

Problem posting GeoPoint to parse.com

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

Nathan Kahl
Posts: 0
Joined: Tue Nov 20, 2012 4:03 am

Problem posting GeoPoint to parse.com

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

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Problem posting GeoPoint to parse.com

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

David Fung
Posts: 0
Joined: Wed Nov 28, 2012 4:52 pm

Problem posting GeoPoint to parse.com

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 };

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Problem posting GeoPoint to parse.com

Try this:

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

return JSON.stringify(jsonback);
/code

David Fung
Posts: 0
Joined: Wed Nov 28, 2012 4:52 pm

Problem posting GeoPoint to parse.com

Sorry, it doesn't work.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Problem posting GeoPoint to parse.com

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.

Return to “Issues”