From f07ab5cc79a49c169035d43b0e32e7b6325f6137 Mon Sep 17 00:00:00 2001 From: Nate Rivera Date: Thu, 23 Nov 2017 13:39:25 -0500 Subject: [PATCH 1/2] added namespace insertion for kmz files --- Source/DataSources/KmlDataSource.js | 1 + Specs/Data/KML/undeclaredNamespaces.kmz | Bin 0 -> 458 bytes Specs/DataSources/KmlDataSourceSpec.js | 14 ++++++++++++++ 3 files changed, 15 insertions(+) create mode 100644 Specs/Data/KML/undeclaredNamespaces.kmz diff --git a/Source/DataSources/KmlDataSource.js b/Source/DataSources/KmlDataSource.js index fd7abced383b..443fd29cfade 100644 --- a/Source/DataSources/KmlDataSource.js +++ b/Source/DataSources/KmlDataSource.js @@ -277,6 +277,7 @@ define([ function loadXmlFromZip(reader, entry, uriResolver, deferred) { entry.getData(new zip.TextWriter(), function(text) { + text = insertNamespaces(text); uriResolver.kml = parser.parseFromString(text, 'application/xml'); deferred.resolve(); }); diff --git a/Specs/Data/KML/undeclaredNamespaces.kmz b/Specs/Data/KML/undeclaredNamespaces.kmz new file mode 100644 index 0000000000000000000000000000000000000000..0c2397950d11cb0c03bed71258d3ba8157bd6cc7 GIT binary patch literal 458 zcmWIWW@Zs#U|`^2FwQFX-XDIh!-A24;V2UWg9K2tG%qDJIVZ6wHN`J6H?_DRF*&tZ zFFQA*+2MC>@<2?WytG&`NoVH6&XpkrnUlBL6>50=ww{qKYi)eNqNfK zE8m~3HfES#TI#xQ!`EXsC;8o&A++UGZtqpq+IZXh_LpYv*!%FeMt9I_?_JyrXEMp~ zu|JdAa;qZE&>_U(AlI$c;(oQ)GMHcPnOU{Y0Roi0#up z)4;M%BYnM~dRBv4+Vw~623xP3kXmiIr0N2HI8Wb$RE2iNO|I*sE`OP>|KskjOvCuI z*PnYFQhn*{ed+ Date: Mon, 27 Nov 2017 12:14:37 -0500 Subject: [PATCH 2/2] Added fix for KMZ missing namespace declarations --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index 71008b438582..7772f8a83130 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -7,6 +7,7 @@ Change Log * Added ability to support touch event in Imagery Layers Split demo application. [#5948](https://github.com/AnalyticalGraphicsInc/cesium/pull/5948) * Fixed `Invalid asm.js: Invalid member of stdlib` console error by recompiling crunch.js with latest emscripten toolchain. [#5847](https://github.com/AnalyticalGraphicsInc/cesium/issues/5847) * Added CZML support for `polyline.depthFailMaterial`, `label.scaleByDistance`, `distanceDisplayCondition`, and `disableDepthTestDistance`. [#5986](https://github.com/AnalyticalGraphicsInc/cesium/pull/5986) +* Fixed handling of KMZ files with missing `xsi` namespace declarations. [#6003](https://github.com/AnalyticalGraphicsInc/cesium/pull/6003) ### 1.39 - 2017-11-01