Skip to content

Commit 1b2a0cc

Browse files
committed
feat(olcs): Use OL tile load functions rather than Cesium's
This is related to (and based on) openlayers/ol-cesium#562 and openlayers/ol-cesium#37. However, we need it for GeoPackage support rather than for reprojection. Additionally, this helps support any other custom tile classes and tile load functions in Cesium.
1 parent bed8ace commit 1b2a0cc

8 files changed

Lines changed: 102 additions & 571 deletions

File tree

externs/Cesium.externs.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,13 @@ Cesium.Deferred = function() {};
7575
*/
7676
Cesium.Deferred.prototype.resolve = function(value) {};
7777

78+
/**
79+
* Rejector for a deferred.
80+
* @param {*=} opt_value
81+
* @template T
82+
*/
83+
Cesium.Deferred.prototype.reject = function(opt_value) {};
84+
7885

7986
/**
8087
* @type {Cesium.Promise}

src/os/mapcontainer.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ goog.require('os.ogc');
6969
goog.require('os.ol.control.MousePosition');
7070
goog.require('os.ol.feature');
7171
goog.require('os.olcs.Camera');
72-
goog.require('os.olcs.WMSImageryProvider');
7372
goog.require('os.olcs.sync.RootSynchronizer');
7473
goog.require('os.proj');
7574
goog.require('os.proj.switch');
@@ -1601,7 +1600,6 @@ os.MapContainer.prototype.initCesium_ = function() {
16011600
os.olcs.loadCesium().then(function() {
16021601
try {
16031602
os.mixin.cesium.loadCesiumMixins();
1604-
os.olcs.WMSImageryProvider.init();
16051603
this.registerTerrainProviderType('cesium', Cesium.CesiumTerrainProvider);
16061604

16071605
this.olCesium_ = new olcs.OLCesium({

src/os/mixin/urltilemixin.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ goog.require('ol.source.TileEventType');
1010
goog.require('ol.source.UrlTile');
1111
goog.require('os.events.PropertyChangeEvent');
1212
goog.require('os.implements');
13+
goog.require('os.ol.source.ILoadingSource');
1314
goog.require('os.ol.source.IUrlSource');
1415

1516

1617
// add support for providing custom URL parameters
1718
os.implements(ol.source.UrlTile, os.ol.source.IUrlSource.ID);
19+
os.implements(ol.source.UrlTile, os.ol.source.ILoadingSource.ID);
1820

1921

2022
/*

src/os/ol/source/iloadingsource.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ goog.provide('os.ol.source.ILoadingSource');
77
*/
88
os.ol.source.ILoadingSource = function() {};
99

10+
/**
11+
* @type {string}
12+
* @const
13+
*/
14+
os.ol.source.ILoadingSource.ID = 'os.ol.source.ILoadingSource';
1015

1116
/**
1217
* If the source is currently in a loading state.

0 commit comments

Comments
 (0)