@@ -237,68 +237,68 @@ public func containsAll <T>(key: String, array: [T]) -> QueryConstraint where T:
237237}
238238
239239/**
240- Add a constraint to the query that requires a particular key's coordinates (specified via `GeoPoint `)
240+ Add a constraint to the query that requires a particular key's coordinates (specified via `ParseGeoPoint `)
241241 be near a reference point. Distance is calculated based on angular distance on a sphere. Results will be sorted
242242 by distance from reference point.
243243 - parameter key: The key to be constrained.
244- - parameter geoPoint: The reference point represented as a `GeoPoint `.
244+ - parameter geoPoint: The reference point represented as a `ParseGeoPoint `.
245245 - returns: The same instance of `QueryConstraint` as the receiver.
246246 */
247- public func near( key: String , geoPoint: GeoPoint ) -> QueryConstraint {
247+ public func near( key: String , geoPoint: ParseGeoPoint ) -> QueryConstraint {
248248 return QueryConstraint ( key: key, value: geoPoint, comparator: . nearSphere)
249249}
250250
251251/**
252- Add a constraint to the query that requires a particular key's coordinates (specified via `GeoPoint `) be near
252+ Add a constraint to the query that requires a particular key's coordinates (specified via `ParseGeoPoint `) be near
253253 a reference point and within the maximum distance specified (in radians). Distance is calculated based on
254254 angular distance on a sphere. Results will be sorted by distance (nearest to farthest) from the reference point.
255255 - parameter key: The key to be constrained.
256- - parameter geoPoint: The reference point as a `GeoPoint `.
256+ - parameter geoPoint: The reference point as a `ParseGeoPoint `.
257257 - parameter distance: Maximum distance in radians.
258258 - returns: The same instance of `QueryConstraint` as the receiver.
259259 */
260- public func withinRadians( key: String , geoPoint: GeoPoint , distance: Double ) -> [ QueryConstraint ] {
260+ public func withinRadians( key: String , geoPoint: ParseGeoPoint , distance: Double ) -> [ QueryConstraint ] {
261261 var constraints = [ QueryConstraint ( key: key, value: geoPoint, comparator: . nearSphere) ]
262262 constraints. append ( . init( key: key, value: distance, comparator: . maxDistance) )
263263 return constraints
264264}
265265
266266/**
267- Add a constraint to the query that requires a particular key's coordinates (specified via `GeoPoint `)
267+ Add a constraint to the query that requires a particular key's coordinates (specified via `ParseGeoPoint `)
268268 be near a reference point and within the maximum distance specified (in miles). Distance is calculated based
269269 on a spherical coordinate system. Results will be sorted by distance (nearest to farthest) from the reference point.
270270 - parameter key: The key to be constrained.
271- - parameter geoPoint: The reference point represented as a `GeoPoint `.
271+ - parameter geoPoint: The reference point represented as a `ParseGeoPoint `.
272272 - parameter distance: Maximum distance in miles.
273273 - returns: The same instance of `QueryConstraint` as the receiver.
274274 */
275- public func withinMiles( key: String , geoPoint: GeoPoint , distance: Double ) -> [ QueryConstraint ] {
276- return withinRadians ( key: key, geoPoint: geoPoint, distance: ( distance / GeoPoint . earthRadiusMiles) )
275+ public func withinMiles( key: String , geoPoint: ParseGeoPoint , distance: Double ) -> [ QueryConstraint ] {
276+ return withinRadians ( key: key, geoPoint: geoPoint, distance: ( distance / ParseGeoPoint . earthRadiusMiles) )
277277}
278278
279279/**
280- Add a constraint to the query that requires a particular key's coordinates (specified via `GeoPoint `)
280+ Add a constraint to the query that requires a particular key's coordinates (specified via `ParseGeoPoint `)
281281 be near a reference point and within the maximum distance specified (in kilometers). Distance is calculated based
282282 on a spherical coordinate system. Results will be sorted by distance (nearest to farthest) from the reference point.
283283 - parameter key: The key to be constrained.
284- - parameter geoPoint: The reference point represented as a `GeoPoint `.
284+ - parameter geoPoint: The reference point represented as a `ParseGeoPoint `.
285285 - parameter distance: Maximum distance in kilometers.
286286 - returns: The same instance of `QueryConstraint` as the receiver.
287287 */
288- public func withinKilometers( key: String , geoPoint: GeoPoint , distance: Double ) -> [ QueryConstraint ] {
289- return withinRadians ( key: key, geoPoint: geoPoint, distance: ( distance / GeoPoint . earthRadiusKilometers) )
288+ public func withinKilometers( key: String , geoPoint: ParseGeoPoint , distance: Double ) -> [ QueryConstraint ] {
289+ return withinRadians ( key: key, geoPoint: geoPoint, distance: ( distance / ParseGeoPoint . earthRadiusKilometers) )
290290}
291291
292292/**
293- Add a constraint to the query that requires a particular key's coordinates (specified via `GeoPoint `) be
293+ Add a constraint to the query that requires a particular key's coordinates (specified via `ParseGeoPoint `) be
294294 contained within a given rectangular geographic bounding box.
295295 - parameter key: The key to be constrained.
296296 - parameter fromSouthWest: The lower-left inclusive corner of the box.
297297 - parameter toNortheast: The upper-right inclusive corner of the box.
298298 - returns: The same instance of `QueryConstraint` as the receiver.
299299 */
300- public func withinGeoBox( key: String , fromSouthWest southwest: GeoPoint ,
301- toNortheast northeast: GeoPoint ) -> QueryConstraint {
300+ public func withinGeoBox( key: String , fromSouthWest southwest: ParseGeoPoint ,
301+ toNortheast northeast: ParseGeoPoint ) -> QueryConstraint {
302302 let array = [ southwest, northeast]
303303 let dictionary = [ QueryConstraint . Comparator. box. rawValue: array]
304304 return . init( key: key, value: dictionary, comparator: . within)
@@ -313,25 +313,25 @@ public func withinGeoBox(key: String, fromSouthWest southwest: GeoPoint,
313313 Polygon must have at least 3 points.
314314
315315 - parameter key: The key to be constrained.
316- - parameter points: The polygon points as an Array of `GeoPoint `'s.
316+ - parameter points: The polygon points as an Array of `ParseGeoPoint `'s.
317317 - returns: The same instance of `QueryConstraint` as the receiver.
318318 */
319- public func withinPolygon( key: String , points: [ GeoPoint ] ) -> QueryConstraint {
319+ public func withinPolygon( key: String , points: [ ParseGeoPoint ] ) -> QueryConstraint {
320320 let dictionary = [ QueryConstraint . Comparator. polygon. rawValue: points]
321321 return . init( key: key, value: dictionary, comparator: . geoWithin)
322322}
323323
324324/**
325325 Add a constraint to the query that requires a particular key's
326- coordinates that contains a `GeoPoint `
326+ coordinates that contains a `ParseGeoPoint `
327327328328
329329 - parameter key: The key to be constrained.
330- - parameter point: The point the polygon contains `GeoPoint `.
330+ - parameter point: The point the polygon contains `ParseGeoPoint `.
331331
332332 - returns: The same instance of `QueryConstraint` as the receiver.
333333 */
334- public func polygonContains( key: String , point: GeoPoint ) -> QueryConstraint {
334+ public func polygonContains( key: String , point: ParseGeoPoint ) -> QueryConstraint {
335335 let dictionary = [ QueryConstraint . Comparator. point. rawValue: point]
336336 return . init( key: key, value: dictionary, comparator: . geoIntersects)
337337}
0 commit comments