Overview

Namespaces

  • LeanCloud
    • Engine
    • Operation
    • Storage
    • Uploader

Classes

  • ACL
  • AppRouter
  • Bytes
  • Client
  • File
  • GeoPoint
  • LeanObject
  • MIMEType
  • Push
  • Query
  • Region
  • Relation
  • Role
  • RouteCache
  • SaveOption
  • SMS
  • User

Exceptions

  • BatchRequestError
  • CloudException
  • Overview
  • Namespace
  • Class

Class GeoPoint

GeoPoint type representation

It represents a geographic point, and supports computing geo distance from point to point. It can also be used in Query to build proximity-based queries.

Namespace: LeanCloud
See: LeanCloud\Query
Located at LeanCloud/GeoPoint.php
Methods summary
public
# __construct( number $latitude = 0.0, number $longitude = 0.0 )

Initialize a geo point

Initialize a geo point

Parameters

$latitude
$longitude

Throws

InvalidArgumentException
public number
# getLatitude( )

Returns

number
public number
# getLongitude( )

Returns

number
public number
# radiansTo( LeanCloud\GeoPoint $point )

Compute distance (in radians) to a geo point

Compute distance (in radians) to a geo point

Parameters

$point
Other geo point

Returns

number
public number
# kilometersTo( LeanCloud\GeoPoint $point )

Compute distance (in kilometers) to other geo point

Compute distance (in kilometers) to other geo point

Parameters

$point
Other geo point

Returns

number
public number
# milesTo( LeanCloud\GeoPoint $point )

Compute distance (in miles) to other geo point

Compute distance (in miles) to other geo point

Parameters

$point
Other geo point

Returns

number
public
# encode( )
API documentation generated by ApiGen