Skip to content

Commit

Permalink
Remove deprecated GeoJsonDataSource parameter
Browse files Browse the repository at this point in the history
Fixes #2257
  • Loading branch information
mramato committed Jan 6, 2015
1 parent f394723 commit 8b98cc2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
3 changes: 2 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ Change Log
* Breaking changes
* `Rectangle.intersectWith` was deprecated in Cesium 1.5. Use `Rectangle.intersection`, which is the same but returns `undefined` when two rectangles do not intersect.
* `Rectangle.isEmpty` was deprecated in Cesium 1.5.

* The `sourceUri` parameter to `GeoJsonDatasource.load` was deprecated in Cesium 1.4 and has been removed. Use options.sourceUri instead.

### 1.5 - 2015-01-05

* Breaking changes
Expand Down
13 changes: 2 additions & 11 deletions Source/DataSources/GeoJsonDataSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ define([
'../Core/defaultValue',
'../Core/defined',
'../Core/defineProperties',
'../Core/deprecationWarning',
'../Core/DeveloperError',
'../Core/Event',
'../Core/getFilenameFromUri',
Expand All @@ -32,7 +31,6 @@ define([
defaultValue,
defined,
defineProperties,
deprecationWarning,
DeveloperError,
Event,
getFilenameFromUri,
Expand Down Expand Up @@ -776,19 +774,12 @@ define([
}
//>>includeEnd('debug');

var sourceUri = options;
if (typeof options === 'string') {
sourceUri = options;
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');
} else if (defined(options)) {
sourceUri = options.sourceUri;
}

return load(this, geoJson, sourceUri, options);
return load(this, geoJson, undefined, options);
};

function load(that, geoJson, sourceUri, options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
sourceUri = defaultValue(sourceUri, options.sourceUri);

options = {
markerSize : defaultValue(options.markerSize, defaultMarkerSize),
Expand Down

0 comments on commit 8b98cc2

Please sign in to comment.