Skip to content
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

Require full tileset JSON path #6678

Merged
merged 4 commits into from
Jun 12, 2018
Merged

Require full tileset JSON path #6678

merged 4 commits into from
Jun 12, 2018

Conversation

OmarShehata
Copy link
Contributor

This PR drops support for directory URLs when loading tilesets to match the updated 3D Tiles spec. Updated documentation to remove references to "tileset.json" and to just say "tileset JSON files" instead.

Fixes #6502

@lilleyse can you review when you get a chance?

@cesium-concierge
Copy link

Please sign the CLA before we review this PR.

Welcome to the Cesium community @OmarShehata!

Can you please send in a Contributor License Agreement (CLA) so that we can review and merge this pull request?


I am a bot who helps you make Cesium awesome! Contributions to my configuration are welcome.

🌍 🌎 🌏

@mramato
Copy link
Contributor

mramato commented Jun 12, 2018

@OmarShehata, welcome aboard!

P.S. You can ignore the CLA message, someone forgot to add you to the list, I'll get it taken care of.

@ggetz
Copy link
Contributor

ggetz commented Jun 12, 2018

Thanks @OmarShehata! You've been added under AGI's CLA, so you're good to go.

@lilleyse
Copy link
Contributor

Thanks @OmarShehata, I'm about to review. In the meantime check out CesiumGS/3d-tiles-samples#26.

@lilleyse
Copy link
Contributor

@OmarShehata you may want to edit your .gitconfig file so that it uses the same email as your github account. That way your commits will show up with your github picture and link to your account.

@shunter
Copy link
Contributor

shunter commented Jun 12, 2018

You can also add additional email addresses to your GitHub profile.

@OmarShehata
Copy link
Contributor Author

Added an additional email, looks like that fixed the commit profile links!

Copy link
Contributor

@lilleyse lilleyse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! All tests pass, and Sandcastle demos are already using ion links and don't require adjustments. Just a few comments from me.

@@ -90,7 +90,7 @@ define([
* @constructor
*
* @param {Object} options Object with the following properties:
* @param {Resource|String|Promise<Resource>|Promise<String>} options.url The url to a tileset.json file or to a directory containing a tileset.json file.
* @param {Resource|String|Promise<Resource>|Promise<String>} options.url The url to a tileset JSON file.
Copy link
Contributor

@lilleyse lilleyse Jun 12, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also make similar adjustments to the wording (tileset.json -> tileset JSON) in other 3D Tiles related files - Cesium3DTile, Cesium3DTilesetStatistics, and Cesium3DTilesInspectorViewModel

tilesetResource = resource.getDerivedResource({
url: 'tileset.json'
});
basePath = resource.url;
}

that._url = resource.url;
that._tilesetUrl = tilesetResource.url;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can just remove _tilesetUrl altogether now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And similarly, remove tilesetResource.

@@ -90,7 +90,7 @@ define([
* @constructor
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a bunch of examples in the documentation that need to be fixed. Search for url : 'http://localhost:8002/tilesets/Seattle' - I couldn't find other cases.

@OmarShehata
Copy link
Contributor Author

I've resolved all your comments @lilleyse except for removing tilesetResource. While it doesn't seem necessary to keep it in this block, several other parts seem to be using this reference to a tilesetResource.

Does it still seem like it needs to be removed?

@lilleyse
Copy link
Contributor

For those cases tilesetResource and resource can be merged into one resource variable. For example:

var that = this;
var resource;
when(options.url)
    .then(function(url) {
        var basePath;
        resource = Resource.createIfNeeded(url);

@OmarShehata
Copy link
Contributor Author

Should be all good now! @lilleyse

@lilleyse
Copy link
Contributor

Yes, looks good. Thanks @OmarShehata.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants