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: openlayers/ol-cesium
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.20
Choose a base ref
...
head repository: openlayers/ol-cesium
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 4,183 additions and 1,963 deletions.
  1. +17 −0 CHANGES.md
  2. +11 −0 CONTRIBUTING.md
  3. +1 −1 README.md
  4. +0 −116 buildtools/fix_paths_recast.js
  5. +15 −5 examples/3dtiles.html
  6. +7 −2 examples/3dtiles.js
  7. +178 −0 examples/_code-sandbox.js
  8. +0 −1 examples/_common.js
  9. +24 −10 examples/buildings.html
  10. +6 −1 examples/buildings.js
  11. +19 −7 examples/customProj.html
  12. +8 −5 examples/customProj.js
  13. +0 −1 examples/data/geojson/countries.geojson
  14. +38 −14 examples/exports.html
  15. +7 −5 examples/exports.js
  16. +23 −10 examples/fillstyle.html
  17. +6 −6 examples/fillstyle.js
  18. +25 −12 examples/groundvectors.html
  19. +16 −4 examples/groundvectors.js
  20. +27 −14 examples/icon-position.html
  21. +7 −5 examples/icon-position.js
  22. +19 −6 examples/image-static.html
  23. +7 −6 examples/image-static.js
  24. +18 −6 examples/imageWMS.html
  25. +8 −5 examples/imageWMS.js
  26. +0 −21 examples/index.html
  27. +18 −6 examples/kml.html
  28. +17 −11 examples/kml.js
  29. +67 −55 examples/layer-group.html
  30. +6 −3 examples/layer-group.js
  31. +18 −6 examples/lazy.html
  32. +7 −4 examples/lazy.js
  33. +29 −17 examples/main.html
  34. +8 −5 examples/main.js
  35. +18 −6 examples/mvt.html
  36. +7 −14 examples/mvt.js
  37. +44 −26 examples/overlay.html
  38. +13 −11 examples/overlay.js
  39. +27 −17 examples/print.html
  40. +10 −10 examples/print.js
  41. +42 −31 examples/rastersync.html
  42. +7 −6 examples/rastersync.js
  43. +23 −8 examples/rotate.html
  44. +8 −7 examples/rotate.js
  45. +21 −10 examples/selection.html
  46. +9 −4 examples/selection.js
  47. +17 −6 examples/sidebyside.html
  48. +8 −6 examples/sidebyside.js
  49. +34 −14 examples/synthvectors.html
  50. +7 −4 examples/synthvectors.js
  51. +19 −9 examples/tracking.html
  52. +10 −12 examples/tracking.js
  53. +34 −24 examples/vectors.html
  54. +14 −9 examples/vectors.js
  55. +25 −4 examples/wmts.html
  56. +8 −7 examples/wmts.js
  57. +3,001 −1,248 package-lock.json
  58. +23 −19 package.json
  59. +15 −13 src/olcs.ts
  60. +3 −3 src/olcs/AbstractSynchronizer.ts
  61. +1 −1 src/olcs/AutoRenderLoop.ts
  62. +2 −2 src/olcs/Camera.ts
  63. +31 −17 src/olcs/FeatureConverter.ts
  64. +1 −1 src/olcs/MVTImageryProvider.ts
  65. +11 −11 src/olcs/OLCesium.ts
  66. +3 −3 src/olcs/OverlaySynchronizer.ts
  67. +3 −3 src/olcs/RasterSynchronizer.ts
  68. +3 −3 src/olcs/SynchronizedOverlay.ts
  69. +6 −6 src/olcs/VectorSynchronizer.ts
  70. +3 −3 src/olcs/contrib/Manager.ts
  71. +3 −3 src/olcs/core.ts
  72. +4 −4 src/olcs/core/OLImageryProvider.ts
  73. +1 −1 src/olcs/dashPatternConversion.test.ts
  74. +3 −3 src/olcs/print.ts
  75. +2 −2 src/olcs/print/printUtils.ts
  76. +2 −2 src/olcs/util.ts
17 changes: 17 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Changelog

## v 2.22.1

* Changes
* Port to CesiumJS 1.123.

## v 2.22.0

* Changes
* Port to CesiumJS 1.122.
* Allow to live edit examples.

## v 2.21.0

* Changes
* Changes types to work with OL 9.2, min version is now 9.2
* Add OL 10 support.
* Port to CesiumJS 1.121.

## v 2.20.0

11 changes: 11 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -18,6 +18,11 @@ npm start
browse http://localhost:1234
```

### OLCesium import

The examples use a compiled version of OLCesium. If you want to use the source code directly you can define an alias.
See https://en.parceljs.org/module_resolution.html#aliases

### The `check` target

```bash
@@ -30,3 +35,9 @@ Run this before every commit. It will catch many problems quickly.

Please submit separate pull requests for separate issues. This allows each to
be reviewed on its own merits.

### Typescript imports

Write typescript files with the ".ts" extension.
But import these files with a ".js" extension.
This is a useful strangeness of Typescript which, in the end, produces correct transpiled code.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -49,7 +49,7 @@ const ol3d = new OLCesium({map: ol2dMap});

```js
ol3d.setEnabled(true); // switch to 3D - show the globe
ol3d.setEnabled(true); // switch to 2D - show the map
ol3d.setEnabled(false); // switch to 2D - show the map
```

Build with your prefered bundler.
116 changes: 0 additions & 116 deletions buildtools/fix_paths_recast.js

This file was deleted.

20 changes: 15 additions & 5 deletions examples/3dtiles.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="index, all" />
<title>olcesium 3d tiles example</title>
<title>Ol-Cesium | 3d tiles example</title>
<link rel="stylesheet" href="../node_modules/ol/ol.css" type="text/css">
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.4.0/css/all.min.css" crossorigin="anonymous">
</head>
<body>
<div id="map" style="width:600px;height:400px;"></div>
<input id="enable" type="button" value="Enable/disable" />
<div style="text-align: right;">
<button id="sandbox-button"><i class="fab fa-codepen fa-lg"></i> Edit in sandbox</button>
<form method="POST" id="sandbox-form" target="_blank" action="https://codesandbox.io/api/v1/sandboxes/define">
<input id="sandbox-params" type="hidden" name="parameters">
</form>
</div>
<div id="example-html-source">
<div>
<div class="clear-map-sandbox" id="mapCesium" style="width:600px;height:400px;float:left;"></div>
</div>
<input id="enable" type="button" value="Enable/disable" />
</div>
<script src="./inject_ol_cesium.js"></script>
<script type="module" src="./3dtiles.js"></script>
</body>
9 changes: 7 additions & 2 deletions examples/3dtiles.js
Original file line number Diff line number Diff line change
@@ -5,9 +5,9 @@ import {defaults as olControlDefaults} from 'ol/control.js';
import olSourceOSM from 'ol/source/OSM.js';
import olLayerTile from 'ol/layer/Tile.js';
import olMap from 'ol/Map.js';
import {OLCS_ION_TOKEN} from './_common.js';

Cesium.Ion.defaultAccessToken = OLCS_ION_TOKEN;
const Cesium = window.Cesium;

const ol2d = new olMap({
layers: [
new olLayerTile({
@@ -39,3 +39,8 @@ document.getElementById('enable').addEventListener('click', () => ol3d.setEnable
scene.camera.flyTo({
destination: Cesium.Cartesian3.fromDegrees(6.54254, 46.50802, 1000.0)
});

//##REMOVE## Keep this tag, split code here for code sandbox

import {initCodeSandbox} from './_code-sandbox.js';
initCodeSandbox('rawjs/3dtiles.js', 'rawjs/_proj21781.js');
Loading