Skip to content

Commit 8b98cc2

Browse files
committedJan 6, 2015
Remove deprecated GeoJsonDataSource parameter
Fixes #2257
1 parent f394723 commit 8b98cc2

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed
 

‎CHANGES.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ Change Log
66
* Breaking changes
77
* `Rectangle.intersectWith` was deprecated in Cesium 1.5. Use `Rectangle.intersection`, which is the same but returns `undefined` when two rectangles do not intersect.
88
* `Rectangle.isEmpty` was deprecated in Cesium 1.5.
9-
9+
* The `sourceUri` parameter to `GeoJsonDatasource.load` was deprecated in Cesium 1.4 and has been removed. Use options.sourceUri instead.
10+
1011
### 1.5 - 2015-01-05
1112

1213
* Breaking changes

‎Source/DataSources/GeoJsonDataSource.js

+2-11
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ define([
66
'../Core/defaultValue',
77
'../Core/defined',
88
'../Core/defineProperties',
9-
'../Core/deprecationWarning',
109
'../Core/DeveloperError',
1110
'../Core/Event',
1211
'../Core/getFilenameFromUri',
@@ -32,7 +31,6 @@ define([
3231
defaultValue,
3332
defined,
3433
defineProperties,
35-
deprecationWarning,
3634
DeveloperError,
3735
Event,
3836
getFilenameFromUri,
@@ -776,19 +774,12 @@ define([
776774
}
777775
//>>includeEnd('debug');
778776

779-
var sourceUri = options;
780-
if (typeof options === 'string') {
781-
sourceUri = options;
782-
deprecationWarning('GeoJsonDataSource.load', 'GeoJsonDataSource.load now takes an options object instead of a string as its second parameter. Support for passing a string parameter will be removed in Cesium 1.6');
783-
} else if (defined(options)) {
784-
sourceUri = options.sourceUri;
785-
}
786-
787-
return load(this, geoJson, sourceUri, options);
777+
return load(this, geoJson, undefined, options);
788778
};
789779

790780
function load(that, geoJson, sourceUri, options) {
791781
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
782+
sourceUri = defaultValue(sourceUri, options.sourceUri);
792783

793784
options = {
794785
markerSize : defaultValue(options.markerSize, defaultMarkerSize),

0 commit comments

Comments
 (0)
Please sign in to comment.