Waypoint
Summary
A Waypoint is a marker along a route. A waypoint has a path, as well as information about how to get the path.
Constructor
aeris.maps.gmaps.route.Waypoint
Syntax
aeris.maps.gmaps.route.Waypoint
-
opt_options.polyline
-
opt_options.pathValidator
-
opt_options.directionsService
-
opt_options.nonstopDirectionsService
Summary
Parameters:
-
opt_options.polyline
MapObjectInterface= -
opt_options.pathValidator
PathValidator= -
opt_options.directionsService
DirectionsServiceInterface= -
opt_options.nonstopDirectionsService
DirectionsServiceInterface=
Item Index
Methods
- createStrategy_
- destroy
- export
- getDistance
- getMap
- getPosition
- getRoute
- getSelectedUrl
- getType
- getUrl
- getView
- hasMap
- hasPath
- import
- initializePolylineBindings_
- removeStrategy
- reset
- resetStrategy
- setMap
- setPathStartsAt
- setPosition
- setSelectedUrl
- setStrategy
- setUrl
- stylePath
- toJSON
- triggerDirectionsServiceError_
- updateFromDirectionsResults_
- updatePolyline_
- validate
Properties
Methods
createStrategy_
Syntax
Summary
Create a {aeris.maps.AbstractStrategy} instance.
Override to adjust how strategy objects are instantiated.
Parameters:
-
Strategy
FunctionAbstractStrategy object ctor.
Returns:
destroy
Syntax
destroy
()
Summary
export
Syntax
Summary
Exports the waypoint as a JSON string
Returns:
JSON representation of a waypoint.
getMap
Syntax
getMap
()
Summary
getType
Syntax
Summary
This method method may be overriden to return an arbitrary "type" category for the marker. Used by MarkerClusterer strategies to split up a single MarkerColection into several cluster sets.
Returns:
import
Syntax
import
-
jsonStr
Summary
Import a JSON string as a waypoint. Replaces any existing waypoint data.
Parameters:
-
jsonStr
StringJSON representation of a waypoint.
initializePolylineBindings_
Syntax
initializePolylineBindings_
()
private
Summary
removeStrategy
Syntax
removeStrategy
()
Summary
Remove and clean up the StrategyObject's strategy.
reset
Syntax
reset
-
obj
-
opt_options
Summary
Replaces entire model with new attributes, and validates.
Triggers a 'reset' event (and DOES NOT trigger a set event)
resetStrategy
Syntax
resetStrategy
()
Summary
Reset the rendering strategy used by the object. Useful for re-enabled a strategy which has previously been removed with StrategyObject#removeStrategy
setMap
Syntax
setMap
()
Summary
setStrategy
Syntax
setStrategy
-
Strategy
Summary
Set the strategy to use for rendering the StrategyObject.
Parameters:
-
Strategy
FunctionConstructor for an {aeris.maps.AbstractStrategy} object.
stylePath
Syntax
stylePath
-
styles
Summary
Set style on the polyine for the waypoint's path.
Parameters:
-
styles
Object
toJSON
Syntax
Summary
Serialize Waypoint as a JSON object
Returns:
Exported waypoint as JSON object.
triggerDirectionsServiceError_
Syntax
triggerDirectionsServiceError_
-
directionsResults
Summary
Parameters:
-
directionsResults
DirectionsResults
updateFromDirectionsResults_
Syntax
updateFromDirectionsResults_
-
directionsResults
Summary
Parameters:
-
directionsResults
DirectionsResults
updatePolyline_
Syntax
updatePolyline_
()
private
Summary
Update a polyline to be in sync with the waypoint's path.
validate
Syntax
validate
()
Summary
Properties
directionsService_
Syntax
Summary
Default: {aeris.directions.GoogleDirectionsService}
nonstopDirectionsService_
Syntax
Summary
Default: {aeris.directions.NonstopDirectionsService}
pathValidator_
Syntax
Summary
Default: {aeris.helpers.validator.PathValidator}
polyline_
Syntax
polyline_
aeris.maps.extensions.MapObjectInterface
private
Summary
Default: {aeris.maps.polylines.Polyline}
strategy_
Syntax
strategy_
aeris.maps.Strategy Strategy constructor.
Summary
Default {aeris.Strategy} implementation
StrategyType_
Syntax
StrategyType_
function():aeris.maps.AbstractStrategy
private
Summary
Attributes
Events
directions:error
Syntax
directions:error
Summary
When a waypoint fails retrieve directions data.
Event Payload:
-
directionsResults
aeris.directions.results.DirectionsResults
dragend
Syntax
dragend
Summary
Event Payload:
-
latLon
aeris.maps.LatLon -
marker
aeris.maps.markers.Marker
path:click
Syntax
path:click
Summary
Event Payload:
-
latLon
aeris.maps.LatLon -
waypoint
aeris.maps.gmaps.route.Waypoint
reset
Syntax
reset
Summary
strategy:set
Syntax
strategy:set
Summary
When a strategy is set on the object.
Event Payload:
-
strategy
aeris.maps.AbstractStrategy