@cesium/engine 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Build/Workers/{AxisAlignedBoundingBox-a6f9f0e5.js → AxisAlignedBoundingBox-379015ef.js} +1 -1
- package/Build/Workers/{BoundingRectangle-b0a68595.js → BoundingRectangle-57f2b24f.js} +1 -1
- package/Build/Workers/{BoxGeometry-baedd794.js → BoxGeometry-ecabfc78.js} +1 -1
- package/Build/Workers/{Color-f85df1be.js → Color-14d1a36d.js} +1 -1
- package/Build/Workers/{CoplanarPolygonGeometryLibrary-30516950.js → CoplanarPolygonGeometryLibrary-048c3c14.js} +1 -1
- package/Build/Workers/{CorridorGeometryLibrary-5d5d3b3a.js → CorridorGeometryLibrary-520c8619.js} +1 -1
- package/Build/Workers/{CylinderGeometry-d899ae26.js → CylinderGeometry-119068b8.js} +1 -1
- package/Build/Workers/{EllipseGeometry-a49f8449.js → EllipseGeometry-2dfc3523.js} +1 -1
- package/Build/Workers/{EllipseGeometryLibrary-cba7edde.js → EllipseGeometryLibrary-0a1e0170.js} +1 -1
- package/Build/Workers/{EllipseOutlineGeometry-8095c8cb.js → EllipseOutlineGeometry-c5251669.js} +1 -1
- package/Build/Workers/{EllipsoidGeometry-ed93f571.js → EllipsoidGeometry-d10a5221.js} +1 -1
- package/Build/Workers/{EllipsoidOutlineGeometry-e4854854.js → EllipsoidOutlineGeometry-7039a0ae.js} +1 -1
- package/Build/Workers/{EllipsoidTangentPlane-7ae1aa9a.js → EllipsoidTangentPlane-857186be.js} +1 -1
- package/Build/Workers/{FrustumGeometry-b62db3e3.js → FrustumGeometry-400fa1b7.js} +2 -2
- package/Build/Workers/{GeometryAttribute-780af4fa.js → GeometryAttribute-7a2de5c6.js} +1 -1
- package/Build/Workers/{GeometryPipeline-36b61c99.js → GeometryPipeline-916636fa.js} +1 -1
- package/Build/Workers/{IntersectionTests-e889fcf0.js → IntersectionTests-b4d02d4d.js} +1 -1
- package/Build/Workers/{OrientedBoundingBox-43478ac8.js → OrientedBoundingBox-96fe1752.js} +5 -3
- package/Build/Workers/{PolygonGeometryLibrary-38a98276.js → PolygonGeometryLibrary-931f1ec6.js} +1 -1
- package/Build/Workers/{PolygonPipeline-d31ff61c.js → PolygonPipeline-32fc92cc.js} +1 -1
- package/Build/Workers/{PolylinePipeline-30e4cec9.js → PolylinePipeline-6d5c63e5.js} +1 -1
- package/Build/Workers/{PolylineVolumeGeometryLibrary-90551d26.js → PolylineVolumeGeometryLibrary-f068c1fb.js} +1 -1
- package/Build/Workers/{PrimitivePipeline-558d9cb0.js → PrimitivePipeline-879f996a.js} +1 -1
- package/Build/Workers/{RectangleGeometryLibrary-815c68df.js → RectangleGeometryLibrary-2d6f36f3.js} +1 -1
- package/Build/Workers/{TerrainEncoding-341ead52.js → TerrainEncoding-82882059.js} +1 -1
- package/Build/Workers/{Transforms-9e9df299.js → Transforms-9052372a.js} +6 -5
- package/Build/Workers/{WallGeometryLibrary-ccf90976.js → WallGeometryLibrary-db7a64fb.js} +1 -1
- package/Build/Workers/cesiumWorkerBootstrapper.js +1 -1
- package/Build/Workers/combineGeometry.js +1 -1
- package/Build/Workers/createBoxGeometry.js +1 -1
- package/Build/Workers/createBoxOutlineGeometry.js +1 -1
- package/Build/Workers/createCircleGeometry.js +1 -1
- package/Build/Workers/createCircleOutlineGeometry.js +1 -1
- package/Build/Workers/createCoplanarPolygonGeometry.js +1 -1
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +1 -1
- package/Build/Workers/createCorridorGeometry.js +1 -1
- package/Build/Workers/createCorridorOutlineGeometry.js +1 -1
- package/Build/Workers/createCylinderGeometry.js +1 -1
- package/Build/Workers/createCylinderOutlineGeometry.js +1 -1
- package/Build/Workers/createEllipseGeometry.js +1 -1
- package/Build/Workers/createEllipseOutlineGeometry.js +1 -1
- package/Build/Workers/createEllipsoidGeometry.js +1 -1
- package/Build/Workers/createEllipsoidOutlineGeometry.js +1 -1
- package/Build/Workers/createFrustumGeometry.js +1 -1
- package/Build/Workers/createFrustumOutlineGeometry.js +1 -1
- package/Build/Workers/createGeometry.js +1 -1
- package/Build/Workers/createGroundPolylineGeometry.js +1 -1
- package/Build/Workers/createPlaneGeometry.js +1 -1
- package/Build/Workers/createPlaneOutlineGeometry.js +1 -1
- package/Build/Workers/createPolygonGeometry.js +1 -1
- package/Build/Workers/createPolygonOutlineGeometry.js +1 -1
- package/Build/Workers/createPolylineGeometry.js +1 -1
- package/Build/Workers/createPolylineVolumeGeometry.js +1 -1
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +1 -1
- package/Build/Workers/createRectangleGeometry.js +1 -1
- package/Build/Workers/createRectangleOutlineGeometry.js +1 -1
- package/Build/Workers/createSimplePolylineGeometry.js +1 -1
- package/Build/Workers/createSphereGeometry.js +1 -1
- package/Build/Workers/createSphereOutlineGeometry.js +1 -1
- package/Build/Workers/createVectorTileGeometries.js +1 -1
- package/Build/Workers/createVectorTilePolygons.js +1 -1
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +1 -1
- package/Build/Workers/createVerticesFromHeightmap.js +1 -1
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +10 -15
- package/Build/Workers/createWallGeometry.js +1 -1
- package/Build/Workers/createWallOutlineGeometry.js +1 -1
- package/Build/Workers/package.js +1 -1
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +1 -1
- package/Source/Core/ArcGISTiledElevationTerrainProvider.js +291 -191
- package/Source/Core/CesiumTerrainProvider.js +571 -434
- package/Source/Core/CustomHeightmapTerrainProvider.js +12 -0
- package/Source/Core/EllipsoidTerrainProvider.js +17 -10
- package/Source/Core/FrustumGeometry.js +1 -1
- package/Source/Core/GoogleEarthEnterpriseMetadata.js +86 -34
- package/Source/Core/GoogleEarthEnterpriseTerrainProvider.js +119 -82
- package/Source/Core/Ion.js +1 -1
- package/Source/Core/IonResource.js +14 -3
- package/Source/Core/OrientedBoundingBox.js +4 -2
- package/Source/Core/RequestScheduler.js +1 -1
- package/Source/Core/Resource.js +2 -2
- package/Source/Core/TerrainProvider.js +9 -14
- package/Source/Core/TileProviderError.js +8 -8
- package/Source/Core/VRTheWorldTerrainProvider.js +193 -124
- package/Source/Core/buildModuleUrl.js +4 -3
- package/Source/Core/createWorldTerrain.js +20 -2
- package/Source/Core/createWorldTerrainAsync.js +48 -0
- package/Source/Core/sampleTerrain.js +9 -10
- package/Source/Core/sampleTerrainMostDetailed.js +66 -72
- package/Source/DataSources/Cesium3DTilesetVisualizer.js +37 -26
- package/Source/DataSources/Entity.js +6 -1
- package/Source/DataSources/ModelVisualizer.js +99 -31
- package/Source/DataSources/PolygonGraphics.js +1 -1
- package/Source/Scene/ArcGisMapServerImageryProvider.js +552 -376
- package/Source/Scene/BingMapsImageryProvider.js +511 -305
- package/Source/Scene/BufferLoader.js +29 -34
- package/Source/Scene/Cesium3DTile.js +388 -251
- package/Source/Scene/Cesium3DTileBatchTable.js +2 -2
- package/Source/Scene/Cesium3DTileContent.js +16 -0
- package/Source/Scene/Cesium3DTileContentFactory.js +4 -4
- package/Source/Scene/Cesium3DTilePass.js +8 -11
- package/Source/Scene/Cesium3DTileStyleEngine.js +1 -1
- package/Source/Scene/Cesium3DTilesVoxelProvider.js +225 -117
- package/Source/Scene/Cesium3DTileset.js +755 -481
- package/Source/Scene/Cesium3DTilesetBaseTraversal.js +301 -0
- package/Source/Scene/Cesium3DTilesetMostDetailedTraversal.js +33 -46
- package/Source/Scene/Cesium3DTilesetSkipTraversal.js +421 -0
- package/Source/Scene/Cesium3DTilesetTraversal.js +219 -671
- package/Source/Scene/ClassificationPrimitive.js +7 -0
- package/Source/Scene/Composite3DTileContent.js +69 -26
- package/Source/Scene/CreditDisplay.js +20 -4
- package/Source/Scene/DepthPlane.js +1 -1
- package/Source/Scene/Empty3DTileContent.js +31 -1
- package/Source/Scene/Geometry3DTileContent.js +47 -7
- package/Source/Scene/Globe.js +5 -1
- package/Source/Scene/GlobeSurfaceTile.js +2 -1
- package/Source/Scene/GlobeSurfaceTileProvider.js +50 -27
- package/Source/Scene/GltfBufferViewLoader.js +47 -91
- package/Source/Scene/GltfDracoLoader.js +110 -112
- package/Source/Scene/GltfImageLoader.js +71 -78
- package/Source/Scene/GltfIndexBufferLoader.js +108 -121
- package/Source/Scene/GltfJsonLoader.js +75 -74
- package/Source/Scene/GltfLoader.js +392 -280
- package/Source/Scene/GltfStructuralMetadataLoader.js +109 -110
- package/Source/Scene/GltfTextureLoader.js +97 -96
- package/Source/Scene/GltfVertexBufferLoader.js +128 -133
- package/Source/Scene/GoogleEarthEnterpriseImageryProvider.js +353 -225
- package/Source/Scene/GoogleEarthEnterpriseMapsProvider.js +491 -331
- package/Source/Scene/GridImageryProvider.js +267 -104
- package/Source/Scene/GroundPolylinePrimitive.js +12 -1
- package/Source/Scene/GroundPrimitive.js +8 -1
- package/Source/Scene/I3SDataProvider.js +214 -113
- package/Source/Scene/I3SFeature.js +7 -6
- package/Source/Scene/I3SLayer.js +26 -37
- package/Source/Scene/I3SNode.js +59 -66
- package/Source/Scene/Imagery.js +6 -1
- package/Source/Scene/ImageryLayer.js +299 -48
- package/Source/Scene/ImageryLayerCollection.js +26 -0
- package/Source/Scene/ImageryProvider.js +129 -111
- package/Source/Scene/Implicit3DTileContent.js +72 -23
- package/Source/Scene/ImplicitSubtree.js +66 -45
- package/Source/Scene/IonImageryProvider.js +471 -264
- package/Source/Scene/MapboxImageryProvider.js +272 -112
- package/Source/Scene/MapboxStyleImageryProvider.js +270 -111
- package/Source/Scene/MetadataSchemaLoader.js +26 -36
- package/Source/Scene/Model/B3dmLoader.js +42 -46
- package/Source/Scene/Model/GeoJsonLoader.js +8 -32
- package/Source/Scene/Model/I3dmLoader.js +48 -74
- package/Source/Scene/Model/Model.js +470 -132
- package/Source/Scene/Model/Model3DTileContent.js +83 -31
- package/Source/Scene/Model/ModelAnimationCollection.js +3 -3
- package/Source/Scene/Model/ModelDrawCommand.js +15 -26
- package/Source/Scene/Model/ModelUtility.js +16 -16
- package/Source/Scene/Model/PntsLoader.js +27 -32
- package/Source/Scene/Multiple3DTileContent.js +134 -115
- package/Source/Scene/PointCloud.js +11 -19
- package/Source/Scene/Primitive.js +20 -0
- package/Source/Scene/QuadtreePrimitive.js +2 -0
- package/Source/Scene/QuadtreeTileProvider.js +4 -8
- package/Source/Scene/ResourceCache.js +47 -105
- package/Source/Scene/ResourceCacheStatistics.js +24 -58
- package/Source/Scene/ResourceLoader.js +5 -17
- package/Source/Scene/ResourceLoaderState.js +12 -4
- package/Source/Scene/Scene.js +65 -0
- package/Source/Scene/ScreenSpaceCameraController.js +1 -1
- package/Source/Scene/SingleTileImageryProvider.js +382 -209
- package/Source/Scene/Terrain.js +196 -0
- package/Source/Scene/TileCoordinatesImageryProvider.js +267 -104
- package/Source/Scene/TileMapServiceImageryProvider.js +177 -85
- package/Source/Scene/Tileset3DTileContent.js +47 -5
- package/Source/Scene/TimeDynamicPointCloud.js +15 -2
- package/Source/Scene/UrlTemplateImageryProvider.js +343 -215
- package/Source/Scene/Vector3DTileClampedPolylines.js +96 -84
- package/Source/Scene/Vector3DTileContent.js +47 -22
- package/Source/Scene/Vector3DTileGeometry.js +57 -52
- package/Source/Scene/Vector3DTilePoints.js +72 -68
- package/Source/Scene/Vector3DTilePolygons.js +118 -117
- package/Source/Scene/Vector3DTilePolylines.js +86 -82
- package/Source/Scene/Vector3DTilePrimitive.js +0 -1
- package/Source/Scene/VoxelContent.js +61 -63
- package/Source/Scene/VoxelPrimitive.js +39 -91
- package/Source/Scene/VoxelProvider.js +2 -2
- package/Source/Scene/WebMapServiceImageryProvider.js +272 -111
- package/Source/Scene/WebMapTileServiceImageryProvider.js +270 -107
- package/Source/Scene/computeFlyToLocationForRectangle.js +33 -37
- package/Source/Scene/createOsmBuildings.js +6 -0
- package/Source/Scene/createOsmBuildingsAsync.js +82 -0
- package/Source/Scene/createWorldImagery.js +14 -5
- package/Source/Scene/createWorldImageryAsync.js +39 -0
- package/Source/Widget/CesiumWidget.js +55 -27
- package/index.d.ts +2158 -1395
- package/index.js +58 -51
- package/package.json +1 -1
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import Cartesian2 from "../Core/Cartesian2.js";
|
|
2
2
|
import Cartesian3 from "../Core/Cartesian3.js";
|
|
3
3
|
import Cartographic from "../Core/Cartographic.js";
|
|
4
|
+
import Check from "../Core/Check.js";
|
|
4
5
|
import combine from "../Core/combine.js";
|
|
5
6
|
import Credit from "../Core/Credit.js";
|
|
6
7
|
import defaultValue from "../Core/defaultValue.js";
|
|
7
8
|
import defined from "../Core/defined.js";
|
|
9
|
+
import deprecationWarning from "../Core/deprecationWarning.js";
|
|
8
10
|
import DeveloperError from "../Core/DeveloperError.js";
|
|
9
11
|
import Event from "../Core/Event.js";
|
|
10
12
|
import GeographicProjection from "../Core/GeographicProjection.js";
|
|
@@ -134,7 +136,8 @@ const pickFeaturesTags = combine(tags, {
|
|
|
134
136
|
* source does not support picking features or if you don't want this provider's features to be pickable. Note
|
|
135
137
|
* that this can be dynamically overridden by modifying the {@link UriTemplateImageryProvider#enablePickFeatures}
|
|
136
138
|
* property.
|
|
137
|
-
* @property {
|
|
139
|
+
* @property {TileDiscardPolicy} [tileDiscardPolicy] A policy for discarding tile images according to some criteria
|
|
140
|
+
* @property {Object} [customTags] Allow to replace custom keywords in the URL template. The object must have strings as keys and functions as values.
|
|
138
141
|
*/
|
|
139
142
|
|
|
140
143
|
/**
|
|
@@ -149,7 +152,6 @@ const pickFeaturesTags = combine(tags, {
|
|
|
149
152
|
* // Access Natural Earth II imagery, which uses a TMS tiling scheme and Geographic (EPSG:4326) project
|
|
150
153
|
* const tms = new Cesium.UrlTemplateImageryProvider({
|
|
151
154
|
* url : Cesium.buildModuleUrl('Assets/Textures/NaturalEarthII') + '/{z}/{x}/{reverseY}.jpg',
|
|
152
|
-
* credit : '© Analytical Graphics, Inc.',
|
|
153
155
|
* tilingScheme : new Cesium.GeographicTilingScheme(),
|
|
154
156
|
* maximumLevel : 5
|
|
155
157
|
* });
|
|
@@ -188,118 +190,83 @@ const pickFeaturesTags = combine(tags, {
|
|
|
188
190
|
* @see WebMapTileServiceImageryProvider
|
|
189
191
|
*/
|
|
190
192
|
function UrlTemplateImageryProvider(options) {
|
|
191
|
-
|
|
192
|
-
if (!defined(options)) {
|
|
193
|
-
throw new DeveloperError("options is required.");
|
|
194
|
-
}
|
|
195
|
-
if (!defined(options.then) && !defined(options.url)) {
|
|
196
|
-
throw new DeveloperError("options is required.");
|
|
197
|
-
}
|
|
198
|
-
//>>includeEnd('debug');
|
|
193
|
+
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
|
|
199
194
|
|
|
200
195
|
this._errorEvent = new Event();
|
|
201
196
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
this._tileHeight = undefined;
|
|
207
|
-
this._maximumLevel = undefined;
|
|
208
|
-
this._minimumLevel = undefined;
|
|
209
|
-
this._tilingScheme = undefined;
|
|
210
|
-
this._rectangle = undefined;
|
|
211
|
-
this._tileDiscardPolicy = undefined;
|
|
212
|
-
this._credit = undefined;
|
|
213
|
-
this._hasAlphaChannel = undefined;
|
|
214
|
-
this._readyPromise = undefined;
|
|
215
|
-
this._tags = undefined;
|
|
216
|
-
this._pickFeaturesTags = undefined;
|
|
217
|
-
|
|
218
|
-
/**
|
|
219
|
-
* The default alpha blending value of this provider, with 0.0 representing fully transparent and
|
|
220
|
-
* 1.0 representing fully opaque.
|
|
221
|
-
*
|
|
222
|
-
* @type {number|undefined}
|
|
223
|
-
* @default undefined
|
|
224
|
-
*/
|
|
225
|
-
this.defaultAlpha = undefined;
|
|
226
|
-
|
|
227
|
-
/**
|
|
228
|
-
* The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and
|
|
229
|
-
* 1.0 representing fully opaque.
|
|
230
|
-
*
|
|
231
|
-
* @type {number|undefined}
|
|
232
|
-
* @default undefined
|
|
233
|
-
*/
|
|
234
|
-
this.defaultNightAlpha = undefined;
|
|
235
|
-
|
|
236
|
-
/**
|
|
237
|
-
* The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and
|
|
238
|
-
* 1.0 representing fully opaque.
|
|
239
|
-
*
|
|
240
|
-
* @type {number|undefined}
|
|
241
|
-
* @default undefined
|
|
242
|
-
*/
|
|
243
|
-
this.defaultDayAlpha = undefined;
|
|
197
|
+
if (defined(options.then)) {
|
|
198
|
+
this._reinitialize(options);
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
244
201
|
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
*
|
|
249
|
-
* @type {number|undefined}
|
|
250
|
-
* @default undefined
|
|
251
|
-
*/
|
|
252
|
-
this.defaultBrightness = undefined;
|
|
202
|
+
//>>includeStart('debug', pragmas.debug);
|
|
203
|
+
Check.defined("options.url", options.url);
|
|
204
|
+
//>>includeEnd('debug');
|
|
253
205
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
* the contrast while greater than 1.0 increases it.
|
|
257
|
-
*
|
|
258
|
-
* @type {number|undefined}
|
|
259
|
-
* @default undefined
|
|
260
|
-
*/
|
|
261
|
-
this.defaultContrast = undefined;
|
|
206
|
+
const resource = Resource.createIfNeeded(options.url);
|
|
207
|
+
const pickFeaturesResource = Resource.createIfNeeded(options.pickFeaturesUrl);
|
|
262
208
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
* @default undefined
|
|
268
|
-
*/
|
|
269
|
-
this.defaultHue = undefined;
|
|
209
|
+
this._resource = resource;
|
|
210
|
+
this._urlSchemeZeroPadding = options.urlSchemeZeroPadding;
|
|
211
|
+
this._getFeatureInfoFormats = options.getFeatureInfoFormats;
|
|
212
|
+
this._pickFeaturesResource = pickFeaturesResource;
|
|
270
213
|
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
214
|
+
let subdomains = options.subdomains;
|
|
215
|
+
if (Array.isArray(subdomains)) {
|
|
216
|
+
subdomains = subdomains.slice();
|
|
217
|
+
} else if (defined(subdomains) && subdomains.length > 0) {
|
|
218
|
+
subdomains = subdomains.split("");
|
|
219
|
+
} else {
|
|
220
|
+
subdomains = ["a", "b", "c"];
|
|
221
|
+
}
|
|
222
|
+
this._subdomains = subdomains;
|
|
223
|
+
|
|
224
|
+
this._tileWidth = defaultValue(options.tileWidth, 256);
|
|
225
|
+
this._tileHeight = defaultValue(options.tileHeight, 256);
|
|
226
|
+
this._minimumLevel = defaultValue(options.minimumLevel, 0);
|
|
227
|
+
this._maximumLevel = options.maximumLevel;
|
|
228
|
+
this._tilingScheme = defaultValue(
|
|
229
|
+
options.tilingScheme,
|
|
230
|
+
new WebMercatorTilingScheme({ ellipsoid: options.ellipsoid })
|
|
231
|
+
);
|
|
279
232
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
233
|
+
this._rectangle = defaultValue(
|
|
234
|
+
options.rectangle,
|
|
235
|
+
this._tilingScheme.rectangle
|
|
236
|
+
);
|
|
237
|
+
this._rectangle = Rectangle.intersection(
|
|
238
|
+
this._rectangle,
|
|
239
|
+
this._tilingScheme.rectangle
|
|
240
|
+
);
|
|
287
241
|
|
|
288
|
-
|
|
289
|
-
* The default texture minification filter to apply to this provider.
|
|
290
|
-
*
|
|
291
|
-
* @type {TextureMinificationFilter}
|
|
292
|
-
* @default undefined
|
|
293
|
-
*/
|
|
294
|
-
this.defaultMinificationFilter = undefined;
|
|
242
|
+
this._tileDiscardPolicy = options.tileDiscardPolicy;
|
|
295
243
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
244
|
+
let credit = options.credit;
|
|
245
|
+
if (typeof credit === "string") {
|
|
246
|
+
credit = new Credit(credit);
|
|
247
|
+
}
|
|
248
|
+
this._credit = credit;
|
|
249
|
+
this._hasAlphaChannel = defaultValue(options.hasAlphaChannel, true);
|
|
250
|
+
|
|
251
|
+
const customTags = options.customTags;
|
|
252
|
+
const allTags = combine(tags, customTags);
|
|
253
|
+
const allPickFeaturesTags = combine(pickFeaturesTags, customTags);
|
|
254
|
+
this._tags = allTags;
|
|
255
|
+
this._pickFeaturesTags = allPickFeaturesTags;
|
|
256
|
+
|
|
257
|
+
this._readyPromise = Promise.resolve(true);
|
|
258
|
+
this._ready = true;
|
|
259
|
+
|
|
260
|
+
this._defaultAlpha = undefined;
|
|
261
|
+
this._defaultNightAlpha = undefined;
|
|
262
|
+
this._defaultDayAlpha = undefined;
|
|
263
|
+
this._defaultBrightness = undefined;
|
|
264
|
+
this._defaultContrast = undefined;
|
|
265
|
+
this._defaultHue = undefined;
|
|
266
|
+
this._defaultSaturation = undefined;
|
|
267
|
+
this._defaultGamma = undefined;
|
|
268
|
+
this._defaultMinificationFilter = undefined;
|
|
269
|
+
this._defaultMagnificationFilter = undefined;
|
|
303
270
|
|
|
304
271
|
/**
|
|
305
272
|
* Gets or sets a value indicating whether feature picking is enabled. If true, {@link UrlTemplateImageryProvider#pickFeatures} will
|
|
@@ -310,9 +277,7 @@ function UrlTemplateImageryProvider(options) {
|
|
|
310
277
|
* @type {boolean}
|
|
311
278
|
* @default true
|
|
312
279
|
*/
|
|
313
|
-
this.enablePickFeatures = true;
|
|
314
|
-
|
|
315
|
-
this.reinitialize(options);
|
|
280
|
+
this.enablePickFeatures = defaultValue(options.enablePickFeatures, true);
|
|
316
281
|
}
|
|
317
282
|
|
|
318
283
|
Object.defineProperties(UrlTemplateImageryProvider.prototype, {
|
|
@@ -411,8 +376,7 @@ Object.defineProperties(UrlTemplateImageryProvider.prototype, {
|
|
|
411
376
|
},
|
|
412
377
|
|
|
413
378
|
/**
|
|
414
|
-
* Gets the width of each tile, in pixels.
|
|
415
|
-
* not be called before {@link UrlTemplateImageryProvider#ready} returns true.
|
|
379
|
+
* Gets the width of each tile, in pixels.
|
|
416
380
|
* @memberof UrlTemplateImageryProvider.prototype
|
|
417
381
|
* @type {number}
|
|
418
382
|
* @readonly
|
|
@@ -420,20 +384,12 @@ Object.defineProperties(UrlTemplateImageryProvider.prototype, {
|
|
|
420
384
|
*/
|
|
421
385
|
tileWidth: {
|
|
422
386
|
get: function () {
|
|
423
|
-
//>>includeStart('debug', pragmas.debug);
|
|
424
|
-
if (!this.ready) {
|
|
425
|
-
throw new DeveloperError(
|
|
426
|
-
"tileWidth must not be called before the imagery provider is ready."
|
|
427
|
-
);
|
|
428
|
-
}
|
|
429
|
-
//>>includeEnd('debug');
|
|
430
387
|
return this._tileWidth;
|
|
431
388
|
},
|
|
432
389
|
},
|
|
433
390
|
|
|
434
391
|
/**
|
|
435
|
-
* Gets the height of each tile, in pixels.
|
|
436
|
-
* not be called before {@link UrlTemplateImageryProvider#ready} returns true.
|
|
392
|
+
* Gets the height of each tile, in pixels.
|
|
437
393
|
* @memberof UrlTemplateImageryProvider.prototype
|
|
438
394
|
* @type {number}
|
|
439
395
|
* @readonly
|
|
@@ -441,20 +397,12 @@ Object.defineProperties(UrlTemplateImageryProvider.prototype, {
|
|
|
441
397
|
*/
|
|
442
398
|
tileHeight: {
|
|
443
399
|
get: function () {
|
|
444
|
-
//>>includeStart('debug', pragmas.debug);
|
|
445
|
-
if (!this.ready) {
|
|
446
|
-
throw new DeveloperError(
|
|
447
|
-
"tileHeight must not be called before the imagery provider is ready."
|
|
448
|
-
);
|
|
449
|
-
}
|
|
450
|
-
//>>includeEnd('debug');
|
|
451
400
|
return this._tileHeight;
|
|
452
401
|
},
|
|
453
402
|
},
|
|
454
403
|
|
|
455
404
|
/**
|
|
456
405
|
* Gets the maximum level-of-detail that can be requested, or undefined if there is no limit.
|
|
457
|
-
* This function should not be called before {@link UrlTemplateImageryProvider#ready} returns true.
|
|
458
406
|
* @memberof UrlTemplateImageryProvider.prototype
|
|
459
407
|
* @type {number|undefined}
|
|
460
408
|
* @readonly
|
|
@@ -462,20 +410,12 @@ Object.defineProperties(UrlTemplateImageryProvider.prototype, {
|
|
|
462
410
|
*/
|
|
463
411
|
maximumLevel: {
|
|
464
412
|
get: function () {
|
|
465
|
-
//>>includeStart('debug', pragmas.debug);
|
|
466
|
-
if (!this.ready) {
|
|
467
|
-
throw new DeveloperError(
|
|
468
|
-
"maximumLevel must not be called before the imagery provider is ready."
|
|
469
|
-
);
|
|
470
|
-
}
|
|
471
|
-
//>>includeEnd('debug');
|
|
472
413
|
return this._maximumLevel;
|
|
473
414
|
},
|
|
474
415
|
},
|
|
475
416
|
|
|
476
417
|
/**
|
|
477
|
-
* Gets the minimum level-of-detail that can be requested.
|
|
478
|
-
* not be called before {@link UrlTemplateImageryProvider#ready} returns true.
|
|
418
|
+
* Gets the minimum level-of-detail that can be requested.
|
|
479
419
|
* @memberof UrlTemplateImageryProvider.prototype
|
|
480
420
|
* @type {number}
|
|
481
421
|
* @readonly
|
|
@@ -483,20 +423,12 @@ Object.defineProperties(UrlTemplateImageryProvider.prototype, {
|
|
|
483
423
|
*/
|
|
484
424
|
minimumLevel: {
|
|
485
425
|
get: function () {
|
|
486
|
-
//>>includeStart('debug', pragmas.debug);
|
|
487
|
-
if (!this.ready) {
|
|
488
|
-
throw new DeveloperError(
|
|
489
|
-
"minimumLevel must not be called before the imagery provider is ready."
|
|
490
|
-
);
|
|
491
|
-
}
|
|
492
|
-
//>>includeEnd('debug');
|
|
493
426
|
return this._minimumLevel;
|
|
494
427
|
},
|
|
495
428
|
},
|
|
496
429
|
|
|
497
430
|
/**
|
|
498
|
-
* Gets the tiling scheme used by this provider.
|
|
499
|
-
* not be called before {@link UrlTemplateImageryProvider#ready} returns true.
|
|
431
|
+
* Gets the tiling scheme used by this provider.
|
|
500
432
|
* @memberof UrlTemplateImageryProvider.prototype
|
|
501
433
|
* @type {TilingScheme}
|
|
502
434
|
* @readonly
|
|
@@ -504,20 +436,12 @@ Object.defineProperties(UrlTemplateImageryProvider.prototype, {
|
|
|
504
436
|
*/
|
|
505
437
|
tilingScheme: {
|
|
506
438
|
get: function () {
|
|
507
|
-
//>>includeStart('debug', pragmas.debug);
|
|
508
|
-
if (!this.ready) {
|
|
509
|
-
throw new DeveloperError(
|
|
510
|
-
"tilingScheme must not be called before the imagery provider is ready."
|
|
511
|
-
);
|
|
512
|
-
}
|
|
513
|
-
//>>includeEnd('debug');
|
|
514
439
|
return this._tilingScheme;
|
|
515
440
|
},
|
|
516
441
|
},
|
|
517
442
|
|
|
518
443
|
/**
|
|
519
|
-
* Gets the rectangle, in radians, of the imagery provided by this instance.
|
|
520
|
-
* not be called before {@link UrlTemplateImageryProvider#ready} returns true.
|
|
444
|
+
* Gets the rectangle, in radians, of the imagery provided by this instance.
|
|
521
445
|
* @memberof UrlTemplateImageryProvider.prototype
|
|
522
446
|
* @type {Rectangle}
|
|
523
447
|
* @readonly
|
|
@@ -525,13 +449,6 @@ Object.defineProperties(UrlTemplateImageryProvider.prototype, {
|
|
|
525
449
|
*/
|
|
526
450
|
rectangle: {
|
|
527
451
|
get: function () {
|
|
528
|
-
//>>includeStart('debug', pragmas.debug);
|
|
529
|
-
if (!this.ready) {
|
|
530
|
-
throw new DeveloperError(
|
|
531
|
-
"rectangle must not be called before the imagery provider is ready."
|
|
532
|
-
);
|
|
533
|
-
}
|
|
534
|
-
//>>includeEnd('debug');
|
|
535
452
|
return this._rectangle;
|
|
536
453
|
},
|
|
537
454
|
},
|
|
@@ -539,8 +456,7 @@ Object.defineProperties(UrlTemplateImageryProvider.prototype, {
|
|
|
539
456
|
/**
|
|
540
457
|
* Gets the tile discard policy. If not undefined, the discard policy is responsible
|
|
541
458
|
* for filtering out "missing" tiles via its shouldDiscardImage function. If this function
|
|
542
|
-
* returns undefined, no tiles are filtered.
|
|
543
|
-
* not be called before {@link UrlTemplateImageryProvider#ready} returns true.
|
|
459
|
+
* returns undefined, no tiles are filtered.
|
|
544
460
|
* @memberof UrlTemplateImageryProvider.prototype
|
|
545
461
|
* @type {TileDiscardPolicy}
|
|
546
462
|
* @readonly
|
|
@@ -548,13 +464,6 @@ Object.defineProperties(UrlTemplateImageryProvider.prototype, {
|
|
|
548
464
|
*/
|
|
549
465
|
tileDiscardPolicy: {
|
|
550
466
|
get: function () {
|
|
551
|
-
//>>includeStart('debug', pragmas.debug);
|
|
552
|
-
if (!this.ready) {
|
|
553
|
-
throw new DeveloperError(
|
|
554
|
-
"tileDiscardPolicy must not be called before the imagery provider is ready."
|
|
555
|
-
);
|
|
556
|
-
}
|
|
557
|
-
//>>includeEnd('debug');
|
|
558
467
|
return this._tileDiscardPolicy;
|
|
559
468
|
},
|
|
560
469
|
},
|
|
@@ -578,10 +487,15 @@ Object.defineProperties(UrlTemplateImageryProvider.prototype, {
|
|
|
578
487
|
* @memberof UrlTemplateImageryProvider.prototype
|
|
579
488
|
* @type {boolean}
|
|
580
489
|
* @readonly
|
|
490
|
+
* @deprecated
|
|
581
491
|
*/
|
|
582
492
|
ready: {
|
|
583
493
|
get: function () {
|
|
584
|
-
|
|
494
|
+
deprecationWarning(
|
|
495
|
+
"UrlTemplateImageryProvider.ready",
|
|
496
|
+
"UrlTemplateImageryProvider.ready was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107."
|
|
497
|
+
);
|
|
498
|
+
return this._ready && defined(this._resource);
|
|
585
499
|
},
|
|
586
500
|
},
|
|
587
501
|
|
|
@@ -590,16 +504,21 @@ Object.defineProperties(UrlTemplateImageryProvider.prototype, {
|
|
|
590
504
|
* @memberof UrlTemplateImageryProvider.prototype
|
|
591
505
|
* @type {Promise<boolean>}
|
|
592
506
|
* @readonly
|
|
507
|
+
* @deprecated
|
|
593
508
|
*/
|
|
594
509
|
readyPromise: {
|
|
595
510
|
get: function () {
|
|
511
|
+
deprecationWarning(
|
|
512
|
+
"UrlTemplateImageryProvider.readyPromise",
|
|
513
|
+
"UrlTemplateImageryProvider.readyPromise was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107."
|
|
514
|
+
);
|
|
596
515
|
return this._readyPromise;
|
|
597
516
|
},
|
|
598
517
|
},
|
|
599
518
|
|
|
600
519
|
/**
|
|
601
520
|
* Gets the credit to display when this imagery provider is active. Typically this is used to credit
|
|
602
|
-
* the source of the imagery.
|
|
521
|
+
* the source of the imagery.
|
|
603
522
|
* @memberof UrlTemplateImageryProvider.prototype
|
|
604
523
|
* @type {Credit}
|
|
605
524
|
* @readonly
|
|
@@ -607,13 +526,6 @@ Object.defineProperties(UrlTemplateImageryProvider.prototype, {
|
|
|
607
526
|
*/
|
|
608
527
|
credit: {
|
|
609
528
|
get: function () {
|
|
610
|
-
//>>includeStart('debug', pragmas.debug);
|
|
611
|
-
if (!this.ready) {
|
|
612
|
-
throw new DeveloperError(
|
|
613
|
-
"credit must not be called before the imagery provider is ready."
|
|
614
|
-
);
|
|
615
|
-
}
|
|
616
|
-
//>>includeEnd('debug');
|
|
617
529
|
return this._credit;
|
|
618
530
|
},
|
|
619
531
|
},
|
|
@@ -623,8 +535,7 @@ Object.defineProperties(UrlTemplateImageryProvider.prototype, {
|
|
|
623
535
|
* include an alpha channel. If this property is false, an alpha channel, if present, will
|
|
624
536
|
* be ignored. If this property is true, any images without an alpha channel will be treated
|
|
625
537
|
* as if their alpha is 1.0 everywhere. When this property is false, memory usage
|
|
626
|
-
* and texture upload time are reduced.
|
|
627
|
-
* not be called before {@link ImageryProvider#ready} returns true.
|
|
538
|
+
* and texture upload time are reduced.
|
|
628
539
|
* @memberof UrlTemplateImageryProvider.prototype
|
|
629
540
|
* @type {boolean}
|
|
630
541
|
* @readonly
|
|
@@ -632,26 +543,269 @@ Object.defineProperties(UrlTemplateImageryProvider.prototype, {
|
|
|
632
543
|
*/
|
|
633
544
|
hasAlphaChannel: {
|
|
634
545
|
get: function () {
|
|
635
|
-
//>>includeStart('debug', pragmas.debug);
|
|
636
|
-
if (!this.ready) {
|
|
637
|
-
throw new DeveloperError(
|
|
638
|
-
"hasAlphaChannel must not be called before the imagery provider is ready."
|
|
639
|
-
);
|
|
640
|
-
}
|
|
641
|
-
//>>includeEnd('debug');
|
|
642
546
|
return this._hasAlphaChannel;
|
|
643
547
|
},
|
|
644
548
|
},
|
|
549
|
+
|
|
550
|
+
/**
|
|
551
|
+
* The default alpha blending value of this provider, with 0.0 representing fully transparent and
|
|
552
|
+
* 1.0 representing fully opaque.
|
|
553
|
+
* @memberof UrlTemplateImageryProvider.prototype
|
|
554
|
+
* @type {Number|undefined}
|
|
555
|
+
* @deprecated
|
|
556
|
+
*/
|
|
557
|
+
defaultAlpha: {
|
|
558
|
+
get: function () {
|
|
559
|
+
deprecationWarning(
|
|
560
|
+
"UrlTemplateImageryProvider.defaultAlpha",
|
|
561
|
+
"UrlTemplateImageryProvider.defaultAlpha was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.alpha instead."
|
|
562
|
+
);
|
|
563
|
+
return this._defaultAlpha;
|
|
564
|
+
},
|
|
565
|
+
set: function (value) {
|
|
566
|
+
deprecationWarning(
|
|
567
|
+
"UrlTemplateImageryProvider.defaultAlpha",
|
|
568
|
+
"UrlTemplateImageryProvider.defaultAlpha was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.alpha instead."
|
|
569
|
+
);
|
|
570
|
+
this._defaultAlpha = value;
|
|
571
|
+
},
|
|
572
|
+
},
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
* The default alpha blending value on the night side of the globe of this provider, with 0.0 representing fully transparent and
|
|
576
|
+
* 1.0 representing fully opaque.
|
|
577
|
+
* @memberof UrlTemplateImageryProvider.prototype
|
|
578
|
+
* @type {Number|undefined}
|
|
579
|
+
* @deprecated
|
|
580
|
+
*/
|
|
581
|
+
defaultNightAlpha: {
|
|
582
|
+
get: function () {
|
|
583
|
+
deprecationWarning(
|
|
584
|
+
"UrlTemplateImageryProvider.defaultNightAlpha",
|
|
585
|
+
"UrlTemplateImageryProvider.defaultNightAlpha was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.nightAlpha instead."
|
|
586
|
+
);
|
|
587
|
+
return this._defaultNightAlpha;
|
|
588
|
+
},
|
|
589
|
+
set: function (value) {
|
|
590
|
+
deprecationWarning(
|
|
591
|
+
"UrlTemplateImageryProvider.defaultNightAlpha",
|
|
592
|
+
"UrlTemplateImageryProvider.defaultNightAlpha was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.nightAlpha instead."
|
|
593
|
+
);
|
|
594
|
+
this._defaultNightAlpha = value;
|
|
595
|
+
},
|
|
596
|
+
},
|
|
597
|
+
|
|
598
|
+
/**
|
|
599
|
+
* The default alpha blending value on the day side of the globe of this provider, with 0.0 representing fully transparent and
|
|
600
|
+
* 1.0 representing fully opaque.
|
|
601
|
+
* @memberof UrlTemplateImageryProvider.prototype
|
|
602
|
+
* @type {Number|undefined}
|
|
603
|
+
* @deprecated
|
|
604
|
+
*/
|
|
605
|
+
defaultDayAlpha: {
|
|
606
|
+
get: function () {
|
|
607
|
+
deprecationWarning(
|
|
608
|
+
"UrlTemplateImageryProvider.defaultDayAlpha",
|
|
609
|
+
"UrlTemplateImageryProvider.defaultDayAlpha was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.dayAlpha instead."
|
|
610
|
+
);
|
|
611
|
+
return this._defaultDayAlpha;
|
|
612
|
+
},
|
|
613
|
+
set: function (value) {
|
|
614
|
+
deprecationWarning(
|
|
615
|
+
"UrlTemplateImageryProvider.defaultDayAlpha",
|
|
616
|
+
"UrlTemplateImageryProvider.defaultDayAlpha was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.dayAlpha instead."
|
|
617
|
+
);
|
|
618
|
+
this._defaultDayAlpha = value;
|
|
619
|
+
},
|
|
620
|
+
},
|
|
621
|
+
|
|
622
|
+
/**
|
|
623
|
+
* The default brightness of this provider. 1.0 uses the unmodified imagery color. Less than 1.0
|
|
624
|
+
* makes the imagery darker while greater than 1.0 makes it brighter.
|
|
625
|
+
* @memberof UrlTemplateImageryProvider.prototype
|
|
626
|
+
* @type {Number|undefined}
|
|
627
|
+
* @deprecated
|
|
628
|
+
*/
|
|
629
|
+
defaultBrightness: {
|
|
630
|
+
get: function () {
|
|
631
|
+
deprecationWarning(
|
|
632
|
+
"UrlTemplateImageryProvider.defaultBrightness",
|
|
633
|
+
"UrlTemplateImageryProvider.defaultBrightness was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.brightness instead."
|
|
634
|
+
);
|
|
635
|
+
return this._defaultBrightness;
|
|
636
|
+
},
|
|
637
|
+
set: function (value) {
|
|
638
|
+
deprecationWarning(
|
|
639
|
+
"UrlTemplateImageryProvider.defaultBrightness",
|
|
640
|
+
"UrlTemplateImageryProvider.defaultBrightness was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.brightness instead."
|
|
641
|
+
);
|
|
642
|
+
this._defaultBrightness = value;
|
|
643
|
+
},
|
|
644
|
+
},
|
|
645
|
+
|
|
646
|
+
/**
|
|
647
|
+
* The default contrast of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces
|
|
648
|
+
* the contrast while greater than 1.0 increases it.
|
|
649
|
+
* @memberof UrlTemplateImageryProvider.prototype
|
|
650
|
+
* @type {Number|undefined}
|
|
651
|
+
* @deprecated
|
|
652
|
+
*/
|
|
653
|
+
defaultContrast: {
|
|
654
|
+
get: function () {
|
|
655
|
+
deprecationWarning(
|
|
656
|
+
"UrlTemplateImageryProvider.defaultContrast",
|
|
657
|
+
"UrlTemplateImageryProvider.defaultContrast was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.contrast instead."
|
|
658
|
+
);
|
|
659
|
+
return this._defaultContrast;
|
|
660
|
+
},
|
|
661
|
+
set: function (value) {
|
|
662
|
+
deprecationWarning(
|
|
663
|
+
"UrlTemplateImageryProvider.defaultContrast",
|
|
664
|
+
"UrlTemplateImageryProvider.defaultContrast was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.contrast instead."
|
|
665
|
+
);
|
|
666
|
+
this._defaultContrast = value;
|
|
667
|
+
},
|
|
668
|
+
},
|
|
669
|
+
|
|
670
|
+
/**
|
|
671
|
+
* The default hue of this provider in radians. 0.0 uses the unmodified imagery color.
|
|
672
|
+
* @memberof UrlTemplateImageryProvider.prototype
|
|
673
|
+
* @type {Number|undefined}
|
|
674
|
+
* @deprecated
|
|
675
|
+
*/
|
|
676
|
+
defaultHue: {
|
|
677
|
+
get: function () {
|
|
678
|
+
deprecationWarning(
|
|
679
|
+
"UrlTemplateImageryProvider.defaultHue",
|
|
680
|
+
"UrlTemplateImageryProvider.defaultHue was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.hue instead."
|
|
681
|
+
);
|
|
682
|
+
return this._defaultHue;
|
|
683
|
+
},
|
|
684
|
+
set: function (value) {
|
|
685
|
+
deprecationWarning(
|
|
686
|
+
"UrlTemplateImageryProvider.defaultHue",
|
|
687
|
+
"UrlTemplateImageryProvider.defaultHue was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.hue instead."
|
|
688
|
+
);
|
|
689
|
+
this._defaultHue = value;
|
|
690
|
+
},
|
|
691
|
+
},
|
|
692
|
+
|
|
693
|
+
/**
|
|
694
|
+
* The default saturation of this provider. 1.0 uses the unmodified imagery color. Less than 1.0 reduces the
|
|
695
|
+
* saturation while greater than 1.0 increases it.
|
|
696
|
+
* @memberof UrlTemplateImageryProvider.prototype
|
|
697
|
+
* @type {Number|undefined}
|
|
698
|
+
* @deprecated
|
|
699
|
+
*/
|
|
700
|
+
defaultSaturation: {
|
|
701
|
+
get: function () {
|
|
702
|
+
deprecationWarning(
|
|
703
|
+
"UrlTemplateImageryProvider.defaultSaturation",
|
|
704
|
+
"UrlTemplateImageryProvider.defaultSaturation was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.saturation instead."
|
|
705
|
+
);
|
|
706
|
+
return this._defaultSaturation;
|
|
707
|
+
},
|
|
708
|
+
set: function (value) {
|
|
709
|
+
deprecationWarning(
|
|
710
|
+
"UrlTemplateImageryProvider.defaultSaturation",
|
|
711
|
+
"UrlTemplateImageryProvider.defaultSaturation was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.saturation instead."
|
|
712
|
+
);
|
|
713
|
+
this._defaultSaturation = value;
|
|
714
|
+
},
|
|
715
|
+
},
|
|
716
|
+
|
|
717
|
+
/**
|
|
718
|
+
* The default gamma correction to apply to this provider. 1.0 uses the unmodified imagery color.
|
|
719
|
+
* @memberof UrlTemplateImageryProvider.prototype
|
|
720
|
+
* @type {Number|undefined}
|
|
721
|
+
* @deprecated
|
|
722
|
+
*/
|
|
723
|
+
defaultGamma: {
|
|
724
|
+
get: function () {
|
|
725
|
+
deprecationWarning(
|
|
726
|
+
"UrlTemplateImageryProvider.defaultGamma",
|
|
727
|
+
"UrlTemplateImageryProvider.defaultGamma was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.gamma instead."
|
|
728
|
+
);
|
|
729
|
+
return this._defaultGamma;
|
|
730
|
+
},
|
|
731
|
+
set: function (value) {
|
|
732
|
+
deprecationWarning(
|
|
733
|
+
"UrlTemplateImageryProvider.defaultGamma",
|
|
734
|
+
"UrlTemplateImageryProvider.defaultGamma was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.gamma instead."
|
|
735
|
+
);
|
|
736
|
+
this._defaultGamma = value;
|
|
737
|
+
},
|
|
738
|
+
},
|
|
739
|
+
|
|
740
|
+
/**
|
|
741
|
+
* The default texture minification filter to apply to this provider.
|
|
742
|
+
* @memberof UrlTemplateImageryProvider.prototype
|
|
743
|
+
* @type {TextureMinificationFilter}
|
|
744
|
+
* @deprecated
|
|
745
|
+
*/
|
|
746
|
+
defaultMinificationFilter: {
|
|
747
|
+
get: function () {
|
|
748
|
+
deprecationWarning(
|
|
749
|
+
"UrlTemplateImageryProvider.defaultMinificationFilter",
|
|
750
|
+
"UrlTemplateImageryProvider.defaultMinificationFilter was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.minificationFilter instead."
|
|
751
|
+
);
|
|
752
|
+
return this._defaultMinificationFilter;
|
|
753
|
+
},
|
|
754
|
+
set: function (value) {
|
|
755
|
+
deprecationWarning(
|
|
756
|
+
"UrlTemplateImageryProvider.defaultMinificationFilter",
|
|
757
|
+
"UrlTemplateImageryProvider.defaultMinificationFilter was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.minificationFilter instead."
|
|
758
|
+
);
|
|
759
|
+
this._defaultMinificationFilter = value;
|
|
760
|
+
},
|
|
761
|
+
},
|
|
762
|
+
|
|
763
|
+
/**
|
|
764
|
+
* The default texture magnification filter to apply to this provider.
|
|
765
|
+
* @memberof UrlTemplateImageryProvider.prototype
|
|
766
|
+
* @type {TextureMagnificationFilter}
|
|
767
|
+
* @deprecated
|
|
768
|
+
*/
|
|
769
|
+
defaultMagnificationFilter: {
|
|
770
|
+
get: function () {
|
|
771
|
+
deprecationWarning(
|
|
772
|
+
"UrlTemplateImageryProvider.defaultMagnificationFilter",
|
|
773
|
+
"UrlTemplateImageryProvider.defaultMagnificationFilter was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.magnificationFilter instead."
|
|
774
|
+
);
|
|
775
|
+
return this._defaultMagnificationFilter;
|
|
776
|
+
},
|
|
777
|
+
set: function (value) {
|
|
778
|
+
deprecationWarning(
|
|
779
|
+
"UrlTemplateImageryProvider.defaultMagnificationFilter",
|
|
780
|
+
"UrlTemplateImageryProvider.defaultMagnificationFilter was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107. Use ImageryLayer.magnificationFilter instead."
|
|
781
|
+
);
|
|
782
|
+
this._defaultMagnificationFilter = value;
|
|
783
|
+
},
|
|
784
|
+
},
|
|
645
785
|
});
|
|
646
786
|
|
|
647
787
|
/**
|
|
648
788
|
* Reinitializes this instance. Reinitializing an instance already in use is supported, but it is not
|
|
649
789
|
* recommended because existing tiles provided by the imagery provider will not be updated.
|
|
790
|
+
* @deprecated
|
|
650
791
|
*
|
|
651
792
|
* @param {Promise<object>|object} options Any of the options that may be passed to the {@link UrlTemplateImageryProvider} constructor.
|
|
652
793
|
*/
|
|
653
794
|
UrlTemplateImageryProvider.prototype.reinitialize = function (options) {
|
|
795
|
+
deprecationWarning(
|
|
796
|
+
"UrlTemplateImageryProvider.reinitialize",
|
|
797
|
+
"UrlTemplateImageryProvider.reinitialize was deprecated in CesiumJS 1.104. It will be in CesiumJS 1.107."
|
|
798
|
+
);
|
|
799
|
+
|
|
800
|
+
return this._reinitialize(options);
|
|
801
|
+
};
|
|
802
|
+
|
|
803
|
+
/**
|
|
804
|
+
* @private
|
|
805
|
+
*/
|
|
806
|
+
UrlTemplateImageryProvider.prototype._reinitialize = function (options) {
|
|
654
807
|
const that = this;
|
|
808
|
+
|
|
655
809
|
that._readyPromise = Promise.resolve(options).then(function (properties) {
|
|
656
810
|
//>>includeStart('debug', pragmas.debug);
|
|
657
811
|
if (!defined(properties)) {
|
|
@@ -718,6 +872,7 @@ UrlTemplateImageryProvider.prototype.reinitialize = function (options) {
|
|
|
718
872
|
that._tags = allTags;
|
|
719
873
|
that._pickFeaturesResource = pickFeaturesResource;
|
|
720
874
|
that._pickFeaturesTags = allPickFeaturesTags;
|
|
875
|
+
that._ready = true;
|
|
721
876
|
|
|
722
877
|
return true;
|
|
723
878
|
});
|
|
@@ -730,24 +885,12 @@ UrlTemplateImageryProvider.prototype.reinitialize = function (options) {
|
|
|
730
885
|
* @param {number} y The tile Y coordinate.
|
|
731
886
|
* @param {number} level The tile level;
|
|
732
887
|
* @returns {Credit[]} The credits to be displayed when the tile is displayed.
|
|
733
|
-
*
|
|
734
|
-
* @exception {DeveloperError} <code>getTileCredits</code> must not be called before the imagery provider is ready.
|
|
735
888
|
*/
|
|
736
889
|
UrlTemplateImageryProvider.prototype.getTileCredits = function (x, y, level) {
|
|
737
|
-
//>>includeStart('debug', pragmas.debug);
|
|
738
|
-
if (!this.ready) {
|
|
739
|
-
throw new DeveloperError(
|
|
740
|
-
"getTileCredits must not be called before the imagery provider is ready."
|
|
741
|
-
);
|
|
742
|
-
}
|
|
743
|
-
//>>includeEnd('debug');
|
|
744
890
|
return undefined;
|
|
745
891
|
};
|
|
746
892
|
|
|
747
893
|
/**
|
|
748
|
-
* Requests the image for a given tile. This function should
|
|
749
|
-
* not be called before {@link UrlTemplateImageryProvider#ready} returns true.
|
|
750
|
-
*
|
|
751
894
|
* @param {number} x The tile X coordinate.
|
|
752
895
|
* @param {number} y The tile Y coordinate.
|
|
753
896
|
* @param {number} level The tile level.
|
|
@@ -761,13 +904,6 @@ UrlTemplateImageryProvider.prototype.requestImage = function (
|
|
|
761
904
|
level,
|
|
762
905
|
request
|
|
763
906
|
) {
|
|
764
|
-
//>>includeStart('debug', pragmas.debug);
|
|
765
|
-
if (!this.ready) {
|
|
766
|
-
throw new DeveloperError(
|
|
767
|
-
"requestImage must not be called before the imagery provider is ready."
|
|
768
|
-
);
|
|
769
|
-
}
|
|
770
|
-
//>>includeEnd('debug');
|
|
771
907
|
return ImageryProvider.loadImage(
|
|
772
908
|
this,
|
|
773
909
|
buildImageResource(this, x, y, level, request)
|
|
@@ -776,7 +912,7 @@ UrlTemplateImageryProvider.prototype.requestImage = function (
|
|
|
776
912
|
|
|
777
913
|
/**
|
|
778
914
|
* Asynchronously determines what features, if any, are located at a given longitude and latitude within
|
|
779
|
-
* a tile.
|
|
915
|
+
* a tile.
|
|
780
916
|
*
|
|
781
917
|
* @param {number} x The tile X coordinate.
|
|
782
918
|
* @param {number} y The tile Y coordinate.
|
|
@@ -795,14 +931,6 @@ UrlTemplateImageryProvider.prototype.pickFeatures = function (
|
|
|
795
931
|
longitude,
|
|
796
932
|
latitude
|
|
797
933
|
) {
|
|
798
|
-
//>>includeStart('debug', pragmas.debug);
|
|
799
|
-
if (!this.ready) {
|
|
800
|
-
throw new DeveloperError(
|
|
801
|
-
"pickFeatures must not be called before the imagery provider is ready."
|
|
802
|
-
);
|
|
803
|
-
}
|
|
804
|
-
//>>includeEnd('debug');
|
|
805
|
-
|
|
806
934
|
if (
|
|
807
935
|
!this.enablePickFeatures ||
|
|
808
936
|
!defined(this._pickFeaturesResource) ||
|