ALKMaps.StopLocation

Instances of this class represent stop location.

Possbile use case

stopLocation = new ALKMaps.StopLocation({
    id: "1",
    isViaPoint: true,
    address: new ALKMaps.Address({streetAddress: "", city: "", state: "", zip: "", country: ""}),
    lonLat: new ALKMaps.LonLat(-90, 42),
    label: "Stop 1"
});
Summary
ALKMaps.StopLocationInstances of this class represent stop location.
Properties
id{String} Gets or sets the stop ID.
isViaPoint{Boolean} Gets or sets whether the stop is a via point or not.
sideOfStreetAdherence{Number} How strict to be in order to avoid the destination being on the opposite side of the street.
Constructor
ALKMaps.StopLocationConstruct a new stop location object.
Functions
cloneCreate a cloned instance of this object.
fromLonLatAlternative constructor that builds a new ALKMaps.StopLocation from lonLat object
fromLonLatsBuilds an array of stop location objects from an array of lonLat object.
fromWS_StopLocationBuilds ALKMaps.StopLocation from ALKMaps.WS_StopLocation
parseJsonParses PCMiler web service retured object into ALKMaps.StopLocation.

Properties

id

{String} Gets or sets the stop ID.

isViaPoint

{Boolean} Gets or sets whether the stop is a via point or not.

sideOfStreetAdherence

{Number} How strict to be in order to avoid the destination being on the opposite side of the street.

Available values

0Off.  Will not reroute according to the side of the street.
1Minimal.  Adds a cost of a quarter of a mile to ending up on the wrong side of the street.
2Moderate.  Adds a cost of half a mile to ending up on the wrong side of the street.
3Average.  Adds a cost of one mile to ending up on the wrong side of the street.
4Strict.  Adds a cost of five miles to ending up on the wrong side of the street.
5Adhere.  Adds a cost of 10 miles to ending up on the wrong side of the street.
6StronglyAdhere.  Adds a cost of 1,000 miles to ending up on the wrong side of the street.

Constructor

ALKMaps.StopLocation

Construct a new stop location object.

Parameters (single argument)

params{Object} {id: “”, isViaPoint: false, address: null, lonLat: null, label: “”}

Functions

clone

clone: function (obj)

Create a cloned instance of this object.

Returns

{ALKMaps.StopLocation} A fresh copy of this object

fromLonLat

ALKMaps.StopLocation.fromLonLat = function (lonLat,
options)

Alternative constructor that builds a new ALKMaps.StopLocation from lonLat object

Parameters

lonLat{ALKMaps.LonLat}

Returns

{ALKMaps.StopLocation} New stop location object built from the passed-in object.

fromLonLats

ALKMaps.StopLocation.fromLonLats = function (lonLats,
options)

Builds an array of stop location objects from an array of lonLat object.

fromWS_StopLocation

ALKMaps.StopLocation.fromWS_StopLocation = function (stop,
options)

Builds ALKMaps.StopLocation from ALKMaps.WS_StopLocation

Parameters

stop{ALKMaps.WS_StopLocation}

parseJson

ALKMaps.StopLocation.parseJson = function (stopLocations,
options)

Parses PCMiler web service retured object into ALKMaps.StopLocation.  Lon/lon will be converted from string to number.

Parameters

stopLocations{<Object>|String} [{“Address”:{“StreetAddress”:”1 Kenilworth Court”,”City”:”Cincinnati”,”State”:”OH”,”Zip”:”45246”,”Country”:”United States”},”Coords”:{“Lon”:”-84.48190600000011”,”Lat”:”39.27955799999965”},”ID”:”Stop_1”,”Label”:”3706 COLONY DR (BY GARBAGE DUMP)”,”IsViaPoint”:false},{“Coords”:{“Lon”:”-84.46815099999962”,”Lat”:”39.27522900000012”},”Label”:””,”IsViaPoint”:true},{“Address”:{“StreetAddress”:””,”City”:”Cincinnati”,”State”:”OH”,”Zip”:”45246”,”Country”:”United States”},”Coords”:{“Lon”:”-84.44549700000034”,”Lat”:”39.27540600000013”},”ID”:”Stop_2”,”Label”:”PRINCETON HIGH”,”IsViaPoint”:false}]

Returns

{Array(ALKMaps.StopLocation)} An array of stop locations.

clone: function (obj)
Create a cloned instance of this object.
ALKMaps.StopLocation.fromLonLat = function (lonLat,
options)
Alternative constructor that builds a new ALKMaps.StopLocation from lonLat object
ALKMaps.StopLocation.fromLonLats = function (lonLats,
options)
Builds an array of stop location objects from an array of lonLat object.
ALKMaps.StopLocation.fromWS_StopLocation = function (stop,
options)
Builds ALKMaps.StopLocation from ALKMaps.WS_StopLocation
ALKMaps.StopLocation.parseJson = function (stopLocations,
options)
Parses PCMiler web service retured object into ALKMaps.StopLocation.
Construct a new stop location object.
This class represents a longitude and latitude pair
Construct a new stop location object.
Close