LuxChat  2.0
Instant messenger for iOS
Instance Methods | Class Methods | Properties | List of all members
PFGeoPoint Class Reference

#import <PFGeoPoint.h>

Inheritance diagram for PFGeoPoint:

Instance Methods

(double) - distanceInRadiansTo:
 
More...
 
(double) - distanceInMilesTo:
 
(double) - distanceInKilometersTo:
 

Class Methods

(instancetype) + geoPoint
 
More...
 
(instancetype) + geoPointWithLocation:
 
(instancetype) + geoPointWithLatitude:longitude:
 
(void) + geoPointForCurrentLocationInBackground:
 

Properties

double latitude
 
More...
 
double longitude
 

Detailed Description

PFGeoPoint may be used to embed a latitude / longitude point as the value for a key in a PFObject. It could be used to perform queries in a geospatial manner using PFQuery.-whereKey:nearGeoPoint:.

Currently, instances of PFObject may only have one key associated with a PFGeoPoint type.

Method Documentation

- (double) distanceInKilometersTo: (nullable PFGeoPoint *)  point

Get distance in kilometers from this point to specified point.

Parameters
pointPFGeoPoint that represents the location of other point.
Returns
Distance in kilometers between the receiver and point.
- (double) distanceInMilesTo: (nullable PFGeoPoint *)  point

Get distance in miles from this point to specified point.

Parameters
pointPFGeoPoint that represents the location of other point.
Returns
Distance in miles between the receiver and point.
- (double) distanceInRadiansTo: (nullable PFGeoPoint *)  point



Get distance in radians from this point to specified point.

Parameters
pointPFGeoPoint that represents the location of other point.
Returns
Distance in radians between the receiver and point.
+ (instancetype) geoPoint



Create a PFGeoPoint object. Latitude and longitude are set to 0.0.

Returns
Returns a new PFGeoPoint.
+ (void) geoPointForCurrentLocationInBackground: (nullable PFGeoPointResultBlock)  resultBlock

Fetches the current device location and executes a block with a new PFGeoPoint object.

Parameters
resultBlockA block which takes the newly created PFGeoPoint as an argument. It should have the following argument signature: ^(PFGeoPoint *geoPoint, NSError *error)
+ (instancetype) geoPointWithLatitude: (double)  latitude
longitude: (double)  longitude 

Create a new PFGeoPoint object with the specified latitude and longitude.

Parameters
latitudeLatitude of point in degrees.
longitudeLongitude of point in degrees.
Returns
New point object with specified latitude and longitude.
+ (instancetype) geoPointWithLocation: (nullable CLLocation *)  location

Creates a new PFGeoPoint object for the given CLLocation, set to the location's coordinates.

Parameters
locationInstace of CLLocation, with set latitude and longitude.
Returns
Returns a new PFGeoPoint at specified location.

Property Documentation

- (double) latitude
readwritenonatomicassign



Latitude of point in degrees. Valid range is from -90.0 to 90.0.

- (double) longitude
readwritenonatomicassign

Longitude of point in degrees. Valid range is from -180.0 to 180.0.


The documentation for this class was generated from the following file: