Skip to content

Commit

Permalink
Port to OL 7.4 and Cesium 107
Browse files Browse the repository at this point in the history
  • Loading branch information
gberaudo committed Jul 21, 2023
1 parent d196f62 commit 791343d
Show file tree
Hide file tree
Showing 29 changed files with 852 additions and 719 deletions.
Binary file added .RELEASE.md.swp
Binary file not shown.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

* Changes
* Add function to grab a screenshot from rendered Cesium globe (client side printing)
* Port to OL 7.4 and CesiumJS 1.107

# v 2.14.0 - 2023-04-26

Expand Down
2 changes: 1 addition & 1 deletion buildtools/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ echo
echo "cd ../.. && rm -rf $BUILD && npm publish && buildtools/publish-website.sh"
echo "git tag $TAG && git push --tags"
echo
echo "In addition, create the release on github and announce it"
echo "In addition, create the release on github (upload the zip) and announce it"
1 change: 0 additions & 1 deletion buildtools/webpack.commons.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ const ruleTS = {
plugins: [
['@babel/plugin-syntax-dynamic-import'],
['@babel/plugin-transform-typescript', {allowDeclareFields: true}],
['@babel/proposal-class-properties'],
]
}
},
Expand Down
2 changes: 1 addition & 1 deletion examples/customProj.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const ol3d = new OLCesium({
}
});
const scene = ol3d.getCesiumScene();
scene.terrainProvider = Cesium.createWorldTerrain();
Cesium.createWorldTerrainAsync().then(tp => scene.terrainProvider = tp);
ol3d.setEnabled(true);

document.getElementById('enable').addEventListener('click', () => ol3d.setEnabled(!ol3d.getEnabled()));
2 changes: 1 addition & 1 deletion examples/exports.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const ol2d = new olMap({

const ol3d = new OLCesium({map: ol2d});
const scene = ol3d.getCesiumScene();
scene.terrainProvider = Cesium.createWorldTerrain();
Cesium.createWorldTerrainAsync().then(tp => scene.terrainProvider = tp);

ol3d.setEnabled(true);
const camera = ol3d.getCamera();
Expand Down
2 changes: 1 addition & 1 deletion examples/fillstyle.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const map = new olMap({
Cesium.Ion.defaultAccessToken = OLCS_ION_TOKEN;
const ol3d = new OLCesium({map, target: 'map3d'});
const scene = ol3d.getCesiumScene();
scene.terrainProvider = Cesium.createWorldTerrain();
Cesium.createWorldTerrainAsync().then(tp => scene.terrainProvider = tp);
ol3d.setEnabled(true);

window['ol3d'] = ol3d;
Expand Down
2 changes: 1 addition & 1 deletion examples/groundvectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ Cesium.Ion.defaultAccessToken = OLCS_ION_TOKEN;
vectorLayer.set('altitudeMode', 'clampToGround');
const ol3d = new OLCesium({map, target: 'map3d'});
const scene = ol3d.getCesiumScene();
scene.terrainProvider = Cesium.createWorldTerrain();
Cesium.createWorldTerrainAsync().then(tp => scene.terrainProvider = tp);
ol3d.setEnabled(true);

window['toggleClampToGround'] = function() {
Expand Down
2 changes: 1 addition & 1 deletion examples/icon-position.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const map = new olMap({
Cesium.Ion.defaultAccessToken = OLCS_ION_TOKEN;
const ol3d = new OLCesium({map, target: 'map3d'});
const scene = ol3d.getCesiumScene();
scene.terrainProvider = Cesium.createWorldTerrain();
Cesium.createWorldTerrainAsync().then(tp => scene.terrainProvider = tp);
ol3d.setEnabled(true);

window['toggleClampToGround'] = function() {
Expand Down
2 changes: 1 addition & 1 deletion examples/image-static.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const ol3d = new OLCesium({
map: ol2d
});
const scene = ol3d.getCesiumScene();
scene.terrainProvider = Cesium.createWorldTerrain();
Cesium.createWorldTerrainAsync().then(tp => scene.terrainProvider = tp);
ol3d.setEnabled(true);


Expand Down
2 changes: 1 addition & 1 deletion examples/imageWMS.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const ol3d = new OLCesium({
}
});
const scene = ol3d.getCesiumScene();
scene.terrainProvider = Cesium.createWorldTerrain();
Cesium.createWorldTerrainAsync().then(tp => scene.terrainProvider = tp);
ol3d.setEnabled(true);

document.getElementById('enable').addEventListener('click', () => ol3d.setEnabled(!ol3d.getEnabled()));
2 changes: 1 addition & 1 deletion examples/kml.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const ol2d = new olMap({

const ol3d = new OLCesium({map: ol2d});
const scene = ol3d.getCesiumScene();
scene.terrainProvider = Cesium.createWorldTerrain();
Cesium.createWorldTerrainAsync().then(tp => scene.terrainProvider = tp);

ol3d.getDataSources().add(Cesium.KmlDataSource.load(
'https://api3.geo.admin.ch/ogcproxy?url=' +
Expand Down
3 changes: 2 additions & 1 deletion examples/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const ol3d = new OLCesium({
}
});
const scene = ol3d.getCesiumScene();
scene.terrainProvider = Cesium.createWorldTerrain();
Cesium.createWorldTerrainAsync().then(tp => scene.terrainProvider = tp);
ol3d.setEnabled(true);


Expand All @@ -58,3 +58,4 @@ window['toggleTime'] = function() {
timeElt.style.display = 'none';
}
};

2 changes: 1 addition & 1 deletion examples/overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const ol3d = new OLCesium({
target: 'map3d'
});
const scene = ol3d.getCesiumScene();
scene.terrainProvider = Cesium.createWorldTerrain();
Cesium.createWorldTerrainAsync().then(tp => scene.terrainProvider = tp);

class OverlayHandler {
constructor(ol2d, ol3d, scene) {
Expand Down
2 changes: 1 addition & 1 deletion examples/print.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const ol3d = new OLCesium({
map: ol2d,
});
const scene = ol3d.getCesiumScene();
scene.terrainProvider = Cesium.createWorldTerrain();
Cesium.createWorldTerrainAsync().then(tp => scene.terrainProvider = tp);
ol3d.setEnabled(true);


Expand Down
2 changes: 1 addition & 1 deletion examples/rastersync.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const ol2d = new olMap({
Cesium.Ion.defaultAccessToken = OLCS_ION_TOKEN;
const ol3d = new OLCesium({map: ol2d, target: 'map3d'});
const scene = ol3d.getCesiumScene();
scene.terrainProvider = Cesium.createWorldTerrain();
Cesium.createWorldTerrainAsync().then(tp => scene.terrainProvider = tp);

ol3d.setEnabled(true);

Expand Down
2 changes: 1 addition & 1 deletion examples/rotate.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const map = new olMap({
Cesium.Ion.defaultAccessToken = OLCS_ION_TOKEN;
const ol3d = new OLCesium({map/*, target: 'map3d'*/});
const scene = ol3d.getCesiumScene();
scene.terrainProvider = Cesium.createWorldTerrain();
Cesium.createWorldTerrainAsync().then(tp => scene.terrainProvider = tp);
ol3d.setEnabled(true);


Expand Down
2 changes: 1 addition & 1 deletion examples/sidebyside.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const ol2d = new olMap({

const ol3d = new OLCesium({map: ol2d, target: 'map3d'});
const scene = ol3d.getCesiumScene();
scene.terrainProvider = Cesium.createWorldTerrain();
Cesium.createWorldTerrainAsync().then(tp => scene.terrainProvider = tp);
ol3d.setEnabled(true);

document.getElementById('enable').addEventListener('click', () => ol3d.setEnabled(!ol3d.getEnabled()));
2 changes: 1 addition & 1 deletion examples/synthvectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const map = new olMap({
Cesium.Ion.defaultAccessToken = OLCS_ION_TOKEN;
const ol3d = new OLCesium({map});
const scene = ol3d.getCesiumScene();
scene.terrainProvider = Cesium.createWorldTerrain();
Cesium.createWorldTerrainAsync().then(tp => scene.terrainProvider = tp);
ol3d.setEnabled(true);

// Show off 3D feature picking
Expand Down
2 changes: 1 addition & 1 deletion examples/tracking.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const map = new olMap({
Cesium.Ion.defaultAccessToken = OLCS_ION_TOKEN;
const ol3d = new OLCesium({map/*, target: 'map3d'*/});
const scene = ol3d.getCesiumScene();
scene.terrainProvider = Cesium.createWorldTerrain();
Cesium.createWorldTerrainAsync().then(tp => scene.terrainProvider = tp);
ol3d.setEnabled(true);

let tracking = false;
Expand Down
2 changes: 1 addition & 1 deletion examples/vectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ dragAndDropInteraction.on('addfeatures', (event) => {
Cesium.Ion.defaultAccessToken = OLCS_ION_TOKEN;
const ol3d = new OLCesium({map, target: 'map3d'});
const scene = ol3d.getCesiumScene();
scene.terrainProvider = Cesium.createWorldTerrain();
Cesium.createWorldTerrainAsync().then(tp => scene.terrainProvider = tp);
ol3d.setEnabled(true);

const csLabels = new Cesium.LabelCollection();
Expand Down
2 changes: 1 addition & 1 deletion examples/wmts.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const ol3d = new OLCesium({
map: ol2d,
});
const scene = ol3d.getCesiumScene();
scene.terrainProvider = Cesium.createWorldTerrain();
Cesium.createWorldTerrainAsync().then(tp => scene.terrainProvider = tp);
ol3d.setEnabled(true);

document.getElementById('enable').addEventListener('click', () => ol3d.setEnabled(!ol3d.getEnabled()));
Loading

0 comments on commit 791343d

Please sign in to comment.