Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
33 lines (27 sloc) 779 Bytes
layout language permalink command io related_commands
api-command
JavaScript
api/javascript/point/
point
r
point
line polygon circle
line/
polygon/
circle/

Command syntax

{% apibody %} r.point(longitude, latitude) → point {% endapibody %}

Description

Construct a geometry object of type Point. The point is specified by two floating point numbers, the longitude (−180 to 180) and latitude (−90 to 90) of the point on a perfect sphere. See Geospatial support for more information on ReQL's coordinate system.

Example: Define a point.

r.table('geo').insert({
    id: 1,
    name: 'San Francisco',
    location: r.point(-122.423246,37.779388)
}).run(conn, callback);
You can’t perform that action at this time.