Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
2d187ad
wip
lukemckinstry Sep 4, 2025
7cb61c0
init google
lukemckinstry Sep 5, 2025
154e6e8
google 2d wip
lukemckinstry Sep 8, 2025
b70e0e2
google 2d api docs
lukemckinstry Sep 8, 2025
2853e6d
google 2d updates
lukemckinstry Sep 9, 2025
b8c7df5
add azure 2d imagery provider class
lukemckinstry Sep 9, 2025
5fd1716
implement getTileCredits
lukemckinstry Sep 11, 2025
0e003c8
stream via ion wip
lukemckinstry Sep 18, 2025
2a2dbc1
use IonResource for external imagery types
lukemckinstry Sep 19, 2025
d58748a
use ion resource retry to reset session query parameter for Google 2d…
lukemckinstry Sep 22, 2025
95819da
fixups for refresh logic
lukemckinstry Sep 22, 2025
8a45264
sandcastle - add google 2d
lukemckinstry Sep 23, 2025
cb6d016
wip google fromMapType endpoint
lukemckinstry Sep 23, 2025
c4fd6fe
jsdoc fix
lukemckinstry Sep 23, 2025
66d2fb3
Azure 2D Maps use ion proxy
lukemckinstry Sep 23, 2025
4f1be5d
Azure 2D Maps sandcastle
lukemckinstry Sep 23, 2025
26f4755
Azure ion token refresh
lukemckinstry Sep 23, 2025
51f9ae5
cleanup
lukemckinstry Sep 23, 2025
9e869f1
add google overlay and styling params to imagery provider api
lukemckinstry Sep 24, 2025
0913984
google overlay and styling fixups
lukemckinstry Sep 24, 2025
f5276ea
sandcastle - google overlay and styles
lukemckinstry Sep 24, 2025
fcd8e08
move from session token to constructor
lukemckinstry Sep 24, 2025
66ecf4c
wip - add support for custom maps and overlays via ion
lukemckinstry Sep 24, 2025
7080a35
wip tile availability
lukemckinstry Sep 25, 2025
d11c001
google style options via ion
lukemckinstry Sep 26, 2025
0ccbdd0
fixup availability rollback
lukemckinstry Sep 26, 2025
9259bd9
add imagery available from ion sandcastle
lukemckinstry Sep 26, 2025
0ee41e5
wip google 2d ip specs
lukemckinstry Sep 26, 2025
50ae785
remove cache in google 2d from ion
lukemckinstry Sep 27, 2025
160c17f
add v2 sandcastles
lukemckinstry Sep 27, 2025
4622d17
gather viewport attribution when google provider loads
lukemckinstry Sep 27, 2025
e291f07
increase default width of attribution popup
lukemckinstry Sep 27, 2025
21bfcf9
add specs for request image process
lukemckinstry Sep 27, 2025
b466ef4
rename custom styles sandcastle
lukemckinstry Sep 28, 2025
4bc35e3
update key in ion resource retry callback
lukemckinstry Sep 28, 2025
242e459
use ion resource for fromIon
lukemckinstry Sep 28, 2025
fa93e62
cleanup request image
lukemckinstry Sep 28, 2025
a5ca6fb
docs updates, add examples and links
lukemckinstry Sep 28, 2025
2373596
cleanup
lukemckinstry Sep 28, 2025
54a042e
specs cleanup
lukemckinstry Sep 28, 2025
bfd5110
add google types to ion world imagery style
lukemckinstry Sep 29, 2025
59d2779
fixups to google 2d imagery provider
lukemckinstry Sep 29, 2025
648b0e3
cleanup specs and checks
lukemckinstry Sep 29, 2025
f7ebec7
remove geocoder check pending decision
lukemckinstry Sep 29, 2025
ce54384
mark google 2d provider constructor private
lukemckinstry Sep 29, 2025
0a4db5c
add sandcastle thumbnails
lukemckinstry Sep 29, 2025
78656e6
update default base layer picker options
lukemckinstry Sep 29, 2025
19ba0d2
pr feedback fixups
lukemckinstry Sep 30, 2025
a756739
use GoogleMaps mapTilesApiEndpoint and defaultApiKey
lukemckinstry Sep 30, 2025
ba95957
spec fixes
lukemckinstry Sep 30, 2025
9fd62df
document attribution function
lukemckinstry Sep 30, 2025
ac27462
cleanup
lukemckinstry Sep 30, 2025
420650e
organize options passing
lukemckinstry Sep 30, 2025
994c6e6
update changelog
lukemckinstry Sep 30, 2025
d36a586
azure 2d provider updates
lukemckinstry Sep 30, 2025
80d41ec
add azxure 2d specs
lukemckinstry Sep 30, 2025
bbe42b2
default azure max zoom 22
lukemckinstry Sep 30, 2025
2df3d24
Refactor ion resource refresh token callbacks and credit
ggetz Sep 30, 2025
9f7ff6e
Fix jsdoc
ggetz Sep 30, 2025
8b801e6
prettier
lukemckinstry Sep 30, 2025
0905d8a
undo ion resource refactor
lukemckinstry Oct 1, 2025
fd24d66
remove azure assets from ion showcase for now
lukemckinstry Oct 1, 2025
3beb45e
move azure sandcastles to development
lukemckinstry Oct 1, 2025
96390e4
update sandcastle descriptions
lukemckinstry Oct 1, 2025
8ddcf0c
fixups
lukemckinstry Oct 1, 2025
f74fa57
update to prod asset ids
lukemckinstry Oct 1, 2025
85eb619
prod asset ID updates
lukemckinstry Oct 1, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 94 additions & 0 deletions Apps/Sandcastle/gallery/Google 2D Tiles with Custom Styles.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"
/>
<meta
name="description"
content="Imagery tiles from Google Maps with additional parameters to create overlays and custom styles."
/>
<meta name="cesium-sandcastle-labels" content="Beginner, Showcases" />
<title>Cesium Demo</title>
<script type="text/javascript" src="../Sandcastle-header.js"></script>
<script type="module" src="../load-cesium-es6.js"></script>
</head>
<body class="sandcastle-loading" data-sandcastle-bucket="bucket-requirejs.html">
<style>
@import url(../templates/bucket.css);
</style>
<div id="cesiumContainer" class="fullSize"></div>
<div id="loadingOverlay"><h1>Loading...</h1></div>
<div id="toolbar"></div>
<script id="cesium_sandcastle_script">
window.startup = async function (Cesium) {
"use strict";
//Sandcastle_Begin
const assetId = 3830184;

const base = Cesium.ImageryLayer.fromProviderAsync(
Cesium.Google2DImageryProvider.fromIonAssetId({
assetId,
mapType: "satellite",
}),
);

const overlay = Cesium.ImageryLayer.fromProviderAsync(
Cesium.Google2DImageryProvider.fromIonAssetId({
assetId,
overlayLayerType: "layerRoadmap",
styles: [
{
stylers: [{ hue: "#00ffe6" }, { saturation: -20 }],
},
{
featureType: "road",
elementType: "geometry",
stylers: [{ lightness: 100 }, { visibility: "simplified" }],
},
],
}),
);

const viewer = new Cesium.Viewer("cesiumContainer", {
animation: false,
baseLayer: false,
baseLayerPicker: false,
geocoder: Cesium.IonGeocodeProviderType.GOOGLE,
timeline: false,
sceneModePicker: false,
navigationHelpButton: false,
homeButton: false,
terrainProvider: await Cesium.CesiumTerrainProvider.fromIonAssetId(1),
});
viewer.geocoder.viewModel.keepExpanded = true;

viewer.imageryLayers.add(base);
viewer.imageryLayers.add(overlay);

viewer.scene.camera.flyTo({
duration: 0,
destination: new Cesium.Rectangle.fromDegrees(
//Philly
-75.280266,
39.867004,
-74.955763,
40.137992,
),
});
//Sandcastle_End
Sandcastle.finishedLoading();
};
if (typeof Cesium !== "undefined") {
window.startupCalled = true;
window.startup(Cesium).catch((error) => {
"use strict";
console.error(error);
});
}
</script>
</body>
</html>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
69 changes: 69 additions & 0 deletions Apps/Sandcastle/gallery/Google 2D Tiles.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"
/>
<meta name="description" content="Global imagery data from Google Maps." />
<meta name="cesium-sandcastle-labels" content="Beginner, Showcases" />
<title>Cesium Demo</title>
<script type="text/javascript" src="../Sandcastle-header.js"></script>
<script type="module" src="../load-cesium-es6.js"></script>
</head>
<body class="sandcastle-loading" data-sandcastle-bucket="bucket-requirejs.html">
<style>
@import url(../templates/bucket.css);
</style>
<div id="cesiumContainer" class="fullSize"></div>
<div id="loadingOverlay"><h1>Loading...</h1></div>
<div id="toolbar"></div>
<script id="cesium_sandcastle_script">
window.startup = async function (Cesium) {
"use strict";
//Sandcastle_Begin
const assetId = 3830184;

const google = Cesium.ImageryLayer.fromProviderAsync(
Cesium.IonImageryProvider.fromAssetId(assetId),
);

const viewer = new Cesium.Viewer("cesiumContainer", {
animation: false,
baseLayer: false,
baseLayerPicker: false,
geocoder: Cesium.IonGeocodeProviderType.GOOGLE,
timeline: false,
sceneModePicker: false,
navigationHelpButton: false,
homeButton: false,
terrainProvider: await Cesium.CesiumTerrainProvider.fromIonAssetId(1),
});
viewer.geocoder.viewModel.keepExpanded = true;

viewer.imageryLayers.add(google);

viewer.scene.camera.flyTo({
duration: 0,
destination: new Cesium.Rectangle.fromDegrees(
//Philly
-75.280266,
39.867004,
-74.955763,
40.137992,
),
}); //Sandcastle_End
Sandcastle.finishedLoading();
};
if (typeof Cesium !== "undefined") {
window.startupCalled = true;
window.startup(Cesium).catch((error) => {
"use strict";
console.error(error);
});
}
</script>
</body>
</html>
Binary file added Apps/Sandcastle/gallery/Google 2D Tiles.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
98 changes: 98 additions & 0 deletions Apps/Sandcastle/gallery/Imagery Assets available from ion.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"
/>
<meta name="description" content="Global imagery assets available from Cesium ion." />
<meta name="cesium-sandcastle-labels" content="Beginner, Showcases" />
<title>Cesium Demo</title>
<script type="text/javascript" src="../Sandcastle-header.js"></script>
<script type="module" src="../load-cesium-es6.js"></script>
</head>
<body class="sandcastle-loading" data-sandcastle-bucket="bucket-requirejs.html">
<style>
@import url(../templates/bucket.css);
</style>
<div id="cesiumContainer" class="fullSize"></div>
<div id="loadingOverlay"><h1>Loading...</h1></div>
<div id="toolbar"></div>
<script id="cesium_sandcastle_script">
window.startup = async function (Cesium) {
"use strict";
//Sandcastle_Begin
const viewer = new Cesium.Viewer("cesiumContainer", {
animation: false,
baseLayer: false,
baseLayerPicker: false,
geocoder: Cesium.IonGeocodeProviderType.GOOGLE,
timeline: false,
sceneModePicker: false,
navigationHelpButton: false,
homeButton: false,
terrainProvider: await Cesium.CesiumTerrainProvider.fromIonAssetId(1),
});
viewer.geocoder.viewModel.keepExpanded = true;

const menuOptions = [];

const dropdownOptions = [
{ label: "Google Maps 2D Contour", assetId: 3830186 },
{ label: "Google Maps 2D Labels Only", assetId: 3830185 },
{ label: "Google Maps 2D Roadmap", assetId: 3830184 },
{ label: "Google Maps 2D Satellite", assetId: 3830182 },
{ label: "Google Maps 2D Satellite with Labels", assetId: 3830183 },
{ label: "Bing Maps Aerial", assetId: 2 },
{ label: "Bing Maps Aerial with Labels", assetId: 3 },
{ label: "Bing Maps Road", assetId: 4 },
{ label: "Bing Maps Labels Only", assetId: 2411391 },
{ label: "Sentinel-2", assetId: 3954 },
];

function showLayer(assetId) {
viewer.imageryLayers.removeAll(true);
const layer = Cesium.ImageryLayer.fromProviderAsync(
Cesium.IonImageryProvider.fromAssetId(assetId),
);
viewer.imageryLayers.add(layer);
}

dropdownOptions.forEach((opt) => {
const option = {
text: opt.label,
onselect: function () {
showLayer(opt.assetId);
},
};
menuOptions.push(option);
});

Sandcastle.addToolbarMenu(menuOptions);

showLayer(3830186);

viewer.scene.camera.flyTo({
duration: 0,
destination: new Cesium.Rectangle.fromDegrees(
//Philly
-75.280266,
39.867004,
-74.955763,
40.137992,
),
}); //Sandcastle_End
Sandcastle.finishedLoading();
};
if (typeof Cesium !== "undefined") {
window.startupCalled = true;
window.startup(Cesium).catch((error) => {
"use strict";
console.error(error);
});
}
</script>
</body>
</html>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
72 changes: 72 additions & 0 deletions Apps/Sandcastle/gallery/development/Azure 2D Tiles.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"
/>
<meta name="description" content="Global imagery data from Azure Maps." />
<meta name="cesium-sandcastle-labels" content="Beginner, Showcases" />
<title>Cesium Demo</title>
<script type="text/javascript" src="../Sandcastle-header.js"></script>
<script type="module" src="../load-cesium-es6.js"></script>
</head>
<body class="sandcastle-loading" data-sandcastle-bucket="bucket-requirejs.html">
<style>
@import url(../templates/bucket.css);
</style>
<div id="cesiumContainer" class="fullSize"></div>
<div id="loadingOverlay"><h1>Loading...</h1></div>
<div id="toolbar"></div>
<script id="cesium_sandcastle_script">
window.startup = async function (Cesium) {
"use strict";
//Sandcastle_Begin
Cesium.Ion.defaultServer = "https://api.ion-staging.cesium.com";
Cesium.Ion.defaultAccessToken = "";

const assetId = 1683;

const azure = Cesium.ImageryLayer.fromProviderAsync(
Cesium.IonImageryProvider.fromAssetId(assetId),
);

const viewer = new Cesium.Viewer("cesiumContainer", {
animation: false,
baseLayer: false,
baseLayerPicker: false,
geocoder: Cesium.IonGeocodeProviderType.GOOGLE,
timeline: false,
sceneModePicker: false,
navigationHelpButton: false,
homeButton: false,
terrainProvider: await Cesium.CesiumTerrainProvider.fromIonAssetId(1),
});
viewer.geocoder.viewModel.keepExpanded = true;

viewer.imageryLayers.add(azure);

viewer.scene.camera.flyTo({
duration: 0,
destination: new Cesium.Rectangle.fromDegrees(
//Philly
-75.280266,
39.867004,
-74.955763,
40.137992,
),
}); //Sandcastle_End
Sandcastle.finishedLoading();
};
if (typeof Cesium !== "undefined") {
window.startupCalled = true;
window.startup(Cesium).catch((error) => {
"use strict";
console.error(error);
});
}
</script>
</body>
</html>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

#### Additions :tada:

- Adds Google2DImageryProvider to load imagery from [Google Maps](https://developers.google.com/maps/documentation/tile/2d-tiles-overview) [#12913](https://github.com/CesiumGS/cesium/pull/12913)
- Adds an async factory method for the Material class that allows callers to wait on resource loading. [#10566](https://github.com/CesiumGS/cesium/issues/10566)

## 1.133 - 2025-09-02
Expand Down
4 changes: 2 additions & 2 deletions packages/engine/Source/Core/GoogleMaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ GoogleMaps.defaultApiKey = undefined;
* Gets or sets the default Google Map Tiles API endpoint.
*
* @type {string|Resource}
* @default https://tile.googleapis.com/v1/
* @default https://tile.googleapis.com/
*/
GoogleMaps.mapTilesApiEndpoint = new Resource({
url: "https://tile.googleapis.com/v1/",
url: "https://tile.googleapis.com/",
});

GoogleMaps.getDefaultCredit = function () {
Expand Down
Loading