@sswroom/sswr 1.4.0 → 1.4.1

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/Changelog CHANGED
@@ -1,3 +1,6 @@
1
+ 1.4.1
2
+ -Fixed problems in Chrome
3
+
1
4
  1.4.0
2
5
  -Added LinearRing.createFromCircle
3
6
  -Full support kml.IconStyle
package/map.d.ts CHANGED
@@ -189,5 +189,5 @@ export class WMS
189
189
  version: string;
190
190
 
191
191
  constructor(url: string, layer: string, version?: string);
192
- queryInfos(mapPos: math.Coord2D, bounds: math.RectArea, width: number, height: number): Promise<object | null>;
192
+ queryInfos(mapPos: math.Coord2D, bounds: math.RectArea, width: number, height: number): Promise<OWSFeatureCollection | null>;
193
193
  }
package/map.js CHANGED
@@ -167,9 +167,10 @@ export class WMS
167
167
  var parser = new DOMParser();
168
168
  var contentType = resp.headers.get("Content-Type") || "text/xml";
169
169
  var doc = parser.parseFromString(await resp.text(), contentType);
170
- if (doc.activeElement.nodeName == "WMS_Capabilities" || doc.activeElement.nodeName == "WMT_MS_Capabilities")
170
+ var node = doc.childNodes[0];
171
+ if (node.nodeName == "WMS_Capabilities" || node.nodeName == "WMT_MS_Capabilities")
171
172
  {
172
- var attr = doc.activeElement.attributes.getNamedItem("version");
173
+ var attr = node.attributes.getNamedItem("version");
173
174
  if (attr)
174
175
  {
175
176
  this.version = attr.value;
@@ -203,7 +204,6 @@ export class WMS
203
204
  console.log("WMS: Unsupported version", this.version);
204
205
  return null;
205
206
  }
206
- console.log(url);
207
207
  var resp = await fetch(url);
208
208
  if (resp.ok)
209
209
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sswroom/sswr",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "Libraries made by sswroom",
5
5
  "main": "sswr.js",
6
6
  "scripts": {