-
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
Extend BaseLayerPicker to support terrain #1607
Conversation
Still needs cleanup.
1. Turn on depth test when any terrain other than EllipsoidTerrainProvider is being used 2. All similar Viewer options for terrain that imagery already has.
Flesh out specs and minor cleanup.
I forgot to mention; I kept this two a two line update in CHANGES with a link back to this PR. Since there are so many renames that 99% of users won't care about, I didn't want to clutter things up. |
Okay, one last update and now you guys can review this, I swear 😄 I put back all of the default imagery providers and simply widened the drop down so everything still fits nicely. |
|
||
selectedViewModel(value); | ||
knockout.defineProperty(this, 'selectedTerrain', { |
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.
Because this uses a writable computed observable, selecting a terrain provider that's already selected causes the terrain to be reloaded from scratch. Instead, if it subscribed to a normal observable, you'd get the reference equality comparison for free.
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.
As we talked offline, I did the same thing by just comparing the references in the setter, which in my mind is cleaner than subscribing.
1. BaseLayerPicker now takes an options object instead of individual parameters. 2. Minor styling fix to dropdown width so that 4 items fit when vertical scroll bar is visible. 3. Add selectedImageryProviderViewModel/selectedTerrainProviderViewModel options to BaseLayerPickerViewModel 4. Fix tooltips for default terrain providers.
Ready for another look. |
@@ -23,6 +23,7 @@ Beta Releases | |||
* `TilingScheme.extentToNativeRectangle` -> `TilingScheme.rectangleToNativeRectangle` | |||
* `TilingScheme.tileXYToNativeExtent` -> `TilingScheme.tileXYToNativeRectangle` | |||
* `TilingScheme.tileXYToExtent` -> `TilingScheme.tileXYToRectangle` | |||
* `BaseLayerPicker` has been extended to support terrain selection. This includes many potential breaking changes, see [#1607](https://github.com/AnalyticalGraphicsInc/cesium/pull/1607) for details. |
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.
I think we need to briefly list all the breaking changes, just as we've done every other time. Users doing an upgrade may not have direct internet access.
1. Fix copy/paste error. 2. Add more information to CHANGES
Okay @shunter, this is ready. |
…errain Extend BaseLayerPicker to support terrain
selectedItem
imagery specific (it's nowselectedImagery
) and there's a new correspondingselectedTerrain
.CentralBody.depthTestAgainTerrain
is automatically enabled if anything other than WGS84 is selected.While this was a simple and straightforward change to make, it's a large breaking change for anyone using the
BaseLayerPicker
directly. Thankfully I expect almost everyone is using it throughViewer
, where the breaking changes are all hidden away.@emackey As I mentioned to you, while I'm mostly happy with the new styling; feel free to tweak (or suggest tweaks) if you have ideas for improving it.
Hopefully I didn't leave anything out.