Class TranslationRotationFinder

Search:

Source : file core/mapIcon/TranslationRotationFinder.js at line 41

Constructor

new TranslationRotationFinder ( )

The constructor

Source : file core/mapIcon/TranslationRotationFinder.js at line 238

Public methods

findData ( computeData, noteData )

This method compute the rotation needed to have the SVG oriented on the itinerary and compute also the direction to take after the icon

Source : file core/mapIcon/TranslationRotationFinder.js at line 249

Parameters

Name Type Description
computeData ComputeDataForMapIcon

The object with the data needed for the computations

noteData NoteDataForMapIcon

The object with the nota data

Private properties

#computeData : ComputeDataForMapIcon

A reference to the computeData object of the MapIconFromOsmFactory

Source : file core/mapIcon/TranslationRotationFinder.js at line 48

#directionItineraryPoint : ItineraryPoint

A reference to the itineraryPoint used to compute the direction

Source : file core/mapIcon/TranslationRotationFinder.js at line 69

#iconPoint : Array of Number

The coordinates in pixel of the icon point

Source : file core/mapIcon/TranslationRotationFinder.js at line 76

#noteData : NoteDataForMapIcon

A reference to the noteData Object of the MapIconFromOsmFactory

Source : file core/mapIcon/TranslationRotationFinder.js at line 55

#rotationItineraryPoint : ItineraryPoint

A reference to the itineraryPoint used to compute the rotation

Source : file core/mapIcon/TranslationRotationFinder.js at line 62

Private methods

#computeIconPoint ( )

Transform the latLng of the icon ro pixel coordinates relative to the map origin

Source : file core/mapIcon/TranslationRotationFinder.js at line 125

#computeTranslation ( )

This method compute the translation needed to have the itinerary point in the middle of the svg

Source : file core/mapIcon/TranslationRotationFinder.js at line 82

#findDirection ( )

Computing direction ... if possible

Source : file core/mapIcon/TranslationRotationFinder.js at line 173

#findDirectionPoint ( )

Searching a point at least at 10 m ( theConfig.note.svgIcon.angleDistance ) from the icon point for direction

Source : file core/mapIcon/TranslationRotationFinder.js at line 109

#findPositionOnRoute ( )

Search if the icon is at the start or the end of the route and adapt data

Source : file core/mapIcon/TranslationRotationFinder.js at line 211

#findRotation ( )

Computing rotation... if possible

Source : file core/mapIcon/TranslationRotationFinder.js at line 137

#findRotationPoint ( )

Searching a point at least at 10 m ( theConfig.note.svgIcon.angleDistance ) from the icon point for rotation

Source : file core/mapIcon/TranslationRotationFinder.js at line 93