From 8b98cc2dc8e6f153741b329508672cc62457e297 Mon Sep 17 00:00:00 2001 From: Matthew Amato Date: Tue, 6 Jan 2015 17:16:57 -0500 Subject: [PATCH] Remove deprecated GeoJsonDataSource parameter Fixes #2257 --- CHANGES.md | 3 ++- Source/DataSources/GeoJsonDataSource.js | 13 ++----------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 4d7c7eb2f6a5..cae037534d58 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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 diff --git a/Source/DataSources/GeoJsonDataSource.js b/Source/DataSources/GeoJsonDataSource.js index d74ad796f23e..aae4727cdb9a 100644 --- a/Source/DataSources/GeoJsonDataSource.js +++ b/Source/DataSources/GeoJsonDataSource.js @@ -6,7 +6,6 @@ define([ '../Core/defaultValue', '../Core/defined', '../Core/defineProperties', - '../Core/deprecationWarning', '../Core/DeveloperError', '../Core/Event', '../Core/getFilenameFromUri', @@ -32,7 +31,6 @@ define([ defaultValue, defined, defineProperties, - deprecationWarning, DeveloperError, Event, getFilenameFromUri, @@ -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),