Commit 86481f69 by Billy Tobon

flipping lat - lon on point creation.

parent 557d9ad2
...@@ -156,8 +156,8 @@ class ParseObject(ParseBase): ...@@ -156,8 +156,8 @@ class ParseObject(ParseBase):
coordinates = re.findall("[-+]?[0-9]+\\.?[0-9]*", value) coordinates = re.findall("[-+]?[0-9]+\\.?[0-9]*", value)
print coordinates print coordinates
value = {'__type': 'GeoPoint', value = {'__type': 'GeoPoint',
'latitude': float(coordinates[0]), 'longitude': float(coordinates[0]),
'longitude': float(coordinates[1])} 'latitude': float(coordinates[1])}
return (key, value) return (key, value)
...@@ -173,8 +173,8 @@ class ParseObject(ParseBase): ...@@ -173,8 +173,8 @@ class ParseObject(ParseBase):
value = ParseBinaryDataWrapper(base64.b64decode( value = ParseBinaryDataWrapper(base64.b64decode(
value['base64'])) value['base64']))
elif value['__type'] == 'GeoPoint': elif value['__type'] == 'GeoPoint':
value = 'POINT(%s %s)' % (value['latitude'], value = 'POINT(%s %s)' % (value['longitude'],
value['longitude']) value['latitude'])
else: else:
raise Exception('Invalid __type.') raise Exception('Invalid __type.')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment