Class DataSearchEngine

Class with helper methods to search data See theDataSearchEngine for the one and only one instance of this class

Source : file data/DataSearchEngine.js at line 40

Constructor

new DataSearchEngine ( )

The constructor

Source : file data/DataSearchEngine.js at line 71

Public methods

getNearestRouteData ( latLng )

This method search route data for the nearest route of a given point

Source : file data/DataSearchEngine.js at line 81

Parameters

Name Type Description
latLng Array of Number

The latitude and longitude of the point

Returns

A DataSearchEngineNearestRouteData object
Type : DataSearchEngineNearestRouteData

getNoteAndRoute ( noteObjId )

Search a Note and a the Route to witch the Note is attached with the Note objId

Source : file data/DataSearchEngine.js at line 115

Parameters

Name Type Description
noteObjId Number

The objId of the note to search

Returns

A NoteAndRoute object with the route and note
Type : NoteAndRoute

getRoute ( routeObjId )

Search a route with the route objId

Source : file data/DataSearchEngine.js at line 98

Parameters

Name Type Description
routeObjId Number

The objId of the route to search

Returns

The searched route or null if not found
Type : null or Route

getWayPoint ( wayPointObjId )

Search a WayPoint with the WayPoint objId

Source : file data/DataSearchEngine.js at line 143

Parameters

Name Type Description
wayPointObjId Number

The objId of the WayPoint to search

Returns

A WayPoint
Type : WayPoint

Private methods

#setNearestRouteData ( route, latLng, nearestRouteData )

Helper method for the getNearestRouteData method

Source : file data/DataSearchEngine.js at line 49

Parameters

Name Type Description
route Route

The route that must be treated

latLng Array of Number

The latitude and longitude of the nearest point on route

nearestRouteData DataSearchEngineNearestRouteData

The DataSearchEngineNearestRouteData object used