/**
* BeNomad BeMap JavaScript API - Destination class
*/
/**
* @classdesc
* Base class for geographical coordinate used for a routing calculation.
* @public
* @constructor
* @param {double} lon Longitude in degrees decimal (WGS84).
* @param {double} lat Latitude in degrees decimal (WGS84).
* @param {Object} options To set all fields of this class.
*/
bemap.Destination = function(lon, lat, options) {
var opts = options || {};
/**
* (optional) altitude in meters.
*/
this.altitude = opts.altitude ? opts.altitude : undefined;
/**
* (optional) heading angle in degrees. For BeNomad engine: If the angle is not available, set this field and speed field to 0.
*/
this.heading = opts.heading ? opts.heading : undefined;
/**
* (optional) speed in km/h. For BeNomad engine: Use this field only if the heading is available.
*/
this.speed = opts.speed ? opts.speed : undefined;
/**
* (optional) time stamp of GPS coordinate in milliseconds.
*/
this.time = opts.time ? opts.time : undefined;
/**
* (optional) number of available GPS satellite when the coordinate is collected.
*/
this.satellite = opts.satellite ? opts.satellite : undefined;
/**
* (optional) radius in meters of the waypoint.
*/
this.radius = opts.radius ? opts.radius : undefined;
/**
* (optional) defines if this waypoint is ignored by the planner for its route calculation. Available values are true or false.
*/
this.ignorePoint = opts.ignorePoint ? opts.ignorePoint : undefined;
/**
* (optional) Defines if traffic directions should be ignored by route planner between this waypoint and next one. Available values are true or false.
*/
this.ignoreTrafficDirections = opts.ignoreTrafficDirections ? opts.ignoreTrafficDirections : undefined;
/**
* (optional) Defines if road blocks should be ignored by route planner between this waypoint and next one. Available values are true or false.
*/
this.ignoreRoadBlocks = opts.ignoreRoadBlocks ? opts.ignoreRoadBlocks : undefined;
/**
* (optional) Defines if forbidden maneuvers and blocked passages should be ignored by route planner between this waypoint and next one. Available values are true or false.
*/
this.ignoreRestrictions = opts.ignoreRestrictions ? opts.ignoreRestrictions : undefined;
/**
* (optional) Defines if a UTurn should be avoided (if possible) by route planner at this location. Available values are YES, NO or UNDEF.
*/
this.avoidUTurn = opts.avoidUTurn ? opts.avoidUTurn : undefined;
/**
* (optional) If true and location is on is on a 2 way road, location's angle will be used as a general direction for departure from location. Available values are YES, NO or UNDEF.
*/
this.useStartAngle = opts.useStartAngle ? opts.useStartAngle : undefined;
/**
* (optional) Defines if route planner must arrive on this waypoint on waypoint's side (if waypoint is on a 2 way road). Available values are YES, NO or UNDEF.
*/
this.useStopRoadSide = opts.useStopRoadSide ? opts.useStopRoadSide : undefined;
/**
* (optional) If mandatory is set to true, the coordinate will be kept in the way-points response array. Available values are true or false.
*/
this.mandatory = opts.mandatory ? opts.mandatory : undefined;
bemap.Coordinate.call(this, lon, lat, options);
};
bemap.inherits(bemap.Destination, bemap.Coordinate);