Fork me on GitHub
Show:

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:

Methods

createStrategy_

Syntax

createStrategy_

(
  • Strategy
)
AbstractStrategy protected

Summary

Create a {aeris.maps.AbstractStrategy} instance.

Override to adjust how strategy objects are instantiated.

Parameters:

  • Strategy Function

    AbstractStrategy object ctor.

Returns:

export

Syntax

export

() String

Summary

Exports the waypoint as a JSON string

Returns:

String:

JSON representation of a waypoint.

getDistance

Syntax

getDistance

() Number

Summary

Returns:

getPosition

Syntax

getPosition

() LatLon

Summary

Returns:

getRoute

Syntax

getRoute

() Collection|undefined

Summary

Returns:

getSelectedUrl

Syntax

getSelectedUrl

() String

Summary

Returns:

getType

Syntax

getType

() ?string

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:

?string:

getUrl

Syntax

getUrl

() String

Summary

Return the url of the marker icon.

Returns:

getView

Syntax

getView

() *

Summary

Returns the object view, as rendered by the object's strategy.

Returns:

*:

hasMap

Syntax

hasMap

() Boolean

Summary

Returns:

Boolean:

Returns true if the layer has a map set.

hasPath

Syntax

hasPath

() Boolean

Summary

Returns:

import

Syntax

import

(
  • jsonStr
)

Summary

Import a JSON string as a waypoint. Replaces any existing waypoint data.

Parameters:

  • jsonStr String

    JSON 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)

Parameters:

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

setPathStartsAt

Syntax

setPathStartsAt

(
  • pathStartingPosition
)
Promise

Summary

Parameters:

Returns:

setPosition

Syntax

setPosition

(
  • latLon
)

Summary

Parameters:

setSelectedUrl

Syntax

setSelectedUrl

(
  • selectedUrl
)

Summary

Parameters:

setStrategy

Syntax

setStrategy

(
  • Strategy
)

Summary

Set the strategy to use for rendering the StrategyObject.

Parameters:

  • Strategy Function

    Constructor for an {aeris.maps.AbstractStrategy} object.

setUrl

Syntax

setUrl

(
  • url
)

Summary

Parameters:

stylePath

Syntax

stylePath

(
  • styles
)

Summary

Set style on the polyine for the waypoint's path.

Parameters:

toJSON

Syntax

toJSON

() Object

Summary

Serialize Waypoint as a JSON object

Returns:

Object:

Exported waypoint as JSON object.

triggerDirectionsServiceError_

Syntax

triggerDirectionsServiceError_

(
  • directionsResults
)
private

Summary

Parameters:

updateFromDirectionsResults_

Syntax

updateFromDirectionsResults_

(
  • directionsResults
)
private

Summary

Parameters:

updatePolyline_

Syntax

updatePolyline_

() private

Summary

Update a polyline to be in sync with the waypoint's path.

validate

Syntax

validate

()

Summary

Properties

directionsService_

Syntax

directionsService_

aeris.directions.DirectionsServiceInterface private

Summary

Default: {aeris.directions.GoogleDirectionsService}

nonstopDirectionsService_

Syntax

nonstopDirectionsService_

aeris.directions.DirectionsServiceInterface private

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}

Syntax

Object final static

Summary

strategy_

Syntax

strategy_

aeris.maps.Strategy Strategy constructor.

Summary

Default {aeris.Strategy} implementation

StrategyType_

Syntax

StrategyType_

function():aeris.maps.AbstractStrategy private

Summary

Attributes

clickable

Boolean

Whether to allow click events on the marker.

draggable

Boolean

Whether to allow drag events on the marker.

map

Map protected

An AerisMap that the object is bound to. This is set with setMap.

offsetX

number

Pixels between the marker's lat/lon position and the left side of the icon image.

offsetY

number

Pixels between the marker's lat/lon position and the top of the icon image.

title

string

Marker title.

Default: ''

Events

click

Syntax

click

Summary

Event Payload:

directions:error

Syntax

directions:error

Summary

When a waypoint fails retrieve directions data.

Event Payload:

dragend

Syntax

dragend

Summary

Event Payload:

path:click

Syntax

path:click

Summary

Event Payload:

reset

Syntax

reset

Summary

strategy:set

Syntax

strategy:set

Summary

When a strategy is set on the object.

Event Payload: