-
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
implement TileMapServiceImageryProvider in terms of UrlTemplateImageryProvider #3150
Conversation
…ec floating point comparisons to toBeCloseTo, added async checks
…ffanylu/cesium into tileMapServiceImageryProvider rebase branch onto master
I thought the epsilon test failures were already there on your MacBook Air? If not, we did not need to split up the pull request. No concern either way. |
I merged master (and the test fixes) into this branch. |
@kring can you look at this? I'm still not sure about this approach; it seems like instead of throwing a The current doc for
|
You should not call those properties until |
@@ -315,13 +315,7 @@ define([ | |||
*/ | |||
tileWidth : { | |||
get : function() { | |||
//>>includeStart('debug', pragmas.debug); | |||
if (!this._ready) { |
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.
You still need these checks. But instead of !this._ready
use !defined(this._imageryProvider)
.
Hmm ok this is actually pretty complicated. We can't create the I think the only sensible way to do that is to change how With changes like that, we can construct an instance of
And then delegate most of our properties directly to that instance right away. After we load the TMS metadata, we call Does that all make sense? |
@kring Yes, that makes perfect sense! This is actually almost exactly what @pjcozzi and I were talking about a few days ago, and something I was planning on experimenting with on my own. What can @adamdavidcole and I do to help? Do you want us to pause work on implementing the rest of the imagery providers until your updates are merged, or would you like us to help with testing, etc.? |
@TiffanyLu I'm happy for you to merge my |
This all sounds great! @kring thanks for looking into this. |
…ec floating point comparisons to toBeCloseTo, added async checks
@mramato your second suggestion is a cool idea (the first would be terrible IMO, sorry!). One downside is that the current So we'll lose that with the promise-based approach. @TiffanyLu to answer part of your question that I think Matt missed: |
@kring How can I structure the |
@TiffanyLu any update here? |
@mramato @pjcozzi refactored
|
@TiffanyLu to fix the first test error, put the following code at the very top of the function. //>>includeStart('debug', pragmas.debug);
if (!defined(options)) {
throw new DeveloperError('options is required.');
}
if (!when.isPromise(options) && !defined(options.url)) {
throw new DeveloperError('options is required.');
}
//>>includeEnd('debug'); The problem is that we used to fail immediately if For the This still leaves one more failure, in After that, everything should pass. |
@TiffanyLu To address your question regarding the Specifically in the constructor's promise chain: this._readyPromise = when(options).then(function(properties) {
...initialization code
}).otherwise(function(e){
that._errorEvent.raiseEvent(e);
});; However, since if(!metadataError.retry) {
deferred.reject(new RuntimeError(message));
} |
@@ -7,6 +7,8 @@ Change Log | |||
* Deprecated `HeightmapTessellator`. It will be removed in 1.17. | |||
* Deprecated `TerrainMesh`. It will be removed in 1.17. | |||
* Deprecated `OpenStreetMapImageryProvider`. It will be removed in 1.18. Use `createOpenStreetMapImageryProvider` instead. | |||
* Deprecated `TileMapServiceImageryProvider`. It will be removed in 1.18. Use `createTileMapServiceImageryProvider` instead. |
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.
After merging in master, these changes need to go into the 1.17 section.
@TiffanyLu, I just noticed your recent commits. Is this ready? |
@mramato yes it is! |
@TiffanyLu I'm a little confused. It looks like Also, there are a few jsHint errors, please fix them. |
* Reduced the amount of both GPU and CPU memory used by terrain. The CPU memory was reduced by up to 40%. | ||
* `CorridorGeometry` and `PolylineVolumeGeometry` render short segments [#3293](https://github.com/AnalyticalGraphicsInc/cesium/issues/3293) | ||
* `Rectangle.fromCartographicArray` finds the smallest rectangle regardess of whether or not it crosses the international date line. [#3227](https://github.com/AnalyticalGraphicsInc/cesium/issues/3227) | ||
* Bug fix for `CorridorGeometry` with nearly colinear points [#3320](https://github.com/AnalyticalGraphicsInc/cesium/issues/3320) | ||
|
||
|
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.
Please remove this whitespace.
There is some trivial missing coverage in the unit tests for the new code. If you're on Windows you can run coverage but if you're on a Mac or Linux I'm okay with just just addressing this in a future PR, since Windows is the only way to run coverage right now. |
@mramato I thought earlier discussion proposed that we replace the Regarding test coverage, I'm on a Mac. |
@kring mentioned that it was a feature a lot of people desired, so I assumed that meant we were keeping it. It should be trivial to put back, since it's basically where all of the constructor work is done. |
Closing this because I finished making the changes in #3460 |
continuation of #3119
part of #2814
@pjcozzi @kring
Note that these changes cause some tests to fail, most due to floating point comparisons and some due to
credit
being undefined before the promise resolves. These failures are addressed in #3151