-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #890 from AnalyticalGraphicsInc/geojson
GeoJSON support
- Loading branch information
Showing
11 changed files
with
1,175 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/*global define*/ | ||
define(function() { | ||
"use strict"; | ||
|
||
/** | ||
* Represents a single value which does not change with regard to simulation time. | ||
* | ||
* @alias ConstantProperty | ||
* @constructor | ||
* | ||
* @see DynamicProperty | ||
*/ | ||
var ConstantProperty = function(value) { | ||
this._value = value; | ||
this._clonable = typeof value !== 'undefined' && typeof value.clone === 'function'; | ||
}; | ||
|
||
/** | ||
* Gets the value of the property, optionally cloning it. | ||
* @memberof ConstantProperty | ||
* | ||
* @param {JulianDate} time The time for which to retrieve the value. This parameter is unused. | ||
* @param {Object} [result] The object to store the value into if the value is clonable. If the result is omitted or the value does not implement clone, the actual value is returned. | ||
* @returns The modified result parameter or the actual value instance if the value is not clonable. | ||
*/ | ||
ConstantProperty.prototype.getValue = function(time, result) { | ||
var value = this._value; | ||
if (this._clonable) { | ||
return value.clone(result); | ||
} | ||
return value; | ||
}; | ||
|
||
return ConstantProperty; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.