Methods
-
<inner> getShape( db, id, callback )
-
Description
Get all of the Shape's Points for the specified Shape ID
Parameters
Name Type Description db
RightTrackDB The Right Track DB to query
id
string Shape ID
callback
function Callback function
Name Type Description error
Error Database Query Error
shapes
Array.<Shape> The Shape's Points for the specified Shape ID
Details
-
<inner> getShapes( db, callback )
-
Description
Get all of the Points grouped by Shape from the database
Parameters
Name Type Description db
RightTrackDB The Right Track DB to query
callback
function Callback function
Name Type Description error
Error Database Query Error
shapes
Array.<Array.<Shape>> A 2D-Array of Shape Points
Details
-
<inner> getShapeRoutes( db [, id ], callback )
-
Description
Get the details of the Route(s) that correspond to the specified Shape (or all of the Shapes)
Parameters
Name Type Attributes Description db
RightTrackDB The Right Track DB to query
id
string <optional> Shape ID
callback
function Callback function
Name Type Description error
Error Database Query Error
routes
Object | Array.<Route> Routes associated with each Shape
Details
-
<inner> getShapeCenter( db [, id ], callback )
-
Description
Get the coordinates of the center of the specified Shape (or all of the Shapes)
Parameters
Name Type Attributes Description db
RightTrackDB The Right Track DB to query
id
string <optional> The Shape ID
callback
function Callback function
Name Type Description error
Error Database Query Error
center
Object The coordinates of the Shape's center
Name Type Description lat
number The latitiude of the Shape's center
lon
number The longitude of the Shape's center
Details