-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GeoJSON support #890
Merged
GeoJSON support #890
Changes from 22 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
885a6ec
Start messing around with GeoJSON support.
mramato d709321
Merge branch 'master' into geojson
mramato 5ef9066
Add drag and drop for .geojson files.
mramato a08508a
Merge branch 'master' into geojson
mramato 5bcd722
Apply default styles to all GeoJSON features.
mramato e11f9ec
Ongoing GeoJSON prototyping.
mramato ff0d14d
Merge branch 'master' into geojson
mramato 7c4dc49
Start of some specs, still a ton of work to do.
mramato bc36784
Ongoing GeoJSON work.
mramato db085c9
Merge branch 'master' into geojson
mramato 485985e
Ongoing GeoJSON work.
mramato 83fdd2f
Fix failing tests.
mramato b611ffd
Temporarily remove StaticProperty/StaticPosition property.
mramato ae572be
More cleanup before pull request.
mramato a0eb4e8
Doc cleanup.
mramato ddfacdc
Merge branch 'master' into geojson
mramato 08f5258
Update CHANGES
mramato 3e3188b
Merge branch 'master' into geojson
mramato 7eca3c8
Merge branch 'master' into geojson
mramato 67112b6
Changes after review.
mramato 14e48f1
More changes.
mramato 4b418a6
Minor tweak to ConstantProperty.
mramato 4d7d09f
Change from DeveloperError to RuntimeError for actual GeoJSON process…
mramato 54ae0ea
Cleanup promise usage.
mramato bb14a2b
Tweak to DynamicObject.merge.
mramato 5010369
Standardize casing.
mramato 490a8f2
More changes after review.
mramato File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why check
this.hasOwnProperty(property)
here? Shouldn't you mergeother[property]
intothis
regardless?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably. I simplified it to: