GeoPoints¶
A GeoPoint is basically a regular parse.Object with a specific data structure, and special queries.
Add a location Object¶
parse.request( parse.Object.create, "Place" ) :set("__type", "GeoPoint"), :set("latitude", 40.0), :set("longitude", -30.0) :response(cb)
A GeoPoint Query¶
parse.request( parse.Object.query, "Place" ) :where({location = { ["$nearSphere"] = { ["__type"] = "GeoPoint", latitude = 30, longitude = -20.0 } } }) :options( { limit = 10 } ) :response(cb)