Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: CesiumGS/cesium
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: e52e362024cd6cf7f7086c055030c16583d3578d
Choose a base ref
...
head repository: CesiumGS/cesium
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1.110.1
Choose a head ref
  • 5 commits
  • 7 files changed
  • 1 contributor

Commits on Sep 27, 2023

  1. Verified

    This commit was signed with the committer’s verified signature.
    AbhiPrasad Abhijeet Prasad
    Copy the full SHA
    ceb030a View commit details

Commits on Oct 23, 2023

  1. Merge tag '1.110' into google-ion

    1.110 release
    ggetz committed Oct 23, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    AbhiPrasad Abhijeet Prasad
    Copy the full SHA
    ccfba58 View commit details

Commits on Oct 25, 2023

  1. Update ion asset ID, CHANGES.md

    ggetz committed Oct 25, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    AbhiPrasad Abhijeet Prasad
    Copy the full SHA
    f379487 View commit details
  2. Update for 1.110.1 release

    ggetz committed Oct 25, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    AbhiPrasad Abhijeet Prasad
    Copy the full SHA
    f4550d8 View commit details

Commits on Oct 26, 2023

  1. Correct date in CHANGES.md

    ggetz committed Oct 26, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    AbhiPrasad Abhijeet Prasad
    Copy the full SHA
    a47f67d View commit details
17 changes: 17 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Change Log

### 1.110.1 - 2023-10-25

#### @cesium/engine

##### Breaking Changes :mega:

- CesiumJS no longer ships with a demo Google Maps API key. `GoogleMaps.defaultApiKey` is no longer defined by default.
- `createGooglePhotorealistic3DTileset` by default now provides tiles via Cesium ion if the `GoogleMaps.defaultApiKey` is not set.
- If you wish to continue to use your own Google Maps API key, you can go back to the previous behavior:

```javascript
Cesium.GoogleMaps.defaultApiKey = "your-api-key";

const tileset = await Cesium.createGooglePhotorealistic3DTileset();
viewer.scene.primitives.add(tileset));
```

### 1.110 - 2023-10-02

#### @cesium/engine
57 changes: 28 additions & 29 deletions Documentation/Contributors/ReleaseGuide/README.md
Original file line number Diff line number Diff line change
@@ -23,45 +23,44 @@ There is no release manager; instead, our community shares the responsibility. A
4. Ensure you've generated valid [end to end testing snapshots](../TestingGuide/README.md) against a previous release tag with `npm run test-e2e-update`.
5. Pull down the latest `main` branch and run `npm install`.
6. Update the Cesium ion demo token in `Ion.js` with a new token from the CesiumJS ion team account with read and geocode permissions. These tokens are named like this: `1.85 Release - Delete on November 1st, 2021`. Delete the token from 2 releases ago.
7. Update the ArcGIS Developer API key in `ArcGisMapService.js` with a new API key from the CesiumJS ArcGIS Developer account. These API keys are named like this: `1.85 Release - Delete on November 1st, 2021`. Delete the API key from 2 releases ago.
8. Update the Google Maps Platform API key in `GoogleMaps.js` with a new API key from Cesium's Google Cloud Console. These API keys are named like this: `CesiumJS 1.85 Release - Delete on November 1st, 2021`. Ensure the new key is restricted to the Map Tiles API. Delete the API key from 2 releases ago.
9. Proofread [`CHANGES.md`](../../../CHANGES.md) with the date of the release. Adjust the order of changes so that prominent/popular changes come first. Ensure each change is in the section for the relevant workspace.
10. Based on `CHANGES.md`, update each workspace version following the rules of [semantic versioning](https://semver.org/), e.g.,
- npm version minor -w @cesium/engine --no-git-tag-version
11. Update the version in `package.json` to match, e.g. `1.14.0` -> `1.15.0`.
12. Commit these changes.
13. Make sure the repository is clean `git clean -d -x -f --exclude="/Specs/e2e/*-snapshots/"`. **This will delete all files not already in the repository, excluding end to end testing snapshots.**
14. Run `npm install`.
15. Make sure `ThirdParty.json` is up to date by running `npm run build-third-party`. If there are any changes, verify and commit them.
16. Create the release zip `npm run make-zip`.
17. Run tests against the release `npm run test -- --failTaskOnError --release`. Test **in all browsers** with the `--browsers` flag (i.e. `--browsers Firefox,Chrome`). Alternatively, test with the browser Spec Runner by starting a local server (`npm start`) and browsing to http://localhost:8080/Specs/SpecRunner.html?built=true&release=true.
18. Run end to end tests against the release with `npm run test-e2e-release`, or multiple browsers with `npm run test-e2e-release-all`.
19. Unpack the release zip to the directory of your choice and start the server by running `npm install` and then `npm start`
20. Browse to http://localhost:8080 and confirm that the home page loads as expected and all links work.
21. Verify that the [documentation](http://localhost:8080/Build/Documentation/index.html) built correctly
22. Make sure [Hello World](http://localhost:8080/Apps/HelloWorld.html) loads.
23. Make sure [Cesium Viewer](http://localhost:8080/Apps/CesiumViewer/index.html) loads.
24. Run [Sandcastle](http://localhost:8080/Apps/Sandcastle/index.html) on the browser of your choice (or multiple browsers if you are up for it). Switch to the `All` tab and spot test more complicated demos. Actually play with each of the buttons and sliders on each demo to ensure everything works as expected.
25. If any of the above steps fail, post a message to the `#cesiumjs` channel in Slack to figure out what needs to be fixed before we can release. **Do NOT proceed to the next step until issues are resolved.**
26. Push your commits to main
7. Update the ArcGIS Developer API key in `ArcGisMapService.js` with a new API key from the CesiumJS ArcGIS Developer account. These API keys are named like this: `1.85 Release - Delete on November 1st, 2021`. Delete the API key from the last release.
8. Proofread [`CHANGES.md`](../../../CHANGES.md) with the date of the release. Adjust the order of changes so that prominent/popular changes come first. Ensure each change is in the section for the relevant workspace.
9. Based on `CHANGES.md`, update each workspace version following the rules of [semantic versioning](https://semver.org/), e.g.,
- npm version minor -w @cesium/engine --no-git-tag-version
10. Update the version in `package.json` to match, e.g. `1.14.0` -> `1.15.0`.
11. Commit these changes.
12. Make sure the repository is clean `git clean -d -x -f --exclude="/Specs/e2e/*-snapshots/"`. **This will delete all files not already in the repository, excluding end to end testing snapshots.**
13. Run `npm install`.
14. Make sure `ThirdParty.json` is up to date by running `npm run build-third-party`. If there are any changes, verify and commit them.
15. Create the release zip `npm run make-zip`.
16. Run tests against the release `npm run test -- --failTaskOnError --release`. Test **in all browsers** with the `--browsers` flag (i.e. `--browsers Firefox,Chrome`). Alternatively, test with the browser Spec Runner by starting a local server (`npm start`) and browsing to http://localhost:8080/Specs/SpecRunner.html?built=true&release=true.
17. Run end to end tests against the release with `npm run test-e2e-release`, or multiple browsers with `npm run test-e2e-release-all`.
18. Unpack the release zip to the directory of your choice and start the server by running `npm install` and then `npm start`
19. Browse to http://localhost:8080 and confirm that the home page loads as expected and all links work.
20. Verify that the [documentation](http://localhost:8080/Build/Documentation/index.html) built correctly
21. Make sure [Hello World](http://localhost:8080/Apps/HelloWorld.html) loads.
22. Make sure [Cesium Viewer](http://localhost:8080/Apps/CesiumViewer/index.html) loads.
23. Run [Sandcastle](http://localhost:8080/Apps/Sandcastle/index.html) on the browser of your choice (or multiple browsers if you are up for it). Switch to the `All` tab and spot test more complicated demos. Actually play with each of the buttons and sliders on each demo to ensure everything works as expected.
24. If any of the above steps fail, post a message to the `#cesiumjs` channel in Slack to figure out what needs to be fixed before we can release. **Do NOT proceed to the next step until issues are resolved.**
25. Push your commits to main
- `git push`
27. Create and push a [tag](https://git-scm.com/book/en/v2/Git-Basics-Tagging), e.g.,
26. Create and push a [tag](https://git-scm.com/book/en/v2/Git-Basics-Tagging), e.g.,
- `git tag -a 1.1 -m "1.1 release"`
- `git push origin 1.1` (this assumes origin is the primary cesium repository, do not use `git push --tags` as it pushes all tags from all remotes you have on your system.)
28. Publish the release zip file to GitHub
27. Publish the release zip file to GitHub
- https://github.com/CesiumGS/cesium/releases/new
- Select the tag you use pushed
- Enter 'CesiumJS 1.xx' for the title
- Include date, list of highlights and link to CHANGES.md (https://github.com/CesiumGS/cesium/blob/1.xx/CHANGES.md) as the description
- Look at a [previous release](https://github.com/CesiumGS/cesium/releases/tag/1.79) for an example. Don't use emoji, headings, or other formatting
- Attach the `Cesium-1.xx` release zip file
- Publish the release
29. Publish to npm by running `npm publish` in the repository root (not the unzipped file directory) (the first time you do this, you will need to authorize the machine using `npm adduser`)
30. Use `npm publish -w <WORKSPACE>` in the repository root (not the unzipped file directory) to publish the workspace. Repeat this step for each **updated** workspace, in the following order:
28. Publish to npm by running `npm publish` in the repository root (not the unzipped file directory) (the first time you do this, you will need to authorize the machine using `npm adduser`)
29. Use `npm publish -w <WORKSPACE>` in the repository root (not the unzipped file directory) to publish the workspace. Repeat this step for each **updated** workspace, in the following order:
- `npm publish -w @cesium/engine`
- `npm publish -w @cesium/widgets`
31. Check out the `cesium.com` branch. Merge the new release tag into the `cesium.com` branch `git merge origin <tag-name>`. CI will deploy the hosted release, Sandcastle, and the updated doc when you push the branch up.
32. After the `cesium.com` branch is live on cesium.com, comment in the `#comms-chat` slack channel to notify comms that the release is done so they can add these highlights and publish the monthly blog post
30. Check out the `cesium.com` branch. Merge the new release tag into the `cesium.com` branch `git merge origin <tag-name>`. CI will deploy the hosted release, Sandcastle, and the updated doc when you push the branch up.
31. After the `cesium.com` branch is live on cesium.com, comment in the `#comms-chat` slack channel to notify comms that the release is done so they can add these highlights and publish the monthly blog post
- Note, it may take a little while for the new version of CesiumJS to be live on cesium.com (~30 minutes after the branch builds). You can check the version of Cesium in [sandcastle](https://sandcastle.cesium.com/) by looking at the tab above the cesium pane.
33. Update the version of CesiumJS used in the Cesium Workshop: https://github.com/CesiumGS/cesium-workshop/blob/main/index.html#L13-L14
34. Continue to the [Cesium Analytics release](https://github.com/CesiumGS/cesium-analytics/blob/main/Documentation/Contributors/AnalyticsReleaseGuide/README.md)
32. Update the version of CesiumJS used in the Cesium Workshop: https://github.com/CesiumGS/cesium-workshop/blob/main/index.html#L13-L14
33. Continue to the [Cesium Analytics release](https://github.com/CesiumGS/cesium-analytics/blob/main/Documentation/Contributors/AnalyticsReleaseGuide/README.md)
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cesium",
"version": "1.110.0",
"version": "1.110.1",
"description": "CesiumJS is a JavaScript library for creating 3D globes and 2D maps in a web browser without a plugin.",
"homepage": "http://cesium.com/cesiumjs/",
"license": "Apache-2.0",
@@ -51,8 +51,8 @@
"./Specs/**/*"
],
"dependencies": {
"@cesium/engine": "^5.0.0",
"@cesium/widgets": "^4.1.0"
"@cesium/engine": "^6.0.0",
"@cesium/widgets": "^4.2.0"
},
"devDependencies": {
"@aws-sdk/client-s3": "^3.342.0",
@@ -168,4 +168,4 @@
"packages/engine",
"packages/widgets"
]
}
}
31 changes: 8 additions & 23 deletions packages/engine/Source/Core/GoogleMaps.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
import Credit from "./Credit.js";
import defined from "./defined.js";
import Resource from "./Resource.js";

let defaultKeyCredit;
const defaultKey = "AIzaSyA3mA091skJHiLbk3IOlHrHnZmzCoYz3-c";

/**
* Default settings for accessing the Google Maps API.
* <br/>
* An API key is only required if you are using any Google Maps APIs, such as {@link createGooglePhotorealistic3DTileset}.
* A default key is provided for evaluation purposes only.
* An API key is only required if you are directly using any Google Maps APIs, such as through {@link createGooglePhotorealistic3DTileset}.
* Follow instructions for managing API keys for the Google Maps Platform at {@link https://developers.google.com/maps/documentation/embed/get-api-key}
*
* @see createGooglePhotorealistic3DTileset
@@ -22,9 +17,9 @@ const GoogleMaps = {};
/**
* Gets or sets the default Google Maps API key.
*
* @type {string}
* @type {undefined|string}
*/
GoogleMaps.defaultApiKey = defaultKey;
GoogleMaps.defaultApiKey = undefined;

/**
* Gets or sets the default Google Map Tiles API endpoint.
@@ -36,20 +31,10 @@ GoogleMaps.mapTilesApiEndpoint = new Resource({
url: "https://tile.googleapis.com/v1/",
});

GoogleMaps.getDefaultApiKeyCredit = function (providedKey) {
if (providedKey !== defaultKey) {
return undefined;
}

if (!defined(defaultKeyCredit)) {
const defaultKeyMessage =
'<b> \
This application is using CesiumJS\'s default Google Maps API key. Please assign <i>Cesium.GoogleMaps.defaultApiKey</i> \
with <a href="https://developers.google.com/maps/documentation/embed/get-api-key">your API key for the Google Maps Platform</a>.</b>';

defaultKeyCredit = new Credit(defaultKeyMessage, true);
}

return defaultKeyCredit;
GoogleMaps.getDefaultCredit = function () {
return new Credit(
`<img src="https://assets.ion-development.cesium.com/google-credit.png" alt="Google">`,
true
);
};
export default GoogleMaps;
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Cesium3DTileset from "./Cesium3DTileset.js";
import defaultValue from "../Core/defaultValue.js";
import defined from "../Core/defined.js";
import IonResource from "../Core/IonResource.js";
import GoogleMaps from "../Core/GoogleMaps.js";
import Resource from "../Core/Resource.js";

@@ -16,6 +17,17 @@ import Resource from "../Core/Resource.js";
* @see GoogleMaps
*
* @example
* const viewer = new Cesium.Viewer("cesiumContainer");
*
* try {
* const tileset = await Cesium.createGooglePhotorealistic3DTileset();
* viewer.scene.primitives.add(tileset));
* } catch (error) {
* console.log(`Error creating tileset: ${error}`);
* }
*
* @example
* // Use your own Google Maps API key
* Cesium.GoogleMaps.defaultApiKey = "your-api-key";
*
* const viewer = new Cesium.Viewer("cesiumContainer");
@@ -28,14 +40,6 @@ import Resource from "../Core/Resource.js";
* }
*/
async function createGooglePhotorealistic3DTileset(key, options) {
key = defaultValue(key, GoogleMaps.defaultApiKey);

let credits;
const credit = GoogleMaps.getDefaultApiKeyCredit(key);
if (defined(credit)) {
credits = [credit];
}

options = defaultValue(options, {});
options.showCreditsOnScreen = true;
options.cacheBytes = defaultValue(options.cacheBytes, 1536 * 1024 * 1024);
@@ -44,6 +48,17 @@ async function createGooglePhotorealistic3DTileset(key, options) {
1024 * 1024 * 1024
);

key = defaultValue(key, GoogleMaps.defaultApiKey);
if (!defined(key)) {
return requestCachedIonTileset(options);
}

let credits;
const credit = GoogleMaps.getDefaultCredit();
if (defined(credit)) {
credits = [credit];
}

const resource = new Resource({
url: `${GoogleMaps.mapTilesApiEndpoint}3dtiles/root.json`,
queryParameters: {
@@ -55,4 +70,19 @@ async function createGooglePhotorealistic3DTileset(key, options) {
return Cesium3DTileset.fromUrl(resource, options);
}

const metadataCache = {};
async function requestCachedIonTileset(options) {
const ionAssetId = 2275207;
const cacheKey = ionAssetId;

let promise = metadataCache[cacheKey];
if (!defined(promise)) {
promise = IonResource.fromAssetId(ionAssetId);
metadataCache[cacheKey] = promise;
}

const resource = await promise;
return Cesium3DTileset.fromUrl(resource, options);
}

export default createGooglePhotorealistic3DTileset;
2 changes: 1 addition & 1 deletion packages/engine/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cesium/engine",
"version": "5.0.0",
"version": "6.0.0",
"description": "CesiumJS is a JavaScript library for creating 3D globes and 2D maps in a web browser without a plugin.",
"keywords": [
"3D",
4 changes: 2 additions & 2 deletions packages/widgets/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cesium/widgets",
"version": "4.1.0",
"version": "4.2.0",
"description": "A widgets library for use with CesiumJS. CesiumJS is a JavaScript library for creating 3D globes and 2D maps in a web browser without a plugin.",
"keywords": [
"3D",
@@ -28,7 +28,7 @@
"node": ">=14.0.0"
},
"dependencies": {
"@cesium/engine": "^5.0.0",
"@cesium/engine": "^6.0.0",
"nosleep.js": "^0.12.0"
},
"type": "module",