170 lines
4.0 KiB
HTML
170 lines
4.0 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>JSDoc: Source: gpxWaypoint.js</title>
|
|
|
|
<script src="scripts/prettify/prettify.js"> </script>
|
|
<script src="scripts/prettify/lang-css.js"> </script>
|
|
<!--[if lt IE 9]>
|
|
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
<![endif]-->
|
|
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
|
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div id="main">
|
|
|
|
<h1 class="page-title">Source: gpxWaypoint.js</h1>
|
|
|
|
|
|
|
|
|
|
|
|
<section>
|
|
<article>
|
|
<pre class="prettyprint source"><code>/**
|
|
* Constructs a gpx waypoint.
|
|
* @class
|
|
* @classdesc Represents a waypoint, point of interest, or named feature on a map.
|
|
* @param {number} lat The latitude of the waypoint.
|
|
* @param {number} lon The longtitude of the waypoint.
|
|
* @param {number} elevation of the waypoint.
|
|
* @param {string} time The time at the waypoint.
|
|
* @param {number} magvar The magnetic variation at the waypoint.
|
|
* @param {number} geoidheight The geoid height at the waypoint.
|
|
* @param {string} name The name of the waypoint.
|
|
* @param {string} cmt A comment regarding the waypoint.
|
|
* @param {string} desc A description of the waypoint.
|
|
* @param {string} src The source of the waypoint.
|
|
* @param {string[]} links An array of links for the waypoint.
|
|
* @param {string} sym The symbol of the waypoint.
|
|
* @param {string} type The type of waypoint.
|
|
**/
|
|
function GpxWaypoint(lat, lon, elevation, time, magvar, geoidheight, name, cmt, desc, src, links, sym, type) {
|
|
|
|
lat = parseFloat(lat) || -1;
|
|
lon = parseFloat(lon) || -1;
|
|
elevation = elevation || -1;
|
|
time = new Date(time) || null;
|
|
name = name || "";
|
|
cmt = cmt || "";
|
|
desc = desc || "";
|
|
src = src || "";
|
|
type = type || "";
|
|
|
|
/**
|
|
* Name of the Waypoint
|
|
* @name name
|
|
* @memberOf GpxWaypoint
|
|
* @instance
|
|
* @type {string}
|
|
**/
|
|
this.__defineGetter__("name", function() {
|
|
return name;
|
|
});
|
|
|
|
/**
|
|
* cmt of the Waypoint
|
|
* @name cmt
|
|
* @memberOf GpxWaypoint
|
|
* @instance
|
|
* @type {string}
|
|
**/
|
|
this.__defineGetter__("cmt", function() {
|
|
return cmt;
|
|
});
|
|
|
|
/**
|
|
* Description of the Waypoint
|
|
* @name desc
|
|
* @memberOf GpxWaypoint
|
|
* @instance
|
|
* @type {string}
|
|
**/
|
|
this.__defineGetter__("desc", function() {
|
|
return desc;
|
|
});
|
|
|
|
this.__defineGetter__("src", function() {
|
|
return src;
|
|
});
|
|
|
|
this.__defineGetter__("type", function() {
|
|
return type;
|
|
});
|
|
|
|
/**
|
|
* Latitude of the Waypoint
|
|
* @name lat
|
|
* @memberOf GpxWaypoint
|
|
* @instance
|
|
* @type {Number}
|
|
**/
|
|
this.__defineGetter__("lat", function() {
|
|
return lat;
|
|
});
|
|
|
|
/**
|
|
* Longtitude of the Waypoint
|
|
* @name lon
|
|
* @memberOf GpxWaypoint
|
|
* @instance
|
|
* @type {Number}
|
|
**/
|
|
this.__defineGetter__("lon", function() {
|
|
return lon;
|
|
});
|
|
|
|
|
|
/**
|
|
* Elevation at the Waypoint
|
|
* @name elevation
|
|
* @memberOf GpxWaypoint
|
|
* @instance
|
|
* @type {Number}
|
|
**/
|
|
this.__defineGetter__("elevation", function() {
|
|
return elevation;
|
|
});
|
|
|
|
|
|
/**
|
|
* Time associated with the Waypoint
|
|
* @name time
|
|
* @memberOf GpxWaypoint
|
|
* @instance
|
|
* @type {Date}
|
|
**/
|
|
this.__defineGetter__("time", function() {
|
|
return time;
|
|
});
|
|
}
|
|
|
|
module.exports = GpxWaypoint;
|
|
</code></pre>
|
|
</article>
|
|
</section>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<nav>
|
|
<h2><a href="index.html">Index</a></h2><h3>Modules</h3><ul><li><a href="module-geomutils.html">geomutils</a></li><li><a href="module-gpx-parse.html">gpx-parse</a></li></ul><h3>Classes</h3><ul><li><a href="GpxExtent.html">GpxExtent</a></li><li><a href="GpxMetaData.html">GpxMetaData</a></li><li><a href="GpxResult.html">GpxResult</a></li><li><a href="GpxRoute.html">GpxRoute</a></li><li><a href="GpxTrack.html">GpxTrack</a></li><li><a href="GpxWaypoint.html">GpxWaypoint</a></li></ul><h3><a href="global.html">Global</a></h3>
|
|
</nav>
|
|
|
|
<br clear="both">
|
|
|
|
<footer>
|
|
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.2</a> on Wed Aug 13 2014 09:19:33 GMT+0100 (BST)
|
|
</footer>
|
|
|
|
<script> prettyPrint(); </script>
|
|
<script src="scripts/linenumber.js"> </script>
|
|
</body>
|
|
</html>
|