Instances of this class represent stop location.
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" });
ALKMaps. | Instances 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. | Construct a new stop location object. |
Functions | |
clone | Create a cloned instance of this object. |
fromLonLat | Alternative constructor that builds a new ALKMaps.StopLocation from lonLat object |
fromLonLats | Builds an array of stop location objects from an array of lonLat object. |
fromWS_StopLocation | Builds ALKMaps.StopLocation from ALKMaps.WS_StopLocation |
parseJson | Parses PCMiler web service retured object into ALKMaps.StopLocation. |
{Number} How strict to be in order to avoid the destination being on the opposite side of the street.
0 | Off. Will not reroute according to the side of the street. |
1 | Minimal. Adds a cost of a quarter of a mile to ending up on the wrong side of the street. |
2 | Moderate. Adds a cost of half a mile to ending up on the wrong side of the street. |
3 | Average. Adds a cost of one mile to ending up on the wrong side of the street. |
4 | Strict. Adds a cost of five miles to ending up on the wrong side of the street. |
5 | Adhere. Adds a cost of 10 miles to ending up on the wrong side of the street. |
6 | StronglyAdhere. Adds a cost of 1,000 miles to ending up on the wrong side of the street. |
clone: function ( obj )
Create a cloned instance of this object.
{ALKMaps.StopLocation} A fresh copy of this object
ALKMaps.StopLocation.fromLonLat = function ( lonLat, options )
Alternative constructor that builds a new ALKMaps.StopLocation from lonLat object
lonLat | {ALKMaps.LonLat} |
{ALKMaps.StopLocation} New stop location object built from the passed-in object.
ALKMaps.StopLocation.fromWS_StopLocation = function ( stop, options )
Builds ALKMaps.StopLocation from ALKMaps.WS_StopLocation
stop | {ALKMaps.WS_StopLocation} |
ALKMaps.StopLocation.parseJson = function ( stopLocations, options )
Parses PCMiler web service retured object into ALKMaps.StopLocation. Lon/lon will be converted from string to number.
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}] |
{Array(ALKMaps.StopLocation)} An array of stop locations.
Create a cloned instance of this object.
clone: function ( obj )
Alternative constructor that builds a new ALKMaps.StopLocation from lonLat object
ALKMaps.StopLocation.fromLonLat = function ( lonLat, options )
Builds an array of stop location objects from an array of lonLat object.
ALKMaps.StopLocation.fromLonLats = function ( lonLats, options )
Builds ALKMaps.StopLocation from ALKMaps.WS_StopLocation
ALKMaps.StopLocation.fromWS_StopLocation = function ( stop, options )
Parses PCMiler web service retured object into ALKMaps.StopLocation.
ALKMaps.StopLocation.parseJson = function ( stopLocations, options )