ol 9.1.1-dev.1715268701637 → 9.1.1-dev.1715581613988
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/dist/ol.js +2 -2
- package/dist/ol.js.map +1 -1
- package/featureloader.d.ts.map +1 -1
- package/featureloader.js +23 -27
- package/package.json +1 -1
- package/util.js +1 -1
package/featureloader.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"featureloader.d.ts","sourceRoot":"","sources":["featureloader.js"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH;;;;;;;;;;GAUG;AAEH;;;;;;;;;;;GAWG;AACH,kIAVW,MAAM,GAAC,kBAAkB,UACzB,OAAO,qBAAqB,EAAE,OAAO,UACrC,OAAO,aAAa,EAAE,MAAM,cAC5B,MAAM,cACN,OAAO,sBAAsB,EAAE,OAAO,uCACT,OAAO,sBAAsB,EAAE,OAAO,KAAG,IAAI,iBAE9D,IAAI,
|
|
1
|
+
{"version":3,"file":"featureloader.d.ts","sourceRoot":"","sources":["featureloader.js"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH;;;;;;;;;;GAUG;AAEH;;;;;;;;;;;GAWG;AACH,kIAVW,MAAM,GAAC,kBAAkB,UACzB,OAAO,qBAAqB,EAAE,OAAO,UACrC,OAAO,aAAa,EAAE,MAAM,cAC5B,MAAM,cACN,OAAO,sBAAsB,EAAE,OAAO,uCACT,OAAO,sBAAsB,EAAE,OAAO,KAAG,IAAI,iBAE9D,IAAI,QAkE1B;AAED;;;;;;;;;GASG;AACH,sHALW,MAAM,GAAC,kBAAkB,+IAsCnC;AAED;;;;;;GAMG;AACH,uDAJW,OAAO,QAMjB;;;;;;;;;;;;;;;;0JAxJ0B,CAAC,OAAO,iBAAiB,EAAE,OAAO,GAAC,OAAO,iBAAiB,EAAE,OAAO,CAAC,QAC/F,OAAmB,aAAa,EAAE,MAAM,QACxC,MAAkB,QAClB,OAAmB,sBAAsB,EAAE,OAAO,gBAC7B,MAAM,WAAW,CAAC,KAAG,IAAI,4BACtB,IAAI,kBAAI,IAAI;;;;;;;;;;wCAYf,OAAO,aAAa,EAAE,MAAM,QAAE,MAAM,QAAE,OAAO,sBAAsB,EAAE,OAAO,KAAG,MAAM"}
|
package/featureloader.js
CHANGED
|
@@ -86,35 +86,31 @@ export function loadFeaturesXhr(
|
|
|
86
86
|
// status will be 0 for file:// urls
|
|
87
87
|
if (!xhr.status || (xhr.status >= 200 && xhr.status < 300)) {
|
|
88
88
|
const type = format.getType();
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
89
|
+
try {
|
|
90
|
+
/** @type {Document|Node|Object|string|undefined} */
|
|
91
|
+
let source;
|
|
92
|
+
if (type == 'text' || type == 'json') {
|
|
93
|
+
source = xhr.responseText;
|
|
94
|
+
} else if (type == 'xml') {
|
|
95
|
+
source = xhr.responseXML || xhr.responseText;
|
|
96
|
+
} else if (type == 'arraybuffer') {
|
|
97
|
+
source = /** @type {ArrayBuffer} */ (xhr.response);
|
|
98
|
+
}
|
|
99
|
+
if (source) {
|
|
100
|
+
success(
|
|
101
|
+
/** @type {Array<FeatureType>} */
|
|
102
|
+
(
|
|
103
|
+
format.readFeatures(source, {
|
|
104
|
+
extent: extent,
|
|
105
|
+
featureProjection: projection,
|
|
106
|
+
})
|
|
107
|
+
),
|
|
108
|
+
format.readProjection(source),
|
|
101
109
|
);
|
|
110
|
+
} else {
|
|
111
|
+
failure();
|
|
102
112
|
}
|
|
103
|
-
}
|
|
104
|
-
source = /** @type {ArrayBuffer} */ (xhr.response);
|
|
105
|
-
}
|
|
106
|
-
if (source) {
|
|
107
|
-
success(
|
|
108
|
-
/** @type {Array<FeatureType>} */
|
|
109
|
-
(
|
|
110
|
-
format.readFeatures(source, {
|
|
111
|
-
extent: extent,
|
|
112
|
-
featureProjection: projection,
|
|
113
|
-
})
|
|
114
|
-
),
|
|
115
|
-
format.readProjection(source),
|
|
116
|
-
);
|
|
117
|
-
} else {
|
|
113
|
+
} catch {
|
|
118
114
|
failure();
|
|
119
115
|
}
|
|
120
116
|
} else {
|
package/package.json
CHANGED
package/util.js
CHANGED