diff --git a/build/buildConfig.js b/build/buildConfig.js
index 61127206ad..4a55aea202 100644
--- a/build/buildConfig.js
+++ b/build/buildConfig.js
@@ -68,7 +68,6 @@ module.exports = (bundles, themeEntries, paths, extractThemesPlugin, prod, publi
}
}),
new NormalModuleReplacementPlugin(/leaflet$/, path.join(paths.framework, "libs", "leaflet")),
- new NormalModuleReplacementPlugin(/openlayers$/, path.join(paths.framework, "libs", "openlayers")),
new NormalModuleReplacementPlugin(/proj4$/, path.join(paths.framework, "libs", "proj4")),
new NoEmitOnErrorsPlugin(),
extractThemesPlugin
diff --git a/package-lock.json b/package-lock.json
index bac2ba9632..54ab39cada 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -54,6 +54,122 @@
"xmldom": "0.1.27"
}
},
+ "@terrestris/base-util": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/@terrestris/base-util/-/base-util-0.1.4.tgz",
+ "integrity": "sha512-LlGiKWCxBNthY9ktwoIpZ3BWVmdB4Ok5NJcp2U+Km5TFmTXiR7FD4y16Dt5YuY7Cd+nxjRgJzQxytY51z67H8Q==",
+ "requires": {
+ "lodash": "4.17.11",
+ "loglevel": "1.6.1",
+ "query-string": "5.1.1",
+ "url-parse": "1.4.4",
+ "validator": "10.11.0"
+ },
+ "dependencies": {
+ "lodash": {
+ "version": "4.17.11",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
+ "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg=="
+ },
+ "query-string": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz",
+ "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==",
+ "requires": {
+ "decode-uri-component": "0.2.0",
+ "object-assign": "4.1.1",
+ "strict-uri-encode": "1.1.0"
+ }
+ },
+ "url-parse": {
+ "version": "1.4.4",
+ "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.4.tgz",
+ "integrity": "sha512-/92DTTorg4JjktLNLe6GPS2/RvAd/RGr6LuktmWSMLEOa6rjnlrFXNgSbSmkNvCoL2T028A0a1JaJLzRMlFoHg==",
+ "requires": {
+ "querystringify": "2.1.1",
+ "requires-port": "1.0.0"
+ }
+ }
+ }
+ },
+ "@terrestris/ol-util": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/@terrestris/ol-util/-/ol-util-3.0.0.tgz",
+ "integrity": "sha512-5cNFdZAzf++m6gv2dZ5XyVT2QmOmb3Hwml4QgNaTjWyU3yvpi5vNqdVhUHgP5sSJDDM1pIIZLSJwDV4s2dmjow==",
+ "requires": {
+ "@terrestris/base-util": "0.1.4",
+ "@turf/turf": "5.1.6",
+ "lodash": "4.17.11",
+ "proj4": "2.5.0",
+ "shpjs": "3.4.3"
+ },
+ "dependencies": {
+ "jszip": {
+ "version": "2.6.1",
+ "resolved": "https://registry.npmjs.org/jszip/-/jszip-2.6.1.tgz",
+ "integrity": "sha1-uI86ey5noqBIFSmCx6N1bZxIKPA=",
+ "requires": {
+ "pako": "1.0.10"
+ }
+ },
+ "lodash": {
+ "version": "4.17.11",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
+ "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg=="
+ },
+ "proj4": {
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/proj4/-/proj4-2.5.0.tgz",
+ "integrity": "sha512-XZTRT7OPdLzgvtTqL8DG2cEj8lYdovztOwiwpwRSYayOty5Ipf3H68dh/fiL+HKDEyetmQSMhkkMGiJoyziz3w==",
+ "requires": {
+ "mgrs": "1.0.0",
+ "wkt-parser": "https://github.com/geosolutions-it/wkt-parser/tarball/mapstore2_fixes"
+ }
+ },
+ "shpjs": {
+ "version": "3.4.3",
+ "resolved": "https://registry.npmjs.org/shpjs/-/shpjs-3.4.3.tgz",
+ "integrity": "sha512-NZM75+SLgPt9dK91Z92QK+fVd2OR6zswAmkTrkHRc4mnONbAWGo38I+AxCYsKgCNfqF5cZUi2KfO7r2TZ+tHdw==",
+ "requires": {
+ "jszip": "2.6.1",
+ "lie": "3.1.1",
+ "lru-cache": "2.7.3",
+ "parsedbf": "1.0.0",
+ "proj4": "2.5.0"
+ }
+ }
+ }
+ },
+ "@turf/along": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/along/-/along-5.1.5.tgz",
+ "integrity": "sha1-YdbmplhKzdq1asVYTge/jL5fi+s=",
+ "requires": {
+ "@turf/bearing": "5.1.5",
+ "@turf/destination": "5.1.5",
+ "@turf/distance": "5.1.5",
+ "@turf/helpers": "5.1.5"
+ }
+ },
+ "@turf/area": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/area/-/area-5.1.5.tgz",
+ "integrity": "sha1-79iZv9Jgzb0VQbKjwVX4pdLu+h0=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/meta": "5.2.0"
+ },
+ "dependencies": {
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ }
+ }
+ },
"@turf/bbox": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/@turf/bbox/-/bbox-4.1.0.tgz",
@@ -62,6 +178,16 @@
"@turf/meta": "4.7.4"
}
},
+ "@turf/bbox-clip": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/bbox-clip/-/bbox-clip-5.1.5.tgz",
+ "integrity": "sha1-M2S1Mo3/nzz0HZ4C7a/zdNFQzIQ=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0",
+ "lineclip": "1.1.5"
+ }
+ },
"@turf/bbox-polygon": {
"version": "5.1.5",
"resolved": "https://registry.npmjs.org/@turf/bbox-polygon/-/bbox-polygon-5.1.5.tgz",
@@ -79,6 +205,24 @@
"@turf/invariant": "5.2.0"
}
},
+ "@turf/bezier-spline": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/bezier-spline/-/bezier-spline-5.1.5.tgz",
+ "integrity": "sha1-WaJ7ul17l+8Vqz/VpA+9I4cEm8o=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0"
+ }
+ },
+ "@turf/boolean-clockwise": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/boolean-clockwise/-/boolean-clockwise-5.1.5.tgz",
+ "integrity": "sha1-MwK32sYsXikaB4nimvcoM4f6nes=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0"
+ }
+ },
"@turf/boolean-contains": {
"version": "5.1.5",
"resolved": "https://registry.npmjs.org/@turf/boolean-contains/-/boolean-contains-5.1.5.tgz",
@@ -110,6 +254,125 @@
}
}
},
+ "@turf/boolean-crosses": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/boolean-crosses/-/boolean-crosses-5.1.5.tgz",
+ "integrity": "sha1-Ab+uollvFk3kpNMlCU3HwlXHFdY=",
+ "requires": {
+ "@turf/boolean-point-in-polygon": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0",
+ "@turf/line-intersect": "5.1.5",
+ "@turf/polygon-to-line": "5.1.5"
+ },
+ "dependencies": {
+ "@turf/line-intersect": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/line-intersect/-/line-intersect-5.1.5.tgz",
+ "integrity": "sha1-DikHGuQDKV5JFyO8SfXPrI0R3fM=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0",
+ "@turf/line-segment": "5.1.5",
+ "@turf/meta": "5.2.0",
+ "geojson-rbush": "2.1.0"
+ }
+ },
+ "@turf/line-segment": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/line-segment/-/line-segment-5.1.5.tgz",
+ "integrity": "sha1-Mgeq7lRqskw9jcPMY/kcdwuAE+U=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0",
+ "@turf/meta": "5.2.0"
+ }
+ },
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ },
+ "geojson-rbush": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/geojson-rbush/-/geojson-rbush-2.1.0.tgz",
+ "integrity": "sha1-O9c745H8ELCuaT2bis6iquC4Oo0=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/meta": "5.2.0",
+ "rbush": "2.0.2"
+ }
+ }
+ }
+ },
+ "@turf/boolean-disjoint": {
+ "version": "5.1.6",
+ "resolved": "https://registry.npmjs.org/@turf/boolean-disjoint/-/boolean-disjoint-5.1.6.tgz",
+ "integrity": "sha512-KHvUS6SBNYHBCLIJEJrg04pF5Oy+Fqn8V5G9U+9pti5vI9tyX7Ln2g7RSB7iJ1Cxsz8QAi6OukhXjEF2/8ZpGg==",
+ "requires": {
+ "@turf/boolean-point-in-polygon": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/line-intersect": "5.1.5",
+ "@turf/meta": "5.2.0",
+ "@turf/polygon-to-line": "5.1.5"
+ },
+ "dependencies": {
+ "@turf/line-intersect": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/line-intersect/-/line-intersect-5.1.5.tgz",
+ "integrity": "sha1-DikHGuQDKV5JFyO8SfXPrI0R3fM=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0",
+ "@turf/line-segment": "5.1.5",
+ "@turf/meta": "5.2.0",
+ "geojson-rbush": "2.1.0"
+ }
+ },
+ "@turf/line-segment": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/line-segment/-/line-segment-5.1.5.tgz",
+ "integrity": "sha1-Mgeq7lRqskw9jcPMY/kcdwuAE+U=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0",
+ "@turf/meta": "5.2.0"
+ }
+ },
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ },
+ "geojson-rbush": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/geojson-rbush/-/geojson-rbush-2.1.0.tgz",
+ "integrity": "sha1-O9c745H8ELCuaT2bis6iquC4Oo0=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/meta": "5.2.0",
+ "rbush": "2.0.2"
+ }
+ }
+ }
+ },
+ "@turf/boolean-equal": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/boolean-equal/-/boolean-equal-5.1.5.tgz",
+ "integrity": "sha1-Kfj21gu4RQff12WzIlTbjnLJOKQ=",
+ "requires": {
+ "@turf/clean-coords": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0",
+ "geojson-equality": "0.1.6"
+ }
+ },
"@turf/boolean-overlap": {
"version": "5.1.5",
"resolved": "https://registry.npmjs.org/@turf/boolean-overlap/-/boolean-overlap-5.1.5.tgz",
@@ -165,6 +428,37 @@
}
}
},
+ "@turf/boolean-parallel": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/boolean-parallel/-/boolean-parallel-5.1.5.tgz",
+ "integrity": "sha1-c5NYR16ltlx+GCejw+DopofTqF0=",
+ "requires": {
+ "@turf/clean-coords": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/line-segment": "5.1.5",
+ "@turf/rhumb-bearing": "5.1.5"
+ },
+ "dependencies": {
+ "@turf/line-segment": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/line-segment/-/line-segment-5.1.5.tgz",
+ "integrity": "sha1-Mgeq7lRqskw9jcPMY/kcdwuAE+U=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0",
+ "@turf/meta": "5.2.0"
+ }
+ },
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ }
+ }
+ },
"@turf/boolean-point-in-polygon": {
"version": "5.1.5",
"resolved": "https://registry.npmjs.org/@turf/boolean-point-in-polygon/-/boolean-point-in-polygon-5.1.5.tgz",
@@ -183,13 +477,16 @@
"@turf/invariant": "5.2.0"
}
},
- "@turf/center": {
+ "@turf/boolean-within": {
"version": "5.1.5",
- "resolved": "https://registry.npmjs.org/@turf/center/-/center-5.1.5.tgz",
- "integrity": "sha1-RKss2VT2PA03dX9xWKmcPvURS4A=",
+ "resolved": "https://registry.npmjs.org/@turf/boolean-within/-/boolean-within-5.1.5.tgz",
+ "integrity": "sha1-RxBdVtB1Kp0Pv81Dw2pfkUnchpc=",
"requires": {
"@turf/bbox": "5.1.5",
- "@turf/helpers": "5.1.5"
+ "@turf/boolean-point-in-polygon": "5.1.5",
+ "@turf/boolean-point-on-line": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0"
},
"dependencies": {
"@turf/bbox": {
@@ -211,106 +508,1688 @@
}
}
},
- "@turf/destination": {
- "version": "5.1.5",
- "resolved": "https://registry.npmjs.org/@turf/destination/-/destination-5.1.5.tgz",
- "integrity": "sha1-7TU4G9zoO73cvQei4rzivd/7zCY=",
- "requires": {
- "@turf/helpers": "5.1.5",
- "@turf/invariant": "5.2.0"
- }
- },
- "@turf/distance": {
- "version": "5.1.5",
- "resolved": "https://registry.npmjs.org/@turf/distance/-/distance-5.1.5.tgz",
- "integrity": "sha1-Oc8YIEu/h1h9cH5gmmARiQkVZAk=",
- "requires": {
- "@turf/helpers": "5.1.5",
- "@turf/invariant": "5.2.0"
- }
- },
- "@turf/great-circle": {
+ "@turf/buffer": {
"version": "5.1.5",
- "resolved": "https://registry.npmjs.org/@turf/great-circle/-/great-circle-5.1.5.tgz",
- "integrity": "sha1-3r+2cc5HVQnLY3MBwV/PzPo1mpM=",
+ "resolved": "https://registry.npmjs.org/@turf/buffer/-/buffer-5.1.5.tgz",
+ "integrity": "sha1-hByWJ8+5dLEirE4alW8EZrwCMcQ=",
"requires": {
+ "@turf/bbox": "5.1.5",
+ "@turf/center": "5.1.5",
"@turf/helpers": "5.1.5",
+ "@turf/meta": "5.2.0",
+ "@turf/projection": "5.1.5",
+ "d3-geo": "1.7.1",
+ "turf-jsts": "1.2.3"
+ },
+ "dependencies": {
+ "@turf/bbox": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/bbox/-/bbox-5.1.5.tgz",
+ "integrity": "sha1-MFHfUUrUxQ9KT5uKLRX9i2hA7aM=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/meta": "5.2.0"
+ }
+ },
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ }
+ }
+ },
+ "@turf/center": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/center/-/center-5.1.5.tgz",
+ "integrity": "sha1-RKss2VT2PA03dX9xWKmcPvURS4A=",
+ "requires": {
+ "@turf/bbox": "5.1.5",
+ "@turf/helpers": "5.1.5"
+ },
+ "dependencies": {
+ "@turf/bbox": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/bbox/-/bbox-5.1.5.tgz",
+ "integrity": "sha1-MFHfUUrUxQ9KT5uKLRX9i2hA7aM=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/meta": "5.2.0"
+ }
+ },
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ }
+ }
+ },
+ "@turf/center-mean": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/center-mean/-/center-mean-5.1.5.tgz",
+ "integrity": "sha1-jI6YdTkeXwnw5uePXWYbiLIQigo=",
+ "requires": {
+ "@turf/bbox": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/meta": "5.2.0"
+ },
+ "dependencies": {
+ "@turf/bbox": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/bbox/-/bbox-5.1.5.tgz",
+ "integrity": "sha1-MFHfUUrUxQ9KT5uKLRX9i2hA7aM=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/meta": "5.2.0"
+ }
+ },
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ }
+ }
+ },
+ "@turf/center-median": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/center-median/-/center-median-5.1.5.tgz",
+ "integrity": "sha1-u0Yb/noqSGAdikcnaFcYcjoUqHI=",
+ "requires": {
+ "@turf/center-mean": "5.1.5",
+ "@turf/centroid": "5.1.5",
+ "@turf/distance": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/meta": "5.2.0"
+ },
+ "dependencies": {
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ }
+ }
+ },
+ "@turf/center-of-mass": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/center-of-mass/-/center-of-mass-5.1.5.tgz",
+ "integrity": "sha1-TTvXnYhJjbq4Mk1PafAyL2Uguco=",
+ "requires": {
+ "@turf/centroid": "5.1.5",
+ "@turf/convex": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0",
+ "@turf/meta": "5.2.0"
+ },
+ "dependencies": {
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ }
+ }
+ },
+ "@turf/centroid": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/centroid/-/centroid-5.1.5.tgz",
+ "integrity": "sha1-d4radCFjNQIa2P0OemWoNJ1Tx2k=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/meta": "5.2.0"
+ },
+ "dependencies": {
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ }
+ }
+ },
+ "@turf/circle": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/@turf/circle/-/circle-6.0.1.tgz",
+ "integrity": "sha512-pF9XsYtCvY9ZyNqJ3hFYem9VaiGdVNQb0SFq/zzDMwH3iWZPPJQHnnDB/3e8RD1VDtBBov9p5uO2k7otsfezjw==",
+ "requires": {
+ "@turf/destination": "6.0.1",
+ "@turf/helpers": "6.1.4"
+ },
+ "dependencies": {
+ "@turf/destination": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/@turf/destination/-/destination-6.0.1.tgz",
+ "integrity": "sha512-MroK4nRdp7as174miCAugp8Uvorhe6rZ7MJiC9Hb4+hZR7gNFJyVKmkdDDXIoCYs6MJQsx0buI+gsCpKwgww0Q==",
+ "requires": {
+ "@turf/helpers": "6.1.4",
+ "@turf/invariant": "6.1.2"
+ }
+ },
+ "@turf/helpers": {
+ "version": "6.1.4",
+ "resolved": "https://registry.npmjs.org/@turf/helpers/-/helpers-6.1.4.tgz",
+ "integrity": "sha512-vJvrdOZy1ngC7r3MDA7zIGSoIgyrkWcGnNIEaqn/APmw+bVLF2gAW7HIsdTxd12s5wQMqEpqIQrmrbRRZ0xC7g=="
+ },
+ "@turf/invariant": {
+ "version": "6.1.2",
+ "resolved": "https://registry.npmjs.org/@turf/invariant/-/invariant-6.1.2.tgz",
+ "integrity": "sha512-WU08Ph8j0J2jVGlQCKChXoCtI50BB3yEH21V++V0T4cR1T27HKCxkehV2sYMwTierfMBgjwSwDIsxnR4/2mWXg==",
+ "requires": {
+ "@turf/helpers": "6.1.4"
+ }
+ }
+ }
+ },
+ "@turf/clean-coords": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/clean-coords/-/clean-coords-5.1.5.tgz",
+ "integrity": "sha1-EoAKmKeMmkUqcuxChJPEOs8q2h8=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0"
+ }
+ },
+ "@turf/clone": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/clone/-/clone-5.1.5.tgz",
+ "integrity": "sha1-JT6NNUdxgZduM636tQoPAqfw42c=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ },
+ "@turf/clusters": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/clusters/-/clusters-5.1.5.tgz",
+ "integrity": "sha1-ZzpeXxsZycq6vFfJCO6t1oIiTdQ=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/meta": "5.2.0"
+ },
+ "dependencies": {
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ }
+ }
+ },
+ "@turf/clusters-dbscan": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/clusters-dbscan/-/clusters-dbscan-5.1.5.tgz",
+ "integrity": "sha1-V4H7TmVsdHoLjpk333MYHAMJ4m8=",
+ "requires": {
+ "@turf/clone": "5.1.5",
+ "@turf/distance": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0",
+ "@turf/meta": "5.2.0",
+ "density-clustering": "1.3.0"
+ },
+ "dependencies": {
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ }
+ }
+ },
+ "@turf/clusters-kmeans": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/clusters-kmeans/-/clusters-kmeans-5.1.5.tgz",
+ "integrity": "sha1-/W3+qLEzuovcI3CsPKzuFYejAvE=",
+ "requires": {
+ "@turf/clone": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0",
+ "@turf/meta": "5.2.0",
+ "skmeans": "0.9.7"
+ },
+ "dependencies": {
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ }
+ }
+ },
+ "@turf/collect": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/collect/-/collect-5.1.5.tgz",
+ "integrity": "sha1-/pjJqMIY7PJP/DPXApUXt8GbKj4=",
+ "requires": {
+ "@turf/bbox": "5.1.5",
+ "@turf/boolean-point-in-polygon": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "rbush": "2.0.2"
+ },
+ "dependencies": {
+ "@turf/bbox": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/bbox/-/bbox-5.1.5.tgz",
+ "integrity": "sha1-MFHfUUrUxQ9KT5uKLRX9i2hA7aM=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/meta": "5.2.0"
+ }
+ },
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ }
+ }
+ },
+ "@turf/combine": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/combine/-/combine-5.1.5.tgz",
+ "integrity": "sha1-uxS976VVBDVxlfwaEkzX1TqMiQU=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/meta": "5.2.0"
+ },
+ "dependencies": {
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ }
+ }
+ },
+ "@turf/concave": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/concave/-/concave-5.1.5.tgz",
+ "integrity": "sha1-I7uqw4fQNLlldKG9cNBZI3qdIRA=",
+ "requires": {
+ "@turf/clone": "5.1.5",
+ "@turf/distance": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0",
+ "@turf/meta": "5.2.0",
+ "@turf/tin": "5.1.5",
+ "topojson-client": "3.0.0",
+ "topojson-server": "3.0.0"
+ },
+ "dependencies": {
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ }
+ }
+ },
+ "@turf/convex": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/convex/-/convex-5.1.5.tgz",
+ "integrity": "sha1-Dfk3fdACIWzpghsH9wXgN9rj4B0=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/meta": "5.2.0",
+ "concaveman": "1.1.1"
+ },
+ "dependencies": {
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ }
+ }
+ },
+ "@turf/destination": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/destination/-/destination-5.1.5.tgz",
+ "integrity": "sha1-7TU4G9zoO73cvQei4rzivd/7zCY=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0"
+ }
+ },
+ "@turf/difference": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/difference/-/difference-5.1.5.tgz",
+ "integrity": "sha1-ok1pCnvKgD8QkKnuO52Qb8Q3H0I=",
+ "requires": {
+ "@turf/area": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0",
+ "@turf/meta": "5.2.0",
+ "turf-jsts": "1.2.3"
+ },
+ "dependencies": {
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ }
+ }
+ },
+ "@turf/dissolve": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/dissolve/-/dissolve-5.1.5.tgz",
+ "integrity": "sha1-LPEzqQIdIWODHD16lY1lB/nYGTg=",
+ "requires": {
+ "@turf/boolean-overlap": "5.1.5",
+ "@turf/clone": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0",
+ "@turf/line-intersect": "5.1.5",
+ "@turf/meta": "5.2.0",
+ "@turf/union": "5.1.5",
+ "geojson-rbush": "2.1.0",
+ "get-closest": "0.0.4"
+ },
+ "dependencies": {
+ "@turf/line-intersect": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/line-intersect/-/line-intersect-5.1.5.tgz",
+ "integrity": "sha1-DikHGuQDKV5JFyO8SfXPrI0R3fM=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0",
+ "@turf/line-segment": "5.1.5",
+ "@turf/meta": "5.2.0",
+ "geojson-rbush": "2.1.0"
+ }
+ },
+ "@turf/line-segment": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/line-segment/-/line-segment-5.1.5.tgz",
+ "integrity": "sha1-Mgeq7lRqskw9jcPMY/kcdwuAE+U=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0",
+ "@turf/meta": "5.2.0"
+ }
+ },
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ },
+ "geojson-rbush": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/geojson-rbush/-/geojson-rbush-2.1.0.tgz",
+ "integrity": "sha1-O9c745H8ELCuaT2bis6iquC4Oo0=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/meta": "5.2.0",
+ "rbush": "2.0.2"
+ }
+ }
+ }
+ },
+ "@turf/distance": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/distance/-/distance-5.1.5.tgz",
+ "integrity": "sha1-Oc8YIEu/h1h9cH5gmmARiQkVZAk=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0"
+ }
+ },
+ "@turf/ellipse": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/ellipse/-/ellipse-5.1.5.tgz",
+ "integrity": "sha1-1XyrhTmFkgzeYCKKeNgEWAJcVL4=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0",
+ "@turf/rhumb-destination": "5.1.5",
+ "@turf/transform-rotate": "5.1.5"
+ }
+ },
+ "@turf/envelope": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/envelope/-/envelope-5.1.5.tgz",
+ "integrity": "sha1-UBMwnFP91D369LWIplw/7X28EIo=",
+ "requires": {
+ "@turf/bbox": "5.1.5",
+ "@turf/bbox-polygon": "5.1.5",
+ "@turf/helpers": "5.1.5"
+ },
+ "dependencies": {
+ "@turf/bbox": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/bbox/-/bbox-5.1.5.tgz",
+ "integrity": "sha1-MFHfUUrUxQ9KT5uKLRX9i2hA7aM=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/meta": "5.2.0"
+ }
+ },
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ }
+ }
+ },
+ "@turf/explode": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/explode/-/explode-5.1.5.tgz",
+ "integrity": "sha1-sSsvd0AEobSPYrqVsgocZVo94Rg=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/meta": "5.2.0"
+ },
+ "dependencies": {
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ }
+ }
+ },
+ "@turf/flatten": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/flatten/-/flatten-5.1.5.tgz",
+ "integrity": "sha1-2iknBnEz7WFpsLnWB7khVoiqE1g=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/meta": "5.2.0"
+ },
+ "dependencies": {
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ }
+ }
+ },
+ "@turf/flip": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/flip/-/flip-5.1.5.tgz",
+ "integrity": "sha1-Q29kOnIvDKU7n85jjkaT2zYIpoo=",
+ "requires": {
+ "@turf/clone": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/meta": "5.2.0"
+ },
+ "dependencies": {
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ }
+ }
+ },
+ "@turf/great-circle": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/great-circle/-/great-circle-5.1.5.tgz",
+ "integrity": "sha1-3r+2cc5HVQnLY3MBwV/PzPo1mpM=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0"
+ }
+ },
+ "@turf/helpers": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/helpers/-/helpers-5.1.5.tgz",
+ "integrity": "sha1-FTQFInq5M9AEpbuWQantmZ/L4M8="
+ },
+ "@turf/hex-grid": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/hex-grid/-/hex-grid-5.1.5.tgz",
+ "integrity": "sha1-m3ul/s9QUfHoWJL3E/zlxVBQKmo=",
+ "requires": {
+ "@turf/distance": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/intersect": "5.1.6",
+ "@turf/invariant": "5.2.0"
+ }
+ },
+ "@turf/inside": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/@turf/inside/-/inside-4.1.0.tgz",
+ "integrity": "sha1-0zIidYVLcxxNeP/AaFbcWbEgCYU=",
+ "requires": {
+ "@turf/invariant": "4.7.3"
+ },
+ "dependencies": {
+ "@turf/invariant": {
+ "version": "4.7.3",
+ "resolved": "https://registry.npmjs.org/@turf/invariant/-/invariant-4.7.3.tgz",
+ "integrity": "sha1-U482fSPBE/yEnXDJpSS4Vjh0YB0="
+ }
+ }
+ },
+ "@turf/interpolate": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/interpolate/-/interpolate-5.1.5.tgz",
+ "integrity": "sha1-DxLwq3VtbdEK+ykMpuh3ve8BPqo=",
+ "requires": {
+ "@turf/bbox": "5.1.5",
+ "@turf/centroid": "5.1.5",
+ "@turf/clone": "5.1.5",
+ "@turf/distance": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/hex-grid": "5.1.5",
+ "@turf/invariant": "5.2.0",
+ "@turf/meta": "5.2.0",
+ "@turf/point-grid": "5.1.5",
+ "@turf/square-grid": "5.1.5",
+ "@turf/triangle-grid": "5.1.5"
+ },
+ "dependencies": {
+ "@turf/bbox": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/bbox/-/bbox-5.1.5.tgz",
+ "integrity": "sha1-MFHfUUrUxQ9KT5uKLRX9i2hA7aM=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/meta": "5.2.0"
+ }
+ },
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ }
+ }
+ },
+ "@turf/intersect": {
+ "version": "5.1.6",
+ "resolved": "https://registry.npmjs.org/@turf/intersect/-/intersect-5.1.6.tgz",
+ "integrity": "sha512-KXyNv/GXdoGAOy03qZF53rgtXC2tNhF/4jLwTKiVRrBQH6kcEpipGStdJ+QkYIlarQPa8f7I9UlVAB19et4MfQ==",
+ "requires": {
+ "@turf/clean-coords": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0",
+ "@turf/truncate": "5.1.5",
+ "turf-jsts": "1.2.3"
+ }
+ },
+ "@turf/invariant": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/invariant/-/invariant-5.2.0.tgz",
+ "integrity": "sha1-8BUP9ykLOFd7c9CIt5MsHuCqkKc=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ },
+ "@turf/isobands": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/isobands/-/isobands-5.1.5.tgz",
+ "integrity": "sha1-a0TO9YTVUaMTBBh68jtKFYLj8I0=",
+ "requires": {
+ "@turf/area": "5.1.5",
+ "@turf/bbox": "5.1.5",
+ "@turf/boolean-point-in-polygon": "5.1.5",
+ "@turf/explode": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0",
+ "@turf/meta": "5.2.0"
+ },
+ "dependencies": {
+ "@turf/bbox": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/bbox/-/bbox-5.1.5.tgz",
+ "integrity": "sha1-MFHfUUrUxQ9KT5uKLRX9i2hA7aM=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/meta": "5.2.0"
+ }
+ },
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ }
+ }
+ },
+ "@turf/isolines": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/isolines/-/isolines-5.1.5.tgz",
+ "integrity": "sha1-irTn9Cuz38VGFOW/FVln9+VdLeE=",
+ "requires": {
+ "@turf/bbox": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0",
+ "@turf/meta": "5.2.0"
+ },
+ "dependencies": {
+ "@turf/bbox": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/bbox/-/bbox-5.1.5.tgz",
+ "integrity": "sha1-MFHfUUrUxQ9KT5uKLRX9i2hA7aM=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/meta": "5.2.0"
+ }
+ },
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ }
+ }
+ },
+ "@turf/kinks": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/kinks/-/kinks-5.1.5.tgz",
+ "integrity": "sha1-irtpYdm7AQchO63fLCwmQNAlaYA=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ },
+ "@turf/length": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/length/-/length-5.1.5.tgz",
+ "integrity": "sha1-86X4ZMK5lqi7RxeUU1ofrxLuvvs=",
+ "requires": {
+ "@turf/distance": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/meta": "5.2.0"
+ },
+ "dependencies": {
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ }
+ }
+ },
+ "@turf/line-arc": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/line-arc/-/line-arc-5.1.5.tgz",
+ "integrity": "sha1-AHinRHg1oSrkFKIR+aZNEYYVDhU=",
+ "requires": {
+ "@turf/circle": "5.1.5",
+ "@turf/destination": "5.1.5",
+ "@turf/helpers": "5.1.5"
+ },
+ "dependencies": {
+ "@turf/circle": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/circle/-/circle-5.1.5.tgz",
+ "integrity": "sha1-mxV3g1UIq1L7HBCypQZcuiuHtqU=",
+ "requires": {
+ "@turf/destination": "5.1.5",
+ "@turf/helpers": "5.1.5"
+ }
+ }
+ }
+ },
+ "@turf/line-chunk": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/line-chunk/-/line-chunk-5.1.5.tgz",
+ "integrity": "sha1-kQqFwFwG2dD5w4l3oF4IGNUIXEI=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/length": "5.1.5",
+ "@turf/line-slice-along": "5.1.5",
+ "@turf/meta": "5.2.0"
+ },
+ "dependencies": {
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ }
+ }
+ },
+ "@turf/line-intersect": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/@turf/line-intersect/-/line-intersect-4.1.0.tgz",
+ "integrity": "sha1-GvjT1w0mPgJf41tBuGWmJlCLSoQ=",
+ "requires": {
+ "@turf/helpers": "4.7.3",
+ "@turf/invariant": "4.7.3",
+ "@turf/line-segment": "4.7.3",
+ "@turf/meta": "4.7.4",
+ "geojson-rbush": "1.2.0"
+ },
+ "dependencies": {
+ "@turf/helpers": {
+ "version": "4.7.3",
+ "resolved": "https://registry.npmjs.org/@turf/helpers/-/helpers-4.7.3.tgz",
+ "integrity": "sha1-vDEqxDyrPFMqSDFRxMOCxWSUKek="
+ },
+ "@turf/invariant": {
+ "version": "4.7.3",
+ "resolved": "https://registry.npmjs.org/@turf/invariant/-/invariant-4.7.3.tgz",
+ "integrity": "sha1-U482fSPBE/yEnXDJpSS4Vjh0YB0="
+ }
+ }
+ },
+ "@turf/line-offset": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/line-offset/-/line-offset-5.1.5.tgz",
+ "integrity": "sha1-KrWy8In4yRPiMdmUN4553KkLWh4=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0",
+ "@turf/meta": "5.2.0"
+ },
+ "dependencies": {
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ }
+ }
+ },
+ "@turf/line-overlap": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/line-overlap/-/line-overlap-5.1.5.tgz",
+ "integrity": "sha1-lDxvh6A4bcQ9+sEdKz/5wRLNP2A=",
+ "requires": {
+ "@turf/boolean-point-on-line": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0",
+ "@turf/line-segment": "5.1.5",
+ "@turf/meta": "5.2.0",
+ "@turf/nearest-point-on-line": "5.1.5",
+ "geojson-rbush": "2.1.0"
+ },
+ "dependencies": {
+ "@turf/line-segment": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/line-segment/-/line-segment-5.1.5.tgz",
+ "integrity": "sha1-Mgeq7lRqskw9jcPMY/kcdwuAE+U=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0",
+ "@turf/meta": "5.2.0"
+ }
+ },
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ },
+ "geojson-rbush": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/geojson-rbush/-/geojson-rbush-2.1.0.tgz",
+ "integrity": "sha1-O9c745H8ELCuaT2bis6iquC4Oo0=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/meta": "5.2.0",
+ "rbush": "2.0.2"
+ }
+ }
+ }
+ },
+ "@turf/line-segment": {
+ "version": "4.7.3",
+ "resolved": "https://registry.npmjs.org/@turf/line-segment/-/line-segment-4.7.3.tgz",
+ "integrity": "sha1-dx9x+mU9jmu8Wo2JIoMWPpSzTXo=",
+ "requires": {
+ "@turf/helpers": "4.7.3",
+ "@turf/invariant": "4.7.3",
+ "@turf/meta": "4.7.4"
+ },
+ "dependencies": {
+ "@turf/helpers": {
+ "version": "4.7.3",
+ "resolved": "https://registry.npmjs.org/@turf/helpers/-/helpers-4.7.3.tgz",
+ "integrity": "sha1-vDEqxDyrPFMqSDFRxMOCxWSUKek="
+ },
+ "@turf/invariant": {
+ "version": "4.7.3",
+ "resolved": "https://registry.npmjs.org/@turf/invariant/-/invariant-4.7.3.tgz",
+ "integrity": "sha1-U482fSPBE/yEnXDJpSS4Vjh0YB0="
+ }
+ }
+ },
+ "@turf/line-slice": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/line-slice/-/line-slice-5.1.5.tgz",
+ "integrity": "sha1-Hs/OFGKjeFeXVM7fRGTN4mgp8rU=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0",
+ "@turf/nearest-point-on-line": "5.1.5"
+ }
+ },
+ "@turf/line-slice-along": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/line-slice-along/-/line-slice-along-5.1.5.tgz",
+ "integrity": "sha1-7drQoh70efKWihG9LdcomiEy6aU=",
+ "requires": {
+ "@turf/bearing": "5.1.5",
+ "@turf/destination": "5.1.5",
+ "@turf/distance": "5.1.5",
+ "@turf/helpers": "5.1.5"
+ }
+ },
+ "@turf/line-split": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/line-split/-/line-split-5.1.5.tgz",
+ "integrity": "sha1-Wy30w3YZty73JbUWPPmSbVVArLc=",
+ "requires": {
+ "@turf/bbox": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0",
+ "@turf/line-intersect": "5.1.5",
+ "@turf/line-segment": "5.1.5",
+ "@turf/meta": "5.2.0",
+ "@turf/nearest-point-on-line": "5.1.5",
+ "@turf/square": "5.1.5",
+ "@turf/truncate": "5.1.5",
+ "geojson-rbush": "2.1.0"
+ },
+ "dependencies": {
+ "@turf/bbox": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/bbox/-/bbox-5.1.5.tgz",
+ "integrity": "sha1-MFHfUUrUxQ9KT5uKLRX9i2hA7aM=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/meta": "5.2.0"
+ }
+ },
+ "@turf/line-intersect": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/line-intersect/-/line-intersect-5.1.5.tgz",
+ "integrity": "sha1-DikHGuQDKV5JFyO8SfXPrI0R3fM=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0",
+ "@turf/line-segment": "5.1.5",
+ "@turf/meta": "5.2.0",
+ "geojson-rbush": "2.1.0"
+ }
+ },
+ "@turf/line-segment": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/line-segment/-/line-segment-5.1.5.tgz",
+ "integrity": "sha1-Mgeq7lRqskw9jcPMY/kcdwuAE+U=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0",
+ "@turf/meta": "5.2.0"
+ }
+ },
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ },
+ "geojson-rbush": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/geojson-rbush/-/geojson-rbush-2.1.0.tgz",
+ "integrity": "sha1-O9c745H8ELCuaT2bis6iquC4Oo0=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/meta": "5.2.0",
+ "rbush": "2.0.2"
+ }
+ }
+ }
+ },
+ "@turf/line-to-polygon": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/line-to-polygon/-/line-to-polygon-5.1.5.tgz",
+ "integrity": "sha1-ITz0Gmj4Ikd4ujnTGH3sPouBhlo=",
+ "requires": {
+ "@turf/bbox": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0"
+ },
+ "dependencies": {
+ "@turf/bbox": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/bbox/-/bbox-5.1.5.tgz",
+ "integrity": "sha1-MFHfUUrUxQ9KT5uKLRX9i2hA7aM=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/meta": "5.2.0"
+ }
+ },
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ }
+ }
+ },
+ "@turf/mask": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/mask/-/mask-5.1.5.tgz",
+ "integrity": "sha1-mrD+8aJyyY/j70kvn/thggayQtU=",
+ "requires": {
+ "@turf/bbox": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/meta": "5.2.0",
+ "@turf/union": "5.1.5",
+ "rbush": "2.0.2"
+ },
+ "dependencies": {
+ "@turf/bbox": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/bbox/-/bbox-5.1.5.tgz",
+ "integrity": "sha1-MFHfUUrUxQ9KT5uKLRX9i2hA7aM=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/meta": "5.2.0"
+ }
+ },
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ }
+ }
+ },
+ "@turf/meta": {
+ "version": "4.7.4",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-4.7.4.tgz",
+ "integrity": "sha1-beLx6YkLj2S2aeS0fAmyCJMGOXc="
+ },
+ "@turf/midpoint": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/midpoint/-/midpoint-5.1.5.tgz",
+ "integrity": "sha1-4mH2srDqgSTM7/VSomLdRlydBfA=",
+ "requires": {
+ "@turf/bearing": "5.1.5",
+ "@turf/destination": "5.1.5",
+ "@turf/distance": "5.1.5",
+ "@turf/helpers": "5.1.5"
+ }
+ },
+ "@turf/nearest-point": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/nearest-point/-/nearest-point-5.1.5.tgz",
+ "integrity": "sha1-EgUN5Bw5hEMiTHl43g9iE5ANNPs=",
+ "requires": {
+ "@turf/clone": "5.1.5",
+ "@turf/distance": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/meta": "5.2.0"
+ },
+ "dependencies": {
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ }
+ }
+ },
+ "@turf/nearest-point-on-line": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/nearest-point-on-line/-/nearest-point-on-line-5.1.5.tgz",
+ "integrity": "sha1-VgauKX8VlHUkvqUaKp71HsG/nDY=",
+ "requires": {
+ "@turf/bearing": "5.1.5",
+ "@turf/destination": "5.1.5",
+ "@turf/distance": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0",
+ "@turf/line-intersect": "5.1.5",
+ "@turf/meta": "5.2.0"
+ },
+ "dependencies": {
+ "@turf/line-intersect": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/line-intersect/-/line-intersect-5.1.5.tgz",
+ "integrity": "sha1-DikHGuQDKV5JFyO8SfXPrI0R3fM=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0",
+ "@turf/line-segment": "5.1.5",
+ "@turf/meta": "5.2.0",
+ "geojson-rbush": "2.1.0"
+ }
+ },
+ "@turf/line-segment": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/line-segment/-/line-segment-5.1.5.tgz",
+ "integrity": "sha1-Mgeq7lRqskw9jcPMY/kcdwuAE+U=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0",
+ "@turf/meta": "5.2.0"
+ }
+ },
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ },
+ "geojson-rbush": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/geojson-rbush/-/geojson-rbush-2.1.0.tgz",
+ "integrity": "sha1-O9c745H8ELCuaT2bis6iquC4Oo0=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/meta": "5.2.0",
+ "rbush": "2.0.2"
+ }
+ }
+ }
+ },
+ "@turf/nearest-point-to-line": {
+ "version": "5.1.6",
+ "resolved": "https://registry.npmjs.org/@turf/nearest-point-to-line/-/nearest-point-to-line-5.1.6.tgz",
+ "integrity": "sha512-ZSvDIEiHhifn/vNwLXZI/E8xmEz5yBPqfUR7BVHRZrB1cP7jLhKZvkbidjG//uW8Fr1Ulc+PFOXczLspIcx/lw==",
+ "requires": {
+ "@turf/helpers": "6.1.4",
+ "@turf/invariant": "6.1.2",
+ "@turf/meta": "6.0.2",
+ "@turf/point-to-line-distance": "5.1.6",
+ "object-assign": "4.1.1"
+ },
+ "dependencies": {
+ "@turf/helpers": {
+ "version": "6.1.4",
+ "resolved": "https://registry.npmjs.org/@turf/helpers/-/helpers-6.1.4.tgz",
+ "integrity": "sha512-vJvrdOZy1ngC7r3MDA7zIGSoIgyrkWcGnNIEaqn/APmw+bVLF2gAW7HIsdTxd12s5wQMqEpqIQrmrbRRZ0xC7g=="
+ },
+ "@turf/invariant": {
+ "version": "6.1.2",
+ "resolved": "https://registry.npmjs.org/@turf/invariant/-/invariant-6.1.2.tgz",
+ "integrity": "sha512-WU08Ph8j0J2jVGlQCKChXoCtI50BB3yEH21V++V0T4cR1T27HKCxkehV2sYMwTierfMBgjwSwDIsxnR4/2mWXg==",
+ "requires": {
+ "@turf/helpers": "6.1.4"
+ }
+ },
+ "@turf/meta": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-6.0.2.tgz",
+ "integrity": "sha512-VA7HJkx7qF1l3+GNGkDVn2oXy4+QoLP6LktXAaZKjuT1JI0YESat7quUkbCMy4zP9lAUuvS4YMslLyTtr919FA==",
+ "requires": {
+ "@turf/helpers": "6.1.4"
+ }
+ }
+ }
+ },
+ "@turf/planepoint": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/planepoint/-/planepoint-5.1.5.tgz",
+ "integrity": "sha1-GLvfAG91ne9eQsagBsn53oGyt/8=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0"
+ }
+ },
+ "@turf/point-grid": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/point-grid/-/point-grid-5.1.5.tgz",
+ "integrity": "sha1-MFFBJI9Quv42zn5mukuX56sjaIc=",
+ "requires": {
+ "@turf/boolean-within": "5.1.5",
+ "@turf/distance": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0"
+ }
+ },
+ "@turf/point-on-feature": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/point-on-feature/-/point-on-feature-5.1.5.tgz",
+ "integrity": "sha1-MMfwMkMCd8ZBjZbSieRba/shP+c=",
+ "requires": {
+ "@turf/boolean-point-in-polygon": "5.1.5",
+ "@turf/center": "5.1.5",
+ "@turf/explode": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/nearest-point": "5.1.5"
+ }
+ },
+ "@turf/point-to-line-distance": {
+ "version": "5.1.6",
+ "resolved": "https://registry.npmjs.org/@turf/point-to-line-distance/-/point-to-line-distance-5.1.6.tgz",
+ "integrity": "sha512-PE3hiTeeDEi4ZLPtI8XAzFYW9nHo1EVsZGm/4ZVV8jo39d3X1oLVHxY3e1PkCmWwRapXy4QLqvnTQ7nU4wspNw==",
+ "requires": {
+ "@turf/bearing": "6.0.1",
+ "@turf/distance": "6.0.1",
+ "@turf/helpers": "6.1.4",
+ "@turf/invariant": "6.1.2",
+ "@turf/meta": "6.0.2",
+ "@turf/projection": "6.0.1",
+ "@turf/rhumb-bearing": "6.0.1",
+ "@turf/rhumb-distance": "6.0.1"
+ },
+ "dependencies": {
+ "@turf/bearing": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/@turf/bearing/-/bearing-6.0.1.tgz",
+ "integrity": "sha512-mXY1NozqV9EFfBTbUItujwfqfQF0G/Xe2fzvnZle90ekPEUfhi4Dgf5JswJTd96J9LiT8kcd6Jonp5khnx0wIg==",
+ "requires": {
+ "@turf/helpers": "6.1.4",
+ "@turf/invariant": "6.1.2"
+ }
+ },
+ "@turf/clone": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/@turf/clone/-/clone-6.0.2.tgz",
+ "integrity": "sha512-UVpYPnW3wRj3bPncR6Z2PRbowBk+nEdVWgGewPxrKKLfvswtVtG9n/OIyvbU3E3ZOadBVxTH2uAMEMOz4800FA==",
+ "requires": {
+ "@turf/helpers": "6.1.4"
+ }
+ },
+ "@turf/distance": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/@turf/distance/-/distance-6.0.1.tgz",
+ "integrity": "sha512-q7t7rWIWfkg7MP1Vt4uLjSEhe5rPfCO2JjpKmk7JC+QZKEQkuvHEqy3ejW1iC7Kw5ZcZNR3qdMGGz+6HnVwqvg==",
+ "requires": {
+ "@turf/helpers": "6.1.4",
+ "@turf/invariant": "6.1.2"
+ }
+ },
+ "@turf/helpers": {
+ "version": "6.1.4",
+ "resolved": "https://registry.npmjs.org/@turf/helpers/-/helpers-6.1.4.tgz",
+ "integrity": "sha512-vJvrdOZy1ngC7r3MDA7zIGSoIgyrkWcGnNIEaqn/APmw+bVLF2gAW7HIsdTxd12s5wQMqEpqIQrmrbRRZ0xC7g=="
+ },
+ "@turf/invariant": {
+ "version": "6.1.2",
+ "resolved": "https://registry.npmjs.org/@turf/invariant/-/invariant-6.1.2.tgz",
+ "integrity": "sha512-WU08Ph8j0J2jVGlQCKChXoCtI50BB3yEH21V++V0T4cR1T27HKCxkehV2sYMwTierfMBgjwSwDIsxnR4/2mWXg==",
+ "requires": {
+ "@turf/helpers": "6.1.4"
+ }
+ },
+ "@turf/meta": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-6.0.2.tgz",
+ "integrity": "sha512-VA7HJkx7qF1l3+GNGkDVn2oXy4+QoLP6LktXAaZKjuT1JI0YESat7quUkbCMy4zP9lAUuvS4YMslLyTtr919FA==",
+ "requires": {
+ "@turf/helpers": "6.1.4"
+ }
+ },
+ "@turf/projection": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/@turf/projection/-/projection-6.0.1.tgz",
+ "integrity": "sha512-Y3RvGT6I53MjYKLG69e9sMk45wJXcLbrEO1t6P3WQQQGqA2gYhhMJyV41vE2Z2llrJpvs2dDx/tIeQzGd0HHMQ==",
+ "requires": {
+ "@turf/clone": "6.0.2",
+ "@turf/helpers": "6.1.4",
+ "@turf/meta": "6.0.2"
+ }
+ },
+ "@turf/rhumb-bearing": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/@turf/rhumb-bearing/-/rhumb-bearing-6.0.1.tgz",
+ "integrity": "sha512-MVBra8OVfjM4+/N0B3o6cBIYg9p/uRKzA9uk05RfrzasEbUL1vdD23LkTooVL74Yw4UxL8BQD9hS5Re2COJFDA==",
+ "requires": {
+ "@turf/helpers": "6.1.4",
+ "@turf/invariant": "6.1.2"
+ }
+ },
+ "@turf/rhumb-distance": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/@turf/rhumb-distance/-/rhumb-distance-6.0.1.tgz",
+ "integrity": "sha512-3G45DQtQByzzfHFPcCyJdUZFwsd45zfZ7sAb1ddF7mhEj4G70+T2G3GKjInymqDNrbyh2gbG6wQiZSToC8Uf9g==",
+ "requires": {
+ "@turf/helpers": "6.1.4",
+ "@turf/invariant": "6.1.2"
+ }
+ }
+ }
+ },
+ "@turf/points-within-polygon": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/points-within-polygon/-/points-within-polygon-5.1.5.tgz",
+ "integrity": "sha1-K4VaXfOq2lfC7oIKB1SrlJKKIzc=",
+ "requires": {
+ "@turf/boolean-point-in-polygon": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/meta": "5.2.0"
+ },
+ "dependencies": {
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ }
+ }
+ },
+ "@turf/polygon-tangents": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/polygon-tangents/-/polygon-tangents-5.1.5.tgz",
+ "integrity": "sha1-K/AJkUcwJbF44lDcfLmuVAm71lI=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0"
+ }
+ },
+ "@turf/polygon-to-line": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/polygon-to-line/-/polygon-to-line-5.1.5.tgz",
+ "integrity": "sha1-I7tEjYTcTGUZmaxhGjbZHFklA2o=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0"
+ }
+ },
+ "@turf/polygon-to-linestring": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/@turf/polygon-to-linestring/-/polygon-to-linestring-4.1.0.tgz",
+ "integrity": "sha1-THE9SUG9iKauaGgXNv1WJZbyPhU=",
+ "requires": {
+ "@turf/helpers": "4.7.3",
+ "@turf/invariant": "4.7.3"
+ },
+ "dependencies": {
+ "@turf/helpers": {
+ "version": "4.7.3",
+ "resolved": "https://registry.npmjs.org/@turf/helpers/-/helpers-4.7.3.tgz",
+ "integrity": "sha1-vDEqxDyrPFMqSDFRxMOCxWSUKek="
+ },
+ "@turf/invariant": {
+ "version": "4.7.3",
+ "resolved": "https://registry.npmjs.org/@turf/invariant/-/invariant-4.7.3.tgz",
+ "integrity": "sha1-U482fSPBE/yEnXDJpSS4Vjh0YB0="
+ }
+ }
+ },
+ "@turf/polygonize": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/polygonize/-/polygonize-5.1.5.tgz",
+ "integrity": "sha1-BJP6EYefOdELmtAs5qI+lC0IqjI=",
+ "requires": {
+ "@turf/boolean-point-in-polygon": "5.1.5",
+ "@turf/envelope": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0",
+ "@turf/meta": "5.2.0"
+ },
+ "dependencies": {
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ }
+ }
+ },
+ "@turf/projection": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/projection/-/projection-5.1.5.tgz",
+ "integrity": "sha1-JFF+7rLzaBa6n3EueubWo2jt91c=",
+ "requires": {
+ "@turf/clone": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/meta": "5.2.0"
+ },
+ "dependencies": {
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ }
+ }
+ },
+ "@turf/random": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/random/-/random-5.1.5.tgz",
+ "integrity": "sha1-sy78k0Vgroulfo67UfJBw5+6Lns=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ },
+ "@turf/rewind": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/rewind/-/rewind-5.1.5.tgz",
+ "integrity": "sha1-nqPbSmi3PB/R3RH1djGxQ8/vock=",
+ "requires": {
+ "@turf/boolean-clockwise": "5.1.5",
+ "@turf/clone": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0",
+ "@turf/meta": "5.2.0"
+ },
+ "dependencies": {
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ }
+ }
+ },
+ "@turf/rhumb-bearing": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/rhumb-bearing/-/rhumb-bearing-5.1.5.tgz",
+ "integrity": "sha1-rPalAkJ+uMSeGM2mrg7/qwxd3NI=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0"
+ }
+ },
+ "@turf/rhumb-destination": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/rhumb-destination/-/rhumb-destination-5.1.5.tgz",
+ "integrity": "sha1-sbKuuSFUfyrAwamUtqEw+SRjx0I=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0"
+ }
+ },
+ "@turf/rhumb-distance": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/rhumb-distance/-/rhumb-distance-5.1.5.tgz",
+ "integrity": "sha1-GAaFdiX0IlOE2tQT5p85U4/192U=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0"
+ }
+ },
+ "@turf/sample": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/sample/-/sample-5.1.5.tgz",
+ "integrity": "sha1-6ctEikeJzFbuPeLdZ4HiNDQ1tBE=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ },
+ "@turf/sector": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/sector/-/sector-5.1.5.tgz",
+ "integrity": "sha1-rCu5TBPt1gNPb9wrZwCBNdIPXgc=",
+ "requires": {
+ "@turf/circle": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0",
+ "@turf/line-arc": "5.1.5",
+ "@turf/meta": "5.2.0"
+ },
+ "dependencies": {
+ "@turf/circle": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/circle/-/circle-5.1.5.tgz",
+ "integrity": "sha1-mxV3g1UIq1L7HBCypQZcuiuHtqU=",
+ "requires": {
+ "@turf/destination": "5.1.5",
+ "@turf/helpers": "5.1.5"
+ }
+ },
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ }
+ }
+ },
+ "@turf/shortest-path": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/shortest-path/-/shortest-path-5.1.5.tgz",
+ "integrity": "sha1-hUroCW9rw+EwD6ynfz6PZ9j5Nas=",
+ "requires": {
+ "@turf/bbox": "5.1.5",
+ "@turf/bbox-polygon": "5.1.5",
+ "@turf/boolean-point-in-polygon": "5.1.5",
+ "@turf/clean-coords": "5.1.5",
+ "@turf/distance": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0",
+ "@turf/meta": "5.2.0",
+ "@turf/transform-scale": "5.1.5"
+ },
+ "dependencies": {
+ "@turf/bbox": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/bbox/-/bbox-5.1.5.tgz",
+ "integrity": "sha1-MFHfUUrUxQ9KT5uKLRX9i2hA7aM=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/meta": "5.2.0"
+ }
+ },
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ }
+ }
+ },
+ "@turf/simplify": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/simplify/-/simplify-5.1.5.tgz",
+ "integrity": "sha1-Csjyei60IYGD7dmZjDJ1q+QIuSY=",
+ "requires": {
+ "@turf/clean-coords": "5.1.5",
+ "@turf/clone": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/meta": "5.2.0"
+ },
+ "dependencies": {
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ }
+ }
+ },
+ "@turf/square": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/square/-/square-5.1.5.tgz",
+ "integrity": "sha1-qnsh5gM8ySUsOlvW89iNq9b+0YA=",
+ "requires": {
+ "@turf/distance": "5.1.5",
+ "@turf/helpers": "5.1.5"
+ }
+ },
+ "@turf/square-grid": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/square-grid/-/square-grid-5.1.5.tgz",
+ "integrity": "sha1-G9X3uesU8LYLwjH+/nNR0aMvGlE=",
+ "requires": {
+ "@turf/boolean-contains": "5.1.5",
+ "@turf/boolean-overlap": "5.1.5",
+ "@turf/distance": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/intersect": "5.1.6",
"@turf/invariant": "5.2.0"
}
},
- "@turf/helpers": {
+ "@turf/standard-deviational-ellipse": {
"version": "5.1.5",
- "resolved": "https://registry.npmjs.org/@turf/helpers/-/helpers-5.1.5.tgz",
- "integrity": "sha1-FTQFInq5M9AEpbuWQantmZ/L4M8="
+ "resolved": "https://registry.npmjs.org/@turf/standard-deviational-ellipse/-/standard-deviational-ellipse-5.1.5.tgz",
+ "integrity": "sha1-hc0oO14ayljyG9ZkEuQUtW2FIyQ=",
+ "requires": {
+ "@turf/center-mean": "5.1.5",
+ "@turf/ellipse": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0",
+ "@turf/meta": "5.2.0",
+ "@turf/points-within-polygon": "5.1.5"
+ },
+ "dependencies": {
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ }
+ }
},
- "@turf/inside": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/@turf/inside/-/inside-4.1.0.tgz",
- "integrity": "sha1-0zIidYVLcxxNeP/AaFbcWbEgCYU=",
+ "@turf/tag": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/tag/-/tag-5.1.5.tgz",
+ "integrity": "sha1-0e4aUIjs/UoUEQGcmCOczypJfSA=",
"requires": {
- "@turf/invariant": "4.7.3"
+ "@turf/boolean-point-in-polygon": "5.1.5",
+ "@turf/clone": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/meta": "5.2.0"
},
"dependencies": {
- "@turf/invariant": {
- "version": "4.7.3",
- "resolved": "https://registry.npmjs.org/@turf/invariant/-/invariant-4.7.3.tgz",
- "integrity": "sha1-U482fSPBE/yEnXDJpSS4Vjh0YB0="
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
}
}
},
- "@turf/invariant": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/@turf/invariant/-/invariant-5.2.0.tgz",
- "integrity": "sha1-8BUP9ykLOFd7c9CIt5MsHuCqkKc=",
+ "@turf/tesselate": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/tesselate/-/tesselate-5.1.5.tgz",
+ "integrity": "sha1-MqWU6cIaAEIKn5DSxD3z4RZgYc0=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "earcut": "2.1.5"
+ }
+ },
+ "@turf/tin": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/tin/-/tin-5.1.5.tgz",
+ "integrity": "sha1-KCI+r8X76a6azKgc3P6l0UJMkX0=",
"requires": {
"@turf/helpers": "5.1.5"
}
},
- "@turf/line-intersect": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/@turf/line-intersect/-/line-intersect-4.1.0.tgz",
- "integrity": "sha1-GvjT1w0mPgJf41tBuGWmJlCLSoQ=",
+ "@turf/transform-rotate": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/transform-rotate/-/transform-rotate-5.1.5.tgz",
+ "integrity": "sha1-0Jbt2eMA/jFQadVNjkWMQJIh7fs=",
"requires": {
- "@turf/helpers": "4.7.3",
- "@turf/invariant": "4.7.3",
- "@turf/line-segment": "4.7.3",
- "@turf/meta": "4.7.4",
- "geojson-rbush": "1.2.0"
+ "@turf/centroid": "5.1.5",
+ "@turf/clone": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0",
+ "@turf/meta": "5.2.0",
+ "@turf/rhumb-bearing": "5.1.5",
+ "@turf/rhumb-destination": "5.1.5",
+ "@turf/rhumb-distance": "5.1.5"
},
"dependencies": {
- "@turf/helpers": {
- "version": "4.7.3",
- "resolved": "https://registry.npmjs.org/@turf/helpers/-/helpers-4.7.3.tgz",
- "integrity": "sha1-vDEqxDyrPFMqSDFRxMOCxWSUKek="
- },
- "@turf/invariant": {
- "version": "4.7.3",
- "resolved": "https://registry.npmjs.org/@turf/invariant/-/invariant-4.7.3.tgz",
- "integrity": "sha1-U482fSPBE/yEnXDJpSS4Vjh0YB0="
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
}
}
},
- "@turf/line-overlap": {
+ "@turf/transform-scale": {
"version": "5.1.5",
- "resolved": "https://registry.npmjs.org/@turf/line-overlap/-/line-overlap-5.1.5.tgz",
- "integrity": "sha1-lDxvh6A4bcQ9+sEdKz/5wRLNP2A=",
+ "resolved": "https://registry.npmjs.org/@turf/transform-scale/-/transform-scale-5.1.5.tgz",
+ "integrity": "sha1-cP064BhWz3uunxWtVhzf6PiQAbk=",
"requires": {
- "@turf/boolean-point-on-line": "5.1.5",
+ "@turf/bbox": "5.1.5",
+ "@turf/center": "5.1.5",
+ "@turf/centroid": "5.1.5",
+ "@turf/clone": "5.1.5",
"@turf/helpers": "5.1.5",
"@turf/invariant": "5.2.0",
- "@turf/line-segment": "5.1.5",
"@turf/meta": "5.2.0",
- "@turf/nearest-point-on-line": "5.1.5",
- "geojson-rbush": "2.1.0"
+ "@turf/rhumb-bearing": "5.1.5",
+ "@turf/rhumb-destination": "5.1.5",
+ "@turf/rhumb-distance": "5.1.5"
},
"dependencies": {
- "@turf/line-segment": {
+ "@turf/bbox": {
"version": "5.1.5",
- "resolved": "https://registry.npmjs.org/@turf/line-segment/-/line-segment-5.1.5.tgz",
- "integrity": "sha1-Mgeq7lRqskw9jcPMY/kcdwuAE+U=",
+ "resolved": "https://registry.npmjs.org/@turf/bbox/-/bbox-5.1.5.tgz",
+ "integrity": "sha1-MFHfUUrUxQ9KT5uKLRX9i2hA7aM=",
"requires": {
"@turf/helpers": "5.1.5",
- "@turf/invariant": "5.2.0",
"@turf/meta": "5.2.0"
}
},
@@ -321,69 +2200,203 @@
"requires": {
"@turf/helpers": "5.1.5"
}
- },
- "geojson-rbush": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/geojson-rbush/-/geojson-rbush-2.1.0.tgz",
- "integrity": "sha1-O9c745H8ELCuaT2bis6iquC4Oo0=",
- "requires": {
- "@turf/helpers": "5.1.5",
- "@turf/meta": "5.2.0",
- "rbush": "2.0.2"
- }
}
}
},
- "@turf/line-segment": {
- "version": "4.7.3",
- "resolved": "https://registry.npmjs.org/@turf/line-segment/-/line-segment-4.7.3.tgz",
- "integrity": "sha1-dx9x+mU9jmu8Wo2JIoMWPpSzTXo=",
+ "@turf/transform-translate": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/transform-translate/-/transform-translate-5.1.5.tgz",
+ "integrity": "sha1-Uwolf7Hccmja3Ks05nkB6yo97GM=",
"requires": {
- "@turf/helpers": "4.7.3",
- "@turf/invariant": "4.7.3",
- "@turf/meta": "4.7.4"
+ "@turf/clone": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0",
+ "@turf/meta": "5.2.0",
+ "@turf/rhumb-destination": "5.1.5"
},
"dependencies": {
- "@turf/helpers": {
- "version": "4.7.3",
- "resolved": "https://registry.npmjs.org/@turf/helpers/-/helpers-4.7.3.tgz",
- "integrity": "sha1-vDEqxDyrPFMqSDFRxMOCxWSUKek="
- },
- "@turf/invariant": {
- "version": "4.7.3",
- "resolved": "https://registry.npmjs.org/@turf/invariant/-/invariant-4.7.3.tgz",
- "integrity": "sha1-U482fSPBE/yEnXDJpSS4Vjh0YB0="
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
}
}
},
- "@turf/meta": {
- "version": "4.7.4",
- "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-4.7.4.tgz",
- "integrity": "sha1-beLx6YkLj2S2aeS0fAmyCJMGOXc="
+ "@turf/triangle-grid": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/triangle-grid/-/triangle-grid-5.1.5.tgz",
+ "integrity": "sha1-ezZ2IQhVTBTyjK/zxIsc/ILI3IE=",
+ "requires": {
+ "@turf/distance": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/intersect": "5.1.6",
+ "@turf/invariant": "5.2.0"
+ }
},
- "@turf/nearest-point-on-line": {
+ "@turf/truncate": {
"version": "5.1.5",
- "resolved": "https://registry.npmjs.org/@turf/nearest-point-on-line/-/nearest-point-on-line-5.1.5.tgz",
- "integrity": "sha1-VgauKX8VlHUkvqUaKp71HsG/nDY=",
+ "resolved": "https://registry.npmjs.org/@turf/truncate/-/truncate-5.1.5.tgz",
+ "integrity": "sha1-nu37Oxi6gfLJjT6tCUMcyhiErYk=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/meta": "5.2.0"
+ },
+ "dependencies": {
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ }
+ }
+ },
+ "@turf/turf": {
+ "version": "5.1.6",
+ "resolved": "https://registry.npmjs.org/@turf/turf/-/turf-5.1.6.tgz",
+ "integrity": "sha1-wxIlkoh+0jS3VGi4qMRb+Ib7+PY=",
"requires": {
+ "@turf/along": "5.1.5",
+ "@turf/area": "5.1.5",
+ "@turf/bbox": "5.1.5",
+ "@turf/bbox-clip": "5.1.5",
+ "@turf/bbox-polygon": "5.1.5",
"@turf/bearing": "5.1.5",
+ "@turf/bezier-spline": "5.1.5",
+ "@turf/boolean-clockwise": "5.1.5",
+ "@turf/boolean-contains": "5.1.5",
+ "@turf/boolean-crosses": "5.1.5",
+ "@turf/boolean-disjoint": "5.1.6",
+ "@turf/boolean-equal": "5.1.5",
+ "@turf/boolean-overlap": "5.1.5",
+ "@turf/boolean-parallel": "5.1.5",
+ "@turf/boolean-point-in-polygon": "5.1.5",
+ "@turf/boolean-point-on-line": "5.1.5",
+ "@turf/boolean-within": "5.1.5",
+ "@turf/buffer": "5.1.5",
+ "@turf/center": "5.1.5",
+ "@turf/center-mean": "5.1.5",
+ "@turf/center-median": "5.1.5",
+ "@turf/center-of-mass": "5.1.5",
+ "@turf/centroid": "5.1.5",
+ "@turf/circle": "5.1.5",
+ "@turf/clean-coords": "5.1.5",
+ "@turf/clone": "5.1.5",
+ "@turf/clusters": "5.1.5",
+ "@turf/clusters-dbscan": "5.1.5",
+ "@turf/clusters-kmeans": "5.1.5",
+ "@turf/collect": "5.1.5",
+ "@turf/combine": "5.1.5",
+ "@turf/concave": "5.1.5",
+ "@turf/convex": "5.1.5",
"@turf/destination": "5.1.5",
+ "@turf/difference": "5.1.5",
+ "@turf/dissolve": "5.1.5",
"@turf/distance": "5.1.5",
+ "@turf/ellipse": "5.1.5",
+ "@turf/envelope": "5.1.5",
+ "@turf/explode": "5.1.5",
+ "@turf/flatten": "5.1.5",
+ "@turf/flip": "5.1.5",
+ "@turf/great-circle": "5.1.5",
"@turf/helpers": "5.1.5",
- "@turf/invariant": "5.2.0",
+ "@turf/hex-grid": "5.1.5",
+ "@turf/interpolate": "5.1.5",
+ "@turf/intersect": "5.1.6",
+ "@turf/invariant": "5.1.5",
+ "@turf/isobands": "5.1.5",
+ "@turf/isolines": "5.1.5",
+ "@turf/kinks": "5.1.5",
+ "@turf/length": "5.1.5",
+ "@turf/line-arc": "5.1.5",
+ "@turf/line-chunk": "5.1.5",
"@turf/line-intersect": "5.1.5",
- "@turf/meta": "5.2.0"
+ "@turf/line-offset": "5.1.5",
+ "@turf/line-overlap": "5.1.5",
+ "@turf/line-segment": "5.1.5",
+ "@turf/line-slice": "5.1.5",
+ "@turf/line-slice-along": "5.1.5",
+ "@turf/line-split": "5.1.5",
+ "@turf/line-to-polygon": "5.1.5",
+ "@turf/mask": "5.1.5",
+ "@turf/meta": "5.1.6",
+ "@turf/midpoint": "5.1.5",
+ "@turf/nearest-point": "5.1.5",
+ "@turf/nearest-point-on-line": "5.1.5",
+ "@turf/nearest-point-to-line": "5.1.6",
+ "@turf/planepoint": "5.1.5",
+ "@turf/point-grid": "5.1.5",
+ "@turf/point-on-feature": "5.1.5",
+ "@turf/point-to-line-distance": "5.1.6",
+ "@turf/points-within-polygon": "5.1.5",
+ "@turf/polygon-tangents": "5.1.5",
+ "@turf/polygon-to-line": "5.1.5",
+ "@turf/polygonize": "5.1.5",
+ "@turf/projection": "5.1.5",
+ "@turf/random": "5.1.5",
+ "@turf/rewind": "5.1.5",
+ "@turf/rhumb-bearing": "5.1.5",
+ "@turf/rhumb-destination": "5.1.5",
+ "@turf/rhumb-distance": "5.1.5",
+ "@turf/sample": "5.1.5",
+ "@turf/sector": "5.1.5",
+ "@turf/shortest-path": "5.1.5",
+ "@turf/simplify": "5.1.5",
+ "@turf/square": "5.1.5",
+ "@turf/square-grid": "5.1.5",
+ "@turf/standard-deviational-ellipse": "5.1.5",
+ "@turf/tag": "5.1.5",
+ "@turf/tesselate": "5.1.5",
+ "@turf/tin": "5.1.5",
+ "@turf/transform-rotate": "5.1.5",
+ "@turf/transform-scale": "5.1.5",
+ "@turf/transform-translate": "5.1.5",
+ "@turf/triangle-grid": "5.1.5",
+ "@turf/truncate": "5.1.5",
+ "@turf/union": "5.1.5",
+ "@turf/unkink-polygon": "5.1.5",
+ "@turf/voronoi": "5.1.5"
},
"dependencies": {
+ "@turf/bbox": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/bbox/-/bbox-5.1.5.tgz",
+ "integrity": "sha1-MFHfUUrUxQ9KT5uKLRX9i2hA7aM=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/meta": "5.1.6"
+ }
+ },
+ "@turf/circle": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/circle/-/circle-5.1.5.tgz",
+ "integrity": "sha1-mxV3g1UIq1L7HBCypQZcuiuHtqU=",
+ "requires": {
+ "@turf/destination": "5.1.5",
+ "@turf/helpers": "5.1.5"
+ }
+ },
+ "@turf/invariant": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/invariant/-/invariant-5.1.5.tgz",
+ "integrity": "sha1-9Z9P76CSJLFdzhZR+QPIaNV6JOE=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
+ },
"@turf/line-intersect": {
"version": "5.1.5",
"resolved": "https://registry.npmjs.org/@turf/line-intersect/-/line-intersect-5.1.5.tgz",
"integrity": "sha1-DikHGuQDKV5JFyO8SfXPrI0R3fM=",
"requires": {
"@turf/helpers": "5.1.5",
- "@turf/invariant": "5.2.0",
+ "@turf/invariant": "5.1.5",
"@turf/line-segment": "5.1.5",
- "@turf/meta": "5.2.0",
+ "@turf/meta": "5.1.6",
"geojson-rbush": "2.1.0"
}
},
@@ -393,14 +2406,14 @@
"integrity": "sha1-Mgeq7lRqskw9jcPMY/kcdwuAE+U=",
"requires": {
"@turf/helpers": "5.1.5",
- "@turf/invariant": "5.2.0",
- "@turf/meta": "5.2.0"
+ "@turf/invariant": "5.1.5",
+ "@turf/meta": "5.1.6"
}
},
"@turf/meta": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
- "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "version": "5.1.6",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.1.6.tgz",
+ "integrity": "sha1-wgqGPt7Qhp+yhUje6Ik0G8y0akY=",
"requires": {
"@turf/helpers": "5.1.5"
}
@@ -411,33 +2424,53 @@
"integrity": "sha1-O9c745H8ELCuaT2bis6iquC4Oo0=",
"requires": {
"@turf/helpers": "5.1.5",
- "@turf/meta": "5.2.0",
+ "@turf/meta": "5.1.6",
"rbush": "2.0.2"
}
}
}
},
- "@turf/polygon-to-linestring": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/@turf/polygon-to-linestring/-/polygon-to-linestring-4.1.0.tgz",
- "integrity": "sha1-THE9SUG9iKauaGgXNv1WJZbyPhU=",
+ "@turf/union": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/union/-/union-5.1.5.tgz",
+ "integrity": "sha1-UyhbYJQEf8WNlqrA6pCGXsNNRUs=",
"requires": {
- "@turf/helpers": "4.7.3",
- "@turf/invariant": "4.7.3"
+ "@turf/helpers": "5.1.5",
+ "turf-jsts": "1.2.3"
+ }
+ },
+ "@turf/unkink-polygon": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/unkink-polygon/-/unkink-polygon-5.1.5.tgz",
+ "integrity": "sha1-ewGEfFD7V0riV54Z5Ey6hSbSE8M=",
+ "requires": {
+ "@turf/area": "5.1.5",
+ "@turf/boolean-point-in-polygon": "5.1.5",
+ "@turf/helpers": "5.1.5",
+ "@turf/meta": "5.2.0",
+ "rbush": "2.0.2"
},
"dependencies": {
- "@turf/helpers": {
- "version": "4.7.3",
- "resolved": "https://registry.npmjs.org/@turf/helpers/-/helpers-4.7.3.tgz",
- "integrity": "sha1-vDEqxDyrPFMqSDFRxMOCxWSUKek="
- },
- "@turf/invariant": {
- "version": "4.7.3",
- "resolved": "https://registry.npmjs.org/@turf/invariant/-/invariant-4.7.3.tgz",
- "integrity": "sha1-U482fSPBE/yEnXDJpSS4Vjh0YB0="
+ "@turf/meta": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-5.2.0.tgz",
+ "integrity": "sha1-OxrUhe4MOwsXdRMqMsOE1T5LpT0=",
+ "requires": {
+ "@turf/helpers": "5.1.5"
+ }
}
}
},
+ "@turf/voronoi": {
+ "version": "5.1.5",
+ "resolved": "https://registry.npmjs.org/@turf/voronoi/-/voronoi-5.1.5.tgz",
+ "integrity": "sha1-6FbpQG3MLyXWbdyJhYTifC6/ymY=",
+ "requires": {
+ "@turf/helpers": "5.1.5",
+ "@turf/invariant": "5.2.0",
+ "d3-voronoi": "1.1.2"
+ }
+ },
"JSV": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/JSV/-/JSV-4.0.2.tgz",
@@ -452,12 +2485,14 @@
"abbrev": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
- "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
+ "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
+ "dev": true
},
"accepts": {
"version": "1.3.7",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
"integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==",
+ "dev": true,
"requires": {
"mime-types": "2.1.24",
"negotiator": "0.6.2"
@@ -466,7 +2501,8 @@
"acorn": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-5.2.1.tgz",
- "integrity": "sha512-jG0u7c4Ly+3QkkW18V+NRDN+4bWHdln30NL1ZL2AvFZZmQe/BfopYCtghCKKVBUSetZ4QKcyA0pY6/4Gw8Pv8w=="
+ "integrity": "sha512-jG0u7c4Ly+3QkkW18V+NRDN+4bWHdln30NL1ZL2AvFZZmQe/BfopYCtghCKKVBUSetZ4QKcyA0pY6/4Gw8Pv8w==",
+ "dev": true
},
"acorn-dynamic-import": {
"version": "2.0.2",
@@ -519,7 +2555,8 @@
"after": {
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz",
- "integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8="
+ "integrity": "sha1-/ts5T58OAqqXaOcCvaI7UF+ufh8=",
+ "dev": true
},
"ag-grid": {
"version": "3.3.3",
@@ -535,6 +2572,7 @@
"version": "4.11.8",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz",
"integrity": "sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=",
+ "dev": true,
"requires": {
"co": "4.6.0",
"json-stable-stringify": "1.0.1"
@@ -555,6 +2593,7 @@
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz",
"integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=",
+ "dev": true,
"requires": {
"kind-of": "3.2.2",
"longest": "1.0.1",
@@ -689,20 +2728,6 @@
}
}
},
- "aproba": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
- "integrity": "sha1-aALmJk79GMeQobDVF/DyYnvyyUo="
- },
- "are-we-there-yet": {
- "version": "1.1.5",
- "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz",
- "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==",
- "requires": {
- "delegates": "1.0.0",
- "readable-stream": "2.0.6"
- }
- },
"argparse": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
@@ -715,17 +2740,20 @@
"arr-diff": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
- "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA="
+ "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=",
+ "dev": true
},
"arr-flatten": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz",
- "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg=="
+ "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==",
+ "dev": true
},
"arr-union": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz",
- "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ="
+ "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=",
+ "dev": true
},
"array-equal": {
"version": "1.0.0",
@@ -754,12 +2782,8 @@
"array-unique": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
- "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg="
- },
- "arraybuffer.slice": {
- "version": "0.0.7",
- "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz",
- "integrity": "sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog=="
+ "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=",
+ "dev": true
},
"asap": {
"version": "2.0.6",
@@ -770,6 +2794,7 @@
"version": "0.2.4",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
"integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==",
+ "dev": true,
"requires": {
"safer-buffer": "2.1.2"
}
@@ -815,12 +2840,14 @@
"assert-plus": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz",
- "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ="
+ "integrity": "sha1-104bh+ev/A24qttwIfP+SBAasjQ=",
+ "dev": true
},
"assign-symbols": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz",
- "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c="
+ "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=",
+ "dev": true
},
"ast-traverse": {
"version": "0.1.1",
@@ -838,6 +2865,7 @@
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz",
"integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==",
+ "dev": true,
"requires": {
"lodash": "4.17.5"
}
@@ -848,20 +2876,17 @@
"integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==",
"dev": true
},
- "async-limiter": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz",
- "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg=="
- },
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
- "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
+ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=",
+ "dev": true
},
"atob": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
- "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg=="
+ "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==",
+ "dev": true
},
"attr-accept": {
"version": "1.1.3",
@@ -888,12 +2913,14 @@
"aws-sign2": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz",
- "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8="
+ "integrity": "sha1-FDQt0428yU0OW4fXY81jYSwOeU8=",
+ "dev": true
},
"aws4": {
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz",
- "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ=="
+ "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==",
+ "dev": true
},
"axios": {
"version": "0.18.0",
@@ -2455,25 +4482,23 @@
"to-fast-properties": "1.0.3"
}
},
- "babylon": {
- "version": "7.0.0-beta.19",
- "resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.19.tgz",
- "integrity": "sha512-Vg0C9s/REX6/WIXN37UKpv5ZhRi6A4pjHlpkE34+8/a6c2W1Q692n3hmc+SZG5lKRnaExLUbxtJ1SVT+KaCQ/A=="
- },
"backo2": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz",
- "integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc="
+ "integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=",
+ "dev": true
},
"balanced-match": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
- "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
+ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
+ "dev": true
},
"base": {
"version": "0.11.2",
"resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz",
"integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==",
+ "dev": true,
"requires": {
"cache-base": "1.0.1",
"class-utils": "0.3.6",
@@ -2488,6 +4513,7 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
"integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
+ "dev": true,
"requires": {
"is-descriptor": "1.0.2"
}
@@ -2496,6 +4522,7 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
"integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
+ "dev": true,
"requires": {
"kind-of": "6.0.2"
}
@@ -2504,6 +4531,7 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
"integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
+ "dev": true,
"requires": {
"kind-of": "6.0.2"
}
@@ -2512,6 +4540,7 @@
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
"integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
+ "dev": true,
"requires": {
"is-accessor-descriptor": "1.0.0",
"is-data-descriptor": "1.0.0",
@@ -2521,7 +4550,8 @@
"kind-of": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
- "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA=="
+ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==",
+ "dev": true
}
}
},
@@ -2540,7 +4570,8 @@
"base64-arraybuffer": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz",
- "integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg="
+ "integrity": "sha1-c5JncZI7Whl0etZmqlzUv5xunOg=",
+ "dev": true
},
"base64-js": {
"version": "1.3.0",
@@ -2551,7 +4582,8 @@
"base64id": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/base64id/-/base64id-1.0.0.tgz",
- "integrity": "sha1-R2iMuZu2gE8OBtPnY7HDLlfY5rY="
+ "integrity": "sha1-R2iMuZu2gE8OBtPnY7HDLlfY5rY=",
+ "dev": true
},
"batch": {
"version": "0.6.1",
@@ -2568,6 +4600,7 @@
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
"integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
+ "dev": true,
"requires": {
"tweetnacl": "0.14.5"
}
@@ -2576,6 +4609,7 @@
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/better-assert/-/better-assert-1.0.2.tgz",
"integrity": "sha1-QIZrnhueC1W0gYlDEeaPr/rrxSI=",
+ "dev": true,
"requires": {
"callsite": "1.0.0"
}
@@ -2585,15 +4619,6 @@
"resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz",
"integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ=="
},
- "binary": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/binary/-/binary-0.3.0.tgz",
- "integrity": "sha1-n2BVO8XOjDOG87VTz/R0Yq3sqnk=",
- "requires": {
- "buffers": "0.1.1",
- "chainsaw": "0.1.0"
- }
- },
"binary-extensions": {
"version": "1.13.1",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz",
@@ -2629,11 +4654,6 @@
}
}
},
- "blob": {
- "version": "0.0.5",
- "resolved": "https://registry.npmjs.org/blob/-/blob-0.0.5.tgz",
- "integrity": "sha512-gaqbzQPqOoamawKg0LGVd7SzLgXS+JH61oWprSLH+P+abTczqJbhTR8CmJ2u9/bUYNmHTGJx/UEmn6doAvvuig=="
- },
"bluebird": {
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz",
@@ -2721,6 +4741,7 @@
"version": "2.10.1",
"resolved": "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz",
"integrity": "sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=",
+ "dev": true,
"requires": {
"hoek": "2.16.3"
}
@@ -2734,6 +4755,7 @@
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
"requires": {
"balanced-match": "1.0.0",
"concat-map": "0.0.1"
@@ -2743,6 +4765,7 @@
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
"integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
+ "dev": true,
"requires": {
"arr-flatten": "1.1.0",
"array-unique": "0.3.2",
@@ -2760,6 +4783,7 @@
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
"integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+ "dev": true,
"requires": {
"is-extendable": "0.1.1"
}
@@ -2904,16 +4928,6 @@
"integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=",
"dev": true
},
- "buffers": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz",
- "integrity": "sha1-skV5w77U1tOWru5tmorn9Ugqt7s="
- },
- "builtin-modules": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-2.0.0.tgz",
- "integrity": "sha512-3U5kUA5VPsRUA3nofm/BXX7GVHKfxz0hOBAPxXrIvHzlDRkQVqEn6yi8QJegxl4LzOHLdvb7XF5dVawa/VVYBg=="
- },
"builtin-status-codes": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz",
@@ -2930,6 +4944,7 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz",
"integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==",
+ "dev": true,
"requires": {
"collection-visit": "1.0.0",
"component-emitter": "1.2.1",
@@ -2945,7 +4960,8 @@
"callsite": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz",
- "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA="
+ "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=",
+ "dev": true
},
"camel-case": {
"version": "3.0.0",
@@ -2960,7 +4976,8 @@
"camelcase": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz",
- "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk="
+ "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=",
+ "dev": true
},
"camelcase-keys": {
"version": "2.1.0",
@@ -3016,12 +5033,14 @@
"caseless": {
"version": "0.12.0",
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
- "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
+ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=",
+ "dev": true
},
"catharsis": {
"version": "0.8.10",
"resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.8.10.tgz",
"integrity": "sha512-l2OUaz/3PU3MZylspVFJvwHCVfWyvcduPq4lv3AzZ2pJzZCo7kNKFNyatwujD7XgvGkNAE/Jhhbh2uARNwNkfw==",
+ "dev": true,
"requires": {
"lodash": "4.17.11"
},
@@ -3029,7 +5048,8 @@
"lodash": {
"version": "4.17.11",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
- "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg=="
+ "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==",
+ "dev": true
}
}
},
@@ -3037,6 +5057,7 @@
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz",
"integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=",
+ "dev": true,
"requires": {
"align-text": "0.1.4",
"lazy-cache": "1.0.4"
@@ -3056,14 +5077,6 @@
"resolved": "https://registry.npmjs.org/chain-function/-/chain-function-1.0.1.tgz",
"integrity": "sha512-SxltgMwL9uCko5/ZCLiyG2B7R9fY4pDZUw7hJ4MhirdjBLosoDqkWABi3XMucddHdLiFJMb7PD2MZifZriuMTg=="
},
- "chainsaw": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz",
- "integrity": "sha1-XqtQsor+WAdNDVgpE4iCi15fvJg=",
- "requires": {
- "traverse": "0.3.9"
- }
- },
"chalk": {
"version": "0.4.0",
"resolved": "http://registry.npmjs.org/chalk/-/chalk-0.4.0.tgz",
@@ -3197,6 +5210,7 @@
"version": "0.3.6",
"resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz",
"integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==",
+ "dev": true,
"requires": {
"arr-union": "3.1.0",
"define-property": "0.2.5",
@@ -3208,6 +5222,7 @@
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
"integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+ "dev": true,
"requires": {
"is-descriptor": "0.1.6"
}
@@ -3269,6 +5284,7 @@
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz",
"integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=",
+ "dev": true,
"requires": {
"center-align": "0.1.3",
"right-align": "0.1.3",
@@ -3278,7 +5294,8 @@
"wordwrap": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz",
- "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8="
+ "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=",
+ "dev": true
}
}
},
@@ -3293,85 +5310,11 @@
"integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=",
"dev": true
},
- "closure-util": {
- "version": "1.26.0",
- "resolved": "https://registry.npmjs.org/closure-util/-/closure-util-1.26.0.tgz",
- "integrity": "sha512-zpWABEochWrY48soiEttuqJk/OSYscS9PcvKgHvKUefM29+R8rqx5Bp8KIZHR0Nsq1JrNgxg2VTmJ/IsqN5VOA==",
- "requires": {
- "acorn": "5.2.1",
- "async": "2.6.0",
- "fs-extra": "4.0.2",
- "gaze": "1.1.2",
- "get-down": "1.2.0",
- "glob": "7.1.2",
- "graceful-fs": "4.1.11",
- "handlebars": "4.0.11",
- "lodash": "4.17.4",
- "minimatch": "3.0.4",
- "mkdirp": "0.5.1",
- "nomnom": "1.8.1",
- "npmlog": "4.1.2",
- "rimraf": "2.6.2",
- "send": "0.16.1",
- "socket.io": "2.0.4",
- "temp": "0.8.3"
- },
- "dependencies": {
- "fs-extra": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.2.tgz",
- "integrity": "sha1-+RcExT0bRh+JNFKwwwfZmXZHq2s=",
- "requires": {
- "graceful-fs": "4.1.11",
- "jsonfile": "4.0.0",
- "universalify": "0.1.2"
- }
- },
- "glob": {
- "version": "7.1.2",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz",
- "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==",
- "requires": {
- "fs.realpath": "1.0.0",
- "inflight": "1.0.6",
- "inherits": "2.0.3",
- "minimatch": "3.0.4",
- "once": "1.4.0",
- "path-is-absolute": "1.0.1"
- }
- },
- "graceful-fs": {
- "version": "4.1.11",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
- "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg="
- },
- "jsonfile": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
- "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
- "requires": {
- "graceful-fs": "4.1.11"
- }
- },
- "lodash": {
- "version": "4.17.4",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
- "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4="
- },
- "rimraf": {
- "version": "2.6.2",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz",
- "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==",
- "requires": {
- "glob": "7.1.2"
- }
- }
- }
- },
"co": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
- "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ="
+ "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=",
+ "dev": true
},
"coa": {
"version": "1.0.4",
@@ -3396,6 +5339,7 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz",
"integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=",
+ "dev": true,
"requires": {
"map-visit": "1.0.0",
"object-visit": "1.0.1"
@@ -3479,6 +5423,7 @@
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
+ "dev": true,
"requires": {
"delayed-stream": "1.0.0"
}
@@ -3486,8 +5431,7 @@
"commander": {
"version": "2.20.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz",
- "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==",
- "dev": true
+ "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ=="
},
"commoner": {
"version": "0.10.8",
@@ -3542,17 +5486,20 @@
"component-bind": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz",
- "integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E="
+ "integrity": "sha1-AMYIq33Nk4l8AAllGx06jh5zu9E=",
+ "dev": true
},
"component-emitter": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz",
- "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY="
+ "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=",
+ "dev": true
},
"component-inherit": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/component-inherit/-/component-inherit-0.0.3.tgz",
- "integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM="
+ "integrity": "sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM=",
+ "dev": true
},
"compressible": {
"version": "2.0.17",
@@ -3604,7 +5551,8 @@
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
- "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
+ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
+ "dev": true
},
"concat-stream": {
"version": "1.5.2",
@@ -3616,6 +5564,18 @@
"typedarray": "0.0.6"
}
},
+ "concaveman": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/concaveman/-/concaveman-1.1.1.tgz",
+ "integrity": "sha1-bCSCWAslI874L8K+wAoEFebmgWI=",
+ "requires": {
+ "monotone-convex-hull-2d": "1.0.1",
+ "point-in-polygon": "1.0.1",
+ "rbush": "2.0.2",
+ "robust-orientation": "1.1.3",
+ "tinyqueue": "1.2.3"
+ }
+ },
"connect": {
"version": "3.6.6",
"resolved": "https://registry.npmjs.org/connect/-/connect-3.6.6.tgz",
@@ -3660,11 +5620,6 @@
"date-now": "0.1.4"
}
},
- "console-control-strings": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
- "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4="
- },
"constant-case": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/constant-case/-/constant-case-2.0.0.tgz",
@@ -3711,7 +5666,8 @@
"cookie": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz",
- "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s="
+ "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=",
+ "dev": true
},
"cookie-signature": {
"version": "1.0.6",
@@ -3722,7 +5678,8 @@
"copy-descriptor": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz",
- "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40="
+ "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=",
+ "dev": true
},
"copy-to-clipboard": {
"version": "3.2.0",
@@ -4017,6 +5974,7 @@
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz",
"integrity": "sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=",
+ "dev": true,
"requires": {
"boom": "2.10.1"
}
@@ -4250,6 +6208,14 @@
"resolved": "https://registry.npmjs.org/d3-format/-/d3-format-1.3.2.tgz",
"integrity": "sha512-Z18Dprj96ExragQ0DeGi+SYPQ7pPfRMtUXtsg/ChVIKNBCzjO8XYJvRTC1usblx52lqge56V5ect+frYTQc8WQ=="
},
+ "d3-geo": {
+ "version": "1.7.1",
+ "resolved": "https://registry.npmjs.org/d3-geo/-/d3-geo-1.7.1.tgz",
+ "integrity": "sha512-O4AempWAr+P5qbk2bC2FuN/sDW4z+dN2wDf9QV3bxQt4M5HfOEeXLgJ/UKQW0+o1Dj8BE+L5kiDbdWUMjsmQpw==",
+ "requires": {
+ "d3-array": "1.2.4"
+ }
+ },
"d3-interpolate": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-1.3.2.tgz",
@@ -4298,10 +6264,16 @@
"d3-time": "1.0.11"
}
},
+ "d3-voronoi": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/d3-voronoi/-/d3-voronoi-1.1.2.tgz",
+ "integrity": "sha1-Fodmfo8TotFYyAwUgMWinLDYlzw="
+ },
"dashdash": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
"integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
+ "dev": true,
"requires": {
"assert-plus": "1.0.0"
},
@@ -4309,7 +6281,8 @@
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
- "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
+ "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
+ "dev": true
}
}
},
@@ -4345,7 +6318,8 @@
"decamelize": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
- "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA="
+ "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
+ "dev": true
},
"decode-uri-component": {
"version": "0.2.0",
@@ -4548,38 +6522,6 @@
}
}
},
- "decompress-zip": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/decompress-zip/-/decompress-zip-0.3.0.tgz",
- "integrity": "sha1-rjvLfjTGWHmt/nfhnDD4ZgK0vbA=",
- "requires": {
- "binary": "0.3.0",
- "graceful-fs": "4.1.15",
- "mkpath": "0.1.0",
- "nopt": "3.0.6",
- "q": "1.5.0",
- "readable-stream": "1.1.14",
- "touch": "0.0.3"
- },
- "dependencies": {
- "isarray": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
- "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
- },
- "readable-stream": {
- "version": "1.1.14",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
- "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
- "requires": {
- "core-util-is": "1.0.2",
- "inherits": "2.0.3",
- "isarray": "0.0.1",
- "string_decoder": "0.10.31"
- }
- }
- }
- },
"deconstruct-number-format": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/deconstruct-number-format/-/deconstruct-number-format-0.0.1.tgz",
@@ -4633,6 +6575,7 @@
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz",
"integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==",
+ "dev": true,
"requires": {
"is-descriptor": "1.0.2",
"isobject": "3.0.1"
@@ -4642,6 +6585,7 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
"integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
+ "dev": true,
"requires": {
"kind-of": "6.0.2"
}
@@ -4650,6 +6594,7 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
"integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
+ "dev": true,
"requires": {
"kind-of": "6.0.2"
}
@@ -4658,6 +6603,7 @@
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
"integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
+ "dev": true,
"requires": {
"is-accessor-descriptor": "1.0.0",
"is-data-descriptor": "1.0.0",
@@ -4667,7 +6613,8 @@
"kind-of": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
- "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA=="
+ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==",
+ "dev": true
}
}
},
@@ -4720,12 +6667,8 @@
"delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
- "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
- },
- "delegates": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
- "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o="
+ "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
+ "dev": true
},
"denodeify": {
"version": "1.2.1",
@@ -4733,10 +6676,16 @@
"integrity": "sha1-OjYof1A05pnnV3kBBSwubJQlFjE=",
"dev": true
},
+ "density-clustering": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/density-clustering/-/density-clustering-1.3.0.tgz",
+ "integrity": "sha1-3J9ZyPCrl+FiSsZJMP0xlIF9ysU="
+ },
"depd": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
- "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak="
+ "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=",
+ "dev": true
},
"des.js": {
"version": "1.0.0",
@@ -4751,7 +6700,8 @@
"destroy": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
- "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
+ "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=",
+ "dev": true
},
"detect-indent": {
"version": "4.0.0",
@@ -5270,6 +7220,11 @@
"set-immediate-shim": "1.0.1"
}
},
+ "earcut": {
+ "version": "2.1.5",
+ "resolved": "https://registry.npmjs.org/earcut/-/earcut-2.1.5.tgz",
+ "integrity": "sha512-QFWC7ywTVLtvRAJTVp8ugsuuGQ5mVqNmJ1cRYeLrSHgP3nycr2RHTJob9OtM0v8ujuoKN0NY1a93J/omeTL1PA=="
+ },
"easy-table": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/easy-table/-/easy-table-1.1.1.tgz",
@@ -5292,6 +7247,7 @@
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
"integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
+ "dev": true,
"requires": {
"jsbn": "0.1.1",
"safer-buffer": "2.1.2"
@@ -5300,7 +7256,8 @@
"ee-first": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
- "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
+ "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=",
+ "dev": true
},
"electron-to-chromium": {
"version": "1.3.133",
@@ -5349,7 +7306,8 @@
"encodeurl": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
- "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k="
+ "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=",
+ "dev": true
},
"encoding": {
"version": "0.1.12",
@@ -5368,80 +7326,6 @@
"once": "1.4.0"
}
},
- "engine.io": {
- "version": "3.1.5",
- "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.1.5.tgz",
- "integrity": "sha512-D06ivJkYxyRrcEe0bTpNnBQNgP9d3xog+qZlLbui8EsMr/DouQpf5o9FzJnWYHEYE0YsFHllUv2R1dkgYZXHcA==",
- "requires": {
- "accepts": "1.3.7",
- "base64id": "1.0.0",
- "cookie": "0.3.1",
- "debug": "3.1.0",
- "engine.io-parser": "2.1.3",
- "uws": "9.14.0",
- "ws": "3.3.3"
- },
- "dependencies": {
- "debug": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
- "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
- "requires": {
- "ms": "2.0.0"
- }
- },
- "ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
- }
- }
- },
- "engine.io-client": {
- "version": "3.1.6",
- "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.1.6.tgz",
- "integrity": "sha512-hnuHsFluXnsKOndS4Hv6SvUrgdYx1pk2NqfaDMW+GWdgfU3+/V25Cj7I8a0x92idSpa5PIhJRKxPvp9mnoLsfg==",
- "requires": {
- "component-emitter": "1.2.1",
- "component-inherit": "0.0.3",
- "debug": "3.1.0",
- "engine.io-parser": "2.1.3",
- "has-cors": "1.1.0",
- "indexof": "0.0.1",
- "parseqs": "0.0.5",
- "parseuri": "0.0.5",
- "ws": "3.3.3",
- "xmlhttprequest-ssl": "1.5.5",
- "yeast": "0.1.2"
- },
- "dependencies": {
- "debug": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
- "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
- "requires": {
- "ms": "2.0.0"
- }
- },
- "ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
- }
- }
- },
- "engine.io-parser": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.1.3.tgz",
- "integrity": "sha512-6HXPre2O4Houl7c4g7Ic/XzPnHBvaEmN90vtRO9uLmwtRqQmTOw0QMevL1TOfL2Cpu1VzsaTmMotQgMdkzGkVA==",
- "requires": {
- "after": "0.8.2",
- "arraybuffer.slice": "0.0.7",
- "base64-arraybuffer": "0.1.5",
- "blob": "0.0.5",
- "has-binary2": "1.0.3"
- }
- },
"enhanced-resolve": {
"version": "3.4.1",
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz",
@@ -5664,7 +7548,8 @@
"escape-html": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
- "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
+ "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=",
+ "dev": true
},
"escape-string-regexp": {
"version": "1.0.5",
@@ -5894,11 +7779,6 @@
"integrity": "sha1-0yOky15awzHOoDNBOpJT4WQ+B8Q=",
"dev": true
},
- "estree-walker": {
- "version": "0.6.0",
- "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.0.tgz",
- "integrity": "sha512-peq1RfVAVzr3PU/jL31RaOjUKLoZJpObQWJJ+LgfcxDUifyLZ1RjPQZTl0pzj2uJ45b7A7XpyppXvxdEqzo4rw=="
- },
"esutils": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
@@ -5908,7 +7788,8 @@
"etag": {
"version": "1.8.1",
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
- "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc="
+ "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=",
+ "dev": true
},
"event-emitter": {
"version": "0.3.5",
@@ -6020,6 +7901,7 @@
"version": "2.1.4",
"resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
"integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=",
+ "dev": true,
"requires": {
"debug": "2.6.9",
"define-property": "0.2.5",
@@ -6034,6 +7916,7 @@
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "dev": true,
"requires": {
"ms": "2.0.0"
}
@@ -6042,6 +7925,7 @@
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
"integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+ "dev": true,
"requires": {
"is-descriptor": "0.1.6"
}
@@ -6050,6 +7934,7 @@
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
"integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+ "dev": true,
"requires": {
"is-extendable": "0.1.1"
}
@@ -6057,7 +7942,8 @@
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
+ "dev": true
}
}
},
@@ -6281,6 +8167,7 @@
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
"integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=",
+ "dev": true,
"requires": {
"assign-symbols": "1.0.0",
"is-extendable": "1.0.1"
@@ -6290,6 +8177,7 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
"integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
+ "dev": true,
"requires": {
"is-plain-object": "2.0.4"
}
@@ -6300,6 +8188,7 @@
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz",
"integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==",
+ "dev": true,
"requires": {
"array-unique": "0.3.2",
"define-property": "1.0.0",
@@ -6315,6 +8204,7 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
"integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
+ "dev": true,
"requires": {
"is-descriptor": "1.0.2"
}
@@ -6323,6 +8213,7 @@
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
"integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+ "dev": true,
"requires": {
"is-extendable": "0.1.1"
}
@@ -6331,6 +8222,7 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
"integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
+ "dev": true,
"requires": {
"kind-of": "6.0.2"
}
@@ -6339,6 +8231,7 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
"integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
+ "dev": true,
"requires": {
"kind-of": "6.0.2"
}
@@ -6347,6 +8240,7 @@
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
"integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
+ "dev": true,
"requires": {
"is-accessor-descriptor": "1.0.0",
"is-data-descriptor": "1.0.0",
@@ -6356,7 +8250,8 @@
"kind-of": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
- "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA=="
+ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==",
+ "dev": true
}
}
},
@@ -6375,7 +8270,8 @@
"extsprintf": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
- "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU="
+ "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=",
+ "dev": true
},
"fast-deep-equal": {
"version": "2.0.1",
@@ -6543,6 +8439,7 @@
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
"integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
+ "dev": true,
"requires": {
"extend-shallow": "2.0.1",
"is-number": "3.0.0",
@@ -6554,6 +8451,7 @@
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
"integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+ "dev": true,
"requires": {
"is-extendable": "0.1.1"
}
@@ -6642,7 +8540,8 @@
"for-in": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
- "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA="
+ "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=",
+ "dev": true
},
"for-own": {
"version": "0.1.5",
@@ -6653,20 +8552,17 @@
"for-in": "1.0.2"
}
},
- "foreachasync": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/foreachasync/-/foreachasync-3.0.0.tgz",
- "integrity": "sha1-VQKYfchxS+M5IJfzLgBxyd7gfPY="
- },
"forever-agent": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
- "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE="
+ "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=",
+ "dev": true
},
"form-data": {
"version": "2.1.4",
"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz",
"integrity": "sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=",
+ "dev": true,
"requires": {
"asynckit": "0.4.0",
"combined-stream": "1.0.8",
@@ -6699,6 +8595,7 @@
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz",
"integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=",
+ "dev": true,
"requires": {
"map-cache": "0.2.2"
}
@@ -6706,7 +8603,8 @@
"fresh": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
- "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
+ "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=",
+ "dev": true
},
"fs-access": {
"version": "1.0.1",
@@ -6742,7 +8640,8 @@
"fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
- "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
+ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
+ "dev": true
},
"fsevents": {
"version": "1.2.9",
@@ -7344,39 +9243,6 @@
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
},
- "gauge": {
- "version": "2.7.4",
- "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz",
- "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=",
- "requires": {
- "aproba": "1.2.0",
- "console-control-strings": "1.1.0",
- "has-unicode": "2.0.1",
- "object-assign": "4.1.1",
- "signal-exit": "3.0.2",
- "string-width": "1.0.2",
- "strip-ansi": "3.0.1",
- "wide-align": "1.1.3"
- },
- "dependencies": {
- "strip-ansi": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
- "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
- "requires": {
- "ansi-regex": "2.1.1"
- }
- }
- }
- },
- "gaze": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.2.tgz",
- "integrity": "sha1-hHIkZ3rbiHDWeSV+0ziP22HkAQU=",
- "requires": {
- "globule": "1.2.1"
- }
- },
"generate-function": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz",
@@ -7417,36 +9283,69 @@
"rbush": "2.0.2"
}
},
- "get-caller-file": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz",
- "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==",
- "dev": true
+ "geostyler-openlayers-parser": {
+ "version": "https://github.com/geosolutions-it/geostyler-openlayers-parser/tarball/ms2",
+ "integrity": "sha512-d8Vmd30MblIjojYabIOV770UXt7a/D58d1Pc4zJK5cHZJQV0J92kTCSCkA12jjGt1ORTUV+3nLsr7wHZG9P1Ig==",
+ "requires": {
+ "@terrestris/ol-util": "3.0.0",
+ "geostyler-style": "1.2.1",
+ "lodash": "4.17.15"
+ },
+ "dependencies": {
+ "lodash": {
+ "version": "4.17.15",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
+ "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
+ }
+ }
},
- "get-down": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/get-down/-/get-down-1.2.0.tgz",
- "integrity": "sha512-SbpdXn+fNmGN6pp/vBALveh3oCbWYTR3wb5qifauPSFhAfAVQ7TMOnAkVzQm4YZD2KABzJB3sA2kmMLaOylA2A==",
+ "geostyler-sld-parser": {
+ "version": "https://github.com/geosolutions-it/geostyler-sld-parser/tarball/ms2",
+ "integrity": "sha512-Moj9mpKXHPuDbJo7Fxt/NhSgG3fH1MTGSNG4OYFsH9Gu3BIz/zlBAsDYGOLEA+J/2VA1YIIZ5ioQ8RHSOYBCfQ==",
"requires": {
- "decompress-zip": "0.3.0",
- "graceful-fs": "4.1.11",
- "junk": "2.1.0",
- "mout": "1.0.0",
- "q": "1.5.0",
- "request": "2.81.0",
- "request-progress": "3.0.0",
- "retry": "0.10.1",
- "tar": "3.1.5",
- "tmp": "0.0.31"
+ "geostyler-style": "1.2.1",
+ "lodash": "4.17.15",
+ "xml2js": "0.4.19",
+ "xmldom": "0.1.27"
},
"dependencies": {
- "graceful-fs": {
- "version": "4.1.11",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz",
- "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg="
+ "lodash": {
+ "version": "4.17.15",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
+ "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
+ },
+ "xml2js": {
+ "version": "0.4.19",
+ "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz",
+ "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==",
+ "requires": {
+ "sax": "1.2.4",
+ "xmlbuilder": "9.0.7"
+ }
+ },
+ "xmlbuilder": {
+ "version": "9.0.7",
+ "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz",
+ "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0="
}
}
},
+ "geostyler-style": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/geostyler-style/-/geostyler-style-1.2.1.tgz",
+ "integrity": "sha512-GIGOt0/C2MuaI/+gMAfz78VYQp/bdoMOd2e/cCmXZ9a1bZPYJXmy02R7Vrv4TV/Q2zKq/a08UQ72G6CV1vyE+Q=="
+ },
+ "get-caller-file": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz",
+ "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==",
+ "dev": true
+ },
+ "get-closest": {
+ "version": "0.0.4",
+ "resolved": "https://registry.npmjs.org/get-closest/-/get-closest-0.0.4.tgz",
+ "integrity": "sha1-JprHdtHmAiqg/Vht1wjop9Miaa8="
+ },
"get-stdin": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz",
@@ -7456,12 +9355,14 @@
"get-value": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz",
- "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg="
+ "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=",
+ "dev": true
},
"getpass": {
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
"integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
+ "dev": true,
"requires": {
"assert-plus": "1.0.0"
},
@@ -7469,7 +9370,8 @@
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
- "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
+ "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
+ "dev": true
}
}
},
@@ -7671,36 +9573,6 @@
"integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==",
"dev": true
},
- "globule": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/globule/-/globule-1.2.1.tgz",
- "integrity": "sha512-g7QtgWF4uYSL5/dn71WxubOrS7JVGCnFPEnoeChJmBnyR9Mw8nGoEwOgJL/RC2Te0WhbsEUCejfH8SZNJ+adYQ==",
- "requires": {
- "glob": "7.1.4",
- "lodash": "4.17.11",
- "minimatch": "3.0.4"
- },
- "dependencies": {
- "glob": {
- "version": "7.1.4",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz",
- "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==",
- "requires": {
- "fs.realpath": "1.0.0",
- "inflight": "1.0.6",
- "inherits": "2.0.3",
- "minimatch": "3.0.4",
- "once": "1.4.0",
- "path-is-absolute": "1.0.1"
- }
- },
- "lodash": {
- "version": "4.17.11",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
- "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg=="
- }
- }
- },
"graceful-fs": {
"version": "4.1.15",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz",
@@ -7739,6 +9611,7 @@
"version": "4.0.11",
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz",
"integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=",
+ "dev": true,
"requires": {
"async": "1.5.2",
"optimist": "0.6.1",
@@ -7749,12 +9622,14 @@
"async": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
- "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo="
+ "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=",
+ "dev": true
},
"source-map": {
"version": "0.4.4",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz",
"integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=",
+ "dev": true,
"requires": {
"amdefine": "0.1.1"
}
@@ -7764,12 +9639,14 @@
"har-schema": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz",
- "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4="
+ "integrity": "sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=",
+ "dev": true
},
"har-validator": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz",
"integrity": "sha1-M0gdDxu/9gDdID11gSpqX7oALio=",
+ "dev": true,
"requires": {
"ajv": "4.11.8",
"har-schema": "1.0.5"
@@ -7808,21 +9685,6 @@
}
}
},
- "has-binary2": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz",
- "integrity": "sha512-G1LWKhDSvhGeAQ8mPVQlqNcOB2sJdwATtZKl2pDKKHfpf/rYj24lkinxf69blJbnsvtqqNU+L3SL50vzZhXOnw==",
- "requires": {
- "isarray": "2.0.1"
- },
- "dependencies": {
- "isarray": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz",
- "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4="
- }
- }
- },
"has-color": {
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.7.tgz",
@@ -7831,7 +9693,8 @@
"has-cors": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/has-cors/-/has-cors-1.1.0.tgz",
- "integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk="
+ "integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk=",
+ "dev": true
},
"has-flag": {
"version": "1.0.0",
@@ -7845,15 +9708,11 @@
"integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=",
"dev": true
},
- "has-unicode": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
- "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk="
- },
"has-value": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz",
"integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=",
+ "dev": true,
"requires": {
"get-value": "2.0.6",
"has-values": "1.0.0",
@@ -7864,6 +9723,7 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz",
"integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=",
+ "dev": true,
"requires": {
"is-number": "3.0.0",
"kind-of": "4.0.0"
@@ -7873,6 +9733,7 @@
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz",
"integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=",
+ "dev": true,
"requires": {
"is-buffer": "1.1.6"
}
@@ -7903,6 +9764,7 @@
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz",
"integrity": "sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=",
+ "dev": true,
"requires": {
"boom": "2.10.1",
"cryptiles": "2.0.5",
@@ -7952,7 +9814,8 @@
"hoek": {
"version": "2.16.3",
"resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz",
- "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0="
+ "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=",
+ "dev": true
},
"hoist-non-react-statics": {
"version": "1.2.0",
@@ -8216,6 +10079,7 @@
"version": "1.6.3",
"resolved": "http://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz",
"integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=",
+ "dev": true,
"requires": {
"depd": "1.1.2",
"inherits": "2.0.3",
@@ -8226,7 +10090,8 @@
"statuses": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
- "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow="
+ "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=",
+ "dev": true
}
}
},
@@ -8355,6 +10220,7 @@
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz",
"integrity": "sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=",
+ "dev": true,
"requires": {
"assert-plus": "0.2.0",
"jsprim": "1.4.1",
@@ -8426,12 +10292,14 @@
"indexof": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz",
- "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10="
+ "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=",
+ "dev": true
},
"inflight": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
+ "dev": true,
"requires": {
"once": "1.4.0",
"wrappy": "1.0.2"
@@ -8601,6 +10469,7 @@
"version": "0.1.6",
"resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
"integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
+ "dev": true,
"requires": {
"kind-of": "3.2.2"
}
@@ -8656,6 +10525,7 @@
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
"integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
+ "dev": true,
"requires": {
"kind-of": "3.2.2"
}
@@ -8670,6 +10540,7 @@
"version": "0.1.6",
"resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
"integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
+ "dev": true,
"requires": {
"is-accessor-descriptor": "0.1.6",
"is-data-descriptor": "0.1.4",
@@ -8679,7 +10550,8 @@
"kind-of": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
- "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw=="
+ "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==",
+ "dev": true
}
}
},
@@ -8726,7 +10598,8 @@
"is-extendable": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
- "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik="
+ "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=",
+ "dev": true
},
"is-extglob": {
"version": "2.1.1",
@@ -8790,11 +10663,6 @@
"lower-case": "1.1.4"
}
},
- "is-module": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz",
- "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE="
- },
"is-my-ip-valid": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-my-ip-valid/-/is-my-ip-valid-1.0.0.tgz",
@@ -8824,6 +10692,7 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
"integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
+ "dev": true,
"requires": {
"kind-of": "3.2.2"
}
@@ -8844,6 +10713,7 @@
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
"integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
+ "dev": true,
"requires": {
"isobject": "3.0.1"
}
@@ -8919,7 +10789,8 @@
"is-typedarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
- "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
+ "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
+ "dev": true
},
"is-upper-case": {
"version": "1.1.2",
@@ -8939,7 +10810,8 @@
"is-windows": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz",
- "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA=="
+ "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==",
+ "dev": true
},
"is-zip": {
"version": "1.0.0",
@@ -8975,7 +10847,8 @@
"isobject": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
- "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8="
+ "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
+ "dev": true
},
"isomorphic-fetch": {
"version": "2.2.1",
@@ -8989,7 +10862,8 @@
"isstream": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
- "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
+ "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=",
+ "dev": true
},
"istanbul": {
"version": "0.4.5",
@@ -9240,18 +11114,11 @@
}
}
},
- "js2xmlparser": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-3.0.0.tgz",
- "integrity": "sha1-P7YOqgicVED5MZ9RdgzNB+JJlzM=",
- "requires": {
- "xmlcreate": "1.0.2"
- }
- },
"jsbn": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
- "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM="
+ "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
+ "dev": true
},
"jsdoc": {
"version": "https://github.com/geosolutions-it/jsdoc/tarball/fix_acorn_jsx",
@@ -9409,7 +11276,8 @@
"json-schema": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
- "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM="
+ "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=",
+ "dev": true
},
"json-schema-traverse": {
"version": "0.4.1",
@@ -9420,6 +11288,7 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz",
"integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=",
+ "dev": true,
"requires": {
"jsonify": "0.0.0"
}
@@ -9427,7 +11296,8 @@
"json-stringify-safe": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
- "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus="
+ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=",
+ "dev": true
},
"json3": {
"version": "3.3.2",
@@ -9454,7 +11324,8 @@
"jsonify": {
"version": "0.0.0",
"resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz",
- "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM="
+ "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=",
+ "dev": true
},
"jsonix": {
"version": "2.4.1",
@@ -9508,6 +11379,7 @@
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
"integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
+ "dev": true,
"requires": {
"assert-plus": "1.0.0",
"extsprintf": "1.3.0",
@@ -9518,7 +11390,8 @@
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
- "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
+ "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
+ "dev": true
}
}
},
@@ -9587,11 +11460,6 @@
}
}
},
- "junk": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/junk/-/junk-2.1.0.tgz",
- "integrity": "sha1-9DG0t/By3FAKXxDOf07HGTDnATQ="
- },
"karma": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/karma/-/karma-1.5.0.tgz",
@@ -10114,22 +11982,16 @@
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
"integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+ "dev": true,
"requires": {
"is-buffer": "1.1.6"
}
},
- "klaw": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/klaw/-/klaw-2.0.0.tgz",
- "integrity": "sha1-WcEo4Nxc5BAgEVEZTuucv4WGUPY=",
- "requires": {
- "graceful-fs": "4.1.15"
- }
- },
"lazy-cache": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz",
- "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4="
+ "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=",
+ "dev": true
},
"lcid": {
"version": "1.0.0",
@@ -10287,6 +12149,11 @@
"immediate": "3.0.6"
}
},
+ "lineclip": {
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/lineclip/-/lineclip-1.1.5.tgz",
+ "integrity": "sha1-K/JgZ9lDVP6r+R5CdoI221YW/RM="
+ },
"load-json-file": {
"version": "1.1.0",
"resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
@@ -10581,10 +12448,16 @@
}
}
},
+ "loglevel": {
+ "version": "1.6.1",
+ "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.6.1.tgz",
+ "integrity": "sha1-4PyVEztu8nbNyIh82vJKpvFW+Po="
+ },
"longest": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz",
- "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc="
+ "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=",
+ "dev": true
},
"loose-envify": {
"version": "1.4.0",
@@ -10641,18 +12514,11 @@
"resolved": "https://registry.npmjs.org/lrucache/-/lrucache-1.0.3.tgz",
"integrity": "sha1-Ox3tDRuoLhiLm9q6nu5khvhkpDQ="
},
- "magic-string": {
- "version": "0.22.5",
- "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.22.5.tgz",
- "integrity": "sha512-oreip9rJZkzvA8Qzk9HFs8fZGF/u7H/gtrE8EN6RjKJ9kh2HlC+yQ2QezifqTZfGyiuAV0dRv5a+y/8gBb1m9w==",
- "requires": {
- "vlq": "0.2.3"
- }
- },
"map-cache": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz",
- "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8="
+ "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=",
+ "dev": true
},
"map-obj": {
"version": "1.0.1",
@@ -10664,6 +12530,7 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz",
"integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=",
+ "dev": true,
"requires": {
"object-visit": "1.0.1"
}
@@ -10671,7 +12538,8 @@
"marked": {
"version": "0.3.19",
"resolved": "https://registry.npmjs.org/marked/-/marked-0.3.19.tgz",
- "integrity": "sha512-ea2eGWOqNxPcXv8dyERdSr/6FmzvWwzjMxpfGB/sbMccXoct+xY+YukPD+QTUZwyvK7BZwcr4m21WBOW41pAkg=="
+ "integrity": "sha512-ea2eGWOqNxPcXv8dyERdSr/6FmzvWwzjMxpfGB/sbMccXoct+xY+YukPD+QTUZwyvK7BZwcr4m21WBOW41pAkg==",
+ "dev": true
},
"matchmedia": {
"version": "0.1.2",
@@ -10768,6 +12636,7 @@
"version": "3.1.10",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
"integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
+ "dev": true,
"requires": {
"arr-diff": "4.0.0",
"array-unique": "0.3.2",
@@ -10787,7 +12656,8 @@
"kind-of": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
- "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA=="
+ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==",
+ "dev": true
}
}
},
@@ -10804,17 +12674,20 @@
"mime": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz",
- "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ=="
+ "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==",
+ "dev": true
},
"mime-db": {
"version": "1.40.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz",
- "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA=="
+ "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==",
+ "dev": true
},
"mime-types": {
"version": "2.1.24",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz",
"integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==",
+ "dev": true,
"requires": {
"mime-db": "1.40.0"
}
@@ -10843,6 +12716,7 @@
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
+ "dev": true,
"requires": {
"brace-expansion": "1.1.11"
}
@@ -10852,27 +12726,11 @@
"resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
},
- "minipass": {
- "version": "2.3.5",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz",
- "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==",
- "requires": {
- "safe-buffer": "5.1.2",
- "yallist": "3.0.3"
- }
- },
- "minizlib": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.2.1.tgz",
- "integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==",
- "requires": {
- "minipass": "2.3.5"
- }
- },
"mixin-deep": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz",
"integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==",
+ "dev": true,
"requires": {
"for-in": "1.0.2",
"is-extendable": "1.0.1"
@@ -10882,6 +12740,7 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
"integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
+ "dev": true,
"requires": {
"is-plain-object": "2.0.4"
}
@@ -10892,6 +12751,7 @@
"version": "0.5.1",
"resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
+ "dev": true,
"requires": {
"minimist": "0.0.8"
},
@@ -10899,15 +12759,11 @@
"minimist": {
"version": "0.0.8",
"resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
- "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
+ "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
+ "dev": true
}
}
},
- "mkpath": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/mkpath/-/mkpath-0.1.0.tgz",
- "integrity": "sha1-dVSm+Nhxg0zJe1RisSLEwSTW3pE="
- },
"mocha": {
"version": "2.4.5",
"resolved": "http://registry.npmjs.org/mocha/-/mocha-2.4.5.tgz",
@@ -10992,10 +12848,13 @@
"resolved": "http://registry.npmjs.org/moment/-/moment-2.21.0.tgz",
"integrity": "sha512-TCZ36BjURTeFTM/CwRcViQlfkMvL1/vFISuNLO5GkcVm1+QHfbSiNqZuWeMFjj1/3+uAjXswgRk30j1kkLYJBQ=="
},
- "mout": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/mout/-/mout-1.0.0.tgz",
- "integrity": "sha1-m98dSvV9ZtR8s1OmM1oygQmOFQE="
+ "monotone-convex-hull-2d": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/monotone-convex-hull-2d/-/monotone-convex-hull-2d-1.0.1.tgz",
+ "integrity": "sha1-R/Xa6t88Sv03dkuqGqh4ekDu4Iw=",
+ "requires": {
+ "robust-orientation": "1.1.3"
+ }
},
"ms": {
"version": "2.1.1",
@@ -11019,6 +12878,7 @@
"version": "1.2.13",
"resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
"integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==",
+ "dev": true,
"requires": {
"arr-diff": "4.0.0",
"array-unique": "0.3.2",
@@ -11036,7 +12896,8 @@
"kind-of": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
- "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA=="
+ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==",
+ "dev": true
}
}
},
@@ -11064,7 +12925,8 @@
"negotiator": {
"version": "0.6.2",
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz",
- "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw=="
+ "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==",
+ "dev": true
},
"neo-async": {
"version": "2.6.1",
@@ -11220,6 +13082,7 @@
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz",
"integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=",
+ "dev": true,
"requires": {
"abbrev": "1.1.1"
}
@@ -11268,17 +13131,6 @@
"resolved": "https://registry.npmjs.org/nouislider/-/nouislider-9.2.0.tgz",
"integrity": "sha1-6HxQfeKwtNB1A4taQlR8fbvrr2k="
},
- "npmlog": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
- "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
- "requires": {
- "are-we-there-yet": "1.1.5",
- "console-control-strings": "1.1.0",
- "gauge": "2.7.4",
- "set-blocking": "2.0.0"
- }
- },
"nth-check": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz",
@@ -11314,7 +13166,8 @@
"oauth-sign": {
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz",
- "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM="
+ "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=",
+ "dev": true
},
"object-assign": {
"version": "4.1.1",
@@ -11324,12 +13177,14 @@
"object-component": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/object-component/-/object-component-0.0.3.tgz",
- "integrity": "sha1-8MaapQ78lbhmwYb0AKM3acsvEpE="
+ "integrity": "sha1-8MaapQ78lbhmwYb0AKM3acsvEpE=",
+ "dev": true
},
"object-copy": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz",
"integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=",
+ "dev": true,
"requires": {
"copy-descriptor": "0.1.1",
"define-property": "0.2.5",
@@ -11340,6 +13195,7 @@
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
"integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+ "dev": true,
"requires": {
"is-descriptor": "0.1.6"
}
@@ -11362,6 +13218,7 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz",
"integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=",
+ "dev": true,
"requires": {
"isobject": "3.0.1"
}
@@ -11392,6 +13249,7 @@
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz",
"integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=",
+ "dev": true,
"requires": {
"isobject": "3.0.1"
}
@@ -11421,10 +13279,21 @@
}
}
},
+ "ol": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/ol/-/ol-5.3.0.tgz",
+ "integrity": "sha512-UrOJGNI5XdYfE9n43RJdsMq25SjI4nIi5Kf0kxi+q6vEknzeRxM/wgYf8FMs7Ss3URuIbsKmetW9dVMOYB/DkQ==",
+ "requires": {
+ "pbf": "3.1.0",
+ "pixelworks": "1.1.0",
+ "rbush": "2.0.2"
+ }
+ },
"on-finished": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
"integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=",
+ "dev": true,
"requires": {
"ee-first": "1.1.1"
}
@@ -11439,6 +13308,7 @@
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
+ "dev": true,
"requires": {
"wrappy": "1.0.2"
}
@@ -11449,74 +13319,6 @@
"integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=",
"dev": true
},
- "openlayers": {
- "version": "4.6.4",
- "resolved": "https://registry.npmjs.org/openlayers/-/openlayers-4.6.4.tgz",
- "integrity": "sha512-Oru7/xniirjech7H5zkMQSUj/JUymNveiE4vAwmyjAmcoNyO4zTRD/Pp7BPfxBPuAz45vDl78H1wEQD7RGWkGg==",
- "requires": {
- "async": "2.6.0",
- "closure-util": "1.26.0",
- "fs-extra": "4.0.3",
- "jsdoc": "3.5.5",
- "nomnom": "1.8.1",
- "pbf": "3.1.0",
- "pixelworks": "1.1.0",
- "rbush": "2.0.1",
- "rollup": "0.52.3",
- "rollup-plugin-cleanup": "2.0.1",
- "rollup-plugin-commonjs": "8.4.1",
- "rollup-plugin-node-resolve": "3.4.0",
- "temp": "0.8.3",
- "walk": "2.3.9"
- },
- "dependencies": {
- "fs-extra": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz",
- "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==",
- "requires": {
- "graceful-fs": "4.1.15",
- "jsonfile": "4.0.0",
- "universalify": "0.1.2"
- }
- },
- "jsdoc": {
- "version": "3.5.5",
- "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.5.5.tgz",
- "integrity": "sha512-6PxB65TAU4WO0Wzyr/4/YhlGovXl0EVYfpKbpSroSj0qBxT4/xod/l40Opkm38dRHRdQgdeY836M0uVnJQG7kg==",
- "requires": {
- "babylon": "7.0.0-beta.19",
- "bluebird": "3.5.1",
- "catharsis": "0.8.10",
- "escape-string-regexp": "1.0.5",
- "js2xmlparser": "3.0.0",
- "klaw": "2.0.0",
- "marked": "0.3.19",
- "mkdirp": "0.5.1",
- "requizzle": "0.2.2",
- "strip-json-comments": "2.0.1",
- "taffydb": "2.6.2",
- "underscore": "1.8.3"
- }
- },
- "jsonfile": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
- "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
- "requires": {
- "graceful-fs": "4.1.15"
- }
- },
- "rbush": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/rbush/-/rbush-2.0.1.tgz",
- "integrity": "sha1-TPrKKMMGS8DudUMaG3mZDode76k=",
- "requires": {
- "quickselect": "1.1.1"
- }
- }
- }
- },
"opn": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/opn/-/opn-4.0.2.tgz",
@@ -11531,6 +13333,7 @@
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz",
"integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=",
+ "dev": true,
"requires": {
"minimist": "0.0.10",
"wordwrap": "0.0.3"
@@ -11539,7 +13342,8 @@
"minimist": {
"version": "0.0.10",
"resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz",
- "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8="
+ "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=",
+ "dev": true
}
}
},
@@ -11602,7 +13406,8 @@
"os-tmpdir": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
- "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ="
+ "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
+ "dev": true
},
"output-file-sync": {
"version": "1.1.2",
@@ -11726,6 +13531,7 @@
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/parseqs/-/parseqs-0.0.5.tgz",
"integrity": "sha1-1SCKNzjkZ2bikbouoXNoSSGouJ0=",
+ "dev": true,
"requires": {
"better-assert": "1.0.2"
}
@@ -11734,6 +13540,7 @@
"version": "0.0.5",
"resolved": "https://registry.npmjs.org/parseuri/-/parseuri-0.0.5.tgz",
"integrity": "sha1-gCBKUNTbt3m/3G6+J3jZDkvOMgo=",
+ "dev": true,
"requires": {
"better-assert": "1.0.2"
}
@@ -11757,7 +13564,8 @@
"pascalcase": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz",
- "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ="
+ "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=",
+ "dev": true
},
"path-browserify": {
"version": "0.0.0",
@@ -11789,12 +13597,14 @@
"path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
- "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
+ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
+ "dev": true
},
"path-parse": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
- "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw=="
+ "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
+ "dev": true
},
"path-to-regexp": {
"version": "1.7.0",
@@ -11867,7 +13677,8 @@
"performance-now": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz",
- "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU="
+ "integrity": "sha1-M+8wxcd9TqIcWlOGnZG1bY8lVeU=",
+ "dev": true
},
"pify": {
"version": "2.3.0",
@@ -11908,6 +13719,11 @@
"irregular-plurals": "1.4.0"
}
},
+ "point-in-polygon": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/point-in-polygon/-/point-in-polygon-1.0.1.tgz",
+ "integrity": "sha1-1Ztk6P7kHElFiqyCtWcYxZV7Kvc="
+ },
"portfinder": {
"version": "1.0.20",
"resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.20.tgz",
@@ -11945,7 +13761,8 @@
"posix-character-classes": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz",
- "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs="
+ "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=",
+ "dev": true
},
"postcss": {
"version": "5.2.16",
@@ -12515,7 +14332,8 @@
"punycode": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
- "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4="
+ "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=",
+ "dev": true
},
"pure-color": {
"version": "1.3.0",
@@ -12526,7 +14344,8 @@
"q": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/q/-/q-1.5.0.tgz",
- "integrity": "sha1-3QG6ydBtMObyGa7LglPunr3DCPE="
+ "integrity": "sha1-3QG6ydBtMObyGa7LglPunr3DCPE=",
+ "dev": true
},
"qjobs": {
"version": "1.2.0",
@@ -12550,7 +14369,8 @@
"qs": {
"version": "6.4.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.4.0.tgz",
- "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM="
+ "integrity": "sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=",
+ "dev": true
},
"query-string": {
"version": "4.3.4",
@@ -12576,8 +14396,7 @@
"querystringify": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.1.1.tgz",
- "integrity": "sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA==",
- "dev": true
+ "integrity": "sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA=="
},
"quickselect": {
"version": "1.1.1",
@@ -12677,7 +14496,8 @@
"range-parser": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
- "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg=="
+ "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
+ "dev": true
},
"raw-body": {
"version": "2.4.0",
@@ -14000,6 +15820,7 @@
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz",
"integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==",
+ "dev": true,
"requires": {
"extend-shallow": "3.0.2",
"safe-regex": "1.1.0"
@@ -14099,7 +15920,8 @@
"repeat-element": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz",
- "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g=="
+ "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==",
+ "dev": true
},
"repeat-string": {
"version": "1.6.1",
@@ -14124,6 +15946,7 @@
"version": "2.81.0",
"resolved": "https://registry.npmjs.org/request/-/request-2.81.0.tgz",
"integrity": "sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=",
+ "dev": true,
"requires": {
"aws-sign2": "0.6.0",
"aws4": "1.8.0",
@@ -14149,14 +15972,6 @@
"uuid": "3.0.1"
}
},
- "request-progress": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/request-progress/-/request-progress-3.0.0.tgz",
- "integrity": "sha1-TKdUCBx/7GP1BeT6qCWqBs1mnb4=",
- "requires": {
- "throttleit": "1.0.0"
- }
- },
"require-directory": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
@@ -14184,13 +15999,13 @@
"requires-port": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
- "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=",
- "dev": true
+ "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8="
},
"requizzle": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.2.tgz",
"integrity": "sha512-oJ6y7JcUJkblRGhMByGNcszeLgU0qDxNKFCiUZR1XyzHyVsev+Mxb1tyygxLd1ORsKee1SA5BInFdUwY64GE/A==",
+ "dev": true,
"requires": {
"lodash": "4.17.11"
},
@@ -14198,7 +16013,8 @@
"lodash": {
"version": "4.17.11",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
- "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg=="
+ "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==",
+ "dev": true
}
}
},
@@ -14216,6 +16032,7 @@
"version": "1.10.1",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.1.tgz",
"integrity": "sha512-KuIe4mf++td/eFb6wkaPbMDnP6kObCaEtIDuHOUED6MNUo4K670KZUHuuvYPZDxNF0WVLw49n06M2m2dXphEzA==",
+ "dev": true,
"requires": {
"path-parse": "1.0.6"
}
@@ -14236,17 +16053,14 @@
"resolve-url": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz",
- "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo="
+ "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=",
+ "dev": true
},
"ret": {
"version": "0.1.15",
"resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz",
- "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg=="
- },
- "retry": {
- "version": "0.10.1",
- "resolved": "https://registry.npmjs.org/retry/-/retry-0.10.1.tgz",
- "integrity": "sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q="
+ "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==",
+ "dev": true
},
"rgbcolor": {
"version": "0.0.4",
@@ -14257,6 +16071,7 @@
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz",
"integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=",
+ "dev": true,
"requires": {
"align-text": "0.1.4"
}
@@ -14280,65 +16095,35 @@
"inherits": "2.0.3"
}
},
- "rollup": {
- "version": "0.52.3",
- "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.52.3.tgz",
- "integrity": "sha512-cw+vb9NqaTXlwJyb8G+Ve+uhhlVTcl1NKBkfANdeQqVcpZFilQgeNnAnNiu7MwfeXrqiKEGz+3R03a3zeFkmEQ=="
- },
- "rollup-plugin-cleanup": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/rollup-plugin-cleanup/-/rollup-plugin-cleanup-2.0.1.tgz",
- "integrity": "sha512-Z2UpMe3l2Oo8jzoB2gAWcb3UqIyiGxlh8kKlcs/W53yTPtwdF8RGfhuTx+/kjRlkSc5TC03t3sX3Lj3B40k9Eg==",
+ "robust-orientation": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/robust-orientation/-/robust-orientation-1.1.3.tgz",
+ "integrity": "sha1-2v9bANO+TmByLw6cAVbvln8cIEk=",
"requires": {
- "acorn": "4.0.13",
- "magic-string": "0.22.5",
- "rollup-pluginutils": "2.6.0"
- },
- "dependencies": {
- "acorn": {
- "version": "4.0.13",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz",
- "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c="
- }
+ "robust-scale": "1.0.2",
+ "robust-subtract": "1.0.0",
+ "robust-sum": "1.0.0",
+ "two-product": "1.0.2"
}
},
- "rollup-plugin-commonjs": {
- "version": "8.4.1",
- "resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-8.4.1.tgz",
- "integrity": "sha512-mg+WuD+jlwoo8bJtW3Mvx7Tz6TsIdMsdhuvCnDMoyjh0oxsVgsjB/N0X984RJCWwc5IIiqNVJhXeeITcc73++A==",
+ "robust-scale": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/robust-scale/-/robust-scale-1.0.2.tgz",
+ "integrity": "sha1-d1Ey7QlULQKOWLLMecBikLz3jDI=",
"requires": {
- "acorn": "5.2.1",
- "estree-walker": "0.5.2",
- "magic-string": "0.22.5",
- "resolve": "1.10.1",
- "rollup-pluginutils": "2.6.0"
- },
- "dependencies": {
- "estree-walker": {
- "version": "0.5.2",
- "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.5.2.tgz",
- "integrity": "sha512-XpCnW/AE10ws/kDAs37cngSkvgIR8aN3G0MS85m7dUpuK2EREo9VJ00uvw6Dg/hXEpfsE1I1TvJOJr+Z+TL+ig=="
- }
+ "two-product": "1.0.2",
+ "two-sum": "1.0.0"
}
},
- "rollup-plugin-node-resolve": {
- "version": "3.4.0",
- "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.4.0.tgz",
- "integrity": "sha512-PJcd85dxfSBWih84ozRtBkB731OjXk0KnzN0oGp7WOWcarAFkVa71cV5hTJg2qpVsV2U8EUwrzHP3tvy9vS3qg==",
- "requires": {
- "builtin-modules": "2.0.0",
- "is-module": "1.0.0",
- "resolve": "1.10.1"
- }
+ "robust-subtract": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/robust-subtract/-/robust-subtract-1.0.0.tgz",
+ "integrity": "sha1-4LFk4e2LpOOl3aRaEgODSNvtPpo="
},
- "rollup-pluginutils": {
- "version": "2.6.0",
- "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.6.0.tgz",
- "integrity": "sha512-aGQwspEF8oPKvg37u3p7h0cYNwmJR1sCBMZGZ5b9qy8HGtETknqjzcxrDRrcAnJNXN18lBH4Q9vZYth/p4n8jQ==",
- "requires": {
- "estree-walker": "0.6.0",
- "micromatch": "3.1.10"
- }
+ "robust-sum": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/robust-sum/-/robust-sum-1.0.0.tgz",
+ "integrity": "sha1-FmRuUlKStNJdgnV6KGlV4Lv6U9k="
},
"rx": {
"version": "2.5.3",
@@ -14357,12 +16142,14 @@
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
- "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+ "dev": true
},
"safe-regex": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
"integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=",
+ "dev": true,
"requires": {
"ret": "0.1.15"
}
@@ -14449,41 +16236,6 @@
"integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==",
"dev": true
},
- "send": {
- "version": "0.16.1",
- "resolved": "https://registry.npmjs.org/send/-/send-0.16.1.tgz",
- "integrity": "sha512-ElCLJdJIKPk6ux/Hocwhk7NFHpI3pVm/IZOYWqUmoxcgeyM+MpxHHKhb8QmlJDX1pU6WrgaHBkVNm73Sv7uc2A==",
- "requires": {
- "debug": "2.6.9",
- "depd": "1.1.2",
- "destroy": "1.0.4",
- "encodeurl": "1.0.2",
- "escape-html": "1.0.3",
- "etag": "1.8.1",
- "fresh": "0.5.2",
- "http-errors": "1.6.3",
- "mime": "1.4.1",
- "ms": "2.0.0",
- "on-finished": "2.3.0",
- "range-parser": "1.2.1",
- "statuses": "1.3.1"
- },
- "dependencies": {
- "debug": {
- "version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "requires": {
- "ms": "2.0.0"
- }
- },
- "ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
- }
- }
- },
"sentence-case": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/sentence-case/-/sentence-case-2.1.1.tgz",
@@ -14585,7 +16337,8 @@
"set-blocking": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
- "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc="
+ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
+ "dev": true
},
"set-immediate-shim": {
"version": "1.0.1",
@@ -14597,6 +16350,7 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz",
"integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==",
+ "dev": true,
"requires": {
"extend-shallow": "2.0.1",
"is-extendable": "0.1.1",
@@ -14608,6 +16362,7 @@
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
"integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+ "dev": true,
"requires": {
"is-extendable": "0.1.1"
}
@@ -14622,7 +16377,8 @@
"setprototypeof": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz",
- "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ=="
+ "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==",
+ "dev": true
},
"sha.js": {
"version": "2.4.11",
@@ -14688,7 +16444,8 @@
"signal-exit": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
- "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0="
+ "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
+ "dev": true
},
"simple-fmt": {
"version": "0.1.0",
@@ -14708,6 +16465,11 @@
"integrity": "sha1-Krt1qt453rXMgVzhDmGRFkhQuvA=",
"dev": true
},
+ "skmeans": {
+ "version": "0.9.7",
+ "resolved": "https://registry.npmjs.org/skmeans/-/skmeans-0.9.7.tgz",
+ "integrity": "sha512-hNj1/oZ7ygsfmPZ7ZfN5MUBRoGg1gtpnImuJBgLO0ljQ67DtJuiQaiYdS4lUA6s0KCwnPhGivtC/WRwIZLkHyg=="
+ },
"slash": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz",
@@ -14727,6 +16489,7 @@
"version": "0.8.2",
"resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz",
"integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==",
+ "dev": true,
"requires": {
"base": "0.11.2",
"debug": "2.6.9",
@@ -14742,6 +16505,7 @@
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "dev": true,
"requires": {
"ms": "2.0.0"
}
@@ -14750,6 +16514,7 @@
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
"integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+ "dev": true,
"requires": {
"is-descriptor": "0.1.6"
}
@@ -14758,6 +16523,7 @@
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
"integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+ "dev": true,
"requires": {
"is-extendable": "0.1.1"
}
@@ -14765,7 +16531,8 @@
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
+ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
+ "dev": true
}
}
},
@@ -14773,6 +16540,7 @@
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz",
"integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==",
+ "dev": true,
"requires": {
"define-property": "1.0.0",
"isobject": "3.0.1",
@@ -14783,6 +16551,7 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
"integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
+ "dev": true,
"requires": {
"is-descriptor": "1.0.2"
}
@@ -14791,6 +16560,7 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
"integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
+ "dev": true,
"requires": {
"kind-of": "6.0.2"
}
@@ -14799,6 +16569,7 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
"integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
+ "dev": true,
"requires": {
"kind-of": "6.0.2"
}
@@ -14807,6 +16578,7 @@
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
"integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
+ "dev": true,
"requires": {
"is-accessor-descriptor": "1.0.0",
"is-data-descriptor": "1.0.0",
@@ -14816,7 +16588,8 @@
"kind-of": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz",
- "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA=="
+ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==",
+ "dev": true
}
}
},
@@ -14824,6 +16597,7 @@
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz",
"integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==",
+ "dev": true,
"requires": {
"kind-of": "3.2.2"
}
@@ -14832,108 +16606,11 @@
"version": "1.0.9",
"resolved": "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz",
"integrity": "sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=",
+ "dev": true,
"requires": {
"hoek": "2.16.3"
}
},
- "socket.io": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.0.4.tgz",
- "integrity": "sha1-waRZDO/4fs8TxyZS8Eb3FrKeYBQ=",
- "requires": {
- "debug": "2.6.9",
- "engine.io": "3.1.5",
- "socket.io-adapter": "1.1.1",
- "socket.io-client": "2.0.4",
- "socket.io-parser": "3.1.3"
- },
- "dependencies": {
- "debug": {
- "version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "requires": {
- "ms": "2.0.0"
- }
- },
- "ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
- }
- }
- },
- "socket.io-adapter": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.1.tgz",
- "integrity": "sha1-KoBeihTWNyEk3ZFZrUUC+MsH8Gs="
- },
- "socket.io-client": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-2.0.4.tgz",
- "integrity": "sha1-CRilUkBtxeVAs4Dc2Xr8SmQzL44=",
- "requires": {
- "backo2": "1.0.2",
- "base64-arraybuffer": "0.1.5",
- "component-bind": "1.0.0",
- "component-emitter": "1.2.1",
- "debug": "2.6.9",
- "engine.io-client": "3.1.6",
- "has-cors": "1.1.0",
- "indexof": "0.0.1",
- "object-component": "0.0.3",
- "parseqs": "0.0.5",
- "parseuri": "0.0.5",
- "socket.io-parser": "3.1.3",
- "to-array": "0.1.4"
- },
- "dependencies": {
- "debug": {
- "version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "requires": {
- "ms": "2.0.0"
- }
- },
- "ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
- }
- }
- },
- "socket.io-parser": {
- "version": "3.1.3",
- "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.1.3.tgz",
- "integrity": "sha512-g0a2HPqLguqAczs3dMECuA1RgoGFPyvDqcbaDEdCWY9g59kdUAz3YRmaJBNKXflrHNwB7Q12Gkf/0CZXfdHR7g==",
- "requires": {
- "component-emitter": "1.2.1",
- "debug": "3.1.0",
- "has-binary2": "1.0.3",
- "isarray": "2.0.1"
- },
- "dependencies": {
- "debug": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
- "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
- "requires": {
- "ms": "2.0.0"
- }
- },
- "isarray": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz",
- "integrity": "sha1-o32U7ZzaLVmGXJ92/llu4fM4dB4="
- },
- "ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
- }
- }
- },
"sockjs": {
"version": "0.3.18",
"resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.18.tgz",
@@ -15016,6 +16693,7 @@
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz",
"integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==",
+ "dev": true,
"requires": {
"atob": "2.1.2",
"decode-uri-component": "0.2.0",
@@ -15036,7 +16714,8 @@
"source-map-url": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz",
- "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM="
+ "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=",
+ "dev": true
},
"spdx-correct": {
"version": "3.1.0",
@@ -15167,6 +16846,7 @@
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
"integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==",
+ "dev": true,
"requires": {
"extend-shallow": "3.0.2"
}
@@ -15181,6 +16861,7 @@
"version": "1.16.1",
"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz",
"integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==",
+ "dev": true,
"requires": {
"asn1": "0.2.4",
"assert-plus": "1.0.0",
@@ -15196,7 +16877,8 @@
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
- "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
+ "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
+ "dev": true
}
}
},
@@ -15221,6 +16903,7 @@
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz",
"integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=",
+ "dev": true,
"requires": {
"define-property": "0.2.5",
"object-copy": "0.1.0"
@@ -15230,6 +16913,7 @@
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
"integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+ "dev": true,
"requires": {
"is-descriptor": "0.1.6"
}
@@ -15239,7 +16923,8 @@
"statuses": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz",
- "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4="
+ "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=",
+ "dev": true
},
"stream-browserify": {
"version": "2.0.2",
@@ -15309,8 +16994,7 @@
"strict-uri-encode": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz",
- "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=",
- "dev": true
+ "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM="
},
"string-width": {
"version": "1.0.2",
@@ -15352,7 +17036,8 @@
"stringstream": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.6.tgz",
- "integrity": "sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA=="
+ "integrity": "sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA==",
+ "dev": true
},
"strip-ansi": {
"version": "0.1.1",
@@ -15450,7 +17135,8 @@
"strip-json-comments": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
- "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo="
+ "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
+ "dev": true
},
"style-loader": {
"version": "0.12.4",
@@ -15588,7 +17274,8 @@
"taffydb": {
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/taffydb/-/taffydb-2.6.2.tgz",
- "integrity": "sha1-fLy2S1oUG2ou/CxdLGe04VCyomg="
+ "integrity": "sha1-fLy2S1oUG2ou/CxdLGe04VCyomg=",
+ "dev": true
},
"tapable": {
"version": "0.2.9",
@@ -15596,17 +17283,6 @@
"integrity": "sha512-2wsvQ+4GwBvLPLWsNfLCDYGsW6xb7aeC6utq2Qh0PFwgEy7K7dsma9Jsmb2zSQj7GvYAyUGSntLtsv++GmgL1A==",
"dev": true
},
- "tar": {
- "version": "3.1.5",
- "resolved": "https://registry.npmjs.org/tar/-/tar-3.1.5.tgz",
- "integrity": "sha512-TKJKz1fqBOZBaIQ/MGRKU0EnTGmKMLy4ReTRgP10AgtfOWBbj9PBg4MgY80GFpqGbs2EzcIctW5gbwbP4woDYg==",
- "requires": {
- "minipass": "2.3.5",
- "minizlib": "1.2.1",
- "mkdirp": "0.5.1",
- "yallist": "3.0.3"
- }
- },
"tar-stream": {
"version": "0.4.7",
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-0.4.7.tgz",
@@ -15639,22 +17315,6 @@
}
}
},
- "temp": {
- "version": "0.8.3",
- "resolved": "https://registry.npmjs.org/temp/-/temp-0.8.3.tgz",
- "integrity": "sha1-4Ma8TSa5AxJEEOT+2BEDAU38H1k=",
- "requires": {
- "os-tmpdir": "1.0.2",
- "rimraf": "2.2.8"
- },
- "dependencies": {
- "rimraf": {
- "version": "2.2.8",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz",
- "integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI="
- }
- }
- },
"tether": {
"version": "1.4.6",
"resolved": "https://registry.npmjs.org/tether/-/tether-1.4.6.tgz",
@@ -15671,11 +17331,6 @@
"integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=",
"dev": true
},
- "throttleit": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-1.0.0.tgz",
- "integrity": "sha1-nnhYNtr0Z0MUWlmEtiaNgoUorGw="
- },
"through": {
"version": "2.3.8",
"resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz",
@@ -15742,6 +17397,11 @@
"resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.1.tgz",
"integrity": "sha1-9PrTM0R7wLB9TcjpIJ2POaisd+g="
},
+ "tinyqueue": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/tinyqueue/-/tinyqueue-1.2.3.tgz",
+ "integrity": "sha512-Qz9RgWuO9l8lT+Y9xvbzhPT2efIUIFd69N7eF7tJ9lnQl0iLj1M7peK7IoUGZL9DJHw9XftqLreccfxcQgYLxA=="
+ },
"title-case": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/title-case/-/title-case-2.1.1.tgz",
@@ -15762,6 +17422,7 @@
"version": "0.0.31",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.31.tgz",
"integrity": "sha1-jzirlDjhcxXl29izZX6L+yd65Kc=",
+ "dev": true,
"requires": {
"os-tmpdir": "1.0.2"
}
@@ -15769,7 +17430,8 @@
"to-array": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/to-array/-/to-array-0.1.4.tgz",
- "integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA="
+ "integrity": "sha1-F+bBH3PdTz10zaek/zI46a2b+JA=",
+ "dev": true
},
"to-arraybuffer": {
"version": "1.0.1",
@@ -15793,6 +17455,7 @@
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz",
"integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=",
+ "dev": true,
"requires": {
"kind-of": "3.2.2"
}
@@ -15801,6 +17464,7 @@
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz",
"integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==",
+ "dev": true,
"requires": {
"define-property": "2.0.2",
"extend-shallow": "3.0.2",
@@ -15812,6 +17476,7 @@
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz",
"integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=",
+ "dev": true,
"requires": {
"is-number": "3.0.0",
"repeat-string": "1.6.1"
@@ -15828,34 +17493,33 @@
"integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==",
"dev": true
},
+ "topojson-client": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/topojson-client/-/topojson-client-3.0.0.tgz",
+ "integrity": "sha1-H5kpOnfvQqRI0DKoGqmCtz82DS8=",
+ "requires": {
+ "commander": "2.20.0"
+ }
+ },
+ "topojson-server": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/topojson-server/-/topojson-server-3.0.0.tgz",
+ "integrity": "sha1-N4546Hw5cqe1vixdYENptrrmnF4=",
+ "requires": {
+ "commander": "2.20.0"
+ }
+ },
"toposort": {
"version": "0.2.12",
"resolved": "https://registry.npmjs.org/toposort/-/toposort-0.2.12.tgz",
"integrity": "sha1-x9KYTz1IwhcxXMMtdwiIt3lJHoE=",
"dev": true
},
- "touch": {
- "version": "0.0.3",
- "resolved": "https://registry.npmjs.org/touch/-/touch-0.0.3.tgz",
- "integrity": "sha1-Ua7z1ElXHU8oel2Hyci0kYGg2x0=",
- "requires": {
- "nopt": "1.0.10"
- },
- "dependencies": {
- "nopt": {
- "version": "1.0.10",
- "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz",
- "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=",
- "requires": {
- "abbrev": "1.1.1"
- }
- }
- }
- },
"tough-cookie": {
"version": "2.3.4",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz",
"integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==",
+ "dev": true,
"requires": {
"punycode": "1.4.1"
}
@@ -15866,11 +17530,6 @@
"integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=",
"dev": true
},
- "traverse": {
- "version": "0.3.9",
- "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz",
- "integrity": "sha1-cXuPIgzAu3tE5AUUwisui7xw2Lk="
- },
"trim": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz",
@@ -15910,6 +17569,7 @@
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
"integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
+ "dev": true,
"requires": {
"safe-buffer": "5.1.2"
}
@@ -16004,6 +17664,11 @@
"resolved": "https://registry.npmjs.org/turf-invariant/-/turf-invariant-3.0.12.tgz",
"integrity": "sha1-O5UlOVOZHr2WLdNdT2cEwofejr4="
},
+ "turf-jsts": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/turf-jsts/-/turf-jsts-1.2.3.tgz",
+ "integrity": "sha512-Ja03QIJlPuHt4IQ2FfGex4F4JAr8m3jpaHbFbQrgwr7s7L6U8ocrHiF3J1+wf9jzhGKxvDeaCAnGDot8OjGFyA=="
+ },
"turf-meta": {
"version": "3.0.12",
"resolved": "https://registry.npmjs.org/turf-meta/-/turf-meta-3.0.12.tgz",
@@ -16045,7 +17710,18 @@
"tweetnacl": {
"version": "0.14.5",
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
- "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q="
+ "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
+ "dev": true
+ },
+ "two-product": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/two-product/-/two-product-1.0.2.tgz",
+ "integrity": "sha1-Z9ldSyV6kh4stL16+VEfkIhSLqo="
+ },
+ "two-sum": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/two-sum/-/two-sum-1.0.0.tgz",
+ "integrity": "sha1-MdPzIjnk9zHsqd+RVeKyl/AIq2Q="
},
"type-check": {
"version": "0.3.2",
@@ -16080,6 +17756,7 @@
"version": "2.8.29",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz",
"integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=",
+ "dev": true,
"requires": {
"source-map": "0.5.7",
"uglify-to-browserify": "1.0.2",
@@ -16089,12 +17766,8 @@
"uglify-to-browserify": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz",
- "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc="
- },
- "ultron": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz",
- "integrity": "sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og=="
+ "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=",
+ "dev": true
},
"uncontrollable": {
"version": "4.1.0",
@@ -16113,6 +17786,7 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz",
"integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=",
+ "dev": true,
"requires": {
"arr-union": "3.1.0",
"get-value": "2.0.6",
@@ -16124,6 +17798,7 @@
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
"integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+ "dev": true,
"requires": {
"is-extendable": "0.1.1"
}
@@ -16132,6 +17807,7 @@
"version": "0.4.3",
"resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz",
"integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=",
+ "dev": true,
"requires": {
"extend-shallow": "2.0.1",
"is-extendable": "0.1.1",
@@ -16179,6 +17855,7 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz",
"integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=",
+ "dev": true,
"requires": {
"has-value": "0.3.1",
"isobject": "3.0.1"
@@ -16188,6 +17865,7 @@
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz",
"integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=",
+ "dev": true,
"requires": {
"get-value": "2.0.6",
"has-values": "0.1.4",
@@ -16198,6 +17876,7 @@
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz",
"integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=",
+ "dev": true,
"requires": {
"isarray": "1.0.0"
}
@@ -16207,7 +17886,8 @@
"has-values": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz",
- "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E="
+ "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=",
+ "dev": true
}
}
},
@@ -16250,7 +17930,8 @@
"urix": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz",
- "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI="
+ "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=",
+ "dev": true
},
"url": {
"version": "0.11.0",
@@ -16332,7 +18013,8 @@
"use": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz",
- "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ=="
+ "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==",
+ "dev": true
},
"user-home": {
"version": "1.1.1",
@@ -16399,12 +18081,6 @@
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz",
"integrity": "sha1-ZUS7ot/ajBzxfmKaOjBeK7H+5sE="
},
- "uws": {
- "version": "9.14.0",
- "resolved": "https://registry.npmjs.org/uws/-/uws-9.14.0.tgz",
- "integrity": "sha512-HNMztPP5A1sKuVFmdZ6BPVpBQd5bUjNC8EFMFiICK+oho/OQsAJy5hnIx4btMHiOk8j04f/DbIlqnEZ9d72dqg==",
- "optional": true
- },
"validate-npm-package-license": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
@@ -16415,6 +18091,11 @@
"spdx-expression-parse": "3.0.0"
}
},
+ "validator": {
+ "version": "10.11.0",
+ "resolved": "https://registry.npmjs.org/validator/-/validator-10.11.0.tgz",
+ "integrity": "sha512-X/p3UZerAIsbBfN/IwahhYaBbY68EN/UQBWHtsbXGT5bfrH/p4NQzUCG1kF/rtKaNpnJ7jAu6NGTdSNtyNIXMw=="
+ },
"value-equal": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/value-equal/-/value-equal-0.2.1.tgz",
@@ -16436,6 +18117,7 @@
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
"integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
+ "dev": true,
"requires": {
"assert-plus": "1.0.0",
"core-util-is": "1.0.2",
@@ -16445,7 +18127,8 @@
"assert-plus": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
- "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
+ "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
+ "dev": true
}
}
},
@@ -16570,11 +18253,6 @@
"propagating-hammerjs": "1.4.6"
}
},
- "vlq": {
- "version": "0.2.3",
- "resolved": "https://registry.npmjs.org/vlq/-/vlq-0.2.3.tgz",
- "integrity": "sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow=="
- },
"vm-browserify": {
"version": "0.0.4",
"resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz",
@@ -16598,14 +18276,6 @@
"jsonix": "2.4.1"
}
},
- "walk": {
- "version": "2.3.9",
- "resolved": "https://registry.npmjs.org/walk/-/walk-2.3.9.tgz",
- "integrity": "sha1-MbTbZnjyrgHDnqn7hyWpAx5Vins=",
- "requires": {
- "foreachasync": "3.0.0"
- }
- },
"ware": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/ware/-/ware-1.3.0.tgz",
@@ -17137,18 +18807,11 @@
"integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=",
"dev": true
},
- "wide-align": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
- "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
- "requires": {
- "string-width": "1.0.2"
- }
- },
"window-size": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz",
- "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0="
+ "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=",
+ "dev": true
},
"wkt-parser": {
"version": "https://github.com/geosolutions-it/wkt-parser/tarball/mapstore2_fixes",
@@ -17157,7 +18820,8 @@
"wordwrap": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz",
- "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc="
+ "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=",
+ "dev": true
},
"worker-loader": {
"version": "1.1.1",
@@ -17209,17 +18873,8 @@
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
- "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
- },
- "ws": {
- "version": "3.3.3",
- "resolved": "https://registry.npmjs.org/ws/-/ws-3.3.3.tgz",
- "integrity": "sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA==",
- "requires": {
- "async-limiter": "1.0.0",
- "safe-buffer": "5.1.2",
- "ultron": "1.1.1"
- }
+ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
+ "dev": true
},
"wtf-8": {
"version": "1.0.0",
@@ -17267,11 +18922,6 @@
"lodash": "4.17.5"
}
},
- "xmlcreate": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-1.0.2.tgz",
- "integrity": "sha1-+mv3YqYKQT+z3Y9LA8WyaSONMI8="
- },
"xmldom": {
"version": "0.1.27",
"resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.27.tgz",
@@ -17282,11 +18932,6 @@
"resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz",
"integrity": "sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw="
},
- "xmlhttprequest-ssl": {
- "version": "1.5.5",
- "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz",
- "integrity": "sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4="
- },
"xtend": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
@@ -17299,15 +18944,11 @@
"integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=",
"dev": true
},
- "yallist": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz",
- "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A=="
- },
"yargs": {
"version": "3.10.0",
"resolved": "http://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz",
"integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=",
+ "dev": true,
"requires": {
"camelcase": "1.2.1",
"cliui": "2.1.0",
@@ -17345,7 +18986,8 @@
"yeast": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/yeast/-/yeast-0.1.2.tgz",
- "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk="
+ "integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk=",
+ "dev": true
}
}
}
diff --git a/package.json b/package.json
index a67946a5ea..d528d3ca9c 100644
--- a/package.json
+++ b/package.json
@@ -85,6 +85,7 @@
"@mapbox/togeojson": "0.16.0",
"@turf/bbox": "4.1.0",
"@turf/center": "5.1.5",
+ "@turf/circle": "6.0.1",
"@turf/great-circle": "5.1.5",
"@turf/inside": "4.1.0",
"@turf/bbox-polygon": "5.1.5",
@@ -113,6 +114,8 @@
"eventlistener": "0.0.1",
"file-saver": "1.3.3",
"fs-extra": "3.0.1",
+ "geostyler-sld-parser": "https://github.com/geosolutions-it/geostyler-sld-parser/tarball/ms2",
+ "geostyler-openlayers-parser": "https://github.com/geosolutions-it/geostyler-openlayers-parser/tarball/ms2",
"history": "4.6.1",
"html2canvas": "0.5.0-beta4",
"immutable": "4.0.0-rc.12",
@@ -138,7 +141,7 @@
"node-geo-distance": "1.2.0",
"object-assign": "4.1.1",
"ogc-schemas": "2.6.1",
- "openlayers": "4.6.4",
+ "ol": "5.3.0",
"pdfviewer": "0.3.2",
"proj4": "https://github.com/geosolutions-it/proj4js/tarball/mapstore2_fixes",
"prop-types": "15.6.0",
diff --git a/project/custom/templates/index.html b/project/custom/templates/index.html
index 847db456db..e2101f9641 100644
--- a/project/custom/templates/index.html
+++ b/project/custom/templates/index.html
@@ -7,14 +7,12 @@
__PROJECTDESCRIPTION__
-
-
diff --git a/project/custom/templates/webpack.config.js b/project/custom/templates/webpack.config.js
index 3f17a183ec..abe7f9595d 100644
--- a/project/custom/templates/webpack.config.js
+++ b/project/custom/templates/webpack.config.js
@@ -41,7 +41,6 @@ module.exports = (env) => {
"__DEVTOOLS__": !isProduction
}),
new NormalModuleReplacementPlugin(/leaflet$/, path.join(__dirname, "MapStore2", "web", "client", "libs", "leaflet")),
- new NormalModuleReplacementPlugin(/openlayers$/, path.join(__dirname, "MapStore2", "web", "client", "libs", "openlayers")),
new NormalModuleReplacementPlugin(/cesium$/, path.join(__dirname, "MapStore2", "web", "client", "libs", "cesium")),
new NormalModuleReplacementPlugin(/proj4$/, path.join(__dirname, "MapStore2", "web", "client", "libs", "proj4")),
new NoEmitOnErrorsPlugin(),
diff --git a/project/standard/templates/index.html b/project/standard/templates/index.html
index bb8ee79d50..30249737b6 100644
--- a/project/standard/templates/index.html
+++ b/project/standard/templates/index.html
@@ -86,13 +86,11 @@
-
-
diff --git a/project/standard/templates/indexTemplate.html b/project/standard/templates/indexTemplate.html
index 7d2a1c4d19..25531bb99f 100644
--- a/project/standard/templates/indexTemplate.html
+++ b/project/standard/templates/indexTemplate.html
@@ -86,13 +86,11 @@
-
-
diff --git a/web/client/api/WFS3.js b/web/client/api/WFS3.js
new file mode 100644
index 0000000000..69aac58166
--- /dev/null
+++ b/web/client/api/WFS3.js
@@ -0,0 +1,144 @@
+/*
+ * Copyright 2019, GeoSolutions Sas.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+import axios from 'axios';
+import head from 'lodash/head';
+import isString from 'lodash/isString';
+import ConfigUtils from '../utils/ConfigUtils';
+
+const capabilitiesCache = {};
+
+const collectionToLayer = (collection) => {
+ const { name, title, extent, links } = collection;
+ const spatial = extent && extent.spatial || [-180, -90, 180, 90];
+ const { href: layerUrl, type: format } = head((links || []).filter(({ rel }) => rel === 'tiles')) || {};
+ const { href: tilingSchemes } = head((links || []).filter(({ rel }) => rel === 'tilingSchemes')) || {};
+ const { href: tilingScheme } = head((links || []).filter(({ rel }) => rel === 'tilingScheme')) || {};
+ return {
+ name,
+ title,
+ type: 'wfs3',
+ visibility: true,
+ url: layerUrl,
+ format,
+ tilingScheme,
+ tilingSchemes,
+ bbox: {
+ crs: 'EPSG:4326',
+ bounds: {
+ minx: spatial[0],
+ miny: spatial[1],
+ maxx: spatial[2],
+ maxy: spatial[3]
+ }
+ }
+ };
+};
+
+const searchAndPaginate = (json = {}, startPosition, maxRecords, text, url) => {
+ const { collections } = json;
+ const filteredLayers = collections
+ .filter((layer = {}) => !text
+ || layer.name && layer.name.toLowerCase().indexOf(text.toLowerCase()) !== -1
+ || layer.title && layer.title.toLowerCase().indexOf(text.toLowerCase()) !== -1);
+ return {
+ numberOfRecordsMatched: filteredLayers.length,
+ numberOfRecordsReturned: Math.min(maxRecords, filteredLayers.length),
+ nextRecord: startPosition + Math.min(maxRecords, filteredLayers.length) + 1,
+ records: filteredLayers
+ .filter((layer, index) => index >= startPosition - 1 && index < startPosition - 1 + maxRecords)
+ .map((collection) => ({
+ ...collection,
+ ...collectionToLayer(collection),
+ capabilitiesUrl: url
+ }))
+ };
+};
+
+const parseUrl = function(url) {
+ const serviceUrl = (url || '').split(/\/wfs3\//)[0];
+ return `${serviceUrl}/wfs3/collections`;
+};
+
+export const getRecords = function(url, startPosition, maxRecords, text) {
+ const cached = capabilitiesCache[url];
+ if (cached && new Date().getTime() < cached.timestamp + (ConfigUtils.getConfigProp('cacheExpire') || 60) * 1000) {
+ return new Promise((resolve) => {
+ resolve(searchAndPaginate(cached.data, startPosition, maxRecords, text, url));
+ });
+ }
+ return axios.get(parseUrl(url))
+ .then(({ data }) => {
+ capabilitiesCache[url] = {
+ timestamp: new Date().getTime(),
+ data
+ };
+ return searchAndPaginate(data, startPosition, maxRecords, text, url);
+ });
+};
+
+export const textSearch = function(url, startPosition, maxRecords, text) {
+ return getRecords(url, startPosition, maxRecords, text);
+};
+
+export const getTilingSchemes = (layer) => {
+ const { tilingSchemes, tilingScheme } = layer;
+ if (isString(tilingSchemes)) {
+ return axios.get(tilingSchemes)
+ .then(({ data }) => {
+ return data && data.tilingSchemes && data.tilingSchemes.length > 0
+ ? axios.all(
+ data.tilingSchemes.map((tilingSchemeId) =>
+ axios.get(tilingScheme.replace('{tilingSchemeId}', tilingSchemeId))
+ .then(({ data: scheme }) => scheme)
+ .catch(() => null)
+ )
+ )
+ .then((schemes) => ({
+ tilingSchemes: {
+ url: tilingSchemes,
+ schemes: schemes.filter(scheme => scheme)
+ },
+ allowedSRS: schemes
+ .filter(scheme => scheme)
+ .reduce((acc, { supportedCRS }) => {
+ return {
+ ...acc,
+ [supportedCRS]: true
+ };
+ }, {})
+ }))
+ : {
+ tilingSchemes: {
+ url: tilingSchemes,
+ schemes: null
+ },
+ allowedSRS: {}
+ };
+ });
+ }
+ return new Promise((resolve) => resolve(tilingSchemes));
+};
+
+export const getLayerFromId = (serviceUrl, collectionId) => {
+ return axios.get(`${parseUrl(serviceUrl)}/${collectionId}`)
+ .then(({ data: collection }) => {
+ const layer = collectionToLayer(collection);
+ return getTilingSchemes(layer)
+ .then((params) => ({
+ ...layer,
+ ...params
+ }));
+ });
+};
+
+export const reset = () => {
+ Object.keys(capabilitiesCache).forEach(key => {
+ delete capabilitiesCache[key];
+ });
+};
diff --git a/web/client/api/__tests__/WFS3-test.js b/web/client/api/__tests__/WFS3-test.js
new file mode 100644
index 0000000000..e709702540
--- /dev/null
+++ b/web/client/api/__tests__/WFS3-test.js
@@ -0,0 +1,252 @@
+/*
+ * Copyright 2019, GeoSolutions Sas.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+import expect from 'expect';
+import {
+ getTilingSchemes,
+ getLayerFromId,
+ textSearch,
+ reset
+} from '../WFS3';
+import MockAdapter from 'axios-mock-adapter';
+import axios from '../../libs/ajax';
+
+let mockAxios;
+
+describe('Test WFS3 API', () => {
+
+ beforeEach(done => {
+ mockAxios = new MockAdapter(axios);
+ setTimeout(done);
+ });
+
+ afterEach(done => {
+ mockAxios.restore();
+ setTimeout(done);
+ reset();
+ });
+
+ it('test getTilingSchemes', (done) => {
+
+ const TILING_SCHEMES_URL = '/geoserver/wfs3/collections/layer_name/tiles';
+ const TILING_SCHEMES_ID = 'GoogleMapsCompatible';
+ const TILING_SCHEME = {
+ type: 'TileMatrixSet',
+ identifier: 'GoogleMapsCompatible',
+ title: 'GoogleMapsCompatible',
+ supportedCRS: 'EPSG:3857',
+ tileMatrix: [{
+ matrixHeight: 1,
+ matrixWidth: 1,
+ tileHeight: 256,
+ tileWidth: 256,
+ identifier: '0',
+ scaleDenominator: 559082263.9508929,
+ topLeftCorner: [
+ -20037508.34,
+ 20037508
+ ],
+ type: 'TileMatrix'
+ }],
+ boundingBox: {
+ crs: 'http://www.opengis.net/def/crs/EPSG/0/3857',
+ lowerCorner: [
+ -20037508.34,
+ -20037508.34
+ ],
+ upperCorner: [
+ 20037508.34,
+ 20037508.34
+ ],
+ type: 'BoundingBox'
+ },
+ wellKnownScaleSet: 'http://www.opengis.net/def/wkss/OGC/1.0/GoogleMapsCompatible'
+ };
+
+ mockAxios.onGet(TILING_SCHEMES_URL).reply(() => {
+ return [ 200, { tilingSchemes: [ TILING_SCHEMES_ID ] }];
+ });
+
+ mockAxios.onGet(`${TILING_SCHEMES_URL}/${TILING_SCHEMES_ID}`).reply(() => {
+ return [ 200, TILING_SCHEME];
+ });
+
+ const layer = {
+ tilingScheme: `${TILING_SCHEMES_URL}/{tilingSchemeId}`,
+ tilingSchemes: TILING_SCHEMES_URL
+ };
+
+ getTilingSchemes(layer)
+ .then(({ tilingSchemes, allowedSRS }) => {
+ expect(allowedSRS).toEqual({ 'EPSG:3857': true });
+ expect(tilingSchemes).toEqual({
+ url: TILING_SCHEMES_URL,
+ schemes: [ TILING_SCHEME ]
+ });
+ done();
+ });
+ });
+
+ it('test getLayerFromId', (done) => {
+ const SERVICE_URL = '/geoserver/wfs3/collections/';
+ const COLLECTIONS_ID = 'layer_name';
+ const TILING_SCHEMES_URL = '/geoserver/wfs3/collections/layer_name/tiles';
+ const TILING_SCHEMES_ID = 'GoogleMapsCompatible';
+ const COLLECTION = {
+ name: COLLECTIONS_ID,
+ title: 'Layer Title',
+ extent: {
+ spatial: [-180, -90, 180, 90]
+ },
+ links: [
+ {
+ href: '/geoserver/wfs3/collections/layer_name/tiles/{tilingSchemeId}/{level}/{row}/{col}',
+ rel: 'tiles',
+ type: 'application/vnd.mapbox-vector-tile'
+ },
+ {
+ href: '/geoserver/wfs3/collections/layer_name/tiles/{tilingSchemeId}',
+ rel: 'tilingScheme',
+ type: 'application/json',
+ title: '...'
+ },
+ {
+ href: TILING_SCHEMES_URL,
+ rel: 'tilingSchemes',
+ type: 'application/json',
+ title: '...'
+ }
+ ]
+ };
+
+ const TILING_SCHEME = {
+ type: 'TileMatrixSet',
+ identifier: 'GoogleMapsCompatible',
+ title: 'GoogleMapsCompatible',
+ supportedCRS: 'EPSG:3857',
+ tileMatrix: [{
+ matrixHeight: 1,
+ matrixWidth: 1,
+ tileHeight: 256,
+ tileWidth: 256,
+ identifier: '0',
+ scaleDenominator: 559082263.9508929,
+ topLeftCorner: [
+ -20037508.34,
+ 20037508
+ ],
+ type: 'TileMatrix'
+ }],
+ boundingBox: {
+ crs: 'http://www.opengis.net/def/crs/EPSG/0/3857',
+ lowerCorner: [
+ -20037508.34,
+ -20037508.34
+ ],
+ upperCorner: [
+ 20037508.34,
+ 20037508.34
+ ],
+ type: 'BoundingBox'
+ },
+ wellKnownScaleSet: 'http://www.opengis.net/def/wkss/OGC/1.0/GoogleMapsCompatible'
+ };
+
+ mockAxios.onGet(`${SERVICE_URL}${COLLECTIONS_ID}`).reply(() => {
+ return [ 200, COLLECTION];
+ });
+
+ mockAxios.onGet(TILING_SCHEMES_URL).reply(() => {
+ return [ 200, { tilingSchemes: [ TILING_SCHEMES_ID ] }];
+ });
+
+ mockAxios.onGet(`${TILING_SCHEMES_URL}/${TILING_SCHEMES_ID}`).reply(() => {
+ return [ 200, TILING_SCHEME];
+ });
+
+ getLayerFromId(SERVICE_URL, COLLECTIONS_ID)
+ .then((layer) => {
+ expect(layer).toEqual({
+ name: COLLECTIONS_ID,
+ title: 'Layer Title',
+ type: 'wfs3',
+ visibility: true,
+ url: '/geoserver/wfs3/collections/layer_name/tiles/{tilingSchemeId}/{level}/{row}/{col}',
+ format: 'application/vnd.mapbox-vector-tile',
+ tilingScheme: '/geoserver/wfs3/collections/layer_name/tiles/{tilingSchemeId}',
+ tilingSchemes: {
+ url: TILING_SCHEMES_URL,
+ schemes: [ TILING_SCHEME ]
+ },
+ allowedSRS: { 'EPSG:3857': true },
+ bbox: {
+ crs: 'EPSG:4326',
+ bounds: {
+ minx: -180,
+ miny: -90,
+ maxx: 180,
+ maxy: 90
+ }
+ }});
+ done();
+ });
+ });
+ it('test textSearch', (done) => {
+ const TILING_SCHEMES_URL = '/geoserver/wfs3/collections';
+ const START_POSITION = 1;
+ const MAX_RECORDS = 1;
+ const TEXT = '';
+ const COLLECTIONS = [
+ {
+ name: 'layer_name_01',
+ title: 'layer title 01',
+ extent: {
+ spatial: [-180, -90, 180, 90]
+ },
+ links: []
+ },
+ {
+ name: 'layer_name_02',
+ title: 'layer title 02',
+ extent: {
+ spatial: [-180, -90, 180, 90]
+ },
+ links: []
+ }
+ ];
+
+ mockAxios.onGet(TILING_SCHEMES_URL)
+ .reply(() => {
+ return [ 200, { collections: COLLECTIONS }];
+ });
+ textSearch(TILING_SCHEMES_URL, START_POSITION, MAX_RECORDS, TEXT)
+ .then((res) => {
+ expect(res).toEqual({
+ numberOfRecordsMatched: 2,
+ numberOfRecordsReturned: 1,
+ nextRecord: 3,
+ records: [{
+ name: 'layer_name_01',
+ title: 'layer title 01',
+ extent: { spatial: [ -180, -90, 180, 90 ] },
+ links: [],
+ type: 'wfs3',
+ visibility: true,
+ url: undefined,
+ format: undefined,
+ tilingScheme: undefined,
+ tilingSchemes: undefined,
+ bbox: { crs: 'EPSG:4326', bounds: { minx: -180, miny: -90, maxx: 180, maxy: 90 } },
+ capabilitiesUrl: '/geoserver/wfs3/collections'
+ }]
+ });
+ done();
+ });
+ });
+});
+
diff --git a/web/client/components/map/__tests__/BaseMap-test.jsx b/web/client/components/map/__tests__/BaseMap-test.jsx
index 869ade9b61..96d56e3bd3 100644
--- a/web/client/components/map/__tests__/BaseMap-test.jsx
+++ b/web/client/components/map/__tests__/BaseMap-test.jsx
@@ -5,12 +5,13 @@
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
-const React = require('react');
-const ReactDOM = require('react-dom');
-const expect = require('expect');
+import React from 'react';
+import ReactDOM from 'react-dom';
+import expect from 'expect';
+
+import BaseMap from '../BaseMap';
+import mapType from '../enhancers/mapType';
-const BaseMap = require('../BaseMap');
-const mapType = require('../enhancers/mapType');
const TestMap = mapType(BaseMap);
const LAYER_OSM = {
diff --git a/web/client/components/map/cesium/__tests__/Layer-test-chrome.jsx b/web/client/components/map/cesium/__tests__/Layer-test-chrome.jsx
index 091c5de49d..ac62eef837 100644
--- a/web/client/components/map/cesium/__tests__/Layer-test-chrome.jsx
+++ b/web/client/components/map/cesium/__tests__/Layer-test-chrome.jsx
@@ -162,6 +162,63 @@ describe('Cesium layer', () => {
expect(map.imageryLayers._layers[0]._imageryProvider._tileProvider._subdomains.length).toBe(1);
expect(map.imageryLayers._layers[0]._imageryProvider.proxy.proxy).toExist();
});
+
+ it('test wms vector formats must change to default image format (image/png)', () => {
+ const options = {
+ "type": 'wms',
+ "visibility": true,
+ "name": 'osm:vector_tile',
+ "group": 'Vector',
+ "url": "http://demo.geo-solutions.it/geoserver/wms"
+ };
+
+ let layer = ReactDOM.render(, document.getElementById("container"));
+
+ expect(layer).toExist();
+
+ expect(layer.layer._tileProvider._url.indexOf('format=image%2Fpng') !== -1).toBe(true);
+
+ layer = ReactDOM.render(, document.getElementById("container"));
+
+ expect(layer).toExist();
+ expect(layer.layer._tileProvider._url.indexOf('format=image%2Fpng') !== -1).toBe(true);
+
+ layer = ReactDOM.render(, document.getElementById("container"));
+
+ expect(layer).toExist();
+ expect(layer.layer._tileProvider._url.indexOf('format=image%2Fpng') !== -1).toBe(true);
+
+ // check if it switches to jpeg
+ layer = ReactDOM.render(, document.getElementById("container"));
+
+ expect(layer).toExist();
+ expect(layer.layer._tileProvider._url.indexOf('format=image%2Fjpeg') !== -1).toBe(true);
+ });
+
it('wms layer with credits', () => {
var options = {
"type": "wms",
@@ -825,4 +882,73 @@ describe('Cesium layer', () => {
expect(cqlFilter).toBe("((\"prop2\" = 'value2')) AND (prop = 'value')");
});
+
+
+ it('test wmts vector formats must change to default image format (image/png)', () => {
+ const options = {
+ type: 'wmts',
+ visibility: true,
+ name: 'osm:vector_tile',
+ group: 'Vector',
+ tileMatrixSet: 'EPSG:900913',
+ matrixIds: {
+ 'EPSG:4326': [{
+ ranges: {
+ cols: {max: 0, min: 0},
+ rows: {max: 0, min: 0}
+ }
+ }]
+ },
+ url: 'http://sample.server/geoserver/gwc/service/wmts'
+ };
+
+ const GeoJSON = 'application/json;type=geojson';
+ let layer = ReactDOM.render(, document.getElementById("container"));
+
+ expect(layer).toExist();
+ expect(layer.layer._format).toBe('image/png');
+
+ const MVT = 'application/vnd.mapbox-vector-tile';
+ layer = ReactDOM.render(, document.getElementById("container"));
+
+ expect(layer).toExist();
+ expect(layer.layer._format).toBe('image/png');
+
+ const TopoJSON = 'application/json;type=topojson';
+ layer = ReactDOM.render(, document.getElementById("container"));
+
+ expect(layer).toExist();
+ expect(layer.layer._format).toBe('image/png');
+
+ // check if it switches to jpeg
+ const JPEG = 'image/jpeg';
+ layer = ReactDOM.render(, document.getElementById("container"));
+
+ expect(layer).toExist();
+ expect(layer.layer._format).toBe(JPEG);
+ });
});
diff --git a/web/client/components/map/cesium/plugins/WMSLayer.js b/web/client/components/map/cesium/plugins/WMSLayer.js
index fac6a6e1ee..6da659e72e 100644
--- a/web/client/components/map/cesium/plugins/WMSLayer.js
+++ b/web/client/components/map/cesium/plugins/WMSLayer.js
@@ -18,6 +18,8 @@ const {getAuthenticationParam, getURLs} = require('../../../../utils/LayersUtils
const { optionsToVendorParams } = require('../../../../utils/VendorParamsUtils');
const SecurityUtils = require('../../../../utils/SecurityUtils');
+const { isVectorFormat } = require('../../../../utils/VectorTileUtils');
+
function splitUrl(originalUrl) {
let url = originalUrl;
let queryString = "";
@@ -57,7 +59,7 @@ function wmsToCesiumOptionsSingleTile(options) {
const params = optionsToVendorParams(options);
const parameters = assign({
styles: options.style || "",
- format: options.format || 'image/png',
+ format: isVectorFormat(options.format) && 'image/png' || options.format || 'image/png',
transparent: options.transparent !== undefined ? options.transparent : true,
opacity: opacity,
tiled: options.tiled !== undefined ? options.tiled : true,
@@ -94,7 +96,7 @@ function wmsToCesiumOptions(options) {
enablePickFeatures: false,
parameters: assign({
styles: options.style || "",
- format: options.format || 'image/png',
+ format: isVectorFormat(options.format) && 'image/png' || options.format || 'image/png',
transparent: options.transparent !== undefined ? options.transparent : true,
opacity: opacity,
tiled: options.tiled !== undefined ? options.tiled : true
diff --git a/web/client/components/map/cesium/plugins/WMTSLayer.js b/web/client/components/map/cesium/plugins/WMTSLayer.js
index d319e89ded..2710da3198 100644
--- a/web/client/components/map/cesium/plugins/WMTSLayer.js
+++ b/web/client/components/map/cesium/plugins/WMTSLayer.js
@@ -6,15 +6,16 @@
* LICENSE file in the root directory of this source tree.
*/
-const Layers = require('../../../../utils/cesium/Layers');
-const ConfigUtils = require('../../../../utils/ConfigUtils');
-const ProxyUtils = require('../../../../utils/ProxyUtils');
-const WMTSUtils = require('../../../../utils/WMTSUtils');
-const Cesium = require('../../../../libs/cesium');
-const {getAuthenticationParam, getURLs} = require('../../../../utils/LayersUtils');
-const assign = require('object-assign');
-const { isObject, isArray, slice, get, head} = require('lodash');
-const urlParser = require('url');
+import Layers from '../../../../utils/cesium/Layers';
+import ConfigUtils from '../../../../utils/ConfigUtils';
+import ProxyUtils from '../../../../utils/ProxyUtils';
+import WMTSUtils from '../../../../utils/WMTSUtils';
+import Cesium from '../../../../libs/cesium';
+import { getAuthenticationParam, getURLs } from '../../../../utils/LayersUtils';
+import assign from 'object-assign';
+import { isObject, isArray, slice, get, head} from 'lodash';
+import urlParser from 'url';
+import { isVectorFormat } from '../../../../utils/VectorTileUtils';
function splitUrl(originalUrl) {
let url = originalUrl;
@@ -112,7 +113,8 @@ function wmtsToCesiumOptions(options) {
return assign({
// TODO: multi-domain support, if use {s} switches to RESTFul mode
url: head(getURLs(isArray(options.url) ? options.url : [options.url], queryParametersString)),
- format: options.format || 'image/png',
+ // set image format to png if vector to avoid errors while switching between map type
+ format: isVectorFormat(options.format) && 'image/png' || options.format || 'image/png',
isValid,
// tileDiscardPolicy: {
// isReady: () => true,
@@ -148,7 +150,8 @@ const createLayer = options => {
};
const updateLayer = (layer, newOptions, oldOptions) => {
- if (newOptions.securityToken !== oldOptions.securityToken) {
+ if (newOptions.securityToken !== oldOptions.securityToken
+ || oldOptions.format !== newOptions.format) {
return createLayer(newOptions);
}
return null;
diff --git a/web/client/components/map/leaflet/DrawSupport.jsx b/web/client/components/map/leaflet/DrawSupport.jsx
index c990ccf430..8f7da8c640 100644
--- a/web/client/components/map/leaflet/DrawSupport.jsx
+++ b/web/client/components/map/leaflet/DrawSupport.jsx
@@ -28,7 +28,7 @@ L.Draw.Polygon.prototype._calculateFinishDistance = function(t) {
};
const {isSimpleGeomType, getSimpleGeomType} = require('../../../utils/MapUtils');
-const {boundsToOLExtent} = require('../../../utils/DrawSupportUtils');
+const {boundsToOLExtent} = require('../../../utils/leaflet/DrawSupportUtils');
const assign = require('object-assign');
const CoordinatesUtils = require('../../../utils/CoordinatesUtils');
diff --git a/web/client/components/map/leaflet/__tests__/Layer-test.jsx b/web/client/components/map/leaflet/__tests__/Layer-test.jsx
index d531e63f23..ab74aeb5ae 100644
--- a/web/client/components/map/leaflet/__tests__/Layer-test.jsx
+++ b/web/client/components/map/leaflet/__tests__/Layer-test.jsx
@@ -186,6 +186,78 @@ describe('Leaflet layer', () => {
expect(urls.length).toBe(1);
});
+ it('test wms vector formats must change to default image format (image/png)', () => {
+ const options = {
+ type: 'wms',
+ visibility: true,
+ name: 'osm:vector_tile',
+ group: 'Vector',
+ "url": "http://sample.server/geoserver/wms"
+ };
+
+ let layer = ReactDOM.render(, document.getElementById("container"));
+ expect(layer).toExist();
+ let lcount = 0;
+ map.eachLayer(function() { lcount++; });
+ expect(lcount).toBe(1);
+
+ expect(layer.layer.wmsParams.format).toBe('image/png');
+
+ layer = ReactDOM.render(, document.getElementById("container"));
+
+ expect(layer).toExist();
+ lcount = 0;
+ map.eachLayer(function() { lcount++; });
+ expect(lcount).toBe(1);
+
+ expect(layer.layer.wmsParams.format).toBe('image/png');
+
+
+ layer = ReactDOM.render(, document.getElementById("container"));
+
+ expect(layer).toExist();
+ lcount = 0;
+ map.eachLayer(function() { lcount++; });
+ expect(lcount).toBe(1);
+
+ expect(layer.layer.wmsParams.format).toBe('image/png');
+
+ // check if it switches to jpeg
+ layer = ReactDOM.render(, document.getElementById("container"));
+
+ expect(layer).toExist();
+ lcount = 0;
+ map.eachLayer(function() { lcount++; });
+ expect(lcount).toBe(1);
+
+ expect(layer.layer.wmsParams.format).toBe('image/jpeg');
+
+ });
+
it('creates a wms elevation layer for leaflet map', () => {
var options = {
"type": "wms",
@@ -924,4 +996,88 @@ describe('Leaflet layer', () => {
expect(lcount).toBe(1);
expect(layer.layer.wmsParams.CQL_FILTER).toBe("((\"prop2\" = 'value2')) AND (prop = 'value')");
});
+
+ it('test wmts vector formats must change to default image format (image/png)', () => {
+ const options = {
+ type: 'wmts',
+ visibility: true,
+ name: 'osm:vector_tile',
+ group: 'Vector',
+ tileMatrixSet: [
+ {
+ 'TileMatrix': [],
+ 'ows:Identifier': 'EPSG:900913',
+ 'ows:SupportedCRS': 'urn:ogc:def:crs:EPSG::900913'
+ }
+ ],
+ url: 'http://sample.server/geoserver/gwc/service/wmts'
+ };
+
+ const GeoJSON = 'application/json;type=geojson';
+ let layer = ReactDOM.render(, document.getElementById("container"));
+
+ expect(layer).toExist();
+ let lcount = 0;
+ map.eachLayer(function() {lcount++; });
+ expect(lcount).toBe(1);
+
+ expect(layer.layer.wmtsParams.format).toBe('image/png');
+
+ const MVT = 'application/vnd.mapbox-vector-tile';
+ layer = ReactDOM.render(, document.getElementById("container"));
+
+ expect(layer).toExist();
+ lcount = 0;
+ map.eachLayer(function() {lcount++; });
+ expect(lcount).toBe(1);
+
+ expect(layer.layer.wmtsParams.format).toBe('image/png');
+
+
+ const TopoJSON = 'application/json;type=topojson';
+ layer = ReactDOM.render(, document.getElementById("container"));
+
+ expect(layer).toExist();
+ lcount = 0;
+ map.eachLayer(function() {lcount++; });
+ expect(lcount).toBe(1);
+
+ expect(layer.layer.wmtsParams.format).toBe('image/png');
+
+ // check if it switches to jpeg
+ const JPEG = 'image/jpeg';
+ layer = ReactDOM.render(, document.getElementById("container"));
+
+ expect(layer).toExist();
+ lcount = 0;
+ map.eachLayer(function() {lcount++; });
+ expect(lcount).toBe(1);
+
+ expect(layer.layer.wmtsParams.format).toBe(JPEG);
+
+ });
});
diff --git a/web/client/components/map/leaflet/plugins/WMSLayer.js b/web/client/components/map/leaflet/plugins/WMSLayer.js
index 3aea7b3cba..ad7e07b3d3 100644
--- a/web/client/components/map/leaflet/plugins/WMSLayer.js
+++ b/web/client/components/map/leaflet/plugins/WMSLayer.js
@@ -19,6 +19,8 @@ const SecurityUtils = require('../../../../utils/SecurityUtils');
const ElevationUtils = require('../../../../utils/ElevationUtils');
const { creditsToAttribution } = require('../../../../utils/LayersUtils');
+const { isVectorFormat } = require('../../../../utils/VectorTileUtils');
+
require('leaflet.nontiledlayer');
L.NonTiledLayer.WMSCustom = L.NonTiledLayer.WMS.extend({
@@ -166,7 +168,7 @@ function wmsToLeafletOptions(options) {
attribution: options.credits && creditsToAttribution(options.credits),
layers: options.name,
styles: options.style || "",
- format: options.format || 'image/png',
+ format: isVectorFormat(options.format) && 'image/png' || options.format || 'image/png',
transparent: options.transparent !== undefined ? options.transparent : true,
tiled: options.tiled !== undefined ? options.tiled : true,
opacity: opacity,
diff --git a/web/client/components/map/leaflet/plugins/WMTSLayer.js b/web/client/components/map/leaflet/plugins/WMTSLayer.js
index 789a4cfd13..417c3aa0e6 100644
--- a/web/client/components/map/leaflet/plugins/WMTSLayer.js
+++ b/web/client/components/map/leaflet/plugins/WMTSLayer.js
@@ -6,14 +6,15 @@
* LICENSE file in the root directory of this source tree.
*/
-const Layers = require('../../../../utils/leaflet/Layers');
-const CoordinatesUtils = require('../../../../utils/CoordinatesUtils');
-const L = require('leaflet');
-const assign = require('object-assign');
-const SecurityUtils = require('../../../../utils/SecurityUtils');
-const WMTSUtils = require('../../../../utils/WMTSUtils');
-const WMTS = require('../../../../utils/leaflet/WMTS');
-const {isArray, isObject, head} = require('lodash');
+import Layers from '../../../../utils/leaflet/Layers';
+import CoordinatesUtils from '../../../../utils/CoordinatesUtils';
+import L from 'leaflet';
+import assign from 'object-assign';
+import SecurityUtils from '../../../../utils/SecurityUtils';
+import WMTSUtils from '../../../../utils/WMTSUtils';
+import WMTS from '../../../../utils/leaflet/WMTS';
+import { isArray, isObject, head } from 'lodash';
+import { isVectorFormat } from '../../../../utils/VectorTileUtils';
L.tileLayer.wmts = function(urls, options, matrixOptions) {
return new WMTS(urls, options, matrixOptions);
@@ -26,7 +27,8 @@ function wmtsToLeafletOptions(options) {
requestEncoding: options.requestEncoding,
layer: options.name,
style: options.style || "",
- format: options.format || 'image/png',
+ // set image format to png if vector to avoid errors while switching between map type
+ format: isVectorFormat(options.format) && 'image/png' || options.format || 'image/png',
tileMatrixSet: tileMatrixSet,
version: options.version || "1.0.0",
tileSize: options.tileSize || 256,
@@ -60,7 +62,8 @@ const createLayer = options => {
};
const updateLayer = (layer, newOptions, oldOptions) => {
- if (oldOptions.securityToken !== newOptions.securityToken) {
+ if (oldOptions.securityToken !== newOptions.securityToken
+ || oldOptions.format !== newOptions.format) {
return createLayer(newOptions);
}
return null;
diff --git a/web/client/components/map/openlayers/DrawSupport.jsx b/web/client/components/map/openlayers/DrawSupport.jsx
index 4eec1b25e7..feca6d2086 100644
--- a/web/client/components/map/openlayers/DrawSupport.jsx
+++ b/web/client/components/map/openlayers/DrawSupport.jsx
@@ -6,22 +6,49 @@
* LICENSE file in the root directory of this source tree.
*/
-const React = require('react');
-const ol = require('openlayers');
-const {concat, head, find, slice, omit, isArray, last, filter, isNil, castArray} = require('lodash');
-const PropTypes = require('prop-types');
-const assign = require('object-assign');
-const uuid = require('uuid');
-const axios = require('axios');
-const {isSimpleGeomType, getSimpleGeomType} = require('../../../utils/MapUtils');
-const {reprojectGeoJson, calculateDistance, reproject} = require('../../../utils/CoordinatesUtils');
-const {createStylesAsync} = require('../../../utils/VectorStyleUtils');
-const wgs84Sphere = new ol.Sphere(6378137);
-const {transformPolygonToCircle} = require('../../../utils/DrawSupportUtils');
-const {isCompletePolygon} = require('../../../utils/AnnotationsUtils');
-const VectorStyle = require('./VectorStyle');
-const {parseStyles} = require('./VectorStyle');
-const geojsonFormat = new ol.format.GeoJSON();
+import React from 'react';
+import concat from 'lodash/concat';
+import head from 'lodash/head';
+import find from 'lodash/find';
+import slice from 'lodash/slice';
+import omit from 'lodash/omit';
+import isArray from 'lodash/isArray';
+import last from 'lodash/last';
+import filter from 'lodash/filter';
+import isNil from 'lodash/isNil';
+import castArray from 'lodash/castArray';
+
+import PropTypes from 'prop-types';
+import assign from 'object-assign';
+import uuid from 'uuid';
+import axios from 'axios';
+import {isSimpleGeomType, getSimpleGeomType} from '../../../utils/MapUtils';
+import {reprojectGeoJson, calculateDistance, reproject} from '../../../utils/CoordinatesUtils';
+import {createStylesAsync} from '../../../utils/VectorStyleUtils';
+import {transformPolygonToCircle} from '../../../utils/openlayers/DrawSupportUtils';
+import {isCompletePolygon} from '../../../utils/AnnotationsUtils';
+import { parseStyles, getStyle, defaultStyles, getMarkerStyle, getMarkerStyleLegacy } from './VectorStyle';
+
+import {GeoJSON} from 'ol/format';
+import Feature from 'ol/Feature';
+import VectorSource from 'ol/source/Vector';
+import VectorLayer from 'ol/layer/Vector';
+import Draw from 'ol/interaction/Draw';
+import { Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon, Circle} from 'ol/geom';
+import GeometryCollection from 'ol/geom/GeometryCollection';
+import {Style, Stroke, Fill, Text} from 'ol/style';
+import CircleStyle from 'ol/style/Circle';
+import Collection from 'ol/Collection';
+import {always, primaryAction, altKeyOnly} from 'ol/events/condition';
+import DoubleClickZoom from 'ol/interaction/DoubleClickZoom';
+import Translate from 'ol/interaction/Translate';
+import Modify from 'ol/interaction/Modify';
+import Select from 'ol/interaction/Select';
+import {unByKey} from 'ol/Observable';
+import {getCenter} from 'ol/extent';
+import {fromCircle, circular} from 'ol/geom/Polygon';
+
+const geojsonFormat = new GeoJSON();
/**
* Component that allows to draw and edit geometries as (Point, LineString, Polygon, Rectangle, Circle, MultiGeometries)
@@ -44,7 +71,7 @@ const geojsonFormat = new ol.format.GeoJSON();
*/
// TODO FIX doc
-class DrawSupport extends React.Component {
+export default class DrawSupport extends React.Component {
static propTypes = {
map: PropTypes.object,
drawOwner: PropTypes.string,
@@ -114,7 +141,7 @@ class DrawSupport extends React.Component {
}
getNewFeature = (newDrawMethod, coordinates, radius, center) => {
- return new ol.Feature({
+ return new Feature({
geometry: this.createOLGeometry({type: newDrawMethod, coordinates, radius, center})
});
}
@@ -131,7 +158,7 @@ class DrawSupport extends React.Component {
if (f.style) {
let olFeature = this.toOlFeature(f);
if (olFeature) {
- olFeature.setStyle(f.style ? VectorStyle.getStyle(f) : this.toOlStyle(f.style, f.selected));
+ olFeature.setStyle(f.style ? getStyle(f) : this.toOlStyle(f.style, f.selected));
}
}
});
@@ -162,8 +189,8 @@ class DrawSupport extends React.Component {
/**
This is a style function that applies array of styles to the features.
It takes the style from the features in the props being drawn because
- the style array from the geojson feature model is not passed to ol.feature
- @param {object} ftOl it is an ol.Feature object
+ the style array from the geojson feature model is not passed to Feature
+ @param {object} ftOl it is an Feature object
*/
layerStyle = (ftOl) => {
let originalFeature = head(newProps.features) && find(head(newProps.features).features, ftTemp => ftTemp.properties.id === ftOl.getProperties().id) || null;
@@ -174,12 +201,12 @@ class DrawSupport extends React.Component {
});
} else {
// if the styles is not present in the feature it uses a default one based on the drawMethod basically
- return parseStyles({style: VectorStyle.defaultStyles[styleType]});
+ return parseStyles({style: defaultStyles[styleType]});
}
};
- this.geojson = new ol.format.GeoJSON();
- this.drawSource = new ol.source.Vector();
- this.drawLayer = new ol.layer.Vector({
+ this.geojson = new GeoJSON();
+ this.drawSource = new VectorSource();
+ this.drawLayer = new VectorLayer({
source: this.drawSource,
zIndex: 100000000,
style: layerStyle
@@ -205,9 +232,9 @@ class DrawSupport extends React.Component {
let feature;
features.forEach((f) => {
if (f.type === "FeatureCollection") {
- let featuresOL = (new ol.format.GeoJSON()).readFeatures(f);
+ let featuresOL = (new GeoJSON()).readFeatures(f);
featuresOL = featuresOL.map(ft => transformPolygonToCircle(ft, mapCrs));
- this.drawSource = new ol.source.Vector({
+ this.drawSource = new VectorSource({
features: featuresOL
});
this.drawLayer.setSource(this.drawSource);
@@ -221,11 +248,11 @@ class DrawSupport extends React.Component {
if (drawMethod === "Circle" && geometry && (geometry.properties && geometry.properties.center || geometry.center)) {
center = geometry.properties && geometry.properties.center ? reproject(geometry.properties.center, "EPSG:4326", mapCrs) : geometry.center;
center = [center.x, center.y];
- feature = new ol.Feature({
+ feature = new Feature({
geometry: this.createOLGeometry({type: "Circle", center, projection: "EPSG:3857", radius: geometry.properties && geometry.properties.radius || geometry.radius})
});
} else {
- feature = new ol.Feature({
+ feature = new Feature({
geometry: this.createOLGeometry(geometry.geometry ? geometry.geometry : {...geometry, ...geometry.properties, center })
});
}
@@ -238,15 +265,15 @@ class DrawSupport extends React.Component {
// TODO CHECK THIS WITH FeatureCollection
if (features.length === 0 && (options.editEnabled || options.drawEnabled)) {
if (options.transformToFeatureCollection) {
- this.drawSource = new ol.source.Vector({
- features: (new ol.format.GeoJSON()).readFeatures(
+ this.drawSource = new VectorSource({
+ features: (new GeoJSON()).readFeatures(
{
type: "FeatureCollection", features: []
})
});
this.drawLayer.setSource(this.drawSource);
} else {
- feature = new ol.Feature({
+ feature = new Feature({
geometry: this.createOLGeometry({type: drawMethod, coordinates: null})
});
this.drawSource.addFeature(feature);
@@ -254,8 +281,8 @@ class DrawSupport extends React.Component {
} else {
if (features[0] && features[0].type === "GeometryCollection" ) {
// HERE IT ENTERS WITH EDIT
- this.drawSource = new ol.source.Vector({
- features: (new ol.format.GeoJSON()).readFeatures(features[0])
+ this.drawSource = new VectorSource({
+ features: (new GeoJSON()).readFeatures(features[0])
});
let geoms = this.replacePolygonsWithCircles(this.drawSource.getFeatures()[0]);
@@ -265,8 +292,8 @@ class DrawSupport extends React.Component {
if (features[0] && features[0].geometry && features[0].geometry.type === "GeometryCollection" ) {
// HERE IT ENTERS WITH REPLACE
feature = reprojectGeoJson(features[0], options.featureProjection, mapCrs).geometry;
- this.drawSource = new ol.source.Vector({
- features: (new ol.format.GeoJSON()).readFeatures(feature)
+ this.drawSource = new VectorSource({
+ features: (new GeoJSON()).readFeatures(feature)
});
// TODO remove this props
this.drawSource.getFeatures()[0].set("textGeometriesIndexes", features[0].properties && features[0].properties.textGeometriesIndexes);
@@ -297,7 +324,7 @@ class DrawSupport extends React.Component {
} else {
const styleType = this.convertGeometryTypeToStyleType(newProps.drawMethod);
// if the styles is not present in the feature it uses a default one based on the drawMethod basically
- return parseStyles({style: VectorStyle.defaultStyles[styleType]});
+ return parseStyles({style: defaultStyles[styleType]});
}
});
}
@@ -322,25 +349,23 @@ class DrawSupport extends React.Component {
if (this.drawInteraction) {
this.removeDrawInteraction();
}
- this.drawInteraction = new ol.interaction.Draw(this.drawPropertiesForGeometryType(drawMethod, maxPoints, this.drawSource, newProps));
+ this.drawInteraction = new Draw(this.drawPropertiesForGeometryType(drawMethod, maxPoints, this.drawSource, newProps));
this.props.map.disableEventListener('singleclick');
- this.drawInteraction.on('drawstart', function(evt) {
- this.sketchFeature = evt.feature;
+ this.drawInteraction.on('drawstart', () => {
if (this.selectInteraction) {
this.selectInteraction.getFeatures().clear();
this.selectInteraction.setActive(false);
}
- }, this);
- this.drawInteraction.on('drawend', function(evt) {
- this.sketchFeature = evt.feature;
- this.sketchFeature.set('id', uuid.v1());
- let feature;
- if (this.props.drawMethod === "Circle" && this.sketchFeature.getGeometry().getType() === "Circle") {
- const radius = this.sketchFeature.getGeometry().getRadius();
- const center = this.sketchFeature.getGeometry().getCenter();
- this.sketchFeature.setGeometry(this.polygonFromCircle(center, radius));
+ });
+ this.drawInteraction.on('drawend', (evt) => {
+ const sketchFeature = evt.feature.clone();
+ sketchFeature.set('id', uuid.v1());
+ if (this.props.drawMethod === "Circle" && sketchFeature.getGeometry().getType() === "Circle") {
+ const radius = sketchFeature.getGeometry().getRadius();
+ const center = sketchFeature.getGeometry().getCenter();
+ sketchFeature.setGeometry(this.polygonFromCircle(center, radius));
}
- feature = this.fromOLFeature(this.sketchFeature, startingPoint);
+ const feature = this.fromOLFeature(sketchFeature, startingPoint);
this.props.onEndDrawing(feature, this.props.drawOwner);
if (this.props.options.stopAfterDrawing) {
@@ -351,7 +376,7 @@ class DrawSupport extends React.Component {
this.addSelectInteraction();
this.selectInteraction.setActive(true);
}
- }, this);
+ });
this.props.map.addInteraction(this.drawInteraction);
this.setDoubleClickZoomEnabled(false);
@@ -359,7 +384,7 @@ class DrawSupport extends React.Component {
toMulti = (geometry) => {
if (geometry.getType() === 'Point') {
- return new ol.geom.MultiPoint([geometry.getCoordinates()]);
+ return new MultiPoint([geometry.getCoordinates()]);
}
return geometry;
};
@@ -367,20 +392,20 @@ class DrawSupport extends React.Component {
if (this.drawInteraction) {
this.removeDrawInteraction();
}
- this.drawInteraction = new ol.interaction.Draw(this.drawPropertiesForGeometryType(getSimpleGeomType(drawMethod), maxPoints, isSimpleGeomType(drawMethod) ? this.drawSource : null, newProps ));
+ this.drawInteraction = new Draw(this.drawPropertiesForGeometryType(getSimpleGeomType(drawMethod), maxPoints, isSimpleGeomType(drawMethod) ? this.drawSource : null, newProps ));
this.props.map.disableEventListener('singleclick');
- this.drawInteraction.on('drawstart', function(evt) {
- this.sketchFeature = evt.feature;
+ this.drawInteraction.on('drawstart', () => {
if (this.selectInteraction) {
this.selectInteraction.getFeatures().clear();
this.selectInteraction.setActive(false);
}
- }, this);
+ });
- this.drawInteraction.on('drawend', function(evt) {
- this.sketchFeature = evt.feature;
- this.sketchFeature.set('id', uuid.v1());
- let drawnGeom = this.sketchFeature.getGeometry();
+ this.drawInteraction.on('drawend', (evt) => {
+ const sketchFeature = evt.feature.clone();
+ const id = uuid.v1();
+ sketchFeature.set('id', id);
+ let drawnGeom = sketchFeature.getGeometry();
let drawnFeatures = this.drawLayer.getSource().getFeatures();
let previousGeometries;
let features = this.props.features;
@@ -396,8 +421,7 @@ class DrawSupport extends React.Component {
newFeature = this.getNewFeature(newDrawMethod, coordinates);
// TODO verify center is projected in 4326 and is an array
center = reproject(center, this.getMapCrs(), "EPSG:4326", false);
- const originalId = newProps && newProps.features && newProps.features.length && newProps.features[0] && newProps.features[0].features && newProps.features[0].features.length && newProps.features[0].features.filter(f => f.properties.isDrawing)[0].properties.id || this.sketchFeature.get("id");
- // this.sketchFeature.set('id', originalId);
+ const originalId = newProps && newProps.features && newProps.features.length && newProps.features[0] && newProps.features[0].features && newProps.features[0].features.length && newProps.features[0].features.filter(f => f.properties.isDrawing)[0].properties.id || id;
newFeature.setProperties({isCircle: true, radius, center: [center.x, center.y], id: originalId});
} else if (drawMethod === "Polygon") {
newDrawMethod = this.props.drawMethod;
@@ -412,7 +436,7 @@ class DrawSupport extends React.Component {
newFeature.setProperties({isText: true, valueText: "."});
}
}
- // drawnFeatures is array of ol.Feature
+ // drawnFeatures is array of Feature
const previousFeatures = drawnFeatures.length >= 1 ? [...this.replaceCirclesWithPolygonsInFeatureColl(drawnFeatures)] : [];
if (!newFeature.getProperties().id) {
newFeature.setProperties({id: uuid.v1()});
@@ -420,8 +444,8 @@ class DrawSupport extends React.Component {
const newFeatures = [...previousFeatures, newFeature];
// create FeatureCollection externalize as function
let newFeatureColl = geojsonFormat.writeFeaturesObject(newFeatures);
- const vectorSource = new ol.source.Vector({
- features: (new ol.format.GeoJSON()).readFeatures(newFeatureColl)
+ const vectorSource = new VectorSource({
+ features: (new GeoJSON()).readFeatures(newFeatureColl)
});
this.drawLayer.setSource(vectorSource);
let feature = reprojectGeoJson(newFeatureColl, this.getMapCrs(), "EPSG:4326");
@@ -438,18 +462,18 @@ class DrawSupport extends React.Component {
const newMultiGeom = this.toMulti(this.createOLGeometry({type: newDrawMethod, coordinates}));
if (features.length === 1 && features[0] && !features[0].geometry) {
previousGeometries = [];
- geomCollection = new ol.geom.GeometryCollection([newMultiGeom]);
+ geomCollection = new GeometryCollection([newMultiGeom]);
} else {
previousGeometries = this.toMulti(head(drawnFeatures).getGeometry());
if (previousGeometries.getGeometries) {
// transform also previous circles into polygon
const geoms = this.replaceCirclesWithPolygons(head(drawnFeatures));
- geomCollection = new ol.geom.GeometryCollection([...geoms, newMultiGeom]);
+ geomCollection = new GeometryCollection([...geoms, newMultiGeom]);
} else {
- geomCollection = new ol.geom.GeometryCollection([previousGeometries, newMultiGeom]);
+ geomCollection = new GeometryCollection([previousGeometries, newMultiGeom]);
}
}
- this.sketchFeature.setGeometry(geomCollection);
+ sketchFeature.setGeometry(geomCollection);
} else if (drawMethod === "Text" || drawMethod === "MultiPoint") {
let coordinates = drawnGeom.getCoordinates();
@@ -457,17 +481,17 @@ class DrawSupport extends React.Component {
let newMultiGeom = this.toMulti(this.createOLGeometry({type: newDrawMethod, coordinates: [coordinates]}));
if (features.length === 1 && !features[0].geometry) {
previousGeometries = [];
- geomCollection = new ol.geom.GeometryCollection([newMultiGeom]);
+ geomCollection = new GeometryCollection([newMultiGeom]);
} else {
previousGeometries = this.toMulti(head(drawnFeatures).getGeometry());
if (previousGeometries.getGeometries) {
let geoms = this.replaceCirclesWithPolygons(head(drawnFeatures));
- geomCollection = new ol.geom.GeometryCollection([...geoms, newMultiGeom]);
+ geomCollection = new GeometryCollection([...geoms, newMultiGeom]);
} else {
- geomCollection = new ol.geom.GeometryCollection([previousGeometries, newMultiGeom]);
+ geomCollection = new GeometryCollection([previousGeometries, newMultiGeom]);
}
}
- this.sketchFeature.setGeometry(geomCollection);
+ sketchFeature.setGeometry(geomCollection);
} else if (!isSimpleGeomType(drawMethod)) {
let newMultiGeom;
geomCollection = null;
@@ -502,42 +526,42 @@ class DrawSupport extends React.Component {
let newGeoms = geoms.map(gg => {
return gg.getType() === geomAlreadyPresent.getType() ? geomAlreadyPresent : gg;
});
- geomCollection = new ol.geom.GeometryCollection(newGeoms);
+ geomCollection = new GeometryCollection(newGeoms);
} else {
if (previousGeometries.getType() === "GeometryCollection") {
- geomCollection = new ol.geom.GeometryCollection([...geoms, newMultiGeom]);
+ geomCollection = new GeometryCollection([...geoms, newMultiGeom]);
} else {
if (drawMethod === "Text") {
- geomCollection = new ol.geom.GeometryCollection([newMultiGeom]);
+ geomCollection = new GeometryCollection([newMultiGeom]);
} else {
- geomCollection = new ol.geom.GeometryCollection([previousGeometries, newMultiGeom]);
+ geomCollection = new GeometryCollection([previousGeometries, newMultiGeom]);
}
}
}
- this.sketchFeature.setGeometry(geomCollection);
+ sketchFeature.setGeometry(geomCollection);
} else {
- this.sketchFeature.setGeometry(geomAlreadyPresent);
+ sketchFeature.setGeometry(geomAlreadyPresent);
}
}
let properties = this.props.features[0].properties;
if (drawMethod === "Text") {
properties = assign({}, this.props.features[0].properties, {
textValues: (this.props.features[0].properties.textValues || []).concat(["."]),
- textGeometriesIndexes: (this.props.features[0].properties.textGeometriesIndexes || []).concat([this.sketchFeature.getGeometry().getGeometries().length - 1])
+ textGeometriesIndexes: (this.props.features[0].properties.textGeometriesIndexes || []).concat([sketchFeature.getGeometry().getGeometries().length - 1])
});
}
if (drawMethod === "Circle") {
properties = assign({}, properties, {
- circles: (this.props.features[0].properties.circles || []).concat([this.sketchFeature.getGeometry().getGeometries().length - 1])
+ circles: (this.props.features[0].properties.circles || []).concat([sketchFeature.getGeometry().getGeometries().length - 1])
});
}
- let feature = this.fromOLFeature(this.sketchFeature, startingPoint, properties);
- const vectorSource = new ol.source.Vector({
- features: (new ol.format.GeoJSON()).readFeatures(feature)
+ let feature = this.fromOLFeature(sketchFeature, startingPoint, properties);
+ const vectorSource = new VectorSource({
+ features: (new GeoJSON()).readFeatures(feature)
});
this.drawLayer.setSource(vectorSource);
- let newFeature = reprojectGeoJson(geojsonFormat.writeFeatureObject(this.sketchFeature.clone()), this.getMapCrs(), "EPSG:4326");
+ let newFeature = reprojectGeoJson(geojsonFormat.writeFeatureObject(sketchFeature.clone()), this.getMapCrs(), "EPSG:4326");
if (newFeature.geometry.type === "Polygon") {
newFeature.geometry.coordinates[0].push(newFeature.geometry.coordinates[0][0]);
}
@@ -563,7 +587,7 @@ class DrawSupport extends React.Component {
}
}
- }, this);
+ });
this.props.map.addInteraction(this.drawInteraction);
this.setDoubleClickZoomEnabled(false);
@@ -573,27 +597,27 @@ class DrawSupport extends React.Component {
let drawBaseProps = {
source: this.drawSource || source,
type: /** @type {ol.geom.GeometryType} */ geometryType,
- style: geometryType === "Marker" ? VectorStyle.getMarkerStyle(newProps.style) : new ol.style.Style({
- fill: new ol.style.Fill({
+ style: geometryType === "Marker" ? getMarkerStyle(newProps.style) : new Style({
+ fill: new Fill({
color: 'rgba(255, 255, 255, 0.2)'
}),
- stroke: new ol.style.Stroke({
+ stroke: new Stroke({
color: 'rgba(0, 0, 0, 0.5)',
lineDash: [10, 10],
width: 2
}),
- image: new ol.style.Circle({
+ image: new CircleStyle({
radius: 5,
- stroke: new ol.style.Stroke({
+ stroke: new Stroke({
color: 'rgba(0, 0, 0, 0.7)'
}),
- fill: new ol.style.Fill({
+ fill: new Fill({
color: 'rgba(255, 255, 255, 0.2)'
})
})
}),
- features: new ol.Collection(),
- condition: ol.events.condition.always
+ features: new Collection(),
+ condition: always
};
let roiProps = {};
switch (geometryType) {
@@ -603,7 +627,7 @@ class DrawSupport extends React.Component {
roiProps.geometryFunction = function(coordinates, geometry) {
let geom = geometry;
if (!geom) {
- geom = new ol.geom.Polygon(null);
+ geom = new Polygon(null);
}
let start = coordinates[0];
let end = coordinates[1];
@@ -627,7 +651,7 @@ class DrawSupport extends React.Component {
roiProps.geometryFunction = (coordinates, geometry) => {
let geom = geometry;
if (!geom) {
- geom = new ol.geom.Polygon(null);
+ geom = new Polygon(null);
geom.setProperties({geodesicCenter: [...coordinates[0]]}, true);
}
let projection = this.props.map.getView().getProjection().getCode();
@@ -635,7 +659,7 @@ class DrawSupport extends React.Component {
return this.reprojectCoordinatesToWGS84(coordinate, projection);
});
let radius = calculateDistance(wgs84Coordinates, 'haversine');
- let coords = ol.geom.Polygon.circular(wgs84Sphere, wgs84Coordinates[0], radius, roiProps.maxPoints).clone().transform('EPSG:4326', projection).getCoordinates();
+ let coords = circular(wgs84Coordinates[0], radius).clone().transform('EPSG:4326', projection).getCoordinates();
geom.setCoordinates(coords);
return geom;
};
@@ -669,7 +693,7 @@ class DrawSupport extends React.Component {
let interactions = this.props.map.getInteractions();
for (let i = 0; i < interactions.getLength(); i++) {
let interaction = interactions.item(i);
- if (interaction instanceof ol.interaction.DoubleClickZoom) {
+ if (interaction instanceof DoubleClickZoom) {
interaction.setActive(enabled);
break;
}
@@ -704,7 +728,7 @@ class DrawSupport extends React.Component {
this.props.map.removeInteraction(this.translateInteraction);
}
- this.translateInteraction = new ol.interaction.Translate({
+ this.translateInteraction = new Translate({
features: this.selectInteraction.getFeatures()
});
this.translateInteraction.setActive(false);
@@ -717,10 +741,10 @@ class DrawSupport extends React.Component {
this.props.map.removeInteraction(this.modifyInteraction);
}
- this.modifyInteraction = new ol.interaction.Modify({
+ this.modifyInteraction = new Modify({
features: this.selectInteraction.getFeatures(),
condition: (e) => {
- return ol.events.condition.primaryAction(e) && !ol.events.condition.altKeyOnly(e);
+ return primaryAction(e) && !altKeyOnly(e);
}
});
@@ -739,7 +763,7 @@ class DrawSupport extends React.Component {
addDrawOrEditInteractions = (newProps) => {
if (this.state && this.state.keySingleClickCallback) {
- ol.Observable.unByKey(this.state.keySingleClickCallback);
+ unByKey(this.state.keySingleClickCallback);
}
const singleClickCallback = (event) => {
if (this.drawSource && newProps.options) {
@@ -827,7 +851,7 @@ class DrawSupport extends React.Component {
olFt = transformPolygonToCircle(olFt, this.getMapCrs());
previousFeatures[previousFtIndex] = olFt;
- this.drawSource = new ol.source.Vector({
+ this.drawSource = new VectorSource({
features: previousFeatures
});
this.drawLayer.setSource(this.drawSource);
@@ -889,13 +913,13 @@ class DrawSupport extends React.Component {
this.selectFeature(olFt);
}
}
- this.selectInteraction = new ol.interaction.Select({
+ this.selectInteraction = new Select({
layers: [this.drawLayer],
- features: new ol.Collection(selectedFeature && olFt ? [olFt] : null)
+ features: new Collection(selectedFeature && olFt ? [olFt] : null)
});
if (olFt) {
const styleType = this.convertGeometryTypeToStyleType(props.drawMethod);
- olFt.setStyle(VectorStyle.getStyle({ ...props, style: {...props.style, type: styleType, highlight: true, useSelectedStyle: props.options.useSelectedStyle }}, false, props.features[0] && props.features[0].properties && props.features[0].properties.valueText && [props.features[0].properties.valueText] || [] ));
+ olFt.setStyle(getStyle({ ...props, style: {...props.style, type: styleType, highlight: true, useSelectedStyle: props.options.useSelectedStyle }}, false, props.features[0] && props.features[0].properties && props.features[0].properties.valueText && [props.features[0].properties.valueText] || [] ));
}
this.selectInteraction.on('select', (evt) => {
@@ -952,7 +976,6 @@ class DrawSupport extends React.Component {
if (this.drawInteraction) {
this.props.map.removeInteraction(this.drawInteraction);
this.drawInteraction = null;
- this.sketchFeature = null;
/** Map Singleclick event is dealyed by 250 ms see here
* https://openlayers.org/en/latest/apidoc/ol.MapBrowserEvent.html#event:singleclick
* This timeout prevents ol map to throw mapClick event that has alredy been managed
@@ -994,22 +1017,22 @@ class DrawSupport extends React.Component {
};
fromOLFeature = (feature, startingPoint, properties) => {
- let geometry = feature.getGeometry();
- let extent = geometry.getExtent();
- let geometryProperties = geometry.getProperties();
+ const geometry = feature.getGeometry();
// retrieve geodesic center from properties
// it's different from extent center
- let center = geometryProperties && geometryProperties.geodesicCenter || ol.extent.getCenter(extent);
- let coordinates;
- let projection = this.props.map.getView().getProjection().getCode();
- let radius;
- let type = geometry.getType();
+ const projection = this.props.map.getView().getProjection().getCode();
+ const type = geometry.getType();
+ // LineString, Polygon, MultiLineString, MultiPolygon
if (geometry.getCoordinates) {
- coordinates = geometry.getCoordinates();
+ const extent = geometry.getExtent();
+ const geometryProperties = geometry.getProperties();
+ const center = geometryProperties && geometryProperties.geodesicCenter || getCenter(extent);
+ let coordinates = geometry.getCoordinates();
if (startingPoint) {
coordinates = concat(startingPoint, coordinates);
geometry.setCoordinates(coordinates);
}
+ let radius;
if (this.props.drawMethod === "Circle") {
if (this.props.options.geodesic) {
const wgs84Coordinates = [[...center], [...coordinates[0][0]]].map((coordinate) => {
@@ -1033,13 +1056,14 @@ class DrawSupport extends React.Component {
}
let geometries = geometry.getGeometries().map((g, i) => {
- extent = g.getExtent();
- center = ol.extent.getCenter(extent);
- coordinates = g.getCoordinates();
+ const extent = g.getExtent();
+ const center = getCenter(extent);
+ let coordinates = g.getCoordinates();
if (startingPoint) {
coordinates = concat(startingPoint, coordinates);
g.setCoordinates(coordinates);
}
+ let radius;
if (properties.circles && properties.circles.indexOf(i) !== -1) {
if (this.props.options.geodesic) {
const wgs84Coordinates = [[...center], [...coordinates[0][0]]].map((coordinate) => {
@@ -1063,13 +1087,12 @@ class DrawSupport extends React.Component {
projection: this.getMapCrs()
});
});
- type = "GeometryCollection";
return assign({}, {
type: "Feature",
id: feature.get('id'),
style: this.fromOlStyle(feature.getStyle()),
geometry: {
- type,
+ type: "GeometryCollection",
geometries
},
projection
@@ -1114,32 +1137,32 @@ class DrawSupport extends React.Component {
strokeColor = '#4a90e2';
}
strokeColor = this.hexToRgb(strokeColor).concat([style && style.opacity || 1]);
- let newStyle = new ol.style.Style({
- fill: new ol.style.Fill({
+ let newStyle = new Style({
+ fill: new Fill({
color: fillColor
}),
- stroke: new ol.style.Stroke({
+ stroke: new Stroke({
color: strokeColor,
width: style && (style.strokeWidth || style.weight) ? style.strokeWidth || style.weight : 2
}),
- text: new ol.style.Text({
+ text: new Text({
text: style && style.text ? style.text : '',
- fill: new ol.style.Fill({ color: style && (style.strokeColor || style.color) ? style.strokeColor || style.color : '#000' }),
- stroke: new ol.style.Stroke({ color: '#fff', width: 2 }),
+ fill: new Fill({ color: style && (style.strokeColor || style.color) ? style.strokeColor || style.color : '#000' }),
+ stroke: new Stroke({ color: '#fff', width: 2 }),
font: style && style.fontSize ? style.fontSize + 'px helvetica' : ''
})
});
if (type === "GeometryCollection") {
- return [...VectorStyle.getMarkerStyleLegacy({
+ return [...getMarkerStyleLegacy({
style: { iconGlyph: 'comment',
iconShape: 'square',
iconColor: 'blue' }
}), newStyle];
}
if (style && (style.iconUrl || style.iconGlyph)) {
- return VectorStyle.getMarkerStyleLegacy({
+ return getMarkerStyleLegacy({
style
});
}
@@ -1175,13 +1198,13 @@ class DrawSupport extends React.Component {
filter features to be edited
*/
const editFilter = props && props.options && props.options.editFilter;
- this.modifyFeatureColl = new ol.Collection(filter(this.drawLayer.getSource().getFeatures(), editFilter));
+ this.modifyFeatureColl = new Collection(filter(this.drawLayer.getSource().getFeatures(), editFilter));
- this.modifyInteraction = new ol.interaction.Modify({
+ this.modifyInteraction = new Modify({
features: this.modifyFeatureColl,
condition: (e) => {
- return ol.events.condition.primaryAction(e) && !ol.events.condition.altKeyOnly(e);
+ return primaryAction(e) && !altKeyOnly(e);
}
});
@@ -1216,8 +1239,8 @@ class DrawSupport extends React.Component {
if (this.translateInteraction) {
this.props.map.removeInteraction(this.translateInteraction);
}
- this.translateInteraction = new ol.interaction.Translate({
- features: new ol.Collection(this.drawLayer.getSource().getFeatures())
+ this.translateInteraction = new Translate({
+ features: new Collection(this.drawLayer.getSource().getFeatures())
});
this.translateInteraction.setActive(false);
this.translateInteraction.on('translateend', (e) => {
@@ -1250,7 +1273,7 @@ class DrawSupport extends React.Component {
createOLGeometry = ({type, coordinates, radius, center, geometries, projection, options = {}}) => {
if (type === "GeometryCollection") {
- return geometries && geometries.length ? new ol.geom.GeometryCollection(geometries.map(g => this.olGeomFromType({type: g.type}))) : new ol.geom.GeometryCollection([]);
+ return geometries && geometries.length ? new GeometryCollection(geometries.map(g => this.olGeomFromType({type: g.type}))) : new GeometryCollection([]);
}
return this.olGeomFromType({type, coordinates, radius, center, projection, options});
};
@@ -1259,11 +1282,11 @@ class DrawSupport extends React.Component {
let geometry;
switch (type) {
- case "Point": case "Marker": case "Text": { geometry = new ol.geom.Point(coordinates ? coordinates : []); break; }
- case "LineString": { geometry = new ol.geom.LineString(coordinates ? coordinates : []); break; }
- case "MultiPoint": /*case "Text":*/ { geometry = new ol.geom.MultiPoint(coordinates ? coordinates : []); break; } // TODO move text on "Point"
- case "MultiLineString": { geometry = new ol.geom.MultiLineString(coordinates ? coordinates : []); break; }
- case "MultiPolygon": { geometry = new ol.geom.MultiPolygon(coordinates ? coordinates : []); break; }
+ case "Point": case "Marker": case "Text": { geometry = new Point(coordinates ? coordinates : []); break; }
+ case "LineString": { geometry = new LineString(coordinates ? coordinates : []); break; }
+ case "MultiPoint": /*case "Text":*/ { geometry = new MultiPoint(coordinates ? coordinates : []); break; } // TODO move text on "Point"
+ case "MultiLineString": { geometry = new MultiLineString(coordinates ? [coordinates] : []); break; }
+ case "MultiPolygon": { geometry = new MultiPolygon(coordinates ? coordinates : []); break; }
// default is Polygon
default: {
let correctCenter = isArray(center) ? {x: center[0], y: center[1]} : center;
@@ -1278,9 +1301,9 @@ class DrawSupport extends React.Component {
// TODO simplify, too much use of elvis operator
geometry = isCircle ?
options.geodesic ?
- ol.geom.Polygon.circular(wgs84Sphere, this.reprojectCoordinatesToWGS84([correctCenter.x, correctCenter.y], projection), radius, 100).clone().transform('EPSG:4326', projection)
- : ol.geom.Polygon.fromCircle(new ol.geom.Circle([correctCenter.x, correctCenter.y], radius), 100)
- : new ol.geom.Polygon(coordinates && isArray(coordinates[0]) ? coordinates : []);
+ circular(this.reprojectCoordinatesToWGS84([correctCenter.x, correctCenter.y], projection), radius, 100).clone().transform('EPSG:4326', projection)
+ : fromCircle(new Circle([correctCenter.x, correctCenter.y], radius), 100)
+ : new Polygon(coordinates && isArray(coordinates[0]) ? coordinates : []);
// store geodesic center
if (geometry && isCircle && options.geodesic) {
@@ -1317,10 +1340,10 @@ class DrawSupport extends React.Component {
* @param {number[]} center in 3857 [lon, lat]
* @param {number} radius in meters
* @param {number} npoints number of sides
- * @return {ol.geom.Polygon} the polygon which approximate the circle
+ * @return {Polygon} the polygon which approximate the circle
*/
polygonFromCircle = (center, radius, npoints = 100) => {
- return ol.geom.Polygon.fromCircle(new ol.geom.Circle(center, radius), npoints);
+ return fromCircle(new Circle(center, radius), npoints);
}
polygonCoordsFromCircle = (center, radius, npoints = 100) => {
@@ -1329,8 +1352,8 @@ class DrawSupport extends React.Component {
/**
* replace circles with polygons in feature collection
- * @param {ol.Feature[]} features to transform
- * @return {ol.Feature[]} features transformed
+ * @param {Feature[]} features to transform
+ * @return {Feature[]} features transformed
*/
replaceCirclesWithPolygonsInFeatureColl = (features) => {
return features.map(f => {
@@ -1342,8 +1365,8 @@ class DrawSupport extends React.Component {
}
/**
* tranform circle to polygon
- * @param {ol.Feature} feature to check if needs to be transformed
- * @return {ol.Feature} feature transformed in polygon
+ * @param {Feature} feature to check if needs to be transformed
+ * @return {Feature} feature transformed in polygon
*/
replaceCircleWithPolygon = (feature) => {
if (feature.getProperties().isCircle && feature.getGeometry().getType() === "Circle") {
@@ -1356,7 +1379,7 @@ class DrawSupport extends React.Component {
}
/**
* replace circles with polygons
- * @param {ol.Feature} feature must contain a geometry collection
+ * @param {Feature} feature must contain a geometry collection
* @return {ol.geom.SimpleGeometry[]} geometries
*/
replaceCirclesWithPolygons = (feature) => {
@@ -1378,7 +1401,7 @@ class DrawSupport extends React.Component {
}
/**
* replace polygons with circles
- * @param {ol.Feature} feature must contain a geometry collection and property "circles"
+ * @param {Feature} feature must contain a geometry collection and property "circles"
* @return {ol.geom.SimpleGeometry[]} geometries
*/
replacePolygonsWithCircles = (feature) => {
@@ -1389,9 +1412,9 @@ class DrawSupport extends React.Component {
}
if (feature.getProperties() && feature.getProperties().circles && feature.getProperties().circles.indexOf(i) !== -1) {
const extent = g.getExtent();
- const center = ol.extent.getCenter(extent);
+ const center = getCenter(extent);
const radius = this.calculateRadius(center, g.getCoordinates());
- return new ol.geom.Circle(center, radius);
+ return new Circle(center, radius);
}
return g;
});
@@ -1411,4 +1434,4 @@ class DrawSupport extends React.Component {
});
}
}
-module.exports = DrawSupport;
+
diff --git a/web/client/components/map/openlayers/Feature.jsx b/web/client/components/map/openlayers/Feature.jsx
index c7566df699..d198588679 100644
--- a/web/client/components/map/openlayers/Feature.jsx
+++ b/web/client/components/map/openlayers/Feature.jsx
@@ -5,17 +5,20 @@
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
-const React = require('react');
-const PropTypes = require('prop-types');
-var ol = require('openlayers');
-const axios = require('axios');
-const { isEqual, find, castArray } = require('lodash');
-const { parseStyles } = require('./VectorStyle');
-const { transformPolygonToCircle } = require('../../../utils/DrawSupportUtils');
-const { createStylesAsync } = require('../../../utils/VectorStyleUtils');
+import React from 'react';
+import PropTypes from 'prop-types';
+import axios from 'axios';
+import isEqual from 'lodash/isEqual';
+import find from 'lodash/find';
+import castArray from 'lodash/castArray';
-class Feature extends React.Component {
+import { parseStyles } from './VectorStyle';
+import { transformPolygonToCircle } from '../../../utils/openlayers/DrawSupportUtils';
+import { createStylesAsync } from '../../../utils/VectorStyleUtils';
+import GeoJSON from 'ol/format/GeoJSON';
+
+export default class Feature extends React.Component {
static propTypes = {
type: PropTypes.string,
layerStyle: PropTypes.object,
@@ -59,7 +62,7 @@ class Feature extends React.Component {
}
addFeatures = (props) => {
- const format = new ol.format.GeoJSON();
+ const format = new GeoJSON();
let ftGeometry = null;
let canRender = false;
@@ -137,4 +140,3 @@ class Feature extends React.Component {
};
}
-module.exports = Feature;
diff --git a/web/client/components/map/openlayers/HighlightFeatureSupport.jsx b/web/client/components/map/openlayers/HighlightFeatureSupport.jsx
index ef770d36db..60cbfa6b6f 100644
--- a/web/client/components/map/openlayers/HighlightFeatureSupport.jsx
+++ b/web/client/components/map/openlayers/HighlightFeatureSupport.jsx
@@ -1,4 +1,3 @@
-const PropTypes = require('prop-types');
/**
* Copyright 2016, GeoSolutions Sas.
* All rights reserved.
@@ -7,10 +6,14 @@ const PropTypes = require('prop-types');
* LICENSE file in the root directory of this source tree.
*/
-const React = require('react');
-const ol = require('openlayers');
+import PropTypes from 'prop-types';
+import React from 'react';
+import Select from 'ol/interaction/Select';
+import {platformModifierKeyOnly} from 'ol/events/condition';
+import {Style, Stroke, Fill} from 'ol/style';
+import CircleStyle from 'ol/style/Circle';
-class HighlightFeatureSupport extends React.Component {
+export default class HighlightFeatureSupport extends React.Component {
static propTypes = {
map: PropTypes.object,
layer: PropTypes.string.isRequired,
@@ -112,10 +115,10 @@ class HighlightFeatureSupport extends React.Component {
createSelectInteraction = () => {
this.createStyle();
- this._selectInteraction = new ol.interaction.Select({
+ this._selectInteraction = new Select({
layers: this.layersFilter,
style: this._style,
- toggleCondition: ol.events.condition.platformModifierKeyOnly
+ toggleCondition: platformModifierKeyOnly
});
this._selectInteraction.on('select', this.selectionChange, this);
this.props.map.addInteraction(this._selectInteraction);
@@ -143,20 +146,20 @@ class HighlightFeatureSupport extends React.Component {
createStyle = () => {
let sty = this.props.selectedStyle;
let style = {
- stroke: new ol.style.Stroke( sty.stroke ? sty.stroke : {
+ stroke: new Stroke( sty.stroke ? sty.stroke : {
color: 'blue',
width: 1
}),
- fill: new ol.style.Fill(sty.fill ? sty.fill : {
+ fill: new Fill(sty.fill ? sty.fill : {
color: 'blue'
})
};
if (sty.type === "Point") {
style = {
- image: new ol.style.Circle({...style, radius: sty.radius || 5})
+ image: new CircleStyle({...style, radius: sty.radius || 5})
};
}
- this._style = new ol.style.Style(style);
+ this._style = new Style(style);
};
highlightFeatures = (features) => {
@@ -174,4 +177,3 @@ class HighlightFeatureSupport extends React.Component {
};
}
-module.exports = HighlightFeatureSupport;
diff --git a/web/client/components/map/openlayers/Layer.jsx b/web/client/components/map/openlayers/Layer.jsx
index 758ed03601..bf8ca1e49a 100644
--- a/web/client/components/map/openlayers/Layer.jsx
+++ b/web/client/components/map/openlayers/Layer.jsx
@@ -1,4 +1,3 @@
-const PropTypes = require('prop-types');
/**
* Copyright 2015, GeoSolutions Sas.
* All rights reserved.
@@ -6,14 +5,19 @@ const PropTypes = require('prop-types');
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
-var React = require('react');
-var Layers = require('../../../utils/openlayers/Layers');
-var CoordinatesUtils = require('../../../utils/CoordinatesUtils');
-var assign = require('object-assign');
-const _ = require('lodash');
-const Rx = require('rxjs');
-class OpenlayersLayer extends React.Component {
+import PropTypes from 'prop-types';
+import React from 'react';
+import Layers from '../../../utils/openlayers/Layers';
+import CoordinatesUtils from '../../../utils/CoordinatesUtils';
+import assign from 'object-assign';
+import Rx from 'rxjs';
+import isNumber from 'lodash/isNumber';
+import isArray from 'lodash/isArray';
+import omit from 'lodash/omit';
+import isEqual from 'lodash/isEqual';
+
+export default class OpenlayersLayer extends React.Component {
static propTypes = {
onWarning: PropTypes.func,
maxExtent: PropTypes.array,
@@ -114,7 +118,7 @@ class OpenlayersLayer extends React.Component {
};
generateOpts = (options, position, srs, securityToken) => {
- return assign({}, options, _.isNumber(position) ? {zIndex: position} : null, {
+ return assign({}, options, isNumber(position) ? {zIndex: position} : null, {
srs,
onError: () => {
this.props.onCreationError(options);
@@ -134,7 +138,7 @@ class OpenlayersLayer extends React.Component {
const layerExtent = options && options.bbox && options.bbox.bounds;
const mapBboxPolygon = mapExtent && CoordinatesUtils.reprojectBbox(mapExtent, this.props.srs, 'EPSG:4326');
let layerBboxPolygon = layerExtent && CoordinatesUtils.getExtentFromNormalized(layerExtent, this.props.srs).extent;
- if (layerBboxPolygon && layerBboxPolygon.length === 2 && _.isArray(layerBboxPolygon[1])) {
+ if (layerBboxPolygon && layerBboxPolygon.length === 2 && isArray(layerBboxPolygon[1])) {
layerBboxPolygon = layerBboxPolygon[1];
}
@@ -166,7 +170,7 @@ class OpenlayersLayer extends React.Component {
if (newProps.position === oldProps.position && newProps.srs === oldProps.srs && newProps.securityToken === oldProps.securityToken ) {
// check if options are the same, except loading
if (newProps.options === oldProps.options) return;
- if (_.isEqual( _.omit(newProps.options, ["loading"]), _.omit(oldProps.options, ["loading"]) ) ) {
+ if (isEqual( omit(newProps.options, ["loading"]), omit(oldProps.options, ["loading"]) ) ) {
return;
}
}
@@ -292,5 +296,3 @@ class OpenlayersLayer extends React.Component {
return valid;
};
}
-
-module.exports = OpenlayersLayer;
diff --git a/web/client/components/map/openlayers/LegacyVectorStyle.js b/web/client/components/map/openlayers/LegacyVectorStyle.js
index 203e2e5942..326cf6a443 100644
--- a/web/client/components/map/openlayers/LegacyVectorStyle.js
+++ b/web/client/components/map/openlayers/LegacyVectorStyle.js
@@ -1,22 +1,27 @@
-var markerIcon = require('./img/marker-icon.png');
-var markerShadow = require('./img/marker-shadow.png');
-var ol = require('openlayers');
-const {last, head} = require('lodash');
+import markerIcon from './img/marker-icon.png';
+import markerShadow from './img/marker-shadow.png';
+
+import last from 'lodash/last';
+import head from 'lodash/head';
+import trim from 'lodash/trim';
+import isString from 'lodash/isString';
+import isArray from 'lodash/isArray';
+
+import assign from 'object-assign';
+
+import {colorToRgbaStr} from '../../../utils/ColorUtils';
+import {set} from '../../../utils/ImmutableUtils';
+
+import {Circle, Stroke, Fill, Text, Style, Icon} from 'ol/style';
+import {Point} from 'ol/geom';
+import Icons from '../../../utils/openlayers/Icons';
+
const blue = [0, 153, 255, 1];
-const assign = require('object-assign');
-const {trim, isString, isArray} = require('lodash');
-const {colorToRgbaStr} = require('../../../utils/ColorUtils');
-const {set} = require('../../../utils/ImmutableUtils');
-const selectedStyleConfiguration = {
- white: [255, 255, 255, 1],
- blue: [0, 153, 255, 1],
- width: 3
-};
-const image = new ol.style.Circle({
+const image = new Circle({
radius: 5,
fill: null,
- stroke: new ol.style.Stroke({color: 'red', width: 1})
+ stroke: new Stroke({color: 'red', width: 1})
});
/**
@@ -25,12 +30,12 @@ const image = new ol.style.Circle({
* @param {number} options.radius radius of the circle
* @param {string} options.fillColor ol color for the circle fill style
* @param {boolean} options.applyToPolygon tells if this style can be applied to a polygon
- * @return {ol.style.Style} style of the point
+ * @return {Style} style of the point
*/
-const firstPointOfPolylineStyle = ({radius = 5, fillColor = 'green', applyToPolygon = false} = {}) => new ol.style.Style({
- image: new ol.style.Circle({
+export const firstPointOfPolylineStyle = ({radius = 5, fillColor = 'green', applyToPolygon = false} = {}) => new Style({
+ image: new Circle({
radius,
- fill: new ol.style.Fill({
+ fill: new Fill({
color: fillColor
})
}),
@@ -41,7 +46,7 @@ const firstPointOfPolylineStyle = ({radius = 5, fillColor = 'green', applyToPoly
return null;
}
let coordinates = type === "Polygon" ? geom.getCoordinates()[0] : geom.getCoordinates();
- return coordinates.length > 1 ? new ol.geom.Point(head(coordinates)) : null;
+ return coordinates.length > 1 ? new Point(head(coordinates)) : null;
}
});
@@ -51,12 +56,12 @@ const firstPointOfPolylineStyle = ({radius = 5, fillColor = 'green', applyToPoly
* @param {number} options.radius radius of the circle
* @param {string} options.fillColor ol color for the circle fill style
* @param {boolean} options.applyToPolygon tells if this style can be applied to a polygon
- * @return {ol.style.Style} style of the point
+ * @return {Style} style of the point
*/
-const lastPointOfPolylineStyle = ({radius = 5, fillColor = 'red', applyToPolygon = false} = {}) => new ol.style.Style({
- image: new ol.style.Circle({
+export const lastPointOfPolylineStyle = ({radius = 5, fillColor = 'red', applyToPolygon = false} = {}) => new Style({
+ image: new Circle({
radius,
- fill: new ol.style.Fill({
+ fill: new Fill({
color: fillColor
})
}),
@@ -67,40 +72,40 @@ const lastPointOfPolylineStyle = ({radius = 5, fillColor = 'red', applyToPolygon
return null;
}
let coordinates = type === "Polygon" ? geom.getCoordinates()[0] : geom.getCoordinates();
- return new ol.geom.Point(coordinates.length > 3 ? coordinates[coordinates.length - (type === "Polygon" ? 2 : 1)] : last(coordinates));
+ return new Point(coordinates.length > 3 ? coordinates[coordinates.length - (type === "Polygon" ? 2 : 1)] : last(coordinates));
}
});
/**
creates styles to highlight/customize start and end point of a polyline
*/
-const startEndPolylineStyle = (startPointOptions = {}, endPointOptions = {}) => {
+export const startEndPolylineStyle = (startPointOptions = {}, endPointOptions = {}) => {
return [firstPointOfPolylineStyle(startPointOptions), lastPointOfPolylineStyle(endPointOptions)];
};
const getTextStyle = (tempStyle, valueText, highlight = false) => {
- return new ol.style.Style({
- text: new ol.style.Text({
+ return new Style({
+ text: new Text({
offsetY: -( 4 * Math.sqrt(tempStyle.fontSize)), // TODO improve this for high font values > 100px
textAlign: tempStyle.textAlign || "center",
text: valueText || "",
font: tempStyle.font,
- fill: new ol.style.Fill({
+ fill: new Fill({
// WRONG, SETTING A FILL STYLE WITH A COLOR (STROKE) ATTRIBUTE
color: colorToRgbaStr(tempStyle.stroke || tempStyle.color || '#000000', tempStyle.opacity || 1)
}),
// halo
- stroke: highlight ? new ol.style.Stroke({
+ stroke: highlight ? new Stroke({
color: [255, 255, 255, 1],
width: 2
}) : null
}),
image: highlight ?
- new ol.style.Circle({
+ new Circle({
radius: 5,
fill: null,
- stroke: new ol.style.Stroke({
+ stroke: new Stroke({
color: colorToRgbaStr(tempStyle.color || "#0000FF", tempStyle.opacity || 1),
width: tempStyle.weight || 1
})
@@ -108,7 +113,6 @@ const getTextStyle = (tempStyle, valueText, highlight = false) => {
});
};
-const Icons = require('../../../utils/openlayers/Icons');
const STYLE_POINT = {
color: '#ffcc33',
@@ -162,7 +166,7 @@ const STYLE_MARKER = {
iconGlyph: "comment"
};
-const defaultStyles = {
+export const defaultStyles = {
"Marker": STYLE_MARKER,
"Text": STYLE_TEXT,
"Circle": STYLE_CIRCLE,
@@ -175,7 +179,7 @@ const defaultStyles = {
};
const strokeStyle = (options, defaultsStyle = {color: 'blue', width: 3, lineDash: [6]}) => ({
- stroke: new ol.style.Stroke(
+ stroke: new Stroke(
options.style ?
options.style.stroke || {
color: options.style.color || defaultsStyle.color,
@@ -191,7 +195,7 @@ const strokeStyle = (options, defaultsStyle = {color: 'blue', width: 3, lineDash
});
const fillStyle = (options, defaultsStyle = {color: 'rgba(0, 0, 255, 0.1)'}) => ({
- fill: new ol.style.Fill(
+ fill: new Fill(
options.style ?
options.style.fill || {
color: colorToRgbaStr(options.style.fillColor, options.style.fillOpacity) || defaultsStyle.color
@@ -202,76 +206,76 @@ const fillStyle = (options, defaultsStyle = {color: 'rgba(0, 0, 255, 0.1)'}) =>
});
const defaultOLStyles = {
- 'Point': () => [new ol.style.Style({
+ 'Point': () => [new Style({
image: image
})],
- 'LineString': options => [new ol.style.Style(assign({},
+ 'LineString': options => [new Style(assign({},
strokeStyle(options, {color: 'blue', width: 3})
))],
- 'MultiLineString': options => [new ol.style.Style(assign({},
+ 'MultiLineString': options => [new Style(assign({},
strokeStyle(options, {color: 'blue', width: 3})
))],
- 'MultiPoint': () => [new ol.style.Style({
+ 'MultiPoint': () => [new Style({
image: image
})],
- 'MultiPolygon': options => [new ol.style.Style(assign({},
+ 'MultiPolygon': options => [new Style(assign({},
strokeStyle(options),
fillStyle(options)
))],
- 'Polygon': options => [new ol.style.Style(assign({},
+ 'Polygon': options => [new Style(assign({},
strokeStyle(options),
fillStyle(options)
))],
- 'GeometryCollection': options => [new ol.style.Style(assign({},
+ 'GeometryCollection': options => [new Style(assign({},
strokeStyle(options),
fillStyle(options),
- {image: new ol.style.Circle({
+ {image: new Circle({
radius: 10,
fill: null,
- stroke: new ol.style.Stroke({
+ stroke: new Stroke({
color: 'magenta'
})
})
}))],
- 'Circle': () => [new ol.style.Style({
- stroke: new ol.style.Stroke({
+ 'Circle': () => [new Style({
+ stroke: new Stroke({
color: 'red',
width: 2
}),
- fill: new ol.style.Fill({
+ fill: new Fill({
color: 'rgba(255,0,0,0.2)'
})
})],
- 'marker': (options) => [new ol.style.Style({
- image: new ol.style.Icon({
+ 'marker': (options) => [new Style({
+ image: new Icon({
anchor: [14, 41],
anchorXUnits: 'pixels',
anchorYUnits: 'pixels',
src: markerShadow
})
-}), new ol.style.Style({
- image: new ol.style.Icon({
+}), new Style({
+ image: new Icon({
anchor: [0.5, 1],
anchorXUnits: 'fraction',
anchorYUnits: 'fraction',
src: markerIcon
}),
- text: new ol.style.Text({
+ text: new Text({
text: options.label,
scale: 1.25,
offsetY: 8,
- fill: new ol.style.Fill({color: '#000000'}),
- stroke: new ol.style.Stroke({color: '#FFFFFF', width: 2})
+ fill: new Fill({color: '#000000'}),
+ stroke: new Stroke({color: '#FFFFFF', width: 2})
})
})]
};
-const styleFunction = function(feature, options) {
+export const styleFunction = function(feature, options) {
const type = feature.getGeometry().getType();
return defaultOLStyles[type](options && options.style && options.style[type] && {style: {...options.style[type]}} || options || {});
};
-function getMarkerStyle(options) {
+export function getMarkerStyle(options) {
if (options.style.iconUrl) {
return Icons.standard.getIcon(options);
}
@@ -291,21 +295,21 @@ const getValidStyle = (geomType, options = { style: defaultStyles}, isDrawing, t
let tempStyle = options.style[geomType] || options.style;
if (geomType === "MultiLineString" || geomType === "LineString") {
let styles = [
- new ol.style.Style({
- stroke: options.style.useSelectedStyle ? new ol.style.Stroke({
+ new Style({
+ stroke: options.style.useSelectedStyle ? new Stroke({
color: [255, 255, 255, 1],
width: tempStyle.weight + 2
}) : null
}),
- new ol.style.Style(tempStyle ? {
- stroke: new ol.style.Stroke( tempStyle && tempStyle.stroke ? tempStyle.stroke : {
+ new Style(tempStyle ? {
+ stroke: new Stroke( tempStyle && tempStyle.stroke ? tempStyle.stroke : {
color: colorToRgbaStr(options.style && tempStyle.color || "#0000FF", tempStyle.opacity || 1),
lineDash: options.style.highlight ? [10] : [0],
width: tempStyle.weight || 1
}),
image: isDrawing ? image : null
} : {
- stroke: new ol.style.Stroke(defaultStyles[geomType] && defaultStyles[geomType].stroke ? defaultStyles[geomType].stroke : {
+ stroke: new Stroke(defaultStyles[geomType] && defaultStyles[geomType].stroke ? defaultStyles[geomType].stroke : {
color: colorToRgbaStr(options.style && defaultStyles[geomType].color || "#0000FF", defaultStyles[geomType].opacity || 1),
lineDash: options.style.highlight ? [10] : [0],
width: defaultStyles[geomType].weight || 1
@@ -317,32 +321,32 @@ const getValidStyle = (geomType, options = { style: defaultStyles}, isDrawing, t
}
if ((geomType === "MultiPoint" || geomType === "Point") && (tempStyle.iconUrl || tempStyle.iconGlyph) ) {
- return isDrawing ? new ol.style.Style({
+ return isDrawing ? new Style({
image: image
}) : getMarkerStyle({style: {...tempStyle, highlight: options.style.highlight || options.style.useSelectedStyle}});
}
if (geomType === "Circle" && radius ) {
let styles = [
- new ol.style.Style({
- stroke: options.style.useSelectedStyle ? new ol.style.Stroke({
+ new Style({
+ stroke: options.style.useSelectedStyle ? new Stroke({
color: [255, 255, 255, 1],
width: tempStyle.weight + 4
}) : null
}),
- new ol.style.Style({
- stroke: new ol.style.Stroke( tempStyle && tempStyle.stroke ? tempStyle.stroke : {
+ new Style({
+ stroke: new Stroke( tempStyle && tempStyle.stroke ? tempStyle.stroke : {
color: options.style.useSelectedStyle ? blue : colorToRgbaStr(options.style && tempStyle.color || "#0000FF", tempStyle.opacity || 1),
lineDash: options.style.highlight ? [10] : [0],
width: tempStyle.weight || 1
}),
- fill: new ol.style.Fill(tempStyle.fill ? tempStyle.fill : {
+ fill: new Fill(tempStyle.fill ? tempStyle.fill : {
color: colorToRgbaStr(options.style && tempStyle.fillColor || "#0000FF", tempStyle.fillOpacity || 0.2)
})
- }), new ol.style.Style({
- image: options.style.useSelectedStyle ? new ol.style.Circle({
+ }), new Style({
+ image: options.style.useSelectedStyle ? new Circle({
radius: 3,
- fill: new ol.style.Fill(tempStyle.fill ? tempStyle.fill : {
+ fill: new Fill(tempStyle.fill ? tempStyle.fill : {
color: blue
})
}) : null,
@@ -351,7 +355,7 @@ const getValidStyle = (geomType, options = { style: defaultStyles}, isDrawing, t
const type = geom.getType();
if (type === "Circle") {
let coordinates = geom.getCenter();
- return new ol.geom.Point(coordinates);
+ return new Point(coordinates);
}
return null;
}
@@ -363,20 +367,20 @@ const getValidStyle = (geomType, options = { style: defaultStyles}, isDrawing, t
}
if (geomType === "MultiPolygon" || geomType === "Polygon") {
let styles = [
- new ol.style.Style({
- stroke: options.style.useSelectedStyle ? new ol.style.Stroke({
+ new Style({
+ stroke: options.style.useSelectedStyle ? new Stroke({
color: [255, 255, 255, 1],
width: tempStyle.weight + 2
}) : null
}),
- new ol.style.Style({
- stroke: new ol.style.Stroke( tempStyle.stroke ? tempStyle.stroke : {
+ new Style({
+ stroke: new Stroke( tempStyle.stroke ? tempStyle.stroke : {
color: options.style.useSelectedStyle ? blue : colorToRgbaStr(options.style && tempStyle.color || "#0000FF", tempStyle.opacity || 1),
lineDash: options.style.highlight ? [10] : [0],
width: tempStyle.weight || 1
}),
image: isDrawing ? image : null,
- fill: new ol.style.Fill(tempStyle.fill ? tempStyle.fill : {
+ fill: new Fill(tempStyle.fill ? tempStyle.fill : {
color: colorToRgbaStr(options.style && tempStyle.fillColor || "#0000FF", tempStyle.fillOpacity || 1)
})
})
@@ -387,7 +391,7 @@ const getValidStyle = (geomType, options = { style: defaultStyles}, isDrawing, t
return fallbackStyle;
};
-function getStyle(options, isDrawing = false, textValues = []) {
+export function getStyle(options, isDrawing = false, textValues = []) {
// this is causing max call stack size exceeded because it contains ol functions and it comes from the store
// we suggest to remove this behaviour
@@ -425,19 +429,19 @@ function getStyle(options, isDrawing = false, textValues = []) {
}
if (!style && options.style) {
style = {
- stroke: new ol.style.Stroke( options.style.stroke ? options.style.stroke : {
+ stroke: new Stroke( options.style.stroke ? options.style.stroke : {
color: colorToRgbaStr(options.style && options.style.color || "#0000FF", options.style.opacity || 1),
lineDash: options.style.highlight ? [10] : [0],
width: options.style.weight || 1
}),
- fill: new ol.style.Fill(options.style.fill ? options.style.fill : {
+ fill: new Fill(options.style.fill ? options.style.fill : {
color: colorToRgbaStr(options.style && options.style.fillColor || "#0000FF", options.style.fillOpacity || 1)
})
};
if (geomType === "Point") {
style = {
- image: new ol.style.Circle(assign({}, style, {radius: options.style.radius || 5}))
+ image: new Circle(assign({}, style, {radius: options.style.radius || 5}))
};
}
if (options.style.iconUrl || options.style.iconGlyph) {
@@ -456,7 +460,7 @@ function getStyle(options, isDrawing = false, textValues = []) {
};
return style;
}
- style = new ol.style.Style(style);
+ style = new Style(style);
/* managing new style structure
@@ -503,7 +507,7 @@ function getStyle(options, isDrawing = false, textValues = []) {
}
if (type === "Point" || type === "MultiPoint") {
markerStyles = getMarkerStyle({style: {...options.style[type], highlight: options.style.highlight}});
- return isDrawing ? new ol.style.Style({
+ return isDrawing ? new Style({
image: image,
geometry: feature.getGeometry()
}) : markerStyles.map(m => {
@@ -538,14 +542,3 @@ function getStyle(options, isDrawing = false, textValues = []) {
} : style || styleFunction;
}
-
-module.exports = {
- startEndPolylineStyle,
- lastPointOfPolylineStyle,
- firstPointOfPolylineStyle,
- selectedStyleConfiguration,
- getStyle,
- getMarkerStyle,
- styleFunction,
- defaultStyles
-};
diff --git a/web/client/components/map/openlayers/Locate.jsx b/web/client/components/map/openlayers/Locate.jsx
index 9d79110e9e..093756cfa4 100644
--- a/web/client/components/map/openlayers/Locate.jsx
+++ b/web/client/components/map/openlayers/Locate.jsx
@@ -1,6 +1,6 @@
-const PropTypes = require('prop-types');
-const React = require('react');
-const OlLocate = require('../../../utils/openlayers/OlLocate');
+import PropTypes from 'prop-types';
+import React from 'react';
+import OlLocate from '../../../utils/openlayers/OlLocate';
const defaultOpt = {
follow: true, // follow with zoom and pan the user's location
@@ -16,7 +16,7 @@ const defaultOpt = {
}
};
-class Locate extends React.Component {
+export default class Locate extends React.Component {
static displayName = 'Locate';
static propTypes = {
@@ -80,4 +80,3 @@ class Locate extends React.Component {
};
}
-module.exports = Locate;
diff --git a/web/client/components/map/openlayers/Map.jsx b/web/client/components/map/openlayers/Map.jsx
index bf14a92dcc..04f078729d 100644
--- a/web/client/components/map/openlayers/Map.jsx
+++ b/web/client/components/map/openlayers/Map.jsx
@@ -5,20 +5,39 @@
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
-const ol = require('openlayers');
-const proj4 = require('proj4').default;
-const PropTypes = require('prop-types');
-const React = require('react');
-const assign = require('object-assign');
-const CoordinatesUtils = require('../../../utils/CoordinatesUtils');
-const ConfigUtils = require('../../../utils/ConfigUtils');
-const mapUtils = require('../../../utils/MapUtils');
-const projUtils = require('../../../utils/openlayers/projUtils');
+import { defaults, DragPan, MouseWheelZoom } from 'ol/interaction';
+import { defaults as defaultControls } from 'ol/control';
+import Map from 'ol/Map';
+import View from 'ol/View';
+import { toLonLat } from 'ol/proj';
+import Zoom from 'ol/control/Zoom';
+import Units from 'ol/proj/Units';
-const { isEqual, throttle, isArray, isNil } = require('lodash');
+import { getWidth, getHeight } from 'ol/extent';
-class OpenlayersMap extends React.Component {
+import proj4 from 'proj4';
+import { register } from 'ol/proj/proj4.js';
+import PropTypes from 'prop-types';
+import React from 'react';
+import assign from 'object-assign';
+
+import CoordinatesUtils from '../../../utils/CoordinatesUtils';
+import ConfigUtils from '../../../utils/ConfigUtils';
+import mapUtils from '../../../utils/MapUtils';
+import projUtils from '../../../utils/openlayers/projUtils';
+
+import isEqual from 'lodash/isEqual';
+import throttle from 'lodash/throttle';
+import isArray from 'lodash/isArray';
+import isNil from 'lodash/isNil';
+
+import 'ol/ol.css';
+
+// add overrides for css
+import './mapstore-ol-overrides.css';
+
+export default class OpenlayersMap extends React.Component {
static propTypes = {
id: PropTypes.string,
style: PropTypes.object,
@@ -67,12 +86,12 @@ class OpenlayersMap extends React.Component {
componentDidMount() {
this.props.projectionDefs.forEach(p => {
- projUtils.addProjections(ol, p.code, p.extent, p.worldExtent, p.axisOrientation || proj4.defs(p.code).axis || 'enu');
+ projUtils.addProjections(p.code, p.extent, p.worldExtent, p.axisOrientation || proj4.defs(p.code).axis || 'enu');
});
// It may be a good idea to check if CoordinateUtils also registered the projectionDefs
// normally it happens ad application level.
let center = CoordinatesUtils.reproject([this.props.center.x, this.props.center.y], 'EPSG:4326', this.props.projection);
- ol.proj.setProj4(proj4);
+ register(proj4);
let interactionsOptions = assign(this.props.interactive ? {} : {
doubleClickZoom: false,
dragPan: false,
@@ -84,21 +103,21 @@ class OpenlayersMap extends React.Component {
pinchZoom: false
}, this.props.mapOptions.interactions);
- let interactions = ol.interaction.defaults(assign({
+ let interactions = defaults(assign({
dragPan: false,
mouseWheelZoom: false
}, interactionsOptions, {}));
if (interactionsOptions === undefined || interactionsOptions.dragPan === undefined || interactionsOptions.dragPan) {
interactions.extend([
- new ol.interaction.DragPan({ kinetic: false })
+ new DragPan({ kinetic: false })
]);
}
if (interactionsOptions === undefined || interactionsOptions.mouseWheelZoom === undefined || interactionsOptions.mouseWheelZoom) {
interactions.extend([
- new ol.interaction.MouseWheelZoom({ duration: 0 })
+ new MouseWheelZoom({ duration: 0 })
]);
}
- let controls = ol.control.defaults(assign({
+ let controls = defaultControls(assign({
zoom: this.props.zoomControl,
attributionOptions: assign({
collapsible: false
@@ -106,7 +125,7 @@ class OpenlayersMap extends React.Component {
target: document.querySelector(this.props.mapOptions.attribution.container)
} : {})
}, this.props.mapOptions.controls));
- let map = new ol.Map({
+ let map = new Map({
layers: [],
controls: controls,
interactions: interactions,
@@ -133,7 +152,7 @@ class OpenlayersMap extends React.Component {
pos[0] = CoordinatesUtils.normalizeLng(pos[0]);
}
if (this.props.projection === 'EPSG:900913' || this.props.projection === 'EPSG:3857') {
- pos = ol.proj.toLonLat(pos, this.props.projection);
+ pos = toLonLat(pos, this.props.projection);
projectionExtent = CoordinatesUtils.reprojectBbox(projectionExtent, this.props.projection, "EPSG:4326");
}
// prevent user from clicking outside the projection extent
@@ -160,7 +179,7 @@ class OpenlayersMap extends React.Component {
if (!this.markerPresent && geom.getType() === "Point") {
this.markerPresent = true;
layerInfo = layer.get('msId');
- const arr = ol.proj.toLonLat(geom.getFirstCoordinate(), this.props.projection);
+ const arr = toLonLat(geom.getFirstCoordinate(), this.props.projection);
coords = { x: arr[0], y: arr[1] };
}
}
@@ -207,9 +226,9 @@ class OpenlayersMap extends React.Component {
if (newProps.zoomControl !== this.props.zoomControl) {
if (newProps.zoomControl) {
- this.map.addControl(new ol.control.Zoom());
+ this.map.addControl(new Zoom());
} else {
- this.map.removeControl(this.map.getControls().getArray().filter((ctl) => ctl instanceof ol.control.Zoom)[0]);
+ this.map.removeControl(this.map.getControls().getArray().filter((ctl) => ctl instanceof Zoom)[0]);
}
}
@@ -287,12 +306,12 @@ class OpenlayersMap extends React.Component {
const projection = this.map.getView().getProjection();
const extent = projection.getExtent();
- const extentWidth = !extent ? 360 * ol.proj.METERS_PER_UNIT[ol.proj.Units.DEGREES] /
- ol.proj.METERS_PER_UNIT[projection.getUnits()] :
- ol.extent.getWidth(extent);
- const extentHeight = !extent ? 360 * ol.proj.METERS_PER_UNIT[ol.proj.Units.DEGREES] /
- ol.proj.METERS_PER_UNIT[projection.getUnits()] :
- ol.extent.getHeight(extent);
+ const extentWidth = !extent ? 360 * Units.METERS_PER_UNIT[Units.DEGREES] /
+ Units.METERS_PER_UNIT[projection.getUnits()] :
+ getWidth(extent);
+ const extentHeight = !extent ? 360 * Units.METERS_PER_UNIT[Units.DEGREES] /
+ Units.METERS_PER_UNIT[projection.getUnits()] :
+ getHeight(extent);
let resX = extentWidth / tileWidth;
let resY = extentHeight / tileHeight;
@@ -388,7 +407,7 @@ class OpenlayersMap extends React.Component {
mouseMoveEvent = (event) => {
if (!event.dragging && event.coordinate) {
let pos = event.coordinate.slice();
- let coords = ol.proj.toLonLat(pos, this.props.projection);
+ let coords = toLonLat(pos, this.props.projection);
let tLng = coords[0] / 360 % 1 * 360;
if (tLng < -180) {
tLng = tLng + 360;
@@ -415,11 +434,11 @@ class OpenlayersMap extends React.Component {
const crs = view.getProjection().getCode();
// some projections are repeated on the x axis
// and they need to be updated also if the center is outside of the projection extent
- const wrappedProjections = [ 'EPSG:3857', 'EPSG:900913', 'EPSG:4326' ];
+ const wrappedProjections = ['EPSG:3857', 'EPSG:900913', 'EPSG:4326'];
// prevent user from dragging outside the projection extent
if (wrappedProjections.indexOf(crs) !== -1
- || (tempCenter && tempCenter[0] >= projectionExtent[0] && tempCenter[0] <= projectionExtent[2] &&
- tempCenter[1] >= projectionExtent[1] && tempCenter[1] <= projectionExtent[3])) {
+ || (tempCenter && tempCenter[0] >= projectionExtent[0] && tempCenter[0] <= projectionExtent[2] &&
+ tempCenter[1] >= projectionExtent[1] && tempCenter[1] <= projectionExtent[3])) {
let c = this.normalizeCenter(view.getCenter());
let bbox = view.calculateExtent(this.map.getSize());
let size = {
@@ -459,7 +478,7 @@ class OpenlayersMap extends React.Component {
zoom: zoom,
minZoom: limits.minZoom
}, newOptions || {});
- return new ol.View(viewOptions);
+ return new View(viewOptions);
};
_updateMapPositionFromNewProps = (newProps) => {
@@ -542,7 +561,3 @@ class OpenlayersMap extends React.Component {
});
};
}
-
-// add overrides for css
-require('./mapstore-ol-overrides.css');
-module.exports = OpenlayersMap;
diff --git a/web/client/components/map/openlayers/MeasurementSupport.jsx b/web/client/components/map/openlayers/MeasurementSupport.jsx
index 90386da0a8..29ab7d5fd1 100644
--- a/web/client/components/map/openlayers/MeasurementSupport.jsx
+++ b/web/client/components/map/openlayers/MeasurementSupport.jsx
@@ -6,25 +6,39 @@
* LICENSE file in the root directory of this source tree.
*/
-const React = require('react');
-const PropTypes = require('prop-types');
-const {round, isEqual, dropRight, pick} = require('lodash');
-const assign = require('object-assign');
-const ol = require('openlayers');
-
-const wgs84Sphere = new ol.Sphere(6378137);
-const {reprojectGeoJson, reproject, calculateAzimuth, calculateDistance, transformLineToArcs} = require('../../../utils/CoordinatesUtils');
-const {convertUom, getFormattedBearingValue} = require('../../../utils/MeasureUtils');
-const {set} = require('../../../utils/ImmutableUtils');
-const {startEndPolylineStyle} = require('./VectorStyle');
-const {getMessageById} = require('../../../utils/LocaleUtils');
-const {createOLGeometry} = require('../../../utils/openlayers/DrawUtils');
+import React from 'react';
+import PropTypes from 'prop-types';
+import round from 'lodash/round';
+import isEqual from 'lodash/isEqual';
+import dropRight from 'lodash/dropRight';
+import pick from 'lodash/pick';
+
+import assign from 'object-assign';
+
+import {reprojectGeoJson, reproject, calculateAzimuth, calculateDistance, transformLineToArcs} from '../../../utils/CoordinatesUtils';
+import {convertUom, getFormattedBearingValue} from '../../../utils/MeasureUtils';
+import {set} from '../../../utils/ImmutableUtils';
+import {startEndPolylineStyle} from './VectorStyle';
+import {getMessageById} from '../../../utils/LocaleUtils';
+import {createOLGeometry} from '../../../utils/openlayers/DrawUtils';
+
+import {Polygon, LineString} from 'ol/geom';
+import Overlay from 'ol/Overlay';
+import VectorSource from 'ol/source/Vector';
+import VectorLayer from 'ol/layer/Vector';
+import Feature from 'ol/Feature';
+import {Stroke, Fill, Style} from 'ol/style';
+import CircleStyle from 'ol/style/Circle';
+import Draw from 'ol/interaction/Draw';
+import GeoJSON from 'ol/format/GeoJSON';
+import {unByKey} from 'ol/Observable';
+import {getArea} from 'ol/sphere';
const getProjectionCode = (olMap) => {
return olMap.getView().getProjection().getCode();
};
-class MeasurementSupport extends React.Component {
+export default class MeasurementSupport extends React.Component {
static propTypes = {
startEndPoint: PropTypes.object,
map: PropTypes.object,
@@ -112,15 +126,15 @@ class MeasurementSupport extends React.Component {
let geom = this.source.getFeatures()[0].getGeometry();
let output;
- if (geom instanceof ol.geom.Polygon) {
+ if (geom instanceof Polygon) {
output = this.formatArea(geom, props);
this.tooltipCoord = geom.getInteriorPoint().getCoordinates();
- } else if (geom instanceof ol.geom.LineString) {
+ } else if (geom instanceof LineString) {
output = this.formatLength(geom, props);
this.tooltipCoord = geom.getLastCoordinate();
}
this.measureTooltipElement.innerHTML = output;
- this.measureTooltip = new ol.Overlay({
+ this.measureTooltip = new Overlay({
element: this.measureTooltipElement,
offset: [0, -7],
positioning: 'bottom-center'
@@ -144,10 +158,10 @@ class MeasurementSupport extends React.Component {
let ft = set("geometry.coordinates", newCoords, features[0]);
featuresToReplace = [ft];
}
- this.source = new ol.source.Vector();
+ this.source = new VectorSource();
featuresToReplace.forEach((geoJSON) => {
let geometry = reprojectGeoJson(geoJSON, "EPSG:4326", getProjectionCode(this.props.map)).geometry;
- const feature = new ol.Feature({
+ const feature = new Feature({
geometry: createOLGeometry(geometry)
});
this.source.addFeature(feature);
@@ -168,19 +182,19 @@ class MeasurementSupport extends React.Component {
this.removeDrawInteraction();
}
// create a layer to draw on
- this.source = new ol.source.Vector();
+ this.source = new VectorSource();
let styles = [
- new ol.style.Style({
- fill: new ol.style.Fill({
+ new Style({
+ fill: new Fill({
color: 'rgba(255, 255, 255, 0.2)'
}),
- stroke: new ol.style.Stroke({
+ stroke: new Stroke({
color: '#ffcc33',
width: 2
}),
- image: new ol.style.Circle({
+ image: new CircleStyle({
radius: 7,
- fill: new ol.style.Fill({
+ fill: new Fill({
color: '#ffcc33'
})
})
@@ -193,7 +207,7 @@ class MeasurementSupport extends React.Component {
startEndPointStyles = startEndPolylineStyle(options.startPointOptions, options.endPointOptions);
}
- vector = new ol.layer.Vector({
+ vector = new VectorLayer({
source: this.source,
zIndex: 1000000,
style: [...styles, ...startEndPointStyles]
@@ -207,38 +221,38 @@ class MeasurementSupport extends React.Component {
geometryType = newProps.measurement.geomType;
}
// create an interaction to draw with
- draw = new ol.interaction.Draw({
+ draw = new Draw({
source: this.source,
type: /** @type {ol.geom.GeometryType} */ geometryType,
- style: new ol.style.Style({
- fill: new ol.style.Fill({
+ style: new Style({
+ fill: new Fill({
color: 'rgba(255, 255, 255, 0.2)'
}),
- stroke: new ol.style.Stroke({
+ stroke: new Stroke({
color: 'rgba(0, 0, 0, 0.5)',
lineDash: [10, 10],
width: 2
}),
- image: new ol.style.Circle({
+ image: new CircleStyle({
radius: 5,
- stroke: new ol.style.Stroke({
+ stroke: new Stroke({
color: 'rgba(0, 0, 0, 0.7)'
}),
- fill: new ol.style.Fill({
+ fill: new Fill({
color: 'rgba(255, 255, 255, 0.2)'
})
})
})
});
- this.clickListener = this.props.map.on('click', () => this.updateMeasurementResults(this.props), this);
+ this.clickListener = this.props.map.on('click', () => this.updateMeasurementResults(this.props));
if (this.props.updateOnMouseMove) {
- this.props.map.on('pointermove', () => this.updateMeasurementResults(this.props), this);
+ this.props.map.on('pointermove', () => this.updateMeasurementResults(this.props));
}
- this.props.map.on('pointermove', this.pointerMoveHandler, this);
+ this.props.map.on('pointermove', (evt) => this.pointerMoveHandler(evt));
- draw.on('drawstart', function(evt) {
+ draw.on('drawstart', (evt) => {
// preserve the sketch feature of the draw controller
// to update length/area on drawing a new vertex
this.sketchFeature = evt.feature;
@@ -256,10 +270,10 @@ class MeasurementSupport extends React.Component {
this.listener = this.sketchFeature.getGeometry().on('change', (e) => {
let geom = e.target;
let output;
- if (geom instanceof ol.geom.Polygon) {
+ if (geom instanceof Polygon) {
output = this.formatArea(geom, this.props);
this.tooltipCoord = geom.getInteriorPoint().getCoordinates();
- } else if (geom instanceof ol.geom.LineString) {
+ } else if (geom instanceof LineString) {
output = this.formatLength(geom, this.props);
this.tooltipCoord = geom.getLastCoordinate();
}
@@ -267,12 +281,12 @@ class MeasurementSupport extends React.Component {
this.measureTooltipElement.innerHTML = output;
this.measureTooltip.setPosition(this.tooltipCoord);
}
- }, this);
+ });
this.props.resetGeometry();
- }, this);
- draw.on('drawend', function(evt) {
+ });
+ draw.on('drawend', (evt) => {
this.drawing = false;
- const geojsonFormat = new ol.format.GeoJSON();
+ const geojsonFormat = new GeoJSON();
let newFeature = reprojectGeoJson(geojsonFormat.writeFeatureObject(evt.feature.clone()), getProjectionCode(this.props.map), "EPSG:4326");
this.props.changeGeometry(newFeature);
if (this.props.measurement.lineMeasureEnabled) {
@@ -284,9 +298,9 @@ class MeasurementSupport extends React.Component {
if (this.props.measurement.showLabel) {
this.measureTooltipElement.className = 'tooltip tooltip-static';
this.measureTooltip.setOffset([0, -7]);
- ol.Observable.unByKey(this.listener);
+ unByKey(this.listener);
}
- }, this);
+ });
this.props.map.addInteraction(draw);
if (this.props.measurement.showLabel) {
@@ -307,7 +321,7 @@ class MeasurementSupport extends React.Component {
this.props.map.removeLayer(this.measureLayer);
this.sketchFeature = null;
this.props.map.un('click', () => this.updateMeasurementResults(this.props), this);
- ol.Observable.unByKey(this.clickListener);
+ unByKey(this.clickListener);
if (this.props.updateOnMouseMove) {
this.props.map.un('pointermove', () => this.updateMeasurementResults(this.props), this);
}
@@ -327,9 +341,9 @@ class MeasurementSupport extends React.Component {
if (this.sketchFeature && this.drawing) {
let geom = (this.sketchFeature.getGeometry());
- if (geom instanceof ol.geom.Polygon) {
+ if (geom instanceof Polygon) {
helpMsg = this.continuePolygonMsg;
- } else if (geom instanceof ol.geom.LineString) {
+ } else if (geom instanceof LineString) {
helpMsg = this.continueLineMsg;
}
}
@@ -369,7 +383,7 @@ class MeasurementSupport extends React.Component {
this.drawInteraction.finishDrawing();
}
}
- const geojsonFormat = new ol.format.GeoJSON();
+ const geojsonFormat = new GeoJSON();
let feature = reprojectGeoJson(geojsonFormat.writeFeatureObject(this.sketchFeature.clone()), getProjectionCode(props.map), "EPSG:4326");
// it will no longer create 100 points for arcs to put in the state
@@ -404,8 +418,8 @@ class MeasurementSupport extends React.Component {
calculateGeodesicArea = (coordinates) => {
if (coordinates.length >= 4 ) {
- let reprojectedCoordinatesIn4326 = this.reprojectedCoordinatesIn4326(coordinates);
- return Math.abs(wgs84Sphere.geodesicArea(reprojectedCoordinatesIn4326));
+ const reprojectedCoordinatesIn4326 = this.reprojectedCoordinatesIn4326(coordinates);
+ return Math.abs(getArea(new Polygon([reprojectedCoordinatesIn4326]), { projection: 'EPSG:4326' }));
}
return 0;
};
@@ -417,7 +431,7 @@ class MeasurementSupport extends React.Component {
this.removeHelpTooltip();
this.helpTooltipElement = document.createElement('div');
this.helpTooltipElement.className = 'tooltip hidden';
- this.helpTooltip = new ol.Overlay({
+ this.helpTooltip = new Overlay({
element: this.helpTooltipElement,
offset: [15, 0],
positioning: 'center-left'
@@ -431,7 +445,7 @@ class MeasurementSupport extends React.Component {
this.removeMeasureTooltips();
this.measureTooltipElement = document.createElement('div');
this.measureTooltipElement.className = 'tooltip tooltip-measure';
- this.measureTooltip = new ol.Overlay({
+ this.measureTooltip = new Overlay({
element: this.measureTooltipElement,
offset: [0, -15],
positioning: 'bottom-center'
@@ -488,5 +502,3 @@ class MeasurementSupport extends React.Component {
}
}
}
-
-module.exports = MeasurementSupport;
diff --git a/web/client/components/map/openlayers/Overview.jsx b/web/client/components/map/openlayers/Overview.jsx
index 6557ae6374..204b0cbb87 100644
--- a/web/client/components/map/openlayers/Overview.jsx
+++ b/web/client/components/map/openlayers/Overview.jsx
@@ -5,12 +5,13 @@
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
-const PropTypes = require('prop-types');
-const React = require('react');
-const ol = require('openlayers');
-const Layers = require('../../../utils/openlayers/Layers');
-const assign = require('object-assign');
-const {isFinite} = require('lodash');
+import PropTypes from 'prop-types';
+import React from 'react';
+import Layers from '../../../utils/openlayers/Layers';
+import assign from 'object-assign';
+import isFinite from 'lodash/isFinite';
+
+import OverviewMap from 'ol/control/OverviewMap';
require('./overview.css');
@@ -22,7 +23,7 @@ const defaultOpt = {
collapsible: true
};
-class Overview extends React.Component {
+export default class Overview extends React.Component {
static displayName = 'Overview';
static propTypes = {
@@ -44,7 +45,7 @@ class Overview extends React.Component {
olLayers.push(Layers.createLayer(layerOpt.type, layerOpt.options || {}));
});
let opt = assign({}, defaultOpt, this.props.overviewOpt, {layers: olLayers});
- this.overview = new ol.control.OverviewMap(opt);
+ this.overview = new OverviewMap(opt);
if (this.props.map) {
this.overview.setMap(this.props.map);
}
@@ -130,5 +131,3 @@ class Overview extends React.Component {
this.props.map.getView().fit(extent, mapSize, {nearest: true});
};
}
-
-module.exports = Overview;
diff --git a/web/client/components/map/openlayers/ScaleBar.jsx b/web/client/components/map/openlayers/ScaleBar.jsx
index 966ce35219..cfb5d14806 100644
--- a/web/client/components/map/openlayers/ScaleBar.jsx
+++ b/web/client/components/map/openlayers/ScaleBar.jsx
@@ -6,13 +6,12 @@
* LICENSE file in the root directory of this source tree.
*/
-const PropTypes = require('prop-types');
-const React = require('react');
-const ol = require('openlayers');
+import PropTypes from 'prop-types';
+import React from 'react';
+import assign from 'object-assign';
+import ScaleLine from 'ol/control/ScaleLine';
-const assign = require('object-assign');
-
-class ScaleBar extends React.Component {
+export default class ScaleBar extends React.Component {
static propTypes = {
map: PropTypes.object,
className: PropTypes.string,
@@ -29,7 +28,7 @@ class ScaleBar extends React.Component {
};
componentDidMount() {
- this.scalebar = new ol.control.ScaleLine(assign({}, this.props, this.props.container ? {
+ this.scalebar = new ScaleLine(assign({}, this.props, this.props.container ? {
target: document.querySelector(this.props.container)
} : {}));
if (this.props.map) {
@@ -48,4 +47,3 @@ class ScaleBar extends React.Component {
}
}
-module.exports = ScaleBar;
diff --git a/web/client/components/map/openlayers/SelectionSupport.jsx b/web/client/components/map/openlayers/SelectionSupport.jsx
index 00938e4d3b..fe192287df 100644
--- a/web/client/components/map/openlayers/SelectionSupport.jsx
+++ b/web/client/components/map/openlayers/SelectionSupport.jsx
@@ -1,4 +1,3 @@
-const PropTypes = require('prop-types');
/**
* Copyright 2017, Sourcepole AG.
* All rights reserved.
@@ -7,10 +6,16 @@ const PropTypes = require('prop-types');
* LICENSE file in the root directory of this source tree.
*/
-const React = require('react');
-var ol = require('openlayers');
+import PropTypes from 'prop-types';
+import React from 'react';
+import VectorSource from 'ol/source/Vector';
+import VectorLayer from 'ol/layer/Vector';
+import {Style, Fill, Stroke} from 'ol/style';
+import CircleStyle from 'ol/style/Circle';
+import Draw from 'ol/interaction/Draw';
+import DoubleClickZoom from 'ol/interaction/DoubleClickZoom';
-class SelectionSupport extends React.Component {
+export default class SelectionSupport extends React.Component {
static propTypes = {
map: PropTypes.object,
projection: PropTypes.string,
@@ -42,21 +47,21 @@ class SelectionSupport extends React.Component {
this.removeDrawInteraction();
}
// create a layer to draw on
- let source = new ol.source.Vector();
- let vector = new ol.layer.Vector({
+ let source = new VectorSource();
+ let vector = new VectorLayer({
source: source,
zIndex: 1000000,
- style: new ol.style.Style({
- fill: new ol.style.Fill({
+ style: new Style({
+ fill: new Fill({
color: 'rgba(255, 255, 255, 0.2)'
}),
- stroke: new ol.style.Stroke({
+ stroke: new Stroke({
color: '#ffcc33',
width: 2
}),
- image: new ol.style.Circle({
+ image: new CircleStyle({
radius: 7,
- fill: new ol.style.Fill({
+ fill: new Fill({
color: '#ffcc33'
})
})
@@ -66,40 +71,40 @@ class SelectionSupport extends React.Component {
this.props.map.addLayer(vector);
// create an interaction to draw with
- let draw = new ol.interaction.Draw({
+ let draw = new Draw({
source: source,
type: /** @type {ol.geom.GeometryType} */ newProps.selection.geomType,
- style: new ol.style.Style({
- fill: new ol.style.Fill({
+ style: new Style({
+ fill: new Fill({
color: 'rgba(255, 255, 255, 0.2)'
}),
- stroke: new ol.style.Stroke({
+ stroke: new Stroke({
color: 'rgba(0, 0, 0, 0.5)',
lineDash: [10, 10],
width: 2
}),
- image: new ol.style.Circle({
+ image: new CircleStyle({
radius: 5,
- stroke: new ol.style.Stroke({
+ stroke: new Stroke({
color: 'rgba(0, 0, 0, 0.7)'
}),
- fill: new ol.style.Fill({
+ fill: new Fill({
color: 'rgba(255, 255, 255, 0.2)'
})
})
})
});
- draw.on('drawstart', function(evt) {
+ draw.on('drawstart', (evt) => {
// preserv the sketch feature of the draw controller
// to update length/area on drawing a new vertex
this.sketchFeature = evt.feature;
// clear previous sketches
source.clear();
- }, this);
- draw.on('drawend', function() {
+ });
+ draw.on('drawend', () => {
this.updateSelectionState();
- }, this);
+ });
this.props.map.addInteraction(draw);
this.drawInteraction = draw;
@@ -140,12 +145,10 @@ class SelectionSupport extends React.Component {
let interactions = this.props.map.getInteractions();
for (let i = 0; i < interactions.getLength(); i++) {
let interaction = interactions.item(i);
- if (interaction instanceof ol.interaction.DoubleClickZoom) {
+ if (interaction instanceof DoubleClickZoom) {
interaction.setActive(enabled);
break;
}
}
};
}
-
-module.exports = SelectionSupport;
diff --git a/web/client/components/map/openlayers/SnapshotSupport.jsx b/web/client/components/map/openlayers/SnapshotSupport.jsx
index 7da719c5d3..4f38cdded1 100644
--- a/web/client/components/map/openlayers/SnapshotSupport.jsx
+++ b/web/client/components/map/openlayers/SnapshotSupport.jsx
@@ -6,7 +6,10 @@
* LICENSE file in the root directory of this source tree.
*/
-module.exports = {
- GrabMap: require('./snapshot/GrabMap.jsx'),
- Preview: require('./snapshot/Preview.jsx')
+import GrabMap from './snapshot/GrabMap.jsx';
+import Preview from './snapshot/Preview.jsx';
+
+export default {
+ GrabMap,
+ Preview
};
diff --git a/web/client/components/map/openlayers/VectorStyle.js b/web/client/components/map/openlayers/VectorStyle.js
index 261c7e8610..70158b1ad8 100644
--- a/web/client/components/map/openlayers/VectorStyle.js
+++ b/web/client/components/map/openlayers/VectorStyle.js
@@ -5,15 +5,40 @@
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
-const ol = require('openlayers');
-const {isNil, trim, isString, isArray, castArray, head, last, find, isObject} = require('lodash');
-const {colorToRgbaStr} = require('../../../utils/ColorUtils');
-const {reproject, transformLineToArcs} = require('../../../utils/CoordinatesUtils');
-const Icons = require('../../../utils/openlayers/Icons');
-const {
+import isNil from 'lodash/isNil';
+import trim from 'lodash/trim';
+import isString from 'lodash/isString';
+import isArray from 'lodash/isArray';
+import castArray from 'lodash/castArray';
+import head from 'lodash/head';
+import last from 'lodash/last';
+import find from 'lodash/find';
+import isObject from 'lodash/isObject';
+
+import {colorToRgbaStr} from '../../../utils/ColorUtils';
+import {reproject, transformLineToArcs} from '../../../utils/CoordinatesUtils';
+import Icons from '../../../utils/openlayers/Icons';
+import {
isMarkerStyle, isTextStyle, isStrokeStyle, isFillStyle, isCircleStyle, isSymbolStyle,
registerGeometryFunctions, geometryFunctions
-} = require('../../../utils/VectorStyleUtils');
+} from '../../../utils/VectorStyleUtils';
+
+import CircleStyle from 'ol/style/Circle';
+import {Stroke, Fill, Text, Style} from 'ol/style';
+import {Point, LineString} from 'ol/geom';
+
+import {Promise} from 'es6-promise';
+import axios from '../../../libs/ajax';
+
+import { getStyleParser } from '../../../utils/VectorStyleUtils';
+import OlStyleParser from 'geostyler-openlayers-parser';
+
+const olStyleParser = new OlStyleParser();
+
+import {
+ getStyle as getStyleLegacy, getMarkerStyle as getMarkerStyleLegacyFun,
+ startEndPolylineStyle as startEndPolylineStyleLegacy, defaultStyles as defaultStylesLegacy} from './LegacyVectorStyle';
+
const selectedStyle = {
white: [255, 255, 255, 1],
blue: [0, 153, 255, 1],
@@ -26,8 +51,8 @@ const selectedStyle = {
* @param {object} ol.Fill object
* @return if a circle style is passed then return it available for ol.style.Image
*/
-const getCircleStyle = (style = {}, stroke = null, fill = null) => {
- return isCircleStyle(style) ? new ol.style.Circle({
+export const getCircleStyle = (style = {}, stroke = null, fill = null) => {
+ return isCircleStyle(style) ? new CircleStyle({
stroke,
fill,
radius: style.radius || 5
@@ -39,7 +64,7 @@ const getCircleStyle = (style = {}, stroke = null, fill = null) => {
* @param {object} style to convert
* @return array of ol.Style
*/
-const getMarkerStyle = (style) => {
+export const getMarkerStyle = (style) => {
if (isMarkerStyle(style)) {
if (style.iconUrl) {
return Icons.standard.getIcon({style});
@@ -54,10 +79,10 @@ const getMarkerStyle = (style) => {
/**
* converts a style object
* @param {object} style to convert
- * @return an ol.style.Stroke style
+ * @return an Stroke style
*/
-const getStrokeStyle = (style = {}) => {
- return isStrokeStyle(style) ? new ol.style.Stroke(style.stroke && isObject(style.stroke) ? style.stroke : { // not sure about this ternary expr
+export const getStrokeStyle = (style = {}) => {
+ return isStrokeStyle(style) ? new Stroke(style.stroke && isObject(style.stroke) ? style.stroke : { // not sure about this ternary expr
color: style.highlight ? selectedStyle.blue : colorToRgbaStr(style.color || style.stroke || "#0000FF", isNil(style.opacity) ? 1 : style.opacity),
width: isNil(style.weight) ? 1 : style.weight,
lineDash: isString(style.dashArray) && trim(style.dashArray).split(' ') || isArray(style.dashArray) && style.dashArray || [0],
@@ -70,10 +95,10 @@ const getStrokeStyle = (style = {}) => {
/**
* converts a style object
* @param {object} style to convert
- * @return an ol.style.Fill style
+ * @return an Fill style
*/
-const getFillStyle = (style = {}) => {
- return isFillStyle(style) ? new ol.style.Fill(style.fill && isObject(style.fill) ? style.fill : { // not sure about this ternary expr
+export const getFillStyle = (style = {}) => {
+ return isFillStyle(style) ? new Fill(style.fill && isObject(style.fill) ? style.fill : { // not sure about this ternary expr
color: colorToRgbaStr(style.fillColor || "#0000FF", isNil(style.fillOpacity) ? 1 : style.fillOpacity)
}) : null;
};
@@ -81,28 +106,28 @@ const getFillStyle = (style = {}) => {
/**
* converts a style object
* @param {object} style to convert
- * @param {object} stroke ol.style.Stroke ready to use
- * @param {object} fill ol.style.Fill ready to use
- * @return an ol.style.Text style
+ * @param {object} stroke Stroke ready to use
+ * @param {object} fill Fill ready to use
+ * @return an Text style
*/
-const getTextStyle = (style = {}, stroke = null, fill = null, feature) => {
- return isTextStyle(style) ? new ol.style.Text({
+export const getTextStyle = (style = {}, stroke = null, fill = null, feature) => {
+ return isTextStyle(style) ? new Text({
fill,
offsetY: style.offsetY || -( 4 * Math.sqrt(style.fontSize)), // TODO improve this for high font values > 100px
textAlign: style.textAlign || "center",
text: style.label || feature && feature.properties && feature.properties.valueText || "New",
font: style.font || "Arial",
// halo
- stroke: style.highlight ? new ol.style.Stroke({
+ stroke: style.highlight ? new Stroke({
color: [255, 255, 255, 1],
width: 2
}) : stroke,
// this should be another rule for the small circle
image: style.highlight ?
- new ol.style.Circle({
+ new CircleStyle({
radius: 5,
fill: null,
- stroke: new ol.style.Stroke({
+ stroke: new Stroke({
color: colorToRgbaStr(style.color || "#0000FF", style.opacity || 1),
width: style.weight || 1
})
@@ -117,12 +142,12 @@ const getTextStyle = (style = {}, stroke = null, fill = null, feature) => {
* @param {number} options.radius radius of the circle
* @param {string} options.fillColor ol color for the circle fill style
* @param {boolean} options.applyToPolygon tells if this style can be applied to a polygon
- * @return {ol.style.Style} style of the point
+ * @return {Style} style of the point
*/
-const firstPointOfPolylineStyle = ({radius = 5, fillColor = 'green', applyToPolygon = false} = {}) => new ol.style.Style({
- image: new ol.style.Circle({
+export const firstPointOfPolylineStyle = ({radius = 5, fillColor = 'green', applyToPolygon = false} = {}) => new Style({
+ image: new CircleStyle({
radius,
- fill: new ol.style.Fill({
+ fill: new Fill({
color: fillColor
})
}),
@@ -133,7 +158,7 @@ const firstPointOfPolylineStyle = ({radius = 5, fillColor = 'green', applyToPoly
return null;
}
let coordinates = type === "Polygon" ? geom.getCoordinates()[0] : geom.getCoordinates();
- return coordinates.length > 1 ? new ol.geom.Point(head(coordinates)) : null;
+ return coordinates.length > 1 ? new Point(head(coordinates)) : null;
}
});
@@ -143,12 +168,12 @@ const firstPointOfPolylineStyle = ({radius = 5, fillColor = 'green', applyToPoly
* @param {number} options.radius radius of the circle
* @param {string} options.fillColor ol color for the circle fill style
* @param {boolean} options.applyToPolygon tells if this style can be applied to a polygon
- * @return {ol.style.Style} style of the point
+ * @return {Style} style of the point
*/
-const lastPointOfPolylineStyle = ({radius = 5, fillColor = 'red', applyToPolygon = false} = {}) => new ol.style.Style({
- image: new ol.style.Circle({
+export const lastPointOfPolylineStyle = ({radius = 5, fillColor = 'red', applyToPolygon = false} = {}) => new Style({
+ image: new CircleStyle({
radius,
- fill: new ol.style.Fill({
+ fill: new Fill({
color: fillColor
})
}),
@@ -159,14 +184,14 @@ const lastPointOfPolylineStyle = ({radius = 5, fillColor = 'red', applyToPolygon
return null;
}
let coordinates = type === "Polygon" ? geom.getCoordinates()[0] : geom.getCoordinates();
- return new ol.geom.Point(coordinates.length > 3 ? coordinates[coordinates.length - (type === "Polygon" ? 2 : 1)] : last(coordinates));
+ return new Point(coordinates.length > 3 ? coordinates[coordinates.length - (type === "Polygon" ? 2 : 1)] : last(coordinates));
}
});
/**
creates styles to highlight/customize start and end point of a polyline
*/
-const addDefaultStartEndPoints = (styles = [], startPointOptions = {radius: 3, fillColor: "green", applyToPolygon: true}, endPointOptions = {radius: 3, fillColor: "red", applyToPolygon: true}) => {
+export const addDefaultStartEndPoints = (styles = [], startPointOptions = {radius: 3, fillColor: "green", applyToPolygon: true}, endPointOptions = {radius: 3, fillColor: "red", applyToPolygon: true}) => {
let points = [];
if (!find(styles, s => s.geometry === "startPoint" && s.filtering)) {
points.push(firstPointOfPolylineStyle({...startPointOptions}));
@@ -177,13 +202,13 @@ const addDefaultStartEndPoints = (styles = [], startPointOptions = {radius: 3, f
return points;
};
-const centerPoint = (feature) => {
+export const centerPoint = (feature) => {
const geometry = feature.getGeometry();
const extent = geometry.getExtent();
let center = geometry.getCenter && geometry.getCenter() || [extent[2] - extent[0], extent[3] - extent[1]];
- return new ol.geom.Point(center);
+ return new Point(center);
};
-const lineToArc = (feature) => {
+export const lineToArc = (feature) => {
const type = feature.getGeometry().getType();
if (type === "LineString" || type === "MultiPoint") {
let coordinates = feature.getGeometry().getCoordinates();
@@ -191,25 +216,25 @@ const lineToArc = (feature) => {
const point = reproject(c, "EPSG:3857", "EPSG:4326");
return [point.x, point .y];
}));
- return new ol.geom.LineString(coordinates.map(c => {
+ return new LineString(coordinates.map(c => {
const point = reproject(c, "EPSG:4326", "EPSG:3857");
return [point.x, point .y];
}));
}
return feature.getGeometry();
};
-const startPoint = (feature) => {
+export const startPoint = (feature) => {
const geom = feature.getGeometry();
const type = geom.getType();
let coordinates = type === "Polygon" ? geom.getCoordinates()[0] : geom.getCoordinates();
- return coordinates.length > 1 ? new ol.geom.Point(head(coordinates)) : null;
+ return coordinates.length > 1 ? new Point(head(coordinates)) : null;
};
-const endPoint = (feature) => {
+export const endPoint = (feature) => {
const geom = feature.getGeometry();
const type = geom.getType();
let coordinates = type === "Polygon" ? geom.getCoordinates()[0] : geom.getCoordinates();
- return new ol.geom.Point(coordinates.length > 3 ? coordinates[coordinates.length - (type === "Polygon" ? 2 : 1)] : last(coordinates));
+ return new Point(coordinates.length > 3 ? coordinates[coordinates.length - (type === "Polygon" ? 2 : 1)] : last(coordinates));
};
registerGeometryFunctions("centerPoint", centerPoint, "Point");
@@ -220,7 +245,7 @@ registerGeometryFunctions("endPoint", endPoint, "Point");
/**
if a geom expression is present then return the corresponding function
*/
-const getGeometryTrasformation = (style = {}) => {
+export const getGeometryTrasformation = (style = {}) => {
return style.geometry ?
// then parse the geom_expression and return true or false
(feature) => {
@@ -229,14 +254,14 @@ const getGeometryTrasformation = (style = {}) => {
} : (f) => f.getGeometry();
};
-const getFilter = (style = {}) => {
+export const getFilter = (style = {}) => {
return !isNil(style.filtering) ?
// then parse the filter_expression and return true or false
style.filtering : true; // if no filter is defined, it returns true
};
-const parseStyleToOl = (feature = {properties: {}}, style = {}, tempStyles = []) => {
+export const parseStyleToOl = (feature = {properties: {}}, style = {}, tempStyles = []) => {
const filtering = getFilter(style, feature);
if (filtering) {
const stroke = getStrokeStyle(style);
@@ -259,7 +284,7 @@ const parseStyleToOl = (feature = {properties: {}}, style = {}, tempStyles = [])
const zIndex = style.zIndex;
// if filter is defined and true (default value)
- const finalStyle = new ol.style.Style({
+ const finalStyle = new Style({
geometry: getGeometryTrasformation(style),
image,
text,
@@ -269,12 +294,12 @@ const parseStyleToOl = (feature = {properties: {}}, style = {}, tempStyles = [])
});
return [finalStyle].concat(feature && feature.properties && feature.properties.canEdit && !feature.properties.isCircle ? addDefaultStartEndPoints(tempStyles) : []);
}
- return new ol.style.Style({});
+ return new Style({});
// if not do not return anything
};
-const parseStyles = (feature = {properties: {}}) => {
+export const parseStyles = (feature = {properties: {}}) => {
let styles = feature.style;
if (styles) {
let tempStyles = isArray(styles) ? styles : castArray(styles);
@@ -285,24 +310,23 @@ const parseStyles = (feature = {properties: {}}) => {
return [];
};
-/* importing legacy functions, do not use them if possible */
-module.exports = {
- getStyle: require('./LegacyVectorStyle').getStyle,
- getMarkerStyleLegacy: require('./LegacyVectorStyle').getMarkerStyle,
- startEndPolylineStyle: require('./LegacyVectorStyle').startEndPolylineStyle,
- defaultStyles: require('./LegacyVectorStyle').defaultStyles,
- getCircleStyle,
- getMarkerStyle,
- getStrokeStyle,
- getFillStyle,
- getTextStyle,
- firstPointOfPolylineStyle,
- lastPointOfPolylineStyle,
- centerPoint,
- startPoint,
- endPoint,
- getGeometryTrasformation,
- getFilter,
- parseStyleToOl,
- parseStyles
+
+export const getStyle = (options, isDrawing = false, textValues = []) => {
+ if (options.style && options.style.url) {
+ return axios.get(options.style.url).then(response => {
+ return getStyleParser(options.style.format).readStyle(response.data)
+ .then(style => olStyleParser.writeStyle(style));
+ });
+ }
+ const style = getStyleLegacy(options, isDrawing, textValues);
+ if (options.asPromise) {
+ return new Promise((resolve) => {
+ resolve(style);
+ });
+ }
+ return style;
};
+
+export const getMarkerStyleLegacy = getMarkerStyleLegacyFun;
+export const startEndPolylineStyle = startEndPolylineStyleLegacy;
+export const defaultStyles = defaultStylesLegacy;
diff --git a/web/client/components/map/openlayers/__tests__/DrawSupport-test.jsx b/web/client/components/map/openlayers/__tests__/DrawSupport-test.jsx
index 15a414c3b1..e554eea8cc 100644
--- a/web/client/components/map/openlayers/__tests__/DrawSupport-test.jsx
+++ b/web/client/components/map/openlayers/__tests__/DrawSupport-test.jsx
@@ -5,23 +5,26 @@
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
-const React = require('react');
-const ReactDOM = require('react-dom');
-const expect = require('expect');
-const ol = require('openlayers');
-const assign = require('object-assign');
-const DrawSupport = require('../DrawSupport');
-const {DEFAULT_ANNOTATIONS_STYLES} = require('../../../../utils/AnnotationsUtils');
-const {circle, geomCollFeature} = require('../../../../test-resources/drawsupport/features');
+import React from 'react';
+import ReactDOM from 'react-dom';
+import expect from 'expect';
+import assign from 'object-assign';
+import DrawSupport from '../DrawSupport';
+import {DEFAULT_ANNOTATIONS_STYLES} from '../../../../utils/AnnotationsUtils';
+import {circle, geomCollFeature} from '../../../../test-resources/drawsupport/features';
+
+import {Map, View, Feature} from 'ol';
+import {Point, Circle, Polygon, LineString, MultiLineString} from 'ol/geom';
+import Collection from 'ol/Collection';
const viewOptions = {
projection: 'EPSG:3857',
center: [0, 0],
zoom: 5
};
-let olMap = new ol.Map({
+let olMap = new Map({
target: "map",
- view: new ol.View(viewOptions)
+ view: new View(viewOptions)
});
olMap.disableEventListener = () => {};
@@ -77,9 +80,9 @@ describe('Test DrawSupport', () => {
afterEach((done) => {
document.body.innerHTML = '';
- olMap = new ol.Map({
+ olMap = new Map({
target: "map",
- view: new ol.View(viewOptions)
+ view: new View(viewOptions)
});
olMap.disableEventListener = () => {};
@@ -226,8 +229,8 @@ describe('Test DrawSupport', () => {
, document.getElementById("container"));
- const feature = new ol.Feature({
- geometry: new ol.geom.Point(13.0, 43.0),
+ const feature = new Feature({
+ geometry: new Point(13.0, 43.0),
name: 'My Point'
});
support.selectInteraction.dispatchEvent({
@@ -256,8 +259,8 @@ describe('Test DrawSupport', () => {
ReactDOM.render(
, document.getElementById("container"));
- const feature = new ol.Feature({
- geometry: new ol.geom.Point(13.0, 43.0),
+ const feature = new Feature({
+ geometry: new Point(13.0, 43.0),
name: 'My Point'
});
support.translateInteraction.dispatchEvent({
@@ -372,8 +375,8 @@ describe('Test DrawSupport', () => {
})
})
};
- const feature = new ol.Feature({
- geometry: new ol.geom.Point(13.0, 43.0),
+ const feature = new Feature({
+ geometry: new Point(13.0, 43.0),
name: 'My Point'
});
const spyEnd = expect.spyOn(testHandlers, "onEndDrawing");
@@ -410,8 +413,8 @@ describe('Test DrawSupport', () => {
})
})
};
- const feature = new ol.Feature({
- geometry: new ol.geom.Circle([13.0, 43.0], 100),
+ const feature = new Feature({
+ geometry: new Circle([13.0, 43.0], 100),
name: 'My Point'
});
const spyEnd = expect.spyOn(testHandlers, "onEndDrawing");
@@ -451,8 +454,8 @@ describe('Test DrawSupport', () => {
})
})
};
- const feature = new ol.Feature({
- geometry: new ol.geom.Point(13.0, 43.0),
+ const feature = new Feature({
+ geometry: new Point(13.0, 43.0),
name: 'My Point'
});
const spyEnd = expect.spyOn(testHandlers, "onEndDrawing");
@@ -1151,8 +1154,8 @@ describe('Test DrawSupport', () => {
'name': "some name"
}
};
- const feature = new ol.Feature({
- geometry: new ol.geom.Point(13.0, 43.0),
+ const feature = new Feature({
+ geometry: new Point(13.0, 43.0),
name: 'My Point'
});
const spyEnd = expect.spyOn(testHandlers, "onEndDrawing");
@@ -1205,8 +1208,8 @@ describe('Test DrawSupport', () => {
'name': "some name"
}
};
- const feature = new ol.Feature({
- geometry: new ol.geom.Point(13.0, 43.0),
+ const feature = new Feature({
+ geometry: new Point(13.0, 43.0),
name: 'My Point'
});
const spyEnd = expect.spyOn(testHandlers, "onEndDrawing");
@@ -1346,8 +1349,8 @@ describe('Test DrawSupport', () => {
})
};
- const simplifiedCircle = new ol.Feature({
- geometry: new ol.geom.Polygon([[
+ const simplifiedCircle = new Feature({
+ geometry: new Polygon([[
[1260844.6064174946, 5858067.29727681],
[1260960.7874218025, 5857951.114737838],
[1260844.6064174946, 5857834.9352681665],
@@ -1739,8 +1742,8 @@ describe('Test DrawSupport', () => {
const radius = 1000;
support.drawInteraction.dispatchEvent({
type: 'drawend',
- feature: new ol.Feature({
- geometry: new ol.geom.Circle(center, radius)
+ feature: new Feature({
+ geometry: new Circle(center, radius)
})
});
const drawOwner = null;
@@ -1782,8 +1785,8 @@ describe('Test DrawSupport', () => {
const coordinate = [1300, 4300];
support.drawInteraction.dispatchEvent({
type: 'drawend',
- feature: new ol.Feature({
- geometry: new ol.geom.Point(coordinate)
+ feature: new Feature({
+ geometry: new Point(coordinate)
})
});
const drawOwner = null;
@@ -1824,8 +1827,8 @@ describe('Test DrawSupport', () => {
expect(support).toExist();
support.drawInteraction.dispatchEvent({
type: 'drawend',
- feature: new ol.Feature({
- geometry: new ol.geom.Polygon([[[1300, 4300], [8, 9], [8, 59]]])
+ feature: new Feature({
+ geometry: new Polygon([[[1300, 4300], [8, 9], [8, 59]]])
})
});
const drawOwner = null;
@@ -1865,8 +1868,8 @@ describe('Test DrawSupport', () => {
expect(support).toExist();
support.drawInteraction.dispatchEvent({
type: 'drawend',
- feature: new ol.Feature({
- geometry: new ol.geom.LineString([[1300, 4300], [8, 9], [8, 59]])
+ feature: new Feature({
+ geometry: new LineString([[1300, 4300], [8, 9], [8, 59]])
})
});
const drawOwner = null;
@@ -1905,8 +1908,8 @@ describe('Test DrawSupport', () => {
const radius = 1000;
support.drawInteraction.dispatchEvent({
type: 'drawend',
- feature: new ol.Feature({
- geometry: new ol.geom.Circle(center, radius)
+ feature: new Feature({
+ geometry: new Circle(center, radius)
})
});
expect(spyOnGeometryChanged).toHaveBeenCalled();
@@ -1941,8 +1944,8 @@ describe('Test DrawSupport', () => {
expect(support).toExist();
support.drawInteraction.dispatchEvent({
type: 'drawend',
- feature: new ol.Feature({
- geometry: new ol.geom.MultiLineString([[[1300, 4300], [8, 9], [8, 59]]])
+ feature: new Feature({
+ geometry: new MultiLineString([[[1300, 4300], [8, 9], [8, 59]]])
})
});
expect(spyOnGeometryChanged).toHaveBeenCalled();
@@ -1976,8 +1979,8 @@ describe('Test DrawSupport', () => {
expect(support).toExist();
support.drawInteraction.dispatchEvent({
type: 'drawend',
- feature: new ol.Feature({
- geometry: new ol.geom.Point([1300, 4300])
+ feature: new Feature({
+ geometry: new Point([1300, 4300])
})
});
expect(spyOnGeometryChanged).toHaveBeenCalled();
@@ -2008,8 +2011,8 @@ describe('Test DrawSupport', () => {
}
});
expect(support).toExist();
- const feature = new ol.Feature({
- geometry: new ol.geom.Point(13.0, 43.0),
+ const feature = new Feature({
+ geometry: new Point(13.0, 43.0),
name: 'My Point'
});
support.selectInteraction.dispatchEvent({
@@ -2037,9 +2040,9 @@ describe('Test DrawSupport', () => {
const radius = 1000;
support.modifyInteraction.dispatchEvent({
type: 'modifyend',
- features: new ol.Collection(
- [new ol.Feature({
- geometry: new ol.geom.Circle(center, radius)
+ features: new Collection(
+ [new Feature({
+ geometry: new Circle(center, radius)
})]
)
});
@@ -2070,9 +2073,9 @@ describe('Test DrawSupport', () => {
const radius = 1000;
support.modifyInteraction.dispatchEvent({
type: 'modifyend',
- features: new ol.Collection(
- [new ol.Feature({
- geometry: new ol.geom.Circle(center, radius)
+ features: new Collection(
+ [new Feature({
+ geometry: new Circle(center, radius)
})]
)
});
diff --git a/web/client/components/map/openlayers/__tests__/Feature-test.jsx b/web/client/components/map/openlayers/__tests__/Feature-test.jsx
index 5781f19edc..7ace89074c 100644
--- a/web/client/components/map/openlayers/__tests__/Feature-test.jsx
+++ b/web/client/components/map/openlayers/__tests__/Feature-test.jsx
@@ -5,14 +5,17 @@
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
-const React = require('react');
-const ReactDOM = require('react-dom');
-const ol = require('openlayers');
-const Feature = require('../Feature.jsx');
-const expect = require('expect');
-require('../../../../utils/openlayers/Layers');
-const {DEFAULT_ANNOTATIONS_STYLES} = require('../../../../utils/AnnotationsUtils');
-require('../plugins/VectorLayer');
+import React from 'react';
+import ReactDOM from 'react-dom';
+import expect from 'expect';
+import Feature from '../Feature';
+import '../../../../utils/openlayers/Layers';
+import {DEFAULT_ANNOTATIONS_STYLES} from '../../../../utils/AnnotationsUtils';
+import '../plugins/VectorLayer';
+
+import { Map, View } from 'ol';
+import VectorSource from 'ol/source/Vector';
+import VectorLayer from 'ol/layer/Vector';
describe('Test Feature', () => {
document.body.innerHTML = '';
@@ -20,16 +23,16 @@ describe('Test Feature', () => {
beforeEach((done) => {
document.body.innerHTML = '';
- map = new ol.Map({
+ map = new Map({
layers: [
],
- controls: ol.control.defaults({
- attributionOptions: /** @type {olx.control.AttributionOptions} */ {
+ /*controls: ol.control.defaults({
+ attributionOptions: {
collapsible: false
}
- }),
+ }),*/
target: 'map',
- view: new ol.View({
+ view: new View({
center: [0, 0],
zoom: 5
})
@@ -73,11 +76,11 @@ describe('Test Feature', () => {
]
}
};
- const source = new ol.source.Vector({
+ const source = new VectorSource({
features: []
});
const msId = "some value";
- let container = new ol.layer.Vector({
+ let container = new VectorLayer({
msId,
source: source,
visible: true,
@@ -126,11 +129,11 @@ describe('Test Feature', () => {
]
}
};
- const source = new ol.source.Vector({
+ const source = new VectorSource({
features: []
});
const msId = "some value";
- let container = new ol.layer.Vector({
+ let container = new VectorLayer({
msId,
source: source,
visible: true,
@@ -189,11 +192,11 @@ describe('Test Feature', () => {
]
}
};
- const source = new ol.source.Vector({
+ const source = new VectorSource({
features: []
});
const msId = "some value";
- let container = new ol.layer.Vector({
+ let container = new VectorLayer({
msId,
source: source,
visible: true,
@@ -290,10 +293,10 @@ describe('Test Feature', () => {
]
}
};
- const source = new ol.source.Vector({
+ const source = new VectorSource({
features: []
});
- let container = new ol.layer.Vector({
+ let container = new VectorLayer({
source: source,
visible: true,
zIndex: 1
@@ -402,11 +405,11 @@ describe('Test Feature', () => {
]
}
};
- const source = new ol.source.Vector({
+ const source = new VectorSource({
features: []
});
const msId = "some value";
- let container = new ol.layer.Vector({
+ let container = new VectorLayer({
msId,
source: source,
visible: true,
diff --git a/web/client/components/map/openlayers/__tests__/HighlightFeatureSupport-test.jsx b/web/client/components/map/openlayers/__tests__/HighlightFeatureSupport-test.jsx
index f4825543f4..13dcdcfdbb 100644
--- a/web/client/components/map/openlayers/__tests__/HighlightFeatureSupport-test.jsx
+++ b/web/client/components/map/openlayers/__tests__/HighlightFeatureSupport-test.jsx
@@ -6,11 +6,18 @@
* LICENSE file in the root directory of this source tree.
*/
-const expect = require('expect');
-const React = require('react');
-const ReactDOM = require('react-dom');
-let ol = require('openlayers');
-const HighlightFeatureSupport = require('../HighlightFeatureSupport');
+import React from 'react';
+import ReactDOM from 'react-dom';
+import expect from 'expect';
+
+import HighlightFeatureSupport from '../HighlightFeatureSupport';
+
+import GeoJSON from 'ol/format/GeoJSON';
+
+import { Map, View } from 'ol';
+
+import VectorSource from 'ol/source/Vector';
+import VectorLayer from 'ol/layer/Vector';
let createVectorLayer = function(options) {
let features;
@@ -19,14 +26,14 @@ let createVectorLayer = function(options) {
if (Array.isArray(options.features)) {
featureCollection = { "type": "FeatureCollection", features: featureCollection};
}
- features = (new ol.format.GeoJSON()).readFeatures(featureCollection);
+ features = (new GeoJSON()).readFeatures(featureCollection);
features.forEach((f) => f.getGeometry().transform('EPSG:4326', options.crs || 'EPSG:3857'));
}
- const source = new ol.source.Vector({
+ const source = new VectorSource({
features: features
});
- return new ol.layer.Vector({
+ return new VectorLayer({
msId: options.id,
source: source,
zIndex: options.zIndex
@@ -72,9 +79,9 @@ describe('HighlightFeatureSupport Ol', () => {
center: [0, 0],
zoom: 5
};
- var map = new ol.Map({
+ var map = new Map({
target: "map",
- view: new ol.View(viewOptions)
+ view: new View(viewOptions)
});
let vector = createVectorLayer(layer);
map.addLayer(vector);
diff --git a/web/client/components/map/openlayers/__tests__/Layer-test.jsx b/web/client/components/map/openlayers/__tests__/Layer-test.jsx
index 1d8ee8d04d..c39ea21ea5 100644
--- a/web/client/components/map/openlayers/__tests__/Layer-test.jsx
+++ b/web/client/components/map/openlayers/__tests__/Layer-test.jsx
@@ -5,25 +5,33 @@
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
-var React = require('react');
-var ReactDOM = require('react-dom');
-var ol = require('openlayers');
-var OpenlayersLayer = require('../Layer.jsx');
-var expect = require('expect');
-var assign = require('object-assign');
-require('../../../../utils/openlayers/Layers');
-require('../plugins/OSMLayer');
-require('../plugins/WMSLayer');
-require('../plugins/WMTSLayer');
-require('../plugins/GoogleLayer');
-require('../plugins/BingLayer');
-require('../plugins/MapQuest');
-require('../plugins/VectorLayer');
-require('../plugins/GraticuleLayer');
-require('../plugins/OverlayLayer');
-
-const SecurityUtils = require('../../../../utils/SecurityUtils');
-const ConfigUtils = require('../../../../utils/ConfigUtils');
+import React from 'react';
+import ReactDOM from 'react-dom';
+import expect from 'expect';
+import OpenlayersLayer from '../Layer';
+
+import assign from 'object-assign';
+import '../../../../utils/openlayers/Layers';
+import '../plugins/OSMLayer';
+import '../plugins/WMSLayer';
+import '../plugins/WMTSLayer';
+import '../plugins/GoogleLayer';
+import '../plugins/BingLayer';
+import '../plugins/MapQuest';
+import '../plugins/VectorLayer';
+import '../plugins/GraticuleLayer';
+import '../plugins/OverlayLayer';
+
+import SecurityUtils from '../../../../utils/SecurityUtils';
+import ConfigUtils from '../../../../utils/ConfigUtils';
+
+import { Map, View } from 'ol';
+import { defaults as defaultControls } from 'ol/control';
+
+import axios from "../../../../libs/ajax";
+import MockAdapter from "axios-mock-adapter";
+
+let mockAxios;
const sampleTileMatrixConfig900913 = {
"matrixIds": {
@@ -150,17 +158,18 @@ describe('Openlayers layer', () => {
let map;
beforeEach(() => {
+ mockAxios = new MockAdapter(axios);
document.body.innerHTML = '';
- map = new ol.Map({
+ map = new Map({
layers: [
],
- controls: ol.control.defaults({
- attributionOptions: /** @type {olx.control.AttributionOptions} */ {
+ controls: defaultControls({
+ attributionOptions: {
collapsible: false
}
}),
target: 'map',
- view: new ol.View({
+ view: new View({
center: [0, 0],
zoom: 5
})
@@ -168,6 +177,7 @@ describe('Openlayers layer', () => {
});
afterEach(() => {
+ mockAxios.restore();
map.setTarget(null);
document.body.innerHTML = '';
});
@@ -270,6 +280,151 @@ describe('Openlayers layer', () => {
expect(map.getLayers().item(0).getSource().getAttributions()).toNotExist();
});
+ it('test wms vector formats', () => {
+ const options = {
+ "type": 'wms',
+ "visibility": true,
+ "name": 'osm:vector_tile',
+ "group": 'Vector',
+ "url": "http://sample.server/geoserver/wms"
+ };
+
+ let layer = ReactDOM.render(, document.getElementById("container"));
+
+ expect(layer).toExist();
+ expect(map.getLayers().getLength()).toBe(1);
+ expect(layer.layer.getType()).toBe('VECTOR_TILE');
+ expect(layer.layer.getSource().format_.constructor.name).toBe('GeoJSON');
+
+ layer = ReactDOM.render(, document.getElementById("container"));
+ expect(layer).toExist();
+ expect(map.getLayers().getLength()).toBe(1);
+ expect(layer.layer.getType()).toBe('VECTOR_TILE');
+ expect(layer.layer.getSource().format_.constructor.name).toBe('MVT');
+
+ layer = ReactDOM.render(, document.getElementById("container"));
+
+ expect(layer).toExist();
+ expect(map.getLayers().getLength()).toBe(1);
+ expect(layer.layer.getType()).toBe('VECTOR_TILE');
+ expect(layer.layer.getSource().format_.constructor.name).toBe('TopoJSON');
+ });
+
+ it('test wms vector formats styles are applied', (done) => {
+ const options = {
+ "type": 'wms',
+ "visibility": true,
+ "name": 'osm:vector_tile',
+ "group": 'Vector',
+ "url": "http://sample.server/geoserver/wms",
+ "vectorStyle": {
+ "color": "#ff0000",
+ "fillColor": "#ffff00",
+ "fillOpacity": 0.5
+ }
+ };
+
+ let layer = ReactDOM.render(, document.getElementById("container"));
+
+ expect(layer).toExist();
+ expect(map.getLayers().getLength()).toBe(1);
+ expect(layer.layer.getType()).toBe('VECTOR_TILE');
+ expect(layer.layer.getSource().format_.constructor.name).toBe('GeoJSON');
+ setTimeout(() => {
+ const style = layer.layer.getStyle();
+ expect(style).toExist();
+ expect(style.getStroke().getColor()).toBe('rgb(255, 0, 0)');
+ expect(style.getFill().getColor()).toBe('rgba(255, 255, 0, 0.5)');
+ done();
+ }, 0);
+ });
+
+ it('test wms vector formats remote styles are applied', (done) => {
+ const SLD = `
+
+
+ Simple Polygon
+
+ Simple Polygon
+
+
+
+
+ #FF0000
+ 2
+
+
+ #FFFF00
+ 0.5
+
+
+
+
+
+
+ `;
+ mockAxios.onGet().reply(200, SLD);
+ const options = {
+ "type": 'wms',
+ "visibility": true,
+ "name": 'osm:vector_tile',
+ "group": 'Vector',
+ "url": "http://sample.server/geoserver/wms",
+ "vectorStyle": {
+ "url": "http://mystyle",
+ "format": "sld"
+ }
+ };
+ let layer = ReactDOM.render(, document.getElementById("container"));
+
+ expect(layer).toExist();
+ expect(map.getLayers().getLength()).toBe(1);
+ expect(layer.layer.getType()).toBe('VECTOR_TILE');
+ expect(layer.layer.getSource().format_.constructor.name).toBe('GeoJSON');
+ setTimeout(() => {
+ const style = layer.layer.getStyle();
+ expect(style).toExist();
+ expect(style.getStroke().getColor()).toBe('#FF0000');
+ expect(style.getFill().getColor()).toBe('rgba(255, 255, 0, 0.5)');
+ done();
+ }, 0);
+ });
+
it('wms layer attribution with credits - create and update layer', () => {
const TEXT1 = "some attribution";
const TEXT2 = "some other attibution";
@@ -294,13 +449,12 @@ describe('Openlayers layer', () => {
, document.getElementById("container"));
-
expect(layer).toExist();
// check creation
expect(map.getLayers().getLength()).toBe(1);
expect(map.getLayers().item(0).getSource().urls.length).toBe(1);
expect(map.getLayers().item(0).getSource().getAttributions()).toExist();
- expect(map.getLayers().item(0).getSource().getAttributions()[0].getHTML()).toBe(TEXT1);
+ expect(map.getLayers().item(0).getSource().getAttributions()()[0]).toBe(TEXT1);
// check remove
ReactDOM.render(
{
, document.getElementById("container"));
expect(map.getLayers().item(0).getSource().getAttributions()).toExist();
- expect(map.getLayers().item(0).getSource().getAttributions()[0].getHTML()).toBe(TEXT2);
+ expect(map.getLayers().item(0).getSource().getAttributions()()[0]).toBe(TEXT2);
// check content update
ReactDOM.render(
, document.getElementById("container"));
expect(map.getLayers().item(0).getSource().getAttributions()).toExist();
- expect(map.getLayers().item(0).getSource().getAttributions()[0].getHTML()).toBe(TEXT1);
+ expect(map.getLayers().item(0).getSource().getAttributions()()[0]).toBe(TEXT1);
// check complex contents
ReactDOM.render(
, document.getElementById("container"));
expect(map.getLayers().item(0).getSource().getAttributions()).toExist();
- expect(map.getLayers().item(0).getSource().getAttributions()[0].getHTML()).toBe('');
+ expect(map.getLayers().item(0).getSource().getAttributions()()[0]).toBe('');
});
it('creates a wms elevation layer for openlayers map', () => {
@@ -1702,4 +1856,140 @@ describe('Openlayers layer', () => {
expect(layer.layer.getSource().getParams().CQL_FILTER).toBe("((\"prop2\" = 'value2')) AND (prop = 'value')");
});
+
+
+ it('test wmts vector formats', () => {
+
+ const options = {
+ type: 'wmts',
+ visibility: true,
+ name: 'osm:vector_tile',
+ group: 'Vector',
+ tileMatrixSet: [
+ {
+ 'TileMatrix': [],
+ 'ows:Identifier': 'EPSG:900913',
+ 'ows:SupportedCRS': 'urn:ogc:def:crs:EPSG::900913'
+ }
+ ],
+ url: 'http://sample.server/geoserver/gwc/service/wmts'
+ };
+
+ const GeoJSON = 'application/json;type=geojson';
+ let layer = ReactDOM.render(, document.getElementById("container"));
+
+ expect(layer).toExist();
+ expect(map.getLayers().getLength()).toBe(1);
+ expect(layer.layer.getType()).toBe('VECTOR_TILE');
+ expect(layer.layer.getSource().format_.constructor.name).toBe('GeoJSON');
+
+
+ const MVT = 'application/vnd.mapbox-vector-tile';
+ layer = ReactDOM.render(, document.getElementById("container"));
+
+ expect(layer).toExist();
+ expect(map.getLayers().getLength()).toBe(1);
+ expect(layer.layer.getType()).toBe('VECTOR_TILE');
+ expect(layer.layer.getSource().format_.constructor.name).toBe('MVT');
+
+ const TopoJSON = 'application/json;type=topojson';
+ layer = ReactDOM.render(, document.getElementById("container"));
+
+ expect(layer).toExist();
+ expect(map.getLayers().getLength()).toBe(1);
+ expect(layer.layer.getType()).toBe('VECTOR_TILE');
+ expect(layer.layer.getSource().format_.constructor.name).toBe('TopoJSON');
+
+ });
+
+ it('test render a wfs3 layer', () => {
+
+ const options = {
+ id: 'layer_id',
+ name: 'layer_name',
+ title: 'Layer Title',
+ type: 'wfs3',
+ visibility: true,
+ url: '/geoserver/wfs3/collections/layer_name/tiles/{tilingSchemeId}/{level}/{row}/{col}',
+ format: 'application/vnd.mapbox-vector-tile',
+ tilingScheme: '/geoserver/wfs3/collections/layer_name/tiles/{tilingSchemeId}',
+ tilingSchemes: {
+ url: '/geoserver/wfs3/collections/layer_name/tiles',
+ schemes: [
+ {
+ type: 'TileMatrixSet',
+ identifier: 'GoogleMapsCompatible',
+ title: 'GoogleMapsCompatible',
+ supportedCRS: 'EPSG:3857',
+ tileMatrix: [{
+ matrixHeight: 1,
+ matrixWidth: 1,
+ tileHeight: 256,
+ tileWidth: 256,
+ identifier: '0',
+ scaleDenominator: 559082263.9508929,
+ topLeftCorner: [
+ -20037508.34,
+ 20037508
+ ],
+ type: 'TileMatrix'
+ }],
+ boundingBox: {
+ crs: 'http://www.opengis.net/def/crs/EPSG/0/3857',
+ lowerCorner: [
+ -20037508.34,
+ -20037508.34
+ ],
+ upperCorner: [
+ 20037508.34,
+ 20037508.34
+ ],
+ type: 'BoundingBox'
+ },
+ wellKnownScaleSet: 'http://www.opengis.net/def/wkss/OGC/1.0/GoogleMapsCompatible'
+ }
+ ]
+ },
+ bbox: {
+ crs: 'EPSG:4326',
+ bounds: {
+ minx: -156.2575,
+ miny: -90,
+ maxx: 123.33333333333333,
+ maxy: 46.5475
+ }
+ },
+ allowedSRS: {
+ 'EPSG:3857': true
+ }
+ };
+
+ let layer = ReactDOM.render(, document.getElementById("container"));
+
+ expect(layer).toExist();
+ expect(map.getLayers().getLength()).toBe(1);
+ expect(layer.layer.getType()).toBe('VECTOR_TILE');
+ expect(layer.layer.getSource().format_.constructor.name).toBe('MVT');
+ });
});
diff --git a/web/client/components/map/openlayers/__tests__/LegacyVectorStyle-test.js b/web/client/components/map/openlayers/__tests__/LegacyVectorStyle-test.js
index 06c5175a89..0cc3f631e1 100644
--- a/web/client/components/map/openlayers/__tests__/LegacyVectorStyle-test.js
+++ b/web/client/components/map/openlayers/__tests__/LegacyVectorStyle-test.js
@@ -5,11 +5,15 @@
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
-const expect = require('expect');
-const LegacyVectorStyle = require('../LegacyVectorStyle');
-const ol = require('openlayers');
-const {geomCollFeature} = require('../../../../test-resources/drawsupport/features');
-const {DEFAULT_ANNOTATIONS_STYLES} = require('../../../../utils/AnnotationsUtils');
+import expect from 'expect';
+import { getStyle, styleFunction, firstPointOfPolylineStyle, lastPointOfPolylineStyle, startEndPolylineStyle } from '../LegacyVectorStyle';
+
+import {geomCollFeature} from '../../../../test-resources/drawsupport/features';
+import {DEFAULT_ANNOTATIONS_STYLES} from '../../../../utils/AnnotationsUtils';
+
+import Feature from 'ol/Feature';
+import {Point, LineString, MultiLineString, Polygon, MultiPolygon} from 'ol/geom';
+import GeometryCollection from 'ol/geom/GeometryCollection';
describe('Test LegacyVectorStyle', () => {
beforeEach((done) => {
@@ -23,7 +27,7 @@ describe('Test LegacyVectorStyle', () => {
});
it('simple point style', () => {
- const style = LegacyVectorStyle.getStyle({
+ const style = getStyle({
style: {
type: 'Point',
"Point": {
@@ -36,7 +40,7 @@ describe('Test LegacyVectorStyle', () => {
});
it('style name', () => {
- const style = LegacyVectorStyle.getStyle({
+ const style = getStyle({
type: 'Point',
iconUrl: 'myurl'
});
@@ -51,7 +55,7 @@ describe('Test LegacyVectorStyle', () => {
},
name: 'My Point'
};
- const style = LegacyVectorStyle.getStyle({
+ const style = getStyle({
features: [feature],
style: {
radius: 10,
@@ -65,13 +69,13 @@ describe('Test LegacyVectorStyle', () => {
it('test styleFunction with LineString', () => {
- const lineString = new ol.Feature({
- geometry: new ol.geom.LineString([
+ const lineString = new Feature({
+ geometry: new LineString([
[100.0, 0.0], [101.0, 1.0]
])
});
- let olStyle = LegacyVectorStyle.styleFunction(lineString);
+ let olStyle = styleFunction(lineString);
let olStroke = olStyle[0].getStroke();
expect(olStroke.getColor()).toBe('blue');
@@ -84,7 +88,7 @@ describe('Test LegacyVectorStyle', () => {
}
};
- olStyle = LegacyVectorStyle.styleFunction(lineString, options);
+ olStyle = styleFunction(lineString, options);
olStroke = olStyle[0].getStroke();
expect(olStroke.getColor()).toBe('#3388ff');
@@ -101,7 +105,7 @@ describe('Test LegacyVectorStyle', () => {
}
};
- olStyle = LegacyVectorStyle.styleFunction(lineString, optionsWithFeatureType);
+ olStyle = styleFunction(lineString, optionsWithFeatureType);
olStroke = olStyle[0].getStroke();
expect(olStroke.getColor()).toBe('#ffaa33');
@@ -111,14 +115,14 @@ describe('Test LegacyVectorStyle', () => {
it('test styleFunction with MultiLineString', () => {
- const multiLineString = new ol.Feature({
- geometry: new ol.geom.MultiLineString([
+ const multiLineString = new Feature({
+ geometry: new MultiLineString([
[ [100.0, 0.0], [101.0, 1.0] ],
[ [102.0, 2.0], [103.0, 3.0] ]
])
});
- let olStyle = LegacyVectorStyle.styleFunction(multiLineString);
+ let olStyle = styleFunction(multiLineString);
let olStroke = olStyle[0].getStroke();
expect(olStroke.getColor()).toBe('blue');
@@ -131,7 +135,7 @@ describe('Test LegacyVectorStyle', () => {
}
};
- olStyle = LegacyVectorStyle.styleFunction(multiLineString, options);
+ olStyle = styleFunction(multiLineString, options);
olStroke = olStyle[0].getStroke();
expect(olStroke.getColor()).toBe('#3388ff');
@@ -148,7 +152,7 @@ describe('Test LegacyVectorStyle', () => {
}
};
- olStyle = LegacyVectorStyle.styleFunction(multiLineString, optionsWithFeatureType);
+ olStyle = styleFunction(multiLineString, optionsWithFeatureType);
olStroke = olStyle[0].getStroke();
expect(olStroke.getColor()).toBe('#ffaa33');
@@ -158,13 +162,13 @@ describe('Test LegacyVectorStyle', () => {
it('test styleFunction with Polygon', () => {
- const polygon = new ol.Feature({
- geometry: new ol.geom.Polygon([
+ const polygon = new Feature({
+ geometry: new Polygon([
[ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ]
])
});
- let olStyle = LegacyVectorStyle.styleFunction(polygon);
+ let olStyle = styleFunction(polygon);
let olFill = olStyle[0].getFill();
let olStroke = olStyle[0].getStroke();
@@ -183,7 +187,7 @@ describe('Test LegacyVectorStyle', () => {
}
};
- olStyle = LegacyVectorStyle.styleFunction(polygon, options);
+ olStyle = styleFunction(polygon, options);
olFill = olStyle[0].getFill();
olStroke = olStyle[0].getStroke();
@@ -208,7 +212,7 @@ describe('Test LegacyVectorStyle', () => {
}
};
- olStyle = LegacyVectorStyle.styleFunction(polygon, optionsWithFeatureType);
+ olStyle = styleFunction(polygon, optionsWithFeatureType);
olFill = olStyle[0].getFill();
olStroke = olStyle[0].getStroke();
@@ -221,8 +225,8 @@ describe('Test LegacyVectorStyle', () => {
it('test styleFunction with MultiPolygon', () => {
- const multiPolygon = new ol.Feature({
- geometry: new ol.geom.MultiPolygon([
+ const multiPolygon = new Feature({
+ geometry: new MultiPolygon([
[
[ [102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0] ]
],
@@ -233,7 +237,7 @@ describe('Test LegacyVectorStyle', () => {
])
});
- let olStyle = LegacyVectorStyle.styleFunction(multiPolygon);
+ let olStyle = styleFunction(multiPolygon);
let olFill = olStyle[0].getFill();
let olStroke = olStyle[0].getStroke();
@@ -252,7 +256,7 @@ describe('Test LegacyVectorStyle', () => {
}
};
- olStyle = LegacyVectorStyle.styleFunction(multiPolygon, options);
+ olStyle = styleFunction(multiPolygon, options);
olFill = olStyle[0].getFill();
olStroke = olStyle[0].getStroke();
@@ -277,7 +281,7 @@ describe('Test LegacyVectorStyle', () => {
}
};
- olStyle = LegacyVectorStyle.styleFunction(multiPolygon, optionsWithFeatureType);
+ olStyle = styleFunction(multiPolygon, optionsWithFeatureType);
olFill = olStyle[0].getFill();
olStroke = olStyle[0].getStroke();
@@ -289,31 +293,31 @@ describe('Test LegacyVectorStyle', () => {
});
it('test firstPointOfPolylineStyle defaults', () => {
- let olStyle = LegacyVectorStyle.firstPointOfPolylineStyle();
+ let olStyle = firstPointOfPolylineStyle();
expect(olStyle.getImage().getRadius()).toBe(5);
expect(olStyle.getImage().getFill().getColor()).toBe("green");
});
it('test lastPointOfPolylineStyle defaults', () => {
- let olStyle = LegacyVectorStyle.lastPointOfPolylineStyle();
+ let olStyle = lastPointOfPolylineStyle();
expect(olStyle.getImage().getRadius()).toBe(5);
expect(olStyle.getImage().getFill().getColor()).toBe("red");
});
it('test firstPointOfPolylineStyle {radius: 4}', () => {
- let olStyle = LegacyVectorStyle.firstPointOfPolylineStyle({radius: 4});
+ let olStyle = firstPointOfPolylineStyle({radius: 4});
expect(olStyle.getImage().getRadius()).toBe(4);
expect(olStyle.getImage().getFill().getColor()).toBe("green");
});
it('test lastPointOfPolylineStyle {radius: 4}', () => {
- let olStyle = LegacyVectorStyle.lastPointOfPolylineStyle({radius: 4});
+ let olStyle = lastPointOfPolylineStyle({radius: 4});
expect(olStyle.getImage().getRadius()).toBe(4);
expect(olStyle.getImage().getFill().getColor()).toBe("red");
});
it('test startEndPolylineStyle defaults', () => {
- let styles = LegacyVectorStyle.startEndPolylineStyle();
+ let styles = startEndPolylineStyle();
expect(styles[0].getImage().getRadius()).toBe(5);
expect(styles[0].getImage().getFill().getColor()).toBe("green");
expect(styles[1].getImage().getRadius()).toBe(5);
@@ -322,7 +326,7 @@ describe('Test LegacyVectorStyle', () => {
it('test styleFunction with GeometryCollection', () => {
- const multiPolygon = new ol.geom.MultiPolygon([
+ const multiPolygon = new MultiPolygon([
[
[ [102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0] ]
],
@@ -332,11 +336,11 @@ describe('Test LegacyVectorStyle', () => {
]
]);
- const geometryCollection = new ol.Feature({
- geometry: new ol.geom.GeometryCollection([multiPolygon])
+ const geometryCollection = new Feature({
+ geometry: new GeometryCollection([multiPolygon])
});
- let olStyle = LegacyVectorStyle.styleFunction(geometryCollection);
+ let olStyle = styleFunction(geometryCollection);
let olFill = olStyle[0].getFill();
let olStroke = olStyle[0].getStroke();
@@ -356,7 +360,7 @@ describe('Test LegacyVectorStyle', () => {
}
};
- olStyle = LegacyVectorStyle.styleFunction(geometryCollection, options);
+ olStyle = styleFunction(geometryCollection, options);
olFill = olStyle[0].getFill();
olStroke = olStyle[0].getStroke();
@@ -381,7 +385,7 @@ describe('Test LegacyVectorStyle', () => {
}
};
- olStyle = LegacyVectorStyle.styleFunction(geometryCollection, optionsWithFeatureType);
+ olStyle = styleFunction(geometryCollection, optionsWithFeatureType);
olFill = olStyle[0].getFill();
olStroke = olStyle[0].getStroke();
@@ -392,7 +396,7 @@ describe('Test LegacyVectorStyle', () => {
});
it('test getStyle with GeometryCollection', () => {
- const styleFunc = LegacyVectorStyle.getStyle({
+ const styleFunc = getStyle({
features: [geomCollFeature],
style: {
color: "ff0000",
@@ -402,11 +406,11 @@ describe('Test LegacyVectorStyle', () => {
}, false, ["textValue"]);
expect(styleFunc).toExist();
- const styleGenerated = styleFunc(new ol.Feature({
- geometry: new ol.geom.GeometryCollection([
- new ol.geom.LineString([[1, 2], [1, 3]]),
- new ol.geom.Polygon([[1, 2], [1, 3], [1, 1], [1, 2]]),
- new ol.geom.Point([1, 20])
+ const styleGenerated = styleFunc(new Feature({
+ geometry: new GeometryCollection([
+ new LineString([[1, 2], [1, 3]]),
+ new Polygon([[1, 2], [1, 3], [1, 1], [1, 2]]),
+ new Point([1, 20])
])
}));
expect(styleGenerated).toExist();
diff --git a/web/client/components/map/openlayers/__tests__/Locate-test.jsx b/web/client/components/map/openlayers/__tests__/Locate-test.jsx
index 96a5401e14..5382e8ca9d 100644
--- a/web/client/components/map/openlayers/__tests__/Locate-test.jsx
+++ b/web/client/components/map/openlayers/__tests__/Locate-test.jsx
@@ -5,28 +5,29 @@
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
-var expect = require('expect');
-var React = require('react');
-var ReactDOM = require('react-dom');
-var ol = require('openlayers');
-var Locate = require('../Locate');
+import React from 'react';
+import ReactDOM from 'react-dom';
+import expect from 'expect';
+import Locate from '../Locate';
+
+import { Map, View } from 'ol';
describe('Openlayers Locate component', () => {
let map;
beforeEach((done) => {
document.body.innerHTML = '';
- map = new ol.Map({
+ map = new Map({
layers: [
],
- controls: ol.control.defaults({
- attributionOptions: /** @type {olx.control.AttributionOptions} */ {
+ /*controls: ol.control.defaults({
+ attributionOptions: {
collapsible: false
}
- }),
+ }),*/
target: 'map',
- view: new ol.View({
+ view: new View({
center: [0, 0],
zoom: 5
})
diff --git a/web/client/components/map/openlayers/__tests__/Map-test.jsx b/web/client/components/map/openlayers/__tests__/Map-test.jsx
index fa4c3af952..1fe5fc916c 100644
--- a/web/client/components/map/openlayers/__tests__/Map-test.jsx
+++ b/web/client/components/map/openlayers/__tests__/Map-test.jsx
@@ -5,18 +5,25 @@
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
-const React = require('react');
-const ReactDOM = require('react-dom');
-const OpenlayersMap = require('../Map.jsx');
-const OpenlayersLayer = require('../Layer.jsx');
-const expect = require('expect');
-const assign = require('object-assign');
-const ol = require('openlayers');
-const proj = require('proj4').default;
-const mapUtils = require('../../../../utils/MapUtils');
-require('../../../../utils/openlayers/Layers');
-require('../plugins/OSMLayer');
-require('../plugins/VectorLayer');
+import React from 'react';
+import ReactDOM from 'react-dom';
+import expect from 'expect';
+import OpenlayersLayer from '../Layer';
+import OpenlayersMap from '../Map';
+
+import assign from 'object-assign';
+
+import proj from 'proj4';
+import MapUtils from '../../../../utils/MapUtils';
+
+import '../../../../utils/openlayers/Layers';
+import '../plugins/OSMLayer';
+import '../plugins/VectorLayer';
+
+import {get, transform} from 'ol/proj';
+
+import Feature from 'ol/Feature';
+import {Point, Polygon} from 'ol/geom';
describe('OpenlayersMap', () => {
@@ -109,7 +116,7 @@ describe('OpenlayersMap', () => {
const map = ReactDOM.render(comp, document.getElementById("map"));
expect(map).toExist();
expect(map.map.getView().getProjection().getCode()).toBe('EPSG:25830');
- expect(ol.proj.get('EPSG:25830')).toExist();
+ expect(get('EPSG:25830')).toExist();
});
it('custom projection with axisOrientation', () => {
@@ -136,8 +143,8 @@ describe('OpenlayersMap', () => {
const map = ReactDOM.render(comp, document.getElementById("map"));
expect(map).toExist();
expect(map.map.getView().getProjection().getCode()).toBe('EPSG:31468');
- expect(ol.proj.get('EPSG:31468')).toExist();
- expect(ol.proj.get('EPSG:31468').getAxisOrientation()).toBe('neu');
+ expect(get('EPSG:31468')).toExist();
+ expect(get('EPSG:31468').getAxisOrientation()).toBe('neu');
});
it('check if the handler for "click" event is called with elevation', () => {
@@ -262,8 +269,8 @@ describe('OpenlayersMap', () => {
setTimeout(() => {
map.map.forEachFeatureAtPixel = (pixel, callback) => {
callback.call(null, {
- feature: new ol.Feature({
- geometry: new ol.geom.Point([10.3, 43.9]),
+ feature: new Feature({
+ geometry: new Point([10.3, 43.9]),
name: 'My Point'
}),
getGeometry: () => {
@@ -299,8 +306,8 @@ describe('OpenlayersMap', () => {
setTimeout(() => {
map.map.forEachFeatureAtPixel = (pixel, callback) => {
callback.call(null, {
- feature: new ol.Feature({
- geometry: new ol.geom.Point([10.3, 43.9]),
+ feature: new Feature({
+ geometry: new Point([10.3, 43.9]),
name: 'My Point'
}),
getGeometry: () => {
@@ -335,8 +342,8 @@ describe('OpenlayersMap', () => {
setTimeout(() => {
map.map.forEachFeatureAtPixel = (pixel, callback) => {
callback.call(null, {
- feature: new ol.Feature({
- geometry: new ol.geom.Polygon([ [0, 0], [0, 1], [1, 1], [1, 0], [0, 0] ]),
+ feature: new Feature({
+ geometry: new Polygon([ [0, 0], [0, 1], [1, 1], [1, 0], [0, 0] ]),
name: 'My Point'
}),
getGeometry: () => {
@@ -375,8 +382,8 @@ describe('OpenlayersMap', () => {
setTimeout(() => {
map.map.forEachFeatureAtPixel = (pixel, callback) => {
callback.call(null, {
- feature: new ol.Feature({
- geometry: new ol.geom.Polygon([ [0, 0], [0, 1], [1, 1], [1, 0], [0, 0] ]),
+ feature: new Feature({
+ geometry: new Polygon([ [0, 0], [0, 1], [1, 1], [1, 0], [0, 0] ]),
name: 'My Point'
}),
getGeometry: () => {
@@ -416,8 +423,8 @@ describe('OpenlayersMap', () => {
setTimeout(() => {
map.map.forEachFeatureAtPixel = (pixel, callback) => {
callback.call(null, {
- feature: new ol.Feature({
- geometry: new ol.geom.Point([43.0, 10]),
+ feature: new Feature({
+ geometry: new Point([43.0, 10]),
name: 'My Point'
}),
getGeometry: () => {
@@ -534,7 +541,7 @@ describe('OpenlayersMap', () => {
expect(spy.calls[1].arguments[3].width).toExist();
done();
});
- olMap.getView().setCenter(ol.proj.transform([10, 44], 'EPSG:4326', 'EPSG:3857'));
+ olMap.getView().setCenter(transform([10, 44], 'EPSG:4326', 'EPSG:3857'));
olMap.dispatchEvent('moveend');
});
@@ -705,7 +712,7 @@ describe('OpenlayersMap', () => {
// instanciating the map that will be used to compute the bounfing box
let map = ReactDOM.render(, document.getElementById("map"));
// computing the bounding box for the new center and the new zoom
- const bbox = mapUtils.getBbox({y: 44, x: 10}, 5);
+ const bbox = MapUtils.getBbox({y: 44, x: 10}, 5);
// update the map with the new center and the new zoom so we can check our computed bouding box
map = ReactDOM.render(, document.getElementById("map"));
const mapBbox = map.map.getView().calculateExtent(map.map.getSize());
@@ -724,10 +731,10 @@ describe('OpenlayersMap', () => {
});
it('test GET_PIXEL_FROM_COORDINATES_HOOK/GET_COORDINATES_FROM_PIXEL_HOOK hook registration', () => {
- mapUtils.registerHook(mapUtils.GET_PIXEL_FROM_COORDINATES_HOOK, undefined);
- mapUtils.registerHook(mapUtils.GET_COORDINATES_FROM_PIXEL_HOOK, undefined);
- let getPixelFromCoordinates = mapUtils.getHook(mapUtils.GET_PIXEL_FROM_COORDINATES_HOOK);
- let getCoordinatesFromPixel = mapUtils.getHook(mapUtils.GET_COORDINATES_FROM_PIXEL_HOOK);
+ MapUtils.registerHook(MapUtils.GET_PIXEL_FROM_COORDINATES_HOOK, undefined);
+ MapUtils.registerHook(MapUtils.GET_COORDINATES_FROM_PIXEL_HOOK, undefined);
+ let getPixelFromCoordinates = MapUtils.getHook(MapUtils.GET_PIXEL_FROM_COORDINATES_HOOK);
+ let getCoordinatesFromPixel = MapUtils.getHook(MapUtils.GET_COORDINATES_FROM_PIXEL_HOOK);
expect(getPixelFromCoordinates).toNotExist();
expect(getCoordinatesFromPixel).toNotExist();
@@ -735,13 +742,13 @@ describe('OpenlayersMap', () => {
document.getElementById("map"));
expect(map).toExist();
- getPixelFromCoordinates = mapUtils.getHook(mapUtils.GET_PIXEL_FROM_COORDINATES_HOOK);
- getCoordinatesFromPixel = mapUtils.getHook(mapUtils.GET_COORDINATES_FROM_PIXEL_HOOK);
+ getPixelFromCoordinates = MapUtils.getHook(MapUtils.GET_PIXEL_FROM_COORDINATES_HOOK);
+ getCoordinatesFromPixel = MapUtils.getHook(MapUtils.GET_COORDINATES_FROM_PIXEL_HOOK);
expect(getPixelFromCoordinates).toExist();
expect(getCoordinatesFromPixel).toExist();
});
it('test ZOOM_TO_EXTENT_HOOK', (done) => {
- mapUtils.registerHook(mapUtils.ZOOM_TO_EXTENT_HOOK, undefined);
+ MapUtils.registerHook(MapUtils.ZOOM_TO_EXTENT_HOOK, undefined);
const testHandlers = {
onMapViewChanges: () => { }
@@ -786,7 +793,7 @@ describe('OpenlayersMap', () => {
});
expect(map).toExist();
- const hook = mapUtils.getHook(mapUtils.ZOOM_TO_EXTENT_HOOK);
+ const hook = MapUtils.getHook(MapUtils.ZOOM_TO_EXTENT_HOOK);
expect(hook).toExist();
hook([0, 0, 20, 20], { crs: "EPSG:4326", duration: 0 });
olMap.dispatchEvent('moveend');
@@ -810,7 +817,7 @@ describe('OpenlayersMap', () => {
* To avoid this, zoom to max resolution extent.
* TODO: improve this to manage all degenerated bounding boxes.
*/
- mapUtils.registerHook(mapUtils.ZOOM_TO_EXTENT_HOOK, undefined);
+ MapUtils.registerHook(MapUtils.ZOOM_TO_EXTENT_HOOK, undefined);
const testHandlers = {
onMapViewChanges: () => { }
@@ -841,7 +848,7 @@ describe('OpenlayersMap', () => {
});
expect(map).toExist();
- const hook = mapUtils.getHook(mapUtils.ZOOM_TO_EXTENT_HOOK);
+ const hook = MapUtils.getHook(MapUtils.ZOOM_TO_EXTENT_HOOK);
expect(hook).toExist();
hook([-180, -90, 180, 90], { crs: "EPSG:4326", duration: 0 });
olMap.dispatchEvent('moveend');
@@ -856,7 +863,7 @@ describe('OpenlayersMap', () => {
* To avoid this, zoom to max resolution extent.
* TODO: improve this to manage all degenerated bounding boxes.
*/
- mapUtils.registerHook(mapUtils.ZOOM_TO_EXTENT_HOOK, undefined);
+ MapUtils.registerHook(MapUtils.ZOOM_TO_EXTENT_HOOK, undefined);
const testHandlers = {
onMapViewChanges: () => { }
@@ -889,7 +896,7 @@ describe('OpenlayersMap', () => {
});
expect(map).toExist();
- const hook = mapUtils.getHook(mapUtils.ZOOM_TO_EXTENT_HOOK);
+ const hook = MapUtils.getHook(MapUtils.ZOOM_TO_EXTENT_HOOK);
expect(hook).toExist();
hook([1, 1, 1, 1], { crs: "EPSG:4326", duration: 0 });
olMap.dispatchEvent('moveend');
diff --git a/web/client/components/map/openlayers/__tests__/MeasurementSupport-test.jsx b/web/client/components/map/openlayers/__tests__/MeasurementSupport-test.jsx
index 08fef654f8..3a60f964bb 100644
--- a/web/client/components/map/openlayers/__tests__/MeasurementSupport-test.jsx
+++ b/web/client/components/map/openlayers/__tests__/MeasurementSupport-test.jsx
@@ -6,17 +6,21 @@
* LICENSE file in the root directory of this source tree.
*/
-const expect = require('expect');
-const React = require('react');
-const ReactDOM = require('react-dom');
-const ol = require('openlayers');
-const {round} = require('lodash');
-const MeasurementSupport = require('../MeasurementSupport');
-const {
+import React from 'react';
+import ReactDOM from 'react-dom';
+import expect from 'expect';
+
+import round from 'lodash/round';
+import MeasurementSupport from '../MeasurementSupport';
+
+import {
lineFeature,
lineFeature3,
polyFeatureClosed
-} = require('../../../../test-resources/drawsupport/features');
+} from '../../../../test-resources/drawsupport/features';
+
+import { Map, View, Feature } from 'ol';
+import {LineString} from 'ol/geom';
describe('Openlayers MeasurementSupport', () => {
let msNode;
@@ -27,9 +31,9 @@ describe('Openlayers MeasurementSupport', () => {
center: [0, 0],
zoom: 5
};
- let map = new ol.Map({
+ let map = new Map({
target: "map",
- view: new ol.View(viewOptions)
+ view: new View(viewOptions)
});
const uom = {
length: {unit: 'm', label: 'm'},
@@ -83,9 +87,9 @@ describe('Openlayers MeasurementSupport', () => {
document.body.innerHTML = '';
msNode = undefined;
expect.restoreSpies();
- map = new ol.Map({
+ map = new Map({
target: "map",
- view: new ol.View(viewOptions)
+ view: new View(viewOptions)
});
setTimeout(done);
});
@@ -192,7 +196,7 @@ describe('Openlayers MeasurementSupport', () => {
expect(spyUpdateMeasures.calls.length).toBe(1);
const measureState = spyUpdateMeasures.calls[0].arguments[0];
expect(measureState).toExist();
- expect(round(measureState.area, 2)).toBe(49490132941.51);
+ expect(round(measureState.area, 2)).toBe(49379574502.64);
expect(measureState.bearing).toBe(0);
});
@@ -214,15 +218,15 @@ describe('Openlayers MeasurementSupport', () => {
});
cmp.drawInteraction.dispatchEvent({
type: 'drawstart',
- feature: new ol.Feature({
- geometry: new ol.geom.LineString([[13.0, 43.0], [13.0, 40.0]]),
+ feature: new Feature({
+ geometry: new LineString([[13.0, 43.0], [13.0, 40.0]]),
name: 'My line with 2 points'
})
});
cmp.drawInteraction.dispatchEvent({
type: 'drawend',
- feature: new ol.Feature({
- geometry: new ol.geom.LineString([[13.0, 43.0], [13.0, 40.0], [11.0, 41.0]]),
+ feature: new Feature({
+ geometry: new LineString([[13.0, 43.0], [13.0, 40.0], [11.0, 41.0]]),
name: 'My line with 3 points'
})
});
@@ -249,15 +253,15 @@ describe('Openlayers MeasurementSupport', () => {
});
cmp.drawInteraction.dispatchEvent({
type: 'drawstart',
- feature: new ol.Feature({
- geometry: new ol.geom.LineString([[13.0, 43.0], [13.0, 40.0]]),
+ feature: new Feature({
+ geometry: new LineString([[13.0, 43.0], [13.0, 40.0]]),
name: 'My line with 2 points'
})
});
cmp.drawInteraction.dispatchEvent({
type: 'drawend',
- feature: new ol.Feature({
- geometry: new ol.geom.LineString([[13.0, 43.0], [13.0, 40.0], [11.0, 41.0]]),
+ feature: new Feature({
+ geometry: new LineString([[13.0, 43.0], [13.0, 40.0], [11.0, 41.0]]),
name: 'My line with 3 points'
})
});
diff --git a/web/client/components/map/openlayers/__tests__/Overview-test.jsx b/web/client/components/map/openlayers/__tests__/Overview-test.jsx
index 949c75777c..6e5a719db6 100644
--- a/web/client/components/map/openlayers/__tests__/Overview-test.jsx
+++ b/web/client/components/map/openlayers/__tests__/Overview-test.jsx
@@ -5,27 +5,28 @@
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
-const expect = require('expect');
-const React = require('react');
-const ReactDOM = require('react-dom');
-const ol = require('openlayers');
-const Overview = require('../Overview');
+import React from 'react';
+import ReactDOM from 'react-dom';
+import expect from 'expect';
+import Overview from '../Overview';
+
+import { Map, View } from 'ol';
describe('Openlayers Overview component', () => {
let map;
beforeEach((done) => {
document.body.innerHTML = '';
- map = new ol.Map({
+ map = new Map({
layers: [
],
- controls: ol.control.defaults({
- attributionOptions: /** @type {olx.control.AttributionOptions} */ {
+ /*controls: ol.control.defaults({
+ attributionOptions: {
collapsible: false
}
- }),
+ }),*/
target: 'map',
- view: new ol.View({
+ view: new View({
center: [0, 0],
zoom: 5
})
diff --git a/web/client/components/map/openlayers/__tests__/ScaleBar-test.jsx b/web/client/components/map/openlayers/__tests__/ScaleBar-test.jsx
index b533ccc4fa..a7ce04e08b 100644
--- a/web/client/components/map/openlayers/__tests__/ScaleBar-test.jsx
+++ b/web/client/components/map/openlayers/__tests__/ScaleBar-test.jsx
@@ -5,26 +5,27 @@
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
-var React = require('react');
-var ReactDOM = require('react-dom');
-var ol = require('openlayers');
-var ScaleBar = require('../ScaleBar');
-var expect = require('expect');
+import React from 'react';
+import ReactDOM from 'react-dom';
+import expect from 'expect';
+import ScaleBar from '../ScaleBar';
+
+import { Map, View } from 'ol';
describe('Openlayers ScaleBar component', () => {
let map;
beforeEach((done) => {
document.body.innerHTML = '';
- map = new ol.Map({
+ map = new Map({
layers: [
],
- controls: ol.control.defaults({
- attributionOptions: /** @type {olx.control.AttributionOptions} */ {
+ /*controls: ol.control.defaults({
+ attributionOptions: {
collapsible: false
}
- }),
+ }),*/
target: 'map',
- view: new ol.View({
+ view: new View({
center: [0, 0],
zoom: 5
})
diff --git a/web/client/components/map/openlayers/__tests__/VectorStyle-test.js b/web/client/components/map/openlayers/__tests__/VectorStyle-test.js
index cc84de2bd3..2cd49c5771 100644
--- a/web/client/components/map/openlayers/__tests__/VectorStyle-test.js
+++ b/web/client/components/map/openlayers/__tests__/VectorStyle-test.js
@@ -5,8 +5,8 @@
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
-const expect = require('expect');
-const {
+import expect from 'expect';
+import {
getCircleStyle,
getMarkerStyle,
getStrokeStyle,
@@ -14,22 +14,36 @@ const {
getTextStyle,
getGeometryTrasformation,
getFilter,
- parseStyles
-} = require('../VectorStyle');
-const ol = require('openlayers');
-const {isArray} = require('lodash');
-const baseImageUrl = require('../../../mapcontrols/annotations/img/markers_default.png');
-const shadowImageUrl = require('../../../mapcontrols/annotations/img/markers_shadow.png');
-const MarkerUtils = require('../../../../utils/MarkerUtils');
-const {colorToRgbaStr} = require('../../../../utils/ColorUtils');
+ parseStyles,
+ getStyle
+} from '../VectorStyle';
+
+import isArray from 'lodash/isArray';
+import baseImageUrl from '../../../mapcontrols/annotations/img/markers_default.png';
+import shadowImageUrl from '../../../mapcontrols/annotations/img/markers_shadow.png';
+import MarkerUtils from '../../../../utils/MarkerUtils';
+import {colorToRgbaStr} from '../../../../utils/ColorUtils';
+
+import {Stroke, Fill} from 'ol/style';
+
+import Feature from 'ol/Feature';
+import {Point, MultiPoint, Polygon} from 'ol/geom';
+
+import axios from "../../../../libs/ajax";
+import MockAdapter from "axios-mock-adapter";
+
+let mockAxios;
+
const glyphs = MarkerUtils.getGlyphs('fontawesome');
describe('Test VectorStyle', () => {
beforeEach((done) => {
+ mockAxios = new MockAdapter(axios);
document.body.innerHTML = '';
setTimeout(done);
});
afterEach((done) => {
+ mockAxios.restore();
document.body.innerHTML = '';
setTimeout(done);
});
@@ -57,11 +71,11 @@ describe('Test VectorStyle', () => {
const strokeStyle = {
color: "#223366"
};
- const stroke = new ol.style.Stroke(strokeStyle);
+ const stroke = new Stroke(strokeStyle);
const fillStyle = {
color: "#998877"
};
- const fill = new ol.style.Fill(fillStyle);
+ const fill = new Fill(fillStyle);
const olStyle = getCircleStyle({
radius: 800
},
@@ -306,7 +320,7 @@ describe('Test VectorStyle', () => {
Options are:
- remove it
- test it more, on ol they say that some defaults are applied, but it is not the case
- (https://openlayers.org/en/v4.6.5/apidoc/ol.style.Stroke.html)
+ (https://openlayers.org/en/v4.6.5/apidoc/Stroke.html)
*/
const strokeStyle = {
color: "#ffffff",
@@ -450,9 +464,9 @@ describe('Test VectorStyle', () => {
};
const geomFunc = getGeometryTrasformation(markerStyle);
expect(geomFunc).toNotBe(null);
- const feature = new ol.Feature({
- geometry: new ol.geom.Point([1, 2]),
- labelPoint: new ol.geom.Point([1, 1]),
+ const feature = new Feature({
+ geometry: new Point([1, 2]),
+ labelPoint: new Point([1, 1]),
name: 'My Polygon'
});
expect(geomFunc(feature).getType()).toBe("Point");
@@ -466,9 +480,9 @@ describe('Test VectorStyle', () => {
};
const geomFunc = getGeometryTrasformation(markerStyle);
expect(geomFunc).toNotBe(null);
- const feature = new ol.Feature({
- geometry: new ol.geom.Polygon([[[1, 2], [2, 2], [3, 2], [1, 2]]]),
- labelPoint: new ol.geom.Point([1, 1]),
+ const feature = new Feature({
+ geometry: new Polygon([[[1, 2], [2, 2], [3, 2], [1, 2]]]),
+ labelPoint: new Point([1, 1]),
name: 'My Polygon'
});
expect(geomFunc(feature).getType()).toBe("Point");
@@ -480,9 +494,9 @@ describe('Test VectorStyle', () => {
};
const geomFunc = getGeometryTrasformation(markerStyle);
expect(geomFunc).toNotBe(null);
- const feature = new ol.Feature({
- geometry: new ol.geom.MultiPoint([[1, 2], [2, 2], [3, 2], [1, 2]]),
- labelPoint: new ol.geom.Point([1, 1]),
+ const feature = new Feature({
+ geometry: new MultiPoint([[1, 2], [2, 2], [3, 2], [1, 2]]),
+ labelPoint: new Point([1, 1]),
name: 'My Polygon'
});
expect(geomFunc(feature).getType()).toBe("LineString");
@@ -494,9 +508,9 @@ describe('Test VectorStyle', () => {
};
const geomFunc = getGeometryTrasformation(markerStyle);
expect(geomFunc).toNotBe(null);
- const feature = new ol.Feature({
- geometry: new ol.geom.Polygon([[[1, 2], [2, 2], [3, 2], [1, 2]]]),
- labelPoint: new ol.geom.Point([1, 1]),
+ const feature = new Feature({
+ geometry: new Polygon([[[1, 2], [2, 2], [3, 2], [1, 2]]]),
+ labelPoint: new Point([1, 1]),
name: 'My Polygon'
});
expect(geomFunc(feature).getType()).toBe("Polygon");
@@ -555,4 +569,76 @@ describe('Test VectorStyle', () => {
expect(isArray(olStyles)).toBe(true);
expect(olStyles.length).toBe(3);
});
+ it('getStyle is compatible with legacy get style', () => {
+ const style = getStyle({
+ style: {
+ type: 'Point',
+ "Point": {
+ iconGlyph: "comment"
+ }
+ }
+ }, true);
+ expect(style).toExist();
+ expect(style.getImage()).toExist();
+ // TODO: add more tests from LegacyVectorStyle here
+ });
+ it('getStyle can return a promise', (done) => {
+ const stylePromise = getStyle({
+ asPromise: true,
+ style: {
+ type: 'Point',
+ "Point": {
+ iconGlyph: "comment"
+ }
+ }
+ }, true);
+ stylePromise.then(style => {
+ expect(style).toExist();
+ expect(style.getImage()).toExist();
+ done();
+ });
+ });
+ it('getStyle supports remote styles', (done) => {
+ const SLD = `
+
+
+ Simple Point
+
+ SLD Cook Book: Simple Point
+
+
+
+
+
+ circle
+
+ #FF0000
+
+
+ 6
+
+
+
+
+
+
+ `;
+ mockAxios.onGet().reply(200, SLD);
+ const stylePromise = getStyle({
+ style: {
+ url: "http://styleurl",
+ format: "sld"
+ }
+ }, true);
+ stylePromise.then(style => {
+ expect(style).toExist();
+ expect(style.getImage()).toExist();
+ done();
+ });
+ });
});
diff --git a/web/client/components/map/openlayers/index.js b/web/client/components/map/openlayers/index.js
index 319c6d6046..6259b765c3 100644
--- a/web/client/components/map/openlayers/index.js
+++ b/web/client/components/map/openlayers/index.js
@@ -1,9 +1,9 @@
module.exports = {
- LLayer: require('./Layer.jsx'),
- Locate: require('./Locate.jsx'),
- LMap: require('./Map.jsx'),
- MeasurementSupport: require('./MeasurementSupport'),
- Overview: require('./Overview'),
- ScaleBar: require('./ScaleBar'),
- Feature: require('./Feature')
+ LLayer: require('./Layer.jsx').default,
+ Locate: require('./Locate.jsx').default,
+ LMap: require('./Map.jsx').default,
+ MeasurementSupport: require('./MeasurementSupport').default,
+ Overview: require('./Overview').default,
+ ScaleBar: require('./ScaleBar').default,
+ Feature: require('./Feature').default
};
diff --git a/web/client/components/map/openlayers/plugins/BingLayer.js b/web/client/components/map/openlayers/plugins/BingLayer.js
index e23d91196b..2564a209d9 100644
--- a/web/client/components/map/openlayers/plugins/BingLayer.js
+++ b/web/client/components/map/openlayers/plugins/BingLayer.js
@@ -6,8 +6,9 @@
* LICENSE file in the root directory of this source tree.
*/
-var Layers = require('../../../../utils/openlayers/Layers');
-var ol = require('openlayers');
+import Layers from '../../../../utils/openlayers/Layers';
+import TileLayer from 'ol/layer/Tile';
+import BingMaps from 'ol/source/BingMaps';
const checkLoaded = (layer, options) => {
if (layer.getSource && layer.getSource().getState() === 'error') {
@@ -24,12 +25,12 @@ Layers.registerType('bing', {
create: (options) => {
var key = options.apiKey;
var maxNativeZoom = options.maxNativeZoom || 19;
- const layer = new ol.layer.Tile({
+ const layer = new TileLayer({
preload: Infinity,
opacity: options.opacity !== undefined ? options.opacity : 1,
zIndex: options.zIndex,
visible: options.visibility,
- source: new ol.source.BingMaps({
+ source: new BingMaps({
key: key,
imagerySet: options.name,
maxZoom: maxNativeZoom
diff --git a/web/client/components/map/openlayers/plugins/GoogleLayer.js b/web/client/components/map/openlayers/plugins/GoogleLayer.js
index e63e93fdc4..74b680757a 100644
--- a/web/client/components/map/openlayers/plugins/GoogleLayer.js
+++ b/web/client/components/map/openlayers/plugins/GoogleLayer.js
@@ -6,17 +6,17 @@
* LICENSE file in the root directory of this source tree.
*/
-var Layers = require('../../../../utils/openlayers/Layers');
-var ol = require('openlayers');
-var React = require('react');
-
-var layersMap;
-var rendererItem;
-var gmaps = {};
-var isTouchSupported = 'ontouchstart' in window;
-var startEvent = isTouchSupported ? 'touchstart' : 'mousedown';
-var moveEvent = isTouchSupported ? 'touchmove' : 'mousemove';
-var endEvent = isTouchSupported ? 'touchend' : 'mouseup';
+import Layers from '../../../../utils/openlayers/Layers';
+import React from 'react';
+import {transform} from 'ol/proj';
+
+let layersMap;
+let rendererItem;
+let gmaps = {};
+let isTouchSupported = 'ontouchstart' in window;
+let startEvent = isTouchSupported ? 'touchstart' : 'mousedown';
+let moveEvent = isTouchSupported ? 'touchmove' : 'mousemove';
+let endEvent = isTouchSupported ? 'touchend' : 'mouseup';
Layers.registerType('google', {
create: (options, map, mapId) => {
@@ -44,7 +44,7 @@ Layers.registerType('google', {
let mapContainer = document.getElementById(mapId + 'gmaps');
let setCenter = function() {
if (mapContainer.style.visibility !== 'hidden') {
- const center = ol.proj.transform(map.getView().getCenter(), 'EPSG:3857', 'EPSG:4326');
+ const center = transform(map.getView().getCenter(), 'EPSG:3857', 'EPSG:4326');
gmaps[mapId].setCenter(new google.maps.LatLng(center[1], center[0]));
}
};
@@ -193,7 +193,7 @@ Layers.registerType('google', {
let google = window.google;
if (!oldOptions.visibility && newOptions.visibility) {
let view = map.getView();
- const center = ol.proj.transform(view.getCenter(), 'EPSG:3857', 'EPSG:4326');
+ const center = transform(view.getCenter(), 'EPSG:3857', 'EPSG:4326');
gmaps[mapId].setCenter(new google.maps.LatLng(center[1], center[0]));
gmaps[mapId].setZoom(view.getZoom());
}
diff --git a/web/client/components/map/openlayers/plugins/GraticuleLayer.js b/web/client/components/map/openlayers/plugins/GraticuleLayer.js
index 26912579b1..c6ec9be91b 100644
--- a/web/client/components/map/openlayers/plugins/GraticuleLayer.js
+++ b/web/client/components/map/openlayers/plugins/GraticuleLayer.js
@@ -6,14 +6,15 @@
* LICENSE file in the root directory of this source tree.
*/
-var Layers = require('../../../../utils/openlayers/Layers');
-var ol = require('openlayers');
+import Layers from '../../../../utils/openlayers/Layers';
+import Graticule from 'ol/Graticule';
+import {Stroke} from 'ol/style';
Layers.registerType('graticule', {
create: (options, map) => {
- let graticule = new ol.Graticule({
- strokeStyle: options.style || new ol.style.Stroke({
+ let graticule = new Graticule({
+ strokeStyle: options.style || new Stroke({
color: 'rgba(255,120,0,0.9)',
width: 2,
lineDash: [0.5, 4]
diff --git a/web/client/components/map/openlayers/plugins/MapQuest.js b/web/client/components/map/openlayers/plugins/MapQuest.js
index 06941c06c4..731aad8e17 100644
--- a/web/client/components/map/openlayers/plugins/MapQuest.js
+++ b/web/client/components/map/openlayers/plugins/MapQuest.js
@@ -6,7 +6,7 @@
* LICENSE file in the root directory of this source tree.
*/
-var Layers = require('../../../../utils/openlayers/Layers');
+import Layers from '../../../../utils/openlayers/Layers';
Layers.registerType('mapquest', {
create: (options) => {
diff --git a/web/client/components/map/openlayers/plugins/MarkerLayer.js b/web/client/components/map/openlayers/plugins/MarkerLayer.js
index 0362d5b99f..457a50f528 100644
--- a/web/client/components/map/openlayers/plugins/MarkerLayer.js
+++ b/web/client/components/map/openlayers/plugins/MarkerLayer.js
@@ -6,13 +6,13 @@
* LICENSE file in the root directory of this source tree.
*/
-var Layers = require('../../../../utils/openlayers/Layers');
-var ol = require('openlayers');
-var assign = require('object-assign');
-var defaultIcon = require('../img/marker-icon.png');
+import Layers from '../../../../utils/openlayers/Layers';
+import assign from 'object-assign';
+import defaultIcon from '../img/marker-icon.png';
+import {Style, Icon} from 'ol/style';
-var icon = new ol.style.Style({
- image: new ol.style.Icon(/** @type {olx.style.IconOptions} */ {
+const icon = new Style({
+ image: new Icon(/** @type {olx.style.IconOptions} */ {
anchor: [0.5, 1],
anchorXUnits: 'fraction',
anchorYUnits: 'fraction',
@@ -22,11 +22,13 @@ var icon = new ol.style.Style({
});
const defaultStyles = {
- 'Point': [new ol.style.Style({
+ 'Point': [new Style({
image: icon
})]};
-
+/**
+ * @deprecated use VectorLayer
+ */
Layers.registerType('marker', {
create: (options, map, mapId) => {
return Layers.createLayer('vector', assign(options, {style: () => { return defaultStyles.Point; }}), map, mapId);
diff --git a/web/client/components/map/openlayers/plugins/OSMLayer.js b/web/client/components/map/openlayers/plugins/OSMLayer.js
index 0e08ff051f..927ee8c307 100644
--- a/web/client/components/map/openlayers/plugins/OSMLayer.js
+++ b/web/client/components/map/openlayers/plugins/OSMLayer.js
@@ -6,16 +6,17 @@
* LICENSE file in the root directory of this source tree.
*/
-var Layers = require('../../../../utils/openlayers/Layers');
-var ol = require('openlayers');
+import Layers from '../../../../utils/openlayers/Layers';
+import OSM from 'ol/source/OSM';
+import TileLayer from 'ol/layer/Tile';
Layers.registerType('osm', {
create: (options) => {
- return new ol.layer.Tile({
+ return new TileLayer({
opacity: options.opacity !== undefined ? options.opacity : 1,
visible: options.visibility,
zIndex: options.zIndex,
- source: new ol.source.OSM()
+ source: new OSM()
});
}
});
diff --git a/web/client/components/map/openlayers/plugins/OverlayLayer.js b/web/client/components/map/openlayers/plugins/OverlayLayer.js
index 58709b8fc4..fe0c95e54d 100644
--- a/web/client/components/map/openlayers/plugins/OverlayLayer.js
+++ b/web/client/components/map/openlayers/plugins/OverlayLayer.js
@@ -6,9 +6,9 @@
* LICENSE file in the root directory of this source tree.
*/
-var Layers = require('../../../../utils/openlayers/Layers');
-var ol = require('openlayers');
-var eventListener = require('eventlistener');
+import Layers from '../../../../utils/openlayers/Layers';
+import eventListener from 'eventlistener';
+import Overlay from 'ol/Overlay';
const removeIds = (items) => {
if (items.length !== 0) {
@@ -50,7 +50,7 @@ Layers.registerType('overlay', {
const original = document.getElementById(options.id);
const cloned = cloneOriginalOverlay(original, options);
document.body.appendChild(cloned);
- const overlay = new ol.Overlay({
+ const overlay = new Overlay({
id: options.id,
element: cloned,
autoPan: options.autoPan || false,
diff --git a/web/client/components/map/openlayers/plugins/TileProviderLayer.js b/web/client/components/map/openlayers/plugins/TileProviderLayer.js
index 54f5c45879..10223293ef 100644
--- a/web/client/components/map/openlayers/plugins/TileProviderLayer.js
+++ b/web/client/components/map/openlayers/plugins/TileProviderLayer.js
@@ -5,12 +5,13 @@
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
-var assign = require('object-assign');
-var Layers = require('../../../../utils/openlayers/Layers');
-var ol = require('openlayers');
-var TileProvider = require('../../../../utils/TileConfigProvider');
-var CoordinatesUtils = require('../../../../utils/CoordinatesUtils');
-const { getUrls, template } = require('../../../../utils/TileProviderUtils');
+import assign from 'object-assign';
+import Layers from '../../../../utils/openlayers/Layers';
+import TileProvider from '../../../../utils/TileConfigProvider';
+import CoordinatesUtils from '../../../../utils/CoordinatesUtils';
+import { getUrls, template } from '../../../../utils/TileProviderUtils';
+import XYZ from 'ol/source/XYZ';
+import TileLayer from 'ol/layer/Tile';
/*eslint-disable */
function lBoundsToOlExtent(bounds, destPrj){
@@ -22,11 +23,11 @@ function tileXYZToOpenlayersOptions(options) {
let urls = options.url.match(/(\{s\})/) ? getUrls(options) : [template(options.url, options)];
let sourceOpt = assign({}, {
urls: urls,
- attributions: options.attribution ? [new ol.Attribution({ html: options.attribution})] : [],
+ attributions: options.attribution ? [options.attribution] : [],
maxZoom: options.maxZoom ? options.maxZoom : 18,
minZoom: options.minZoom ? options.minZoom : 0 // dosen't affect ol layer rendering UNSUPPORTED
});
- let source = new ol.source.XYZ(sourceOpt);
+ let source = new XYZ(sourceOpt);
let olOpt = assign({}, {
opacity: options.opacity !== undefined ? options.opacity : 1,
visible: options.visibility !== false,
@@ -40,6 +41,6 @@ Layers.registerType('tileprovider', {
create: (options) => {
let [url, opt] = TileProvider.getLayerConfig(options.provider, options);
opt.url = url;
- return new ol.layer.Tile(tileXYZToOpenlayersOptions(opt));
+ return new TileLayer(tileXYZToOpenlayersOptions(opt));
}
});
diff --git a/web/client/components/map/openlayers/plugins/VectorLayer.js b/web/client/components/map/openlayers/plugins/VectorLayer.js
index 923aca31e5..bc16037cae 100644
--- a/web/client/components/map/openlayers/plugins/VectorLayer.js
+++ b/web/client/components/map/openlayers/plugins/VectorLayer.js
@@ -6,22 +6,23 @@
* LICENSE file in the root directory of this source tree.
*/
-var Layers = require('../../../../utils/openlayers/Layers');
-const VectorStyle = require('../VectorStyle');
-var ol = require('openlayers');
-const {isEqual} = require('lodash');
+import Layers from '../../../../utils/openlayers/Layers';
+import {getStyle} from '../VectorStyle';
+import isEqual from 'lodash/isEqual';
+import VectorSource from 'ol/source/Vector';
+import VectorLayer from 'ol/layer/Vector';
Layers.registerType('vector', {
create: (options) => {
let features = [];
- const source = new ol.source.Vector({
+ const source = new VectorSource({
features: features
});
- const style = VectorStyle.getStyle(options);
+ const style = getStyle(options);
- return new ol.layer.Vector({
+ return new VectorLayer({
msId: options.id,
source: source,
visible: options.visibility !== false,
@@ -39,7 +40,7 @@ Layers.registerType('vector', {
}
if (!isEqual(oldOptions.style, newOptions.style)) {
- layer.setStyle(VectorStyle.getStyle(newOptions));
+ layer.setStyle(getStyle(newOptions));
}
},
render: () => {
diff --git a/web/client/components/map/openlayers/plugins/WFS3Layer.js b/web/client/components/map/openlayers/plugins/WFS3Layer.js
new file mode 100644
index 0000000000..29afb747f9
--- /dev/null
+++ b/web/client/components/map/openlayers/plugins/WFS3Layer.js
@@ -0,0 +1,128 @@
+/**
+ * Copyright 2018, GeoSolutions Sas.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+import head from 'lodash/head';
+import urlParser from 'url';
+
+import CoordinatesUtils from '../../../../utils/CoordinatesUtils';
+import MapUtils from '../../../../utils/MapUtils';
+import Layers from '../../../../utils/openlayers/Layers';
+import SecurityUtils from '../../../../utils/SecurityUtils';
+
+import {get, getTransform} from 'ol/proj';
+import {applyTransform} from 'ol/extent';
+import TileGrid from 'ol/tilegrid/TileGrid';
+import VectorTileLayer from 'ol/layer/VectorTile';
+import VectorTile from 'ol/source/VectorTile';
+import MVT from 'ol/format/MVT';
+
+import { isVectorFormat } from '../../../../utils/VectorTileUtils';
+import { OL_VECTOR_FORMATS, applyStyle } from '../../../../utils/openlayers/VectorTileUtils';
+
+const createLayer = (options) => {
+
+ const srs = CoordinatesUtils.normalizeSRS(options.srs || 'EPSG:3857', options.allowedSRS);
+ const projection = get(srs);
+ const metersPerUnit = projection.getMetersPerUnit();
+
+ const tilingScheme = head(options.tilingSchemes
+ && options.tilingSchemes.schemes
+ && options.tilingSchemes.schemes.filter(({ supportedCRS }) => supportedCRS === srs));
+
+ const { identifier: tilingSchemeId, tileMatrix, boundingBox } = tilingScheme || {};
+ const scales = tileMatrix && tileMatrix.map(({ scaleDenominator }) => scaleDenominator);
+ const mapResolutions = MapUtils.getResolutions();
+
+ const scaleToResolution = s => s * 0.28E-3 / metersPerUnit;
+ const matrixResolutions = options.resolutions || scales && scales.map(scaleToResolution);
+ const resolutions = matrixResolutions || mapResolutions;
+
+ const switchOriginXY = projection.getAxisOrientation().substr(0, 2) === 'ne';
+ const origins = tileMatrix && tileMatrix
+ .map(({ topLeftCorner } = {}) => topLeftCorner)
+ .map(([ x, y ] = []) => switchOriginXY ? [y, x] : [x, y]);
+
+ const tileSizes = tileMatrix && tileMatrix
+ .map(({tileWidth, tileHeight}) => [tileWidth, tileHeight]);
+
+ const bbox = options.bbox;
+
+ const extent = bbox
+ ? applyTransform([
+ parseFloat(bbox.bounds.minx),
+ parseFloat(bbox.bounds.miny),
+ parseFloat(bbox.bounds.maxx),
+ parseFloat(bbox.bounds.maxy)
+ ], getTransform(bbox.crs, options.srs))
+ : null;
+
+ const tileGridExtent = boundingBox && boundingBox.lowerCorner && boundingBox.upperCorner
+ ? [
+ ...boundingBox.lowerCorner,
+ ...boundingBox.upperCorner
+ ]
+ : null;
+
+ const tileGrid = new TileGrid({
+ extent: tileGridExtent,
+ minZoom: 0,
+ origins,
+ origin: !origins ? [20037508.3428, -20037508.3428] : undefined,
+ resolutions,
+ tileSizes,
+ tileSize: !tileSizes ? [256, 256] : undefined
+ });
+
+ let url = (options.url || '')
+ .replace(/\{tilingSchemeId\}/, tilingSchemeId)
+ .replace(/\{level\}/, '{z}')
+ .replace(/\{row\}/, '{y}')
+ .replace(/\{col\}/, '{x}');
+
+ let queryParameters = { };
+ SecurityUtils.addAuthenticationParameter(url, queryParameters, options.securityToken);
+
+ const layerUrl = decodeURI(url);
+ const queryParametersString = urlParser.format({ query: { ...queryParameters } });
+
+ const Format = isVectorFormat(options.format) && OL_VECTOR_FORMATS[options.format] || MVT;
+
+ const source = new VectorTile({
+ format: new Format({
+ dataProjection: srs,
+ layerName: '_layer_'
+ }),
+ tileGrid,
+ url: layerUrl + queryParametersString
+ });
+
+ const layer = new VectorTileLayer({
+ extent,
+ msId: options.id,
+ source: source,
+ visible: options.visibility !== false,
+ zIndex: options.zIndex
+ });
+
+ applyStyle(options.vectorStyle, layer);
+
+ return layer;
+};
+Layers.registerType('wfs3', {
+ create: createLayer,
+ update: (layer, newOptions, oldOptions) => {
+ if (oldOptions.securityToken !== newOptions.securityToken
+ || oldOptions.srs !== newOptions.srs) {
+ return createLayer(newOptions);
+ }
+ return null;
+ },
+ render: () => {
+ return null;
+ }
+});
diff --git a/web/client/components/map/openlayers/plugins/WMSLayer.js b/web/client/components/map/openlayers/plugins/WMSLayer.js
index 4d9c91ffbe..3c4d246ea6 100644
--- a/web/client/components/map/openlayers/plugins/WMSLayer.js
+++ b/web/client/components/map/openlayers/plugins/WMSLayer.js
@@ -5,21 +5,38 @@
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
-const React = require('react');
-const Message = require('../../../../components/I18N/Message');
-const Layers = require('../../../../utils/openlayers/Layers');
-const ol = require('openlayers');
-const {isNil, union} = require('lodash');
-const objectAssign = require('object-assign');
-const CoordinatesUtils = require('../../../../utils/CoordinatesUtils');
-const ProxyUtils = require('../../../../utils/ProxyUtils');
-const { isArray, castArray } = require('lodash');
-const {optionsToVendorParams} = require('../../../../utils/VendorParamsUtils');
-const SecurityUtils = require('../../../../utils/SecurityUtils');
-const { creditsToAttribution } = require('../../../../utils/LayersUtils');
+import React from 'react';
+import Message from '../../../../components/I18N/Message';
+import Layers from '../../../../utils/openlayers/Layers';
+import isNil from 'lodash/isNil';
+import isEqual from 'lodash/isEqual';
+import union from 'lodash/union';
+import isArray from 'lodash/isArray';
+import assign from 'object-assign';
+
+import CoordinatesUtils from '../../../../utils/CoordinatesUtils';
+import ProxyUtils from '../../../../utils/ProxyUtils';
+
+import {optionsToVendorParams} from '../../../../utils/VendorParamsUtils';
+import SecurityUtils from '../../../../utils/SecurityUtils';
+import { creditsToAttribution } from '../../../../utils/LayersUtils';
+
+import MapUtils from '../../../../utils/MapUtils';
+import ElevationUtils from '../../../../utils/ElevationUtils';
+
+import ImageLayer from 'ol/layer/Image';
+import ImageWMS from 'ol/source/ImageWMS';
+import {get} from 'ol/proj';
+import TileGrid from 'ol/tilegrid/TileGrid';
+import TileLayer from 'ol/layer/Tile';
+import TileWMS from 'ol/source/TileWMS';
+
+import VectorTileSource from 'ol/source/VectorTile';
+import VectorTileLayer from 'ol/layer/VectorTile';
+
+import { isVectorFormat } from '../../../../utils/VectorTileUtils';
+import { OL_VECTOR_FORMATS, applyStyle } from '../../../../utils/openlayers/VectorTileUtils';
-const mapUtils = require('../../../../utils/MapUtils');
-const ElevationUtils = require('../../../../utils/ElevationUtils');
/**
@param {object} options of the layer
@return the Openlayers options from the layers ones and/or default.
@@ -28,7 +45,7 @@ const ElevationUtils = require('../../../../utils/ElevationUtils');
function wmsToOpenlayersOptions(options) {
const params = optionsToVendorParams(options);
// NOTE: can we use opacity to manage visibility?
- const result = objectAssign({}, options.baseParams, {
+ const result = assign({}, options.baseParams, {
LAYERS: options.name,
STYLES: options.style || "",
FORMAT: options.format || 'image/png',
@@ -37,7 +54,7 @@ function wmsToOpenlayersOptions(options) {
CRS: CoordinatesUtils.normalizeSRS(options.srs || 'EPSG:3857', options.allowedSRS),
TILED: !isNil(options.tiled) ? options.tiled : true,
VERSION: options.version || "1.3.0"
- }, objectAssign(
+ }, assign(
{},
(options._v_ ? {_v_: options._v_} : {}),
(params || {})
@@ -76,11 +93,10 @@ function elevationLoadFunction(forceProxy, imageTile, src) {
function addTileLoadFunction(sourceOptions, options) {
if (options.useForElevation) {
- return objectAssign({}, sourceOptions, { tileLoadFunction: elevationLoadFunction.bind(null, [options.forceProxy]) });
- // return objectAssign({}, sourceOptions, { tileLoadFunction: (imageTile, src) => { imageTile.getImage().src = src; } });
+ return assign({}, sourceOptions, { tileLoadFunction: elevationLoadFunction.bind(null, [options.forceProxy]) });
}
if (options.forceProxy) {
- return objectAssign({}, sourceOptions, {tileLoadFunction: proxyTileLoadFunction});
+ return assign({}, sourceOptions, {tileLoadFunction: proxyTileLoadFunction});
}
return sourceOptions;
}
@@ -114,155 +130,182 @@ function getElevation(pos) {
return ;
}
}
-const toOLAttributions = credits => credits && creditsToAttribution(credits) ? castArray(creditsToAttribution(credits)) : undefined;
+const toOLAttributions = credits => credits && creditsToAttribution(credits) || undefined;
-Layers.registerType('wms', {
- create: (options, map) => {
- const urls = getWMSURLs(isArray(options.url) ? options.url : [options.url]);
- const queryParameters = wmsToOpenlayersOptions(options) || {};
- urls.forEach(url => SecurityUtils.addAuthenticationParameter(url, queryParameters, options.securityToken));
- if (options.singleTile) {
- return new ol.layer.Image({
- opacity: options.opacity !== undefined ? options.opacity : 1,
- visible: options.visibility !== false,
- zIndex: options.zIndex,
- source: new ol.source.ImageWMS({
- url: urls[0],
- attributions: toOLAttributions(options.credits),
- params: queryParameters,
- ratio: options.ratio || 1
- })
- });
- }
- const mapSrs = map && map.getView() && map.getView().getProjection() && map.getView().getProjection().getCode() || 'EPSG:3857';
- const extent = ol.proj.get(CoordinatesUtils.normalizeSRS(options.srs || mapSrs, options.allowedSRS)).getExtent();
- const sourceOptions = addTileLoadFunction({
- attributions: toOLAttributions(options.credits),
- urls: urls,
- params: queryParameters,
- tileGrid: new ol.tilegrid.TileGrid({
- extent: extent,
- resolutions: mapUtils.getResolutions(),
- tileSize: options.tileSize ? options.tileSize : 256,
- origin: options.origin ? options.origin : [extent[0], extent[1]]
- })
- }, options);
- const layer = new ol.layer.Tile({
+const createLayer = (options, map) => {
+ const urls = getWMSURLs(isArray(options.url) ? options.url : [options.url]);
+ const queryParameters = wmsToOpenlayersOptions(options) || {};
+ urls.forEach(url => SecurityUtils.addAuthenticationParameter(url, queryParameters, options.securityToken));
+
+ const vectorFormat = isVectorFormat(options.format);
+
+ if (options.singleTile && !vectorFormat) {
+ return new ImageLayer({
opacity: options.opacity !== undefined ? options.opacity : 1,
visible: options.visibility !== false,
zIndex: options.zIndex,
- source: new ol.source.TileWMS(sourceOptions)
+ source: new ImageWMS({
+ url: urls[0],
+ attributions: toOLAttributions(options.credits),
+ params: queryParameters,
+ ratio: options.ratio || 1
+ })
});
- layer.set('map', map);
- if (options.useForElevation) {
- layer.set('nodata', options.nodata);
- layer.set('getElevation', getElevation.bind(layer));
+ }
+ const mapSrs = map && map.getView() && map.getView().getProjection() && map.getView().getProjection().getCode() || 'EPSG:3857';
+ const extent = get(CoordinatesUtils.normalizeSRS(options.srs || mapSrs, options.allowedSRS)).getExtent();
+ const sourceOptions = addTileLoadFunction({
+ attributions: toOLAttributions(options.credits),
+ urls: urls,
+ params: queryParameters,
+ tileGrid: new TileGrid({
+ extent: extent,
+ resolutions: MapUtils.getResolutions(),
+ tileSize: options.tileSize ? options.tileSize : 256,
+ origin: options.origin ? options.origin : [extent[0], extent[1]]
+ })
+ }, options);
+ const wmsSource = new TileWMS({ ...sourceOptions });
+ const layerConfig = {
+ opacity: options.opacity !== undefined ? options.opacity : 1,
+ visible: options.visibility !== false,
+ zIndex: options.zIndex
+ };
+ let layer;
+ if (vectorFormat) {
+ layer = new VectorTileLayer({
+ ...layerConfig,
+ source: new VectorTileSource({
+ ...sourceOptions,
+ format: new OL_VECTOR_FORMATS[options.format]({
+ layerName: '_layer_'
+ }),
+ tileUrlFunction: (tileCoord, pixelRatio, projection) => wmsSource.tileUrlFunction(tileCoord, pixelRatio, projection)
+ })
+ });
+ } else {
+ layer = new TileLayer({
+ ...layerConfig,
+ source: wmsSource
+ });
+ }
+ layer.set('map', map);
+ if (vectorFormat) {
+ layer.set('wmsSource', wmsSource);
+ if (options.vectorStyle) {
+ applyStyle(options.vectorStyle, layer);
}
- return layer;
- },
+ }
+ if (options.useForElevation) {
+ layer.set('nodata', options.nodata);
+ layer.set('getElevation', getElevation.bind(layer));
+ }
+ return layer;
+};
+
+const mustCreateNewLayer = (oldOptions, newOptions) => {
+ return (oldOptions.singleTile !== newOptions.singleTile
+ || oldOptions.securityToken !== newOptions.securityToken
+ || oldOptions.ratio !== newOptions.ratio
+ // no way to remove attribution when credits are removed, so have re-create the layer is needed. Seems to be solved in OL v5.3.0, due to the ol commit 9b8232f65b391d5d381d7a99a7cd070fc36696e9 (https://github.com/openlayers/openlayers/pull/7329)
+ || oldOptions.credits !== newOptions.credits && !newOptions.credits
+ || isVectorFormat(oldOptions.format) !== isVectorFormat(newOptions.format)
+ || isVectorFormat(oldOptions.format) && isVectorFormat(newOptions.format) && oldOptions.format !== newOptions.format
+ );
+};
+
+Layers.registerType('wms', {
+ create: createLayer,
update: (layer, newOptions, oldOptions, map) => {
- if (oldOptions && layer && layer.getSource() && layer.getSource().updateParams) {
- let changed = false;
+ const newIsVector = isVectorFormat(newOptions.format);
+
+ if (mustCreateNewLayer(oldOptions, newOptions)) {
+ // TODO: do we need to clean anything before re-creating stuff from scratch?
+ return createLayer(newOptions, map);
+ }
+ let needsRefresh = false;
+ if (newIsVector && newOptions.vectorStyle && !isEqual(newOptions.vectorStyle, oldOptions.vectorStyle || {})) {
+ applyStyle(newOptions.vectorStyle, layer);
+ needsRefresh = true;
+ }
+
+ const wmsSource = layer.get('wmsSource') || layer.getSource();
+ const vectorSource = newIsVector ? layer.getSource() : null;
+
+ if (oldOptions.srs !== newOptions.srs) {
+ const extent = get(CoordinatesUtils.normalizeSRS(newOptions.srs, newOptions.allowedSRS)).getExtent();
+ if (newOptions.singleTile && !newIsVector) {
+ layer.setExtent(extent);
+ } else {
+ const tileGrid = new TileGrid({
+ extent: extent,
+ resolutions: MapUtils.getResolutions(),
+ tileSize: newOptions.tileSize ? newOptions.tileSize : 256,
+ origin: newOptions.origin ? newOptions.origin : [extent[0], extent[1]]
+ });
+ wmsSource.tileGrid = tileGrid;
+ if (vectorSource) {
+ vectorSource.tileGrid = tileGrid;
+ }
+ }
+ needsRefresh = true;
+ }
+
+ if (oldOptions.credits !== newOptions.credits && newOptions.credits) {
+ wmsSource.setAttributions(toOLAttributions(newOptions.credits));
+ needsRefresh = true;
+ }
+
+ let changed = false;
+ let oldParams;
+ let newParams;
+ if (oldOptions && wmsSource && wmsSource.updateParams) {
if (oldOptions.params && newOptions.params) {
changed = union(
- Object.keys(oldOptions.params),
- Object.keys(newOptions.params)
- ).reduce((found, param) => {
- if (newOptions.params[param] !== oldOptions.params[param]) {
- return true;
- }
- return found;
- }, false);
+ Object.keys(oldOptions.params),
+ Object.keys(newOptions.params)
+ ).reduce((found, param) => {
+ if (newOptions.params[param] !== oldOptions.params[param]) {
+ return true;
+ }
+ return found;
+ }, false);
} else if ((!oldOptions.params && newOptions.params) || (oldOptions.params && !newOptions.params)) {
changed = true;
}
- let oldParams = wmsToOpenlayersOptions(oldOptions);
- let newParams = wmsToOpenlayersOptions(newOptions);
+ oldParams = wmsToOpenlayersOptions(oldOptions);
+ newParams = wmsToOpenlayersOptions(newOptions);
changed = changed || ["LAYERS", "STYLES", "FORMAT", "TRANSPARENT", "TILED", "VERSION", "_v_", "CQL_FILTER", "SLD", "VIEWPARAMS"].reduce((found, param) => {
if (oldParams[param] !== newParams[param]) {
return true;
}
return found;
}, false);
- if (oldOptions.srs !== newOptions.srs) {
- const extent = ol.proj.get(CoordinatesUtils.normalizeSRS(newOptions.srs, newOptions.allowedSRS)).getExtent();
- layer.getSource().tileGrid = new ol.tilegrid.TileGrid({
- extent: extent,
- resolutions: mapUtils.getResolutions(),
- tileSize: newOptions.tileSize ? newOptions.tileSize : 256,
- origin: newOptions.origin ? newOptions.origin : [extent[0], extent[1]]
- });
+
+ needsRefresh = needsRefresh || changed;
+ }
+
+ if (needsRefresh) {
+ // forces tile cache drop
+ // this prevents old cached tiles at lower zoom levels to be
+ // rendered during new params load, but causes a blink glitch.
+ // TODO: find out a way to refresh only once to clear lower zoom level cache.
+ if (wmsSource.refresh) {
+ wmsSource.refresh();
+ }
+ if (vectorSource) {
+ vectorSource.clear();
+ vectorSource.refresh();
}
if (changed) {
- const params = objectAssign(newParams, SecurityUtils.addAuthenticationToSLD(optionsToVendorParams(newOptions) || {}, newOptions));
- const source = layer.getSource();
- // forces tile cache drop
- // this prevents old cached tiles at lower zoom levels to be
- // rendered during new params load, but causes a blink glitch.
- // TODO: find out a way to refresh only once to clear lower zoom level cache.
- if (layer.getSource().refresh ) {
- layer.getSource().refresh();
- }
- source.updateParams(objectAssign(params, Object.keys(oldParams || {}).reduce((previous, key) => {
- return params[key] ? previous : objectAssign(previous, {
+ const params = assign(newParams, SecurityUtils.addAuthenticationToSLD(optionsToVendorParams(newOptions) || {}, newOptions));
+
+ wmsSource.updateParams(assign(params, Object.keys(oldParams || {}).reduce((previous, key) => {
+ return params[key] ? previous : assign(previous, {
[key]: undefined
});
}, {})));
-
- }
- if (oldOptions.credits !== newOptions.credits && newOptions.credits) {
- layer.getSource().setAttributions(toOLAttributions(newOptions.credits));
- }
- if (oldOptions.singleTile !== newOptions.singleTile
- || oldOptions.securityToken !== newOptions.securityToken
- || oldOptions.ratio !== newOptions.ratio
- // no way to remove attribution when credits are removed, so have re-create the layer is needed. Seems to be solved in OL v5.3.0, due to the ol commit 9b8232f65b391d5d381d7a99a7cd070fc36696e9 (https://github.com/openlayers/openlayers/pull/7329)
- || oldOptions.credits !== newOptions.credits && !newOptions.credits
- ) {
- const urls = getWMSURLs(isArray(newOptions.url) ? newOptions.url : [newOptions.url]);
- const queryParameters = wmsToOpenlayersOptions(newOptions) || {};
- urls.forEach(url => SecurityUtils.addAuthenticationParameter(url, queryParameters, newOptions.securityToken));
- let newLayer;
- if (newOptions.singleTile) {
- // return the Image Layer with the related source
- newLayer = new ol.layer.Image({
- opacity: newOptions.opacity !== undefined ? newOptions.opacity : 1,
- visible: newOptions.visibility !== false,
- zIndex: newOptions.zIndex,
- source: new ol.source.ImageWMS({
- attributions: toOLAttributions(newOptions.credits),
- url: urls[0],
- params: queryParameters,
- ratio: newOptions.ratio || 1
- })
- });
- } else {
- // return the Tile Layer with the related source
- const mapSrs = map && map.getView() && map.getView().getProjection() && map.getView().getProjection().getCode() || 'EPSG:3857';
- const extent = ol.proj.get(CoordinatesUtils.normalizeSRS(newOptions.srs || mapSrs, newOptions.allowedSRS)).getExtent();
- newLayer = new ol.layer.Tile({
- opacity: newOptions.opacity !== undefined ? newOptions.opacity : 1,
- visible: newOptions.visibility !== false,
- zIndex: newOptions.zIndex,
- source: new ol.source.TileWMS(objectAssign({
- attributions: toOLAttributions(newOptions.credits),
- urls: urls,
- params: queryParameters,
- tileGrid: new ol.tilegrid.TileGrid({
- // TODO: custom grid sets extents
- extent: extent,
- // TODO: custom grid sets resolutions and tile size (needed to generate resolutions)
- resolutions: mapUtils.getResolutions(),
- tileSize: newOptions.tileSize ? newOptions.tileSize : 256,
- // TODO: GWC grid sets with `alignTopLeft=true` may require `extent[0], extent[3]`
- origin: newOptions.origin ? newOptions.origin : [extent[0], extent[1]]
- })
- }, newOptions.forceProxy ? {tileLoadFunction: proxyTileLoadFunction} : {}))
- });
- }
- return newLayer;
}
- return null;
}
}
});
diff --git a/web/client/components/map/openlayers/plugins/WMTSLayer.js b/web/client/components/map/openlayers/plugins/WMTSLayer.js
index b83ebe6227..ffb614617c 100644
--- a/web/client/components/map/openlayers/plugins/WMTSLayer.js
+++ b/web/client/components/map/openlayers/plugins/WMTSLayer.js
@@ -6,15 +6,37 @@
* LICENSE file in the root directory of this source tree.
*/
-var Layers = require('../../../../utils/openlayers/Layers');
-var ol = require('openlayers');
-const { castArray, head, last } = require('lodash');
-const SecurityUtils = require('../../../../utils/SecurityUtils');
-const WMTSUtils = require('../../../../utils/WMTSUtils');
-const CoordinatesUtils = require('../../../../utils/CoordinatesUtils');
-const mapUtils = require('../../../../utils/MapUtils');
-const assign = require('object-assign');
-const urlParser = require('url');
+import Layers from '../../../../utils/openlayers/Layers';
+
+import castArray from 'lodash/castArray';
+import head from 'lodash/head';
+import last from 'lodash/last';
+
+import SecurityUtils from '../../../../utils/SecurityUtils';
+import WMTSUtils from '../../../../utils/WMTSUtils';
+import CoordinatesUtils from '../../../../utils/CoordinatesUtils';
+import MapUtils from '../../../../utils/MapUtils';
+import { isVectorFormat} from '../../../../utils/VectorTileUtils';
+import urlParser from 'url';
+
+import {get, getTransform} from 'ol/proj';
+import {applyTransform} from 'ol/extent';
+import TileLayer from 'ol/layer/Tile';
+import VectorTileLayer from 'ol/layer/VectorTile';
+import WMTS from 'ol/source/WMTS';
+import VectorTile from 'ol/source/VectorTile';
+import WMTSTileGrid from 'ol/tilegrid/WMTS';
+import MVT from 'ol/format/MVT';
+import GeoJSON from 'ol/format/GeoJSON';
+import TopoJSON from 'ol/format/TopoJSON';
+
+import { getStyle } from '../VectorStyle';
+
+const OL_VECTOR_FORMATS = {
+ 'application/vnd.mapbox-vector-tile': MVT,
+ 'application/json;type=geojson': GeoJSON,
+ 'application/json;type=topojson': TopoJSON
+};
function getWMSURLs(urls) {
return urls.map((url) => url.split("\?")[0]);
@@ -24,12 +46,12 @@ const createLayer = options => {
// options.urls is an alternative name of URL.
const urls = getWMSURLs(castArray(options.url));
const srs = CoordinatesUtils.normalizeSRS(options.srs || 'EPSG:3857', options.allowedSRS);
- const projection = ol.proj.get(srs);
+ const projection = get(srs);
const metersPerUnit = projection.getMetersPerUnit();
const tilMatrixSetName = WMTSUtils.getTileMatrixSet(options.tileMatrixSet, srs, options.allowedSRS, options.matrixIds);
const tileMatrixSet = head(options.tileMatrixSet.filter(tM => tM['ows:Identifier'] === tilMatrixSetName));
const scales = tileMatrixSet && tileMatrixSet.TileMatrix.map(t => t.ScaleDenominator);
- const mapResolutions = mapUtils.getResolutions();
+ const mapResolutions = MapUtils.getResolutions();
/*
* WMTS assumes a DPI 90.7 instead of 96 as documented in the WMTSCapabilities document:
* "The tile matrix set that has scale values calculated based on the dpi defined by OGC specification
@@ -55,12 +77,12 @@ const createLayer = options => {
const bbox = options.bbox;
const extent = bbox
- ? ol.extent.applyTransform([
+ ? applyTransform([
parseFloat(bbox.bounds.minx),
parseFloat(bbox.bounds.miny),
parseFloat(bbox.bounds.maxx),
parseFloat(bbox.bounds.maxy)
- ], ol.proj.getTransform(bbox.crs, options.srs))
+ ], getTransform(bbox.crs, options.srs))
: null;
let queryParameters = {};
@@ -75,36 +97,59 @@ const createLayer = options => {
// Temporary fix for https://github.com/openlayers/openlayers/issues/8700 . It should be solved in OL 5.3.0
// it's exclusive so the map lower resolution that draws the image in less then 0.5 pixels have to be the maxResolution
const maxResolution = options.maxResolution || last(mapResolutions.filter((r = []) => resolutions[0] / r * TILE_SIZE < 0.5));
- return new ol.layer.Tile({
+ const format = (options.availableFormats || []).indexOf(options.format) !== -1 && options.format
+ || !options.availableFormats && options.format || 'image/png';
+ const isVector = isVectorFormat(format);
+
+ const wmtsOptions = {
+ requestEncoding,
+ urls: urls.map(u => u + queryParametersString),
+ layer: options.name,
+ version: options.version || "1.0.0",
+ matrixSet: tilMatrixSetName,
+ format,
+ style: options.style,
+ tileGrid: new WMTSTileGrid({
+ origins,
+ origin: !origins ? [20037508.3428, -20037508.3428] : undefined, // Either origin or origins must be configured, never both.
+ // extent: extent,
+ resolutions,
+ matrixIds,
+ // TODO: matrixLimits from ranges
+ tileSize: options.tileSize || [TILE_SIZE, TILE_SIZE]
+ }),
+ wrapX: true
+ };
+
+ const wmtsSource = new WMTS(wmtsOptions);
+ const Layer = isVector ? VectorTileLayer : TileLayer;
+ const wmtsLayer = new Layer({
opacity: options.opacity !== undefined ? options.opacity : 1,
zIndex: options.zIndex,
extent: extent,
maxResolution,
visible: options.visibility !== false,
- source: new ol.source.WMTS(assign({
- requestEncoding,
- urls: urls.map(u => u + queryParametersString),
- layer: options.name,
- version: options.version || "1.0.0",
- matrixSet: tilMatrixSetName,
- format: options.format || 'image/png',
- style: options.style,
- tileGrid: new ol.tilegrid.WMTS({
- origins,
- origin: !origins ? [20037508.3428, -20037508.3428] : undefined, // Either origin or origins must be configured, never both.
- // extent: extent,
- resolutions,
- matrixIds,
- // TODO: matrixLimits from ranges
- tileSize: options.tileSize || [TILE_SIZE, TILE_SIZE]
- }),
- wrapX: true
- }))
+ source: isVector
+ ? new VectorTile({
+ ...wmtsOptions,
+ format: new OL_VECTOR_FORMATS[options.format]({
+ dataProjection: srs
+ }),
+ tileUrlFunction: (...args) => wmtsSource.tileUrlFunction(...args)
+ })
+ : wmtsSource
});
+
+ if (isVector) wmtsLayer.setStyle(getStyle(options));
+
+ return wmtsLayer;
};
const updateLayer = (layer, newOptions, oldOptions) => {
- if (oldOptions.securityToken !== newOptions.securityToken || oldOptions.srs !== newOptions.srs) {
+ if (oldOptions.securityToken !== newOptions.securityToken
+ || oldOptions.srs !== newOptions.srs
+ || oldOptions.format !== newOptions.format
+ || oldOptions.style !== newOptions.style) {
return createLayer(newOptions);
}
return null;
diff --git a/web/client/components/map/openlayers/plugins/index.js b/web/client/components/map/openlayers/plugins/index.js
index 614c5d53dd..96079a765d 100644
--- a/web/client/components/map/openlayers/plugins/index.js
+++ b/web/client/components/map/openlayers/plugins/index.js
@@ -7,14 +7,15 @@
*/
module.exports = {
- BingLayer: require('./BingLayer'),
- GoogleLayer: require('./GoogleLayer'),
- GraticuleLayer: require('./GraticuleLayer'),
- MapQuest: require('./MapQuest'),
- OSMLayer: require('./OSMLayer'),
- OverlayLayer: require('./OverlayLayer'),
- TileProviderLayer: require('./TileProviderLayer'),
- VectorLayer: require('./VectorLayer'),
- WMSLayer: require('./WMSLayer'),
- WMTSLayer: require('./WMTSLayer')
+ BingLayer: require('./BingLayer').default,
+ GoogleLayer: require('./GoogleLayer').default,
+ GraticuleLayer: require('./GraticuleLayer').default,
+ MapQuest: require('./MapQuest').default,
+ OSMLayer: require('./OSMLayer').default,
+ OverlayLayer: require('./OverlayLayer').default,
+ TileProviderLayer: require('./TileProviderLayer').default,
+ VectorLayer: require('./VectorLayer').default,
+ WFS3Layer: require('./WFS3Layer').default,
+ WMSLayer: require('./WMSLayer').default,
+ WMTSLayer: require('./WMTSLayer').default
};
diff --git a/web/client/components/map/openlayers/snapshot/GrabMap.jsx b/web/client/components/map/openlayers/snapshot/GrabMap.jsx
index 52c42e4cc7..76b4a03abc 100644
--- a/web/client/components/map/openlayers/snapshot/GrabMap.jsx
+++ b/web/client/components/map/openlayers/snapshot/GrabMap.jsx
@@ -1,4 +1,3 @@
-const PropTypes = require('prop-types');
/**
* Copyright 2015, GeoSolutions Sas.
* All rights reserved.
@@ -6,14 +5,17 @@ const PropTypes = require('prop-types');
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
-var React = require('react');
-var {LMap,
+import PropTypes from 'prop-types';
+import React from 'react';
+import {LMap,
LLayer,
Feature
-} = require('../index');
-const assign = require('object-assign');
-const ConfigUtils = require('../../../../utils/ConfigUtils');
-require("./snapshotMapStyle.css");
+} from '../index';
+import assign from 'object-assign';
+import ConfigUtils from '../../../../utils/ConfigUtils';
+import './snapshotMapStyle.css';
+
+import '../../../map/openlayers/plugins/index';
/**
* GrabMap for OpenLayers map generate a fake-map, hidden, and waits for the
@@ -21,7 +23,7 @@ require("./snapshotMapStyle.css");
* In order to avoid cross origin issues, the allowTaint property have to be set
* to false if you are not sure that the items come from the same orgin.
*/
-class GrabOlMap extends React.Component {
+export default class GrabOlMap extends React.Component {
static propTypes = {
id: PropTypes.node,
config: ConfigUtils.PropTypes.config,
@@ -154,7 +156,3 @@ class GrabOlMap extends React.Component {
};
}
-
-require('../../../map/openlayers/plugins/index');
-
-module.exports = GrabOlMap;
diff --git a/web/client/components/map/openlayers/snapshot/Preview.jsx b/web/client/components/map/openlayers/snapshot/Preview.jsx
index 87ca4d216d..02a51adf3e 100644
--- a/web/client/components/map/openlayers/snapshot/Preview.jsx
+++ b/web/client/components/map/openlayers/snapshot/Preview.jsx
@@ -1,4 +1,3 @@
-const PropTypes = require('prop-types');
/**
* Copyright 2015, GeoSolutions Sas.
* All rights reserved.
@@ -6,10 +5,11 @@ const PropTypes = require('prop-types');
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
-const React = require('react');
-const ConfigUtils = require('../../../../utils/ConfigUtils');
-const ProxyUtils = require('../../../../utils/ProxyUtils');
-const {isEqual} = require('lodash');
+import PropTypes from 'prop-types';
+import React from 'react';
+import ConfigUtils from '../../../../utils/ConfigUtils';
+import ProxyUtils from '../../../../utils/ProxyUtils';
+import isEqual from 'lodash/isEqual';
/**
* Preview for OpenLayers map generate is a fast system to get the image
@@ -17,7 +17,7 @@ const {isEqual} = require('lodash');
* if it is not tainted, this can be used also to generate snapshot
* (extracting the image URL from the canvas).
*/
-class GrabLMap extends React.Component {
+export default class GrabLMap extends React.Component {
static propTypes = {
config: ConfigUtils.PropTypes.config,
layers: PropTypes.array,
@@ -166,5 +166,3 @@ class GrabLMap extends React.Component {
return this.refs.canvas.toDataURL();
};
}
-
-module.exports = GrabLMap;
diff --git a/web/client/components/map/openlayers/snapshot/__tests__/GrabMap-test.jsx b/web/client/components/map/openlayers/snapshot/__tests__/GrabMap-test.jsx
index 79344600a4..52f2a71a4d 100644
--- a/web/client/components/map/openlayers/snapshot/__tests__/GrabMap-test.jsx
+++ b/web/client/components/map/openlayers/snapshot/__tests__/GrabMap-test.jsx
@@ -5,11 +5,11 @@
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
-var expect = require('expect');
+import expect from 'expect';
-var React = require('react');
-var ReactDOM = require('react-dom');
-var GrabMap = require('../GrabMap');
+import React from 'react';
+import ReactDOM from 'react-dom';
+import GrabMap from '../GrabMap';
describe("the OL GrabMap component", () => {
beforeEach((done) => {
@@ -27,11 +27,6 @@ describe("the OL GrabMap component", () => {
const tb = ReactDOM.render(, document.getElementById("snap"));
expect(tb).toExist();
});
- /* it('component update', () => {
- let tb = ReactDOM.render(, document.getElementById("snap"));
- expect(tb).toExist();
- tb = ReactDOM.render(, document.getElementById("snap"));
- });*/
it('component snapshot img creation', (done) => {
let layers = [{
"source": "mapquest",
diff --git a/web/client/components/map/openlayers/snapshot/__tests__/Preview-test.jsx b/web/client/components/map/openlayers/snapshot/__tests__/Preview-test.jsx
index ce7e4fd290..beda56b6fe 100644
--- a/web/client/components/map/openlayers/snapshot/__tests__/Preview-test.jsx
+++ b/web/client/components/map/openlayers/snapshot/__tests__/Preview-test.jsx
@@ -5,16 +5,16 @@
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
-var expect = require('expect');
+import expect from 'expect';
-var React = require('react');
-var ReactDOM = require('react-dom');
-var GrabMap = require('../Preview');
-var OLMap = require('../../../../map/openlayers/Map.jsx');
+import React from 'react';
+import ReactDOM from 'react-dom';
+import GrabMap from '../Preview';
+import OLMap from '../../../../map/openlayers/Map';
-require('../../../../../utils/openlayers/Layers');
-require('../../../../map/openlayers/plugins/OSMLayer');
+import '../../../../../utils/openlayers/Layers';
+import '../../../../map/openlayers/plugins/OSMLayer';
describe("test the OL Snapshot Preview component", () => {
beforeEach((done) => {
diff --git a/web/client/components/map/plugins/openlayers.js b/web/client/components/map/plugins/openlayers.js
index 3047538d1e..6161de8727 100644
--- a/web/client/components/map/plugins/openlayers.js
+++ b/web/client/components/map/plugins/openlayers.js
@@ -9,14 +9,14 @@
module.exports = () => {
require('../openlayers/plugins/index');
return {
- Map: require('../openlayers/Map'),
- Layer: require('../openlayers/Layer'),
- Feature: require('../openlayers/Feature'),
- Locate: require('../openlayers/Locate'),
- MeasurementSupport: require('../openlayers/MeasurementSupport'),
- Overview: require('../openlayers/Overview'),
- ScaleBar: require('../openlayers/ScaleBar'),
- DrawSupport: require('../openlayers/DrawSupport')
+ Map: require('../openlayers/Map').default,
+ Layer: require('../openlayers/Layer').default,
+ Feature: require('../openlayers/Feature').default,
+ Locate: require('../openlayers/Locate').default,
+ MeasurementSupport: require('../openlayers/MeasurementSupport').default,
+ Overview: require('../openlayers/Overview').default,
+ ScaleBar: require('../openlayers/ScaleBar').default,
+ DrawSupport: require('../openlayers/DrawSupport').default
};
};
diff --git a/web/client/components/mapcontrols/Snapshot/SnapshotSupport.jsx b/web/client/components/mapcontrols/Snapshot/SnapshotSupport.jsx
index 8bb84c6d73..18ec4c1f93 100644
--- a/web/client/components/mapcontrols/Snapshot/SnapshotSupport.jsx
+++ b/web/client/components/mapcontrols/Snapshot/SnapshotSupport.jsx
@@ -7,5 +7,6 @@
*/
module.exports = (mapType) => {
- return require('../../map/' + mapType + '/SnapshotSupport');
+ const SnapshotSupport = require('../../map/' + mapType + '/SnapshotSupport');
+ return SnapshotSupport.default || SnapshotSupport;
};
diff --git a/web/client/components/print/MapPreview.jsx b/web/client/components/print/MapPreview.jsx
index 629b611520..c47b41ede6 100644
--- a/web/client/components/print/MapPreview.jsx
+++ b/web/client/components/print/MapPreview.jsx
@@ -57,10 +57,11 @@ class MapPreview extends React.Component {
};
componentWillMount() {
- PMap = require('../map/' + this.props.mapType + '/Map');
- Layer = require('../map/' + this.props.mapType + '/Layer');
+ const mapComponents = require('../map/' + this.props.mapType + '/index');
+ PMap = mapComponents.LMap;
+ Layer = mapComponents.LLayer;
+ Feature = mapComponents.Feature;
require('../map/' + this.props.mapType + '/plugins/index');
- Feature = require('../map/' + this.props.mapType + '/index').Feature;
}
getRatio = () => {
diff --git a/web/client/examples/api/index.html b/web/client/examples/api/index.html
index 80ca465dd0..d87b48f0ef 100644
--- a/web/client/examples/api/index.html
+++ b/web/client/examples/api/index.html
@@ -7,7 +7,6 @@
-
@@ -18,7 +17,6 @@
-
diff --git a/web/client/index.html b/web/client/index.html
index 2dba99399b..c0fff91c0c 100644
--- a/web/client/index.html
+++ b/web/client/index.html
@@ -86,13 +86,11 @@
-
-
diff --git a/web/client/indexTemplate.html b/web/client/indexTemplate.html
index bab93731bc..53e736f90c 100644
--- a/web/client/indexTemplate.html
+++ b/web/client/indexTemplate.html
@@ -86,13 +86,11 @@
-
-
diff --git a/web/client/plugins/MapImport.jsx b/web/client/plugins/MapImport.jsx
index 8201aa59e2..ac1f8382f1 100644
--- a/web/client/plugins/MapImport.jsx
+++ b/web/client/plugins/MapImport.jsx
@@ -18,6 +18,7 @@ const {toggleControl} = require('../actions/controls');
const assign = require('object-assign');
const {Glyphicon} = require('react-bootstrap');
+const {mapTypeSelector} = require('../selectors/maptype');
module.exports = {
MapImportPlugin: assign({loadPlugin: (resolve) => {
@@ -32,7 +33,8 @@ module.exports = {
bbox: state.mapimport && state.mapimport.bbox || null,
success: state.mapimport && state.mapimport.success || null,
errors: state.mapimport && state.mapimport.errors || null,
- shapeStyle: state.style || {}
+ shapeStyle: state.style || {},
+ mapType: mapTypeSelector(state)
}
), {
setLayers,
diff --git a/web/client/plugins/Snapshot.jsx b/web/client/plugins/Snapshot.jsx
index 1b559080f6..4d83699eb4 100644
--- a/web/client/plugins/Snapshot.jsx
+++ b/web/client/plugins/Snapshot.jsx
@@ -14,6 +14,7 @@ const {onCreateSnapshot, changeSnapshotState, saveImage, onRemoveSnapshot, onSna
const {mapSelector} = require('../selectors/map');
const {layersSelector} = require('../selectors/layers');
+const {mapTypeSelector} = require('../selectors/maptype');
const {toggleControl} = require('../actions/controls');
@@ -23,12 +24,14 @@ const {Glyphicon} = require('react-bootstrap');
const snapshotSelector = createSelector([
mapSelector,
+ mapTypeSelector,
layersSelector,
(state) => state.controls && state.controls.toolbar && state.controls.toolbar.active === "snapshot" || state.controls.snapshot && state.controls.snapshot.enabled,
(state) => state.browser,
(state) => state.snapshot || {queue: []}
-], (map, layers, active, browser, snapshot) => ({
+], (map, mapType, layers, active, browser, snapshot) => ({
map,
+ mapType,
layers,
active,
browser,
diff --git a/web/client/plugins/map/openlayers/index.js b/web/client/plugins/map/openlayers/index.js
index 5e025686ff..1986ecdb8d 100644
--- a/web/client/plugins/map/openlayers/index.js
+++ b/web/client/plugins/map/openlayers/index.js
@@ -11,14 +11,14 @@ const addI18NProps = require('../../../components/I18N/enhancers/addI18NProps');
const addFormatNumber = addI18NProps(['formatNumber']);
module.exports = {
- LMap: require('../../../components/map/openlayers/Map'),
- Layer: require('../../../components/map/openlayers/Layer'),
- Feature: require('../../../components/map/openlayers/Feature'),
- Locate: require('../../../components/map/openlayers/Locate'),
- MeasurementSupport: addFormatNumber(require('../../../components/map/openlayers/MeasurementSupport')),
- Overview: require('../../../components/map/openlayers/Overview'),
- ScaleBar: require('../../../components/map/openlayers/ScaleBar'),
- DrawSupport: require('../../../components/map/openlayers/DrawSupport'),
- HighlightFeatureSupport: require('../../../components/map/openlayers/HighlightFeatureSupport'),
- SelectionSupport: require('../../../components/map/openlayers/SelectionSupport')
+ LMap: require('../../../components/map/openlayers/Map').default,
+ Layer: require('../../../components/map/openlayers/Layer').default,
+ Feature: require('../../../components/map/openlayers/Feature').default,
+ Locate: require('../../../components/map/openlayers/Locate').default,
+ MeasurementSupport: addFormatNumber(require('../../../components/map/openlayers/MeasurementSupport').default),
+ Overview: require('../../../components/map/openlayers/Overview').default,
+ ScaleBar: require('../../../components/map/openlayers/ScaleBar').default,
+ DrawSupport: require('../../../components/map/openlayers/DrawSupport').default,
+ HighlightFeatureSupport: require('../../../components/map/openlayers/HighlightFeatureSupport').default,
+ SelectionSupport: require('../../../components/map/openlayers/SelectionSupport').default
};
diff --git a/web/client/reducers/annotations.js b/web/client/reducers/annotations.js
index df3d4ac139..3d537cf302 100644
--- a/web/client/reducers/annotations.js
+++ b/web/client/reducers/annotations.js
@@ -7,8 +7,9 @@
*/
const assign = require('object-assign');
-const ol = require('openlayers');
-const {reproject, reprojectGeoJson, transformLineToArcs} = require('../utils/CoordinatesUtils');
+const {transformLineToArcs} = require('../utils/CoordinatesUtils');
+
+const circle = require('@turf/circle').default;
const {PURGE_MAPINFO_RESULTS} = require('../actions/mapInfo');
const {TOGGLE_CONTROL} = require('../actions/controls');
@@ -75,35 +76,29 @@ function annotations(state = { validationErrors: {} }, action) {
let features;
if (selected.properties.isCircle) {
- let center = !isNil(coordinates) ? validCoordinates[0] : state.selected.properties.center;
+ let centerCoords = !isNil(coordinates) ? validCoordinates[0] : state.selected.properties.center;
selected = assign({}, {...selected, properties: {
- ...state.selected.properties, center, radius: !isNil(radius) ? radius : selected.properties.radius
+ ...state.selected.properties, center: centerCoords, radius: !isNil(radius) ? radius : selected.properties.radius
}});
features = state.editing.features.map(f => {
return f.properties.id === state.selected.properties.id ? selected : f;
});
- selected = {...selected, geometry: {coordinates: center, type: "Circle"}};
- let centerOL;
- let c = [[[]]];
+ selected = { ...selected, geometry: { coordinates: centerCoords, type: "Circle"}};
+ let center;
+ let c = {
+ type: 'Polygon',
+ coordinates: [[[]]]
+ };
// polygonGeom setting
if (validateCoordsArray(selected.properties.center)) {
- centerOL = reproject(selected.properties.center, "EPSG:4326", "EPSG:3857");
- c = ol.geom.Polygon.fromCircle(new ol.geom.Circle([centerOL.x, centerOL.y], radius), 100).getCoordinates();
+ center = selected.properties.center;
+ c = circle(center, radius * 1000, { steps: 100 }).geometry;
} else {
selected = set("properties.center", [], selected);
}
- // need to change the polygon coords after radius changes, but this implementation is ugly. is using ol to do that, maybe we need to refactor this
- let feature = {
- type: "Feature",
- geometry: {
- type: "Polygon",
- coordinates: c
- }
- };
- let projFt = reprojectGeoJson(feature, "EPSG:3857", "EPSG:4326");
- selected = set("properties.polygonGeom", projFt.geometry, selected);
+ selected = set("properties.polygonGeom", c, selected);
} else if (selected.properties.isText) {
let c = !isNil(coordinates) ? validCoordinates[0] : state.selected.geometry.coordinates;
selected = assign({}, {...selected,
@@ -235,20 +230,11 @@ function annotations(state = { validationErrors: {} }, action) {
}), selected);
selected = set("properties.center", action.components[0], selected);
selected = set("geometry.coordinates", action.components[0], selected);
- let center = reproject(selected.properties.center, "EPSG:4326", "EPSG:3857");
// need to change the polygon coords after radius changes
// but this implementation is ugly. is using openlayers to do that and maybe we need to refactor this
- let coordinates = ol.geom.Polygon.fromCircle(new ol.geom.Circle([center.x, center.y], action.radius), 100).getCoordinates();
- let feature = {
- type: "Feature",
- geometry: {
- type: "Polygon",
- coordinates
- }
- };
- let projFt = reprojectGeoJson(feature, "EPSG:3857", "EPSG:4326");
- selected = set("properties.polygonGeom", projFt.geometry, selected);
+ let feature = circle(selected.properties.center, action.radius * 1000, { steps: 100 });
+ selected = set("properties.polygonGeom", feature.geometry, selected);
let ftChangedIndex = findIndex(state.editing.features, (f) => f.properties.id === state.selected.properties.id);
const selectedGeoJSON = set("geometry", selected.properties.polygonGeom, selected);
diff --git a/web/client/simple.html b/web/client/simple.html
index 8a42685c82..ef2cd9af94 100644
--- a/web/client/simple.html
+++ b/web/client/simple.html
@@ -7,11 +7,9 @@
MapStore HomePage
-
-
diff --git a/web/client/utils/DrawSupportUtils.jsx b/web/client/utils/DrawSupportUtils.jsx
deleted file mode 100644
index e6ce24e679..0000000000
--- a/web/client/utils/DrawSupportUtils.jsx
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright 2017, GeoSolutions Sas.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree.
-*/
-
-/**
- * Utils used in DrawSupport for leaflet and openlayers
-*/
-
-const ol = require('openlayers');
-const {isArray} = require('lodash');
-const {reproject} = require('./CoordinatesUtils');
-
-/**
- * Transforms a leaflet bounds object into an array.
- * @prop {object} the bounds
- * @return the array [minx, miny, maxx, maxy]
-*/
-const boundsToOLExtent = (bounds) => {
- return [bounds.getWest(), bounds.getSouth(), bounds.getEast(), bounds.getNorth()];
-};
-
-/**
- * @return a feature extracted from leaflet layer used in queryform
-*/
-const fromLeafletFeatureToQueryform = (layer) => {
- let geoJesonFt = layer.toGeoJSON();
- let bounds = layer.getBounds();
- let extent = boundsToOLExtent(bounds);
- let center = bounds.getCenter();
- let radius = layer.getRadius ? layer.getRadius() : 0;
- let coordinates = geoJesonFt.features[0].geometry.coordinates;
- let projection = "EPSG:4326";
- let type = geoJesonFt.features[0].geometry.type;
-
- // Geometry respect query form panel needs
- return {
- type,
- extent,
- center,
- coordinates,
- radius,
- projection
- };
-};
-const calculateRadius = (center, coordinates) => {
- return isArray(coordinates) && isArray(coordinates[0]) && isArray(coordinates[0][0]) ? Math.sqrt(Math.pow(center[0] - coordinates[0][0][0], 2) + Math.pow(center[1] - coordinates[0][0][1], 2)) : 100;
-};
-
-const transformPolygonToCircle = (feature, mapCrs) => {
-
- if (!feature.getGeometry() || feature.getGeometry().getType() !== "Polygon" || feature.getProperties().center && feature.getProperties().center.length === 0) {
- return feature;
- }
- if (feature.getProperties() && feature.getProperties().isCircle && feature.getProperties().center && feature.getProperties().center[0] && feature.getProperties().center[1]) {
- // center must be a valid point
- const extent = feature.getGeometry().getExtent();
- let center;
- if (feature.getProperties().center) {
- center = reproject(feature.getProperties().center, "EPSG:4326", mapCrs);
- center = [center.x, center.y];
- } else {
- center = ol.extent.getCenter(extent);
- }
- const radius = feature.getProperties().radius || calculateRadius(center, feature.getGeometry().getCoordinates());
- feature.setGeometry(new ol.geom.Circle(center, radius));
- return feature;
- }
- return feature;
-};
-
-module.exports = {
- transformPolygonToCircle,
- boundsToOLExtent,
- fromLeafletFeatureToQueryform
-};
diff --git a/web/client/utils/StyleUtils.js b/web/client/utils/StyleUtils.js
index b417af104c..6b4b517b90 100644
--- a/web/client/utils/StyleUtils.js
+++ b/web/client/utils/StyleUtils.js
@@ -7,7 +7,8 @@
*/
module.exports = (mapType) => {
+ const StyleUtils = require('./' + mapType + '/StyleUtils');
return {
- toVectorStyle: require('./' + mapType + '/StyleUtils')
+ toVectorStyle: StyleUtils.default || StyleUtils
};
};
diff --git a/web/client/utils/VectorStyleUtils.js b/web/client/utils/VectorStyleUtils.js
index 5c29a7417b..cabc8e3e3f 100644
--- a/web/client/utils/VectorStyleUtils.js
+++ b/web/client/utils/VectorStyleUtils.js
@@ -10,6 +10,10 @@ const {isNil} = require('lodash');
const {set} = require('./ImmutableUtils');
const {colorToRgbaStr} = require('./ColorUtils');
const axios = require('axios');
+const SLDParser = require('geostyler-sld-parser').default;
+const StyleParsers = {
+ sld: new SLDParser()
+};
/**
* checks if there is at least one attrbute in the object
@@ -326,6 +330,10 @@ const createStylesAsync = (styles = []) => {
});
};
+const getStyleParser = (format = 'sld') => {
+ return StyleParsers[format];
+};
+
module.exports = {
getGeometryFunction,
SymbolsStyles,
@@ -348,5 +356,6 @@ module.exports = {
isFillStyle,
getSymbolsStyles,
setSymbolsStyles,
- createStylesAsync
+ createStylesAsync,
+ getStyleParser
};
diff --git a/web/client/utils/VectorTileUtils.js b/web/client/utils/VectorTileUtils.js
new file mode 100644
index 0000000000..09cbfc8803
--- /dev/null
+++ b/web/client/utils/VectorTileUtils.js
@@ -0,0 +1,15 @@
+/*
+ * Copyright 2019, GeoSolutions Sas.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+export const VECTOR_FORMATS = [
+ 'application/vnd.mapbox-vector-tile',
+ 'application/json;type=geojson',
+ 'application/json;type=topojson'
+];
+
+export const isVectorFormat = (format) => VECTOR_FORMATS.indexOf(format) !== -1;
diff --git a/web/client/utils/__tests__/VectorStyleUtils-test.js b/web/client/utils/__tests__/VectorStyleUtils-test.js
index 233afeff2d..ec320ef088 100644
--- a/web/client/utils/__tests__/VectorStyleUtils-test.js
+++ b/web/client/utils/__tests__/VectorStyleUtils-test.js
@@ -29,7 +29,8 @@ const {
createSvgUrl,
createStylesAsync,
setSymbolsStyles,
- getSymbolsStyles
+ getSymbolsStyles,
+ getStyleParser
} = require("../VectorStyleUtils");
const LENGTH_OF_OBJECT_DATA_URL = "blob:http://localhost:9876/87844744-f879-4f5b-90bc-2cc6e70ba3cd".length;
@@ -406,4 +407,10 @@ describe("VectorStyleUtils ", () => {
expect(results[1].fillColor).toBe("#FF00FF");
});
});
+ it('getStyleParser returns parsers for supported style formats', () => {
+ expect(getStyleParser('sld')).toExist();
+ expect(getStyleParser('sld').readStyle).toExist();
+ expect(getStyleParser('sld').writeStyle).toExist();
+ expect(getStyleParser('css')).toNotExist();
+ });
});
diff --git a/web/client/utils/__tests__/VectorTileUtils-test.js b/web/client/utils/__tests__/VectorTileUtils-test.js
new file mode 100644
index 0000000000..26c0de691a
--- /dev/null
+++ b/web/client/utils/__tests__/VectorTileUtils-test.js
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2019, GeoSolutions Sas.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+import expect from 'expect';
+import { isVectorFormat } from '../VectorTileUtils';
+
+describe('VectorTileUtils', () => {
+ it('test isVectorFormat with vector formats', () => {
+ const MVT = 'application/vnd.mapbox-vector-tile';
+ expect(isVectorFormat(MVT)).toBe(true);
+
+ const GeoJSON = 'application/json;type=geojson';
+ expect(isVectorFormat(GeoJSON)).toBe(true);
+
+ const TopoJSON = 'application/json;type=topojson';
+ expect(isVectorFormat(TopoJSON)).toBe(true);
+ });
+ it('test isVectorFormat with image formats', () => {
+ const PNG = 'image/png';
+ expect(isVectorFormat(PNG)).toBe(false);
+
+ const PNG8 = 'image/png8';
+ expect(isVectorFormat(PNG8)).toBe(false);
+
+ const JPEG = 'image/jpeg';
+ expect(isVectorFormat(JPEG)).toBe(false);
+
+ const GIF = 'image/gif';
+ expect(isVectorFormat(GIF)).toBe(false);
+ });
+});
diff --git a/web/client/utils/leaflet/DrawSupportUtils.js b/web/client/utils/leaflet/DrawSupportUtils.js
new file mode 100644
index 0000000000..673100500d
--- /dev/null
+++ b/web/client/utils/leaflet/DrawSupportUtils.js
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2017, GeoSolutions Sas.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree.
+*/
+
+/**
+ * Utils used in DrawSupport for leaflet
+*/
+
+/**
+ * Transforms a leaflet bounds object into an array.
+ * @prop {object} the bounds
+ * @return the array [minx, miny, maxx, maxy]
+*/
+export const boundsToOLExtent = (bounds) => {
+ return [bounds.getWest(), bounds.getSouth(), bounds.getEast(), bounds.getNorth()];
+};
+
+/**
+ * @return a feature extracted from leaflet layer used in queryform
+*/
+export const fromLeafletFeatureToQueryform = (layer) => {
+ let geoJesonFt = layer.toGeoJSON();
+ let bounds = layer.getBounds();
+ let extent = boundsToOLExtent(bounds);
+ let center = bounds.getCenter();
+ let radius = layer.getRadius ? layer.getRadius() : 0;
+ let coordinates = geoJesonFt.features[0].geometry.coordinates;
+ let projection = "EPSG:4326";
+ let type = geoJesonFt.features[0].geometry.type;
+
+ // Geometry respect query form panel needs
+ return {
+ type,
+ extent,
+ center,
+ coordinates,
+ radius,
+ projection
+ };
+};
+
diff --git a/web/client/utils/__tests__/DrawSupportUtils-test.js b/web/client/utils/leaflet/__tests__/DrawSupportUtils-test.js
similarity index 100%
rename from web/client/utils/__tests__/DrawSupportUtils-test.js
rename to web/client/utils/leaflet/__tests__/DrawSupportUtils-test.js
diff --git a/web/client/utils/leaflet/test/WMTS-test.js b/web/client/utils/leaflet/__tests__/WMTS-test.js
similarity index 100%
rename from web/client/utils/leaflet/test/WMTS-test.js
rename to web/client/utils/leaflet/__tests__/WMTS-test.js
diff --git a/web/client/utils/openlayers/DrawSupportUtils.js b/web/client/utils/openlayers/DrawSupportUtils.js
new file mode 100644
index 0000000000..10c7a5f4fb
--- /dev/null
+++ b/web/client/utils/openlayers/DrawSupportUtils.js
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2019, GeoSolutions Sas.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree.
+*/
+
+import isArray from 'lodash/isArray';
+import { reproject } from '../CoordinatesUtils';
+
+import { getCenter } from 'ol/extent';
+import { Circle } from 'ol/geom';
+
+const calculateRadius = (center, coordinates) => {
+ return isArray(coordinates) && isArray(coordinates[0]) && isArray(coordinates[0][0]) ? Math.sqrt(Math.pow(center[0] - coordinates[0][0][0], 2) + Math.pow(center[1] - coordinates[0][0][1], 2)) : 100;
+};
+
+export const transformPolygonToCircle = (feature, mapCrs) => {
+
+ if (!feature.getGeometry() || feature.getGeometry().getType() !== "Polygon" || feature.getProperties().center && feature.getProperties().center.length === 0) {
+ return feature;
+ }
+ if (feature.getProperties() && feature.getProperties().isCircle && feature.getProperties().center && feature.getProperties().center[0] && feature.getProperties().center[1]) {
+ // center must be a valid point
+ const extent = feature.getGeometry().getExtent();
+ let center;
+ if (feature.getProperties().center) {
+ center = reproject(feature.getProperties().center, "EPSG:4326", mapCrs);
+ center = [center.x, center.y];
+ } else {
+ center = getCenter(extent);
+ }
+ const radius = feature.getProperties().radius || calculateRadius(center, feature.getGeometry().getCoordinates());
+ feature.setGeometry(new Circle(center, radius));
+ return feature;
+ }
+ return feature;
+};
diff --git a/web/client/utils/openlayers/DrawUtils.js b/web/client/utils/openlayers/DrawUtils.js
index 187fae6130..7df5a2f35c 100644
--- a/web/client/utils/openlayers/DrawUtils.js
+++ b/web/client/utils/openlayers/DrawUtils.js
@@ -6,24 +6,26 @@
* LICENSE file in the root directory of this source tree.
*/
-let ol = require('openlayers');
-module.exports = {
- createOLGeometry: ({type, coordinates, radius, center} = {}) => {
- let geometry;
- switch (type) {
- case "Point": { geometry = new ol.geom.Point(coordinates ? coordinates : []); break; }
- case "LineString": { geometry = new ol.geom.LineString(coordinates ? coordinates : []); break; }
- case "MultiPoint": { geometry = new ol.geom.MultiPoint(coordinates ? coordinates : []); break; }
- case "MultiLineString": { geometry = new ol.geom.MultiLineString(coordinates ? coordinates : []); break; }
- case "MultiPolygon": { geometry = new ol.geom.MultiPolygon(coordinates ? coordinates : []); break; }
- // defaults is Polygon / Circle
- default: { geometry = radius && center ?
- ol.geom.Polygon.fromCircle(new ol.geom.Circle([center.x, center.y], radius), 100) : new ol.geom.Polygon(coordinates ? coordinates : []);
- }
+import {Point, LineString, MultiPoint, MultiLineString, Polygon, MultiPolygon, Circle} from 'ol/geom';
+import {fromCircle} from 'ol/geom/Polygon';
+
+export const createOLGeometry = ({ type, coordinates, radius, center } = {}) => {
+ let geometry;
+ switch (type) {
+ case "Point": { geometry = new Point(coordinates ? coordinates : []); break; }
+ case "LineString": { geometry = new LineString(coordinates ? coordinates : []); break; }
+ case "MultiPoint": { geometry = new MultiPoint(coordinates ? coordinates : []); break; }
+ case "MultiLineString": { geometry = new MultiLineString(coordinates ? coordinates : []); break; }
+ case "MultiPolygon": { geometry = new MultiPolygon(coordinates ? coordinates : []); break; }
+ // defaults is Polygon / Circle
+ default: {
+ geometry = radius && center ?
+ fromCircle(new Circle([center.x, center.y], radius), 100) : new Polygon(coordinates ? coordinates : []);
}
- return geometry;
- },
- isPolygon: (feature = {}) => {
- return feature && feature.geometry && feature.geometry.type === "Polygon";
}
+ return geometry;
+};
+
+export const isPolygon = (feature = {}) => {
+ return feature && feature.geometry && feature.geometry.type === "Polygon";
};
diff --git a/web/client/utils/openlayers/Icons.js b/web/client/utils/openlayers/Icons.js
index bca51ba6ba..03880fa5a0 100644
--- a/web/client/utils/openlayers/Icons.js
+++ b/web/client/utils/openlayers/Icons.js
@@ -6,40 +6,45 @@
* LICENSE file in the root directory of this source tree.
*/
-const ol = require('openlayers');
+import MarkerUtils from '../MarkerUtils';
+
+import isArray from 'lodash/isArray';
+import isNumber from 'lodash/isNumber';
+import isNil from 'lodash/isNil';
+
+import {Text, Fill, Style, Icon} from 'ol/style';
-const MarkerUtils = require('../MarkerUtils');
const markers = MarkerUtils.markers.extra;
const extraMarker = markers.icons[0];
const extraMarkerShadow = markers.icons[1];
const glyphs = MarkerUtils.getGlyphs('fontawesome');
-const {isArray, isNumber, isNil} = require('lodash');
-const getHighlishtStyle = ({highlight, rotation = 0}) => (highlight ? [new ol.style.Style({
- text: new ol.style.Text({
+
+const getHighlishtStyle = ({highlight, rotation = 0}) => (highlight ? [new Style({
+ text: new Text({
rotation,
text: '\ue165',
font: '18px mapstore2',
offsetY: -markers.size[1] - 10,
- fill: new ol.style.Fill({color: '#FF00FF'})
+ fill: new Fill({color: '#FF00FF'})
})
})] : []);
-module.exports = {
+export default {
extra: {
getIcon: (options = {}) => {
const rotation = !isNil(options.style && options.style.rotation) ? options.style.rotation : 0;
- return [new ol.style.Style({
- image: new ol.style.Icon(({
+ return [new Style({
+ image: new Icon(({
rotation,
anchor: [12, 12],
anchorXUnits: 'pixels',
anchorYUnits: 'pixels',
src: extraMarkerShadow
}))
- }), new ol.style.Style({
- image: new ol.style.Icon({
+ }), new Style({
+ image: new Icon({
rotation,
src: extraMarker,
anchor: [markers.size[0] / 2, markers.size[1]],
@@ -48,12 +53,12 @@ module.exports = {
size: markers.size,
offset: [markers.colors.indexOf(options.style.iconColor || 'blue') * markers.size[0], markers.shapes.indexOf(options.style.iconShape || 'circle') * markers.size[1]]
}),
- text: new ol.style.Text({
+ text: new Text({
rotation,
text: glyphs[options.style.iconGlyph],
font: '14px FontAwesome',
offsetY: -markers.size[1] * 2 / 3,
- fill: new ol.style.Fill({color: '#FFFFFF'})
+ fill: new Fill({color: '#FFFFFF'})
})
})].concat(getHighlishtStyle(options.style));
@@ -63,8 +68,8 @@ module.exports = {
getIcon: ({style, iconAnchor }) => {
const rotation = !isNil(style && style.rotation) ? style.rotation : 0;
const anchor = style.iconAnchor || iconAnchor;
- let markerStyle = [new ol.style.Style({
- image: new ol.style.Icon(({
+ let markerStyle = [new Style({
+ image: new Icon(({
anchor: anchor || [0.5, 1],
anchorXUnits: style.anchorXUnits || (( anchor || anchor === 0) ? 'pixels' : 'fraction'),
anchorYUnits: style.anchorYUnits || (( anchor || anchor === 0) ? 'pixels' : 'fraction'),
@@ -75,8 +80,8 @@ module.exports = {
}))
})];
if (style.shadowUrl) {
- markerStyle = [new ol.style.Style({
- image: new ol.style.Icon({
+ markerStyle = [new Style({
+ image: new Icon({
anchor: [12, 41],
anchorXUnits: 'pixels',
anchorYUnits: 'pixels',
diff --git a/web/client/utils/openlayers/Layers.js b/web/client/utils/openlayers/Layers.js
index 06e6f8dadc..f2901f2f4a 100644
--- a/web/client/utils/openlayers/Layers.js
+++ b/web/client/utils/openlayers/Layers.js
@@ -8,74 +8,87 @@
const layerTypes = {};
-var Layers = {
+export const registerType = function(type, impl) {
+ layerTypes[type] = impl;
+};
- registerType: function(type, impl) {
- layerTypes[type] = impl;
- },
+export const createLayer = function(type, options, map, mapId) {
+ var layerCreator = layerTypes[type];
+ if (layerCreator) {
+ return layerCreator.create(options, map, mapId);
+ }
+ return null;
+};
- createLayer: function(type, options, map, mapId) {
- var layerCreator = layerTypes[type];
- if (layerCreator) {
- return layerCreator.create(options, map, mapId);
+export const updateLayer = function(type, layer, newOptions, oldOptions, map, mapId) {
+ var layerCreator = layerTypes[type];
+ if (layerCreator && layerCreator.update) {
+ return layerCreator.update(layer, newOptions, oldOptions, map, mapId);
+ } else if (oldOptions && layer && layer.getSource() && layer.getSource().updateParams) {
+ // old method, keept for compatibility.
+ // TODO move it in specific layerCreator where possibile
+ let changed = false;
+ if (oldOptions.params && newOptions.params) {
+ changed = Object.keys(oldOptions.params).reduce((found, param) => {
+ if (newOptions.params[param] !== oldOptions.params[param]) {
+ return true;
+ }
+ return found;
+ }, false);
+ } else if (!oldOptions.params && newOptions.params) {
+ changed = true;
}
- return null;
- },
- updateLayer: function(type, layer, newOptions, oldOptions, map, mapId) {
- var layerCreator = layerTypes[type];
- if (layerCreator && layerCreator.update) {
- return layerCreator.update(layer, newOptions, oldOptions, map, mapId);
- } else if (oldOptions && layer && layer.getSource() && layer.getSource().updateParams) {
- // old method, keept for compatibility.
- // TODO move it in specific layerCreator where possibile
- let changed = false;
- if (oldOptions.params && newOptions.params) {
- changed = Object.keys(oldOptions.params).reduce((found, param) => {
- if (newOptions.params[param] !== oldOptions.params[param]) {
- return true;
- }
- return found;
- }, false);
- } else if (!oldOptions.params && newOptions.params) {
- changed = true;
- }
- if (changed) {
- layer.getSource().updateParams(newOptions.params);
- }
- }
- },
- removeLayer: function(type, options, map, mapId, layer) {
- var layerCreator = layerTypes[type];
- if (layerCreator && layerCreator.remove) {
- return layerCreator.remove(options, map, mapId, layer);
- }
- return null;
- },
- renderLayer: function(type, options, map, mapId, layer) {
- var layerCreator = layerTypes[type];
- if (layerCreator && layerCreator.render) {
- return layerCreator.render(options, map, mapId, layer);
- }
- return null;
- },
- isValid(type, layer) {
- var layerCreator = layerTypes[type];
- if (layerCreator && layerCreator.isValid) {
- return layerCreator.isValid(layer);
+ if (changed) {
+ layer.getSource().updateParams(newOptions.params);
}
- return true;
- },
- isSupported(type) {
- return !!layerTypes[type];
- },
- isCompatible(type, options) {
- const layerCreator = layerTypes[type];
- if (layerCreator && layerCreator.isCompatible) {
- return layerCreator.isCompatible(options);
- }
- return true;
}
};
-module.exports = Layers;
+export const removeLayer = function(type, options, map, mapId, layer) {
+ var layerCreator = layerTypes[type];
+ if (layerCreator && layerCreator.remove) {
+ return layerCreator.remove(options, map, mapId, layer);
+ }
+ return null;
+};
+
+export const renderLayer = function(type, options, map, mapId, layer) {
+ var layerCreator = layerTypes[type];
+ if (layerCreator && layerCreator.render) {
+ return layerCreator.render(options, map, mapId, layer);
+ }
+ return null;
+};
+
+export const isValid = function(type, layer) {
+ var layerCreator = layerTypes[type];
+ if (layerCreator && layerCreator.isValid) {
+ return layerCreator.isValid(layer);
+ }
+ return true;
+};
+
+export const isSupported = function(type) {
+ return !!layerTypes[type];
+};
+
+export const isCompatible = function(type, options) {
+ const layerCreator = layerTypes[type];
+ if (layerCreator && layerCreator.isCompatible) {
+ return layerCreator.isCompatible(options);
+ }
+ return true;
+};
+
+export default {
+ registerType,
+ createLayer,
+ updateLayer,
+ removeLayer,
+ renderLayer,
+ isValid,
+ isSupported,
+ isCompatible
+};
+
diff --git a/web/client/utils/openlayers/OlLocate.js b/web/client/utils/openlayers/OlLocate.js
index fd20f7e8f7..7d09ef4e95 100644
--- a/web/client/utils/openlayers/OlLocate.js
+++ b/web/client/utils/openlayers/OlLocate.js
@@ -6,13 +6,26 @@
* LICENSE file in the root directory of this source tree.
*/
-var ol = require('openlayers');
-var popUp = require('./OlPopUp')();
-var assign = require('object-assign');
+import olPopUp from './OlPopUp';
+import assign from 'object-assign';
+import {inherits} from 'ol';
+import BaseObject from 'ol/Object';
+import Overlay from 'ol/Overlay';
+import Feature from 'ol/Feature';
+import VectorSource from 'ol/source/Vector';
+import VectorLayer from 'ol/layer/Vector';
+import Geolocation from 'ol/Geolocation';
+import {Point, Circle} from 'ol/geom';
+import GeometryCollection from 'ol/geom/GeometryCollection';
+import {Style, Fill, Stroke} from 'ol/style';
+import CircleStyle from 'ol/style/Circle';
-var OlLocate = function(map, optOptions) {
- ol.Object.call(this, {state: "DISABLED"});
+const popUp = olPopUp();
+
+
+const OlLocate = function(map, optOptions) {
+ BaseObject.call(this, {state: "DISABLED"});
this.map = map;
let defOptions = {
drawCircle: true, // draw accuracy circle
@@ -41,43 +54,48 @@ var OlLocate = function(map, optOptions) {
};
this.options = assign({}, defOptions, optOptions || {} );
- this.geolocate = new ol.Geolocation({
+ this.geolocate = new Geolocation({
projection: this.map.getView().getProjection(),
trackingOptions: this.options.locateOptions
});
- this.geolocate.on('change:position', this._updatePosFt, this);
+ this.updateHandler = this._updatePosFt.bind(this);
+ this.geolocate.on('change:position', this.updateHandler);
this.popup = popUp;
this.popup.hidden = true;
this.popCnt = popUp.getElementsByClassName("ol-popup-cnt")[0];
- this.overlay = new ol.Overlay({
+ this.overlay = new Overlay({
element: this.popup,
positioning: 'top-center',
stopEvent: false
});
- this.layer = new ol.layer.Vector({
- source: new ol.source.Vector({useSpatialIndex: false})});
- this.posFt = new ol.Feature({
+ this.layer = new VectorLayer({
+ source: new VectorSource({useSpatialIndex: false})});
+ this.posFt = new Feature({
geometry: this.geolocate.getAccuracyGeometry(),
name: 'position',
id: '_locate-pos'});
this.posFt.setStyle(this.options.locateStyle);
this.layer.getSource().addFeature(this.posFt);
+
+ this.clickHandler = this.mapClick.bind(this);
+ this.stopHandler = this.stopFollow.bind(this);
+ this.errorHandler = this.options.onLocationError.bind(this);
};
-ol.inherits(OlLocate, ol.Object);
+inherits(OlLocate, BaseObject);
OlLocate.prototype.start = function() {
- this.geolocate.on('error', this.options.onLocationError, this);
+ this.geolocate.on('error', this.errorHandler);
this.follow = this.options.follow;
this.geolocate.setTracking(true);
this.layer.setMap(this.map);
this.map.addOverlay(this.overlay);
if (this.options.showPopup) {
- this.map.on('click', this.mapClick, this);
- this.map.on('touch', this.mapClick, this);
+ this.map.on('click', this.clickHandler);
+ this.map.on('touch', this.clickHandler);
}
if (this.options.stopFollowingOnDrag) {
- this.map.on('pointerdrag', this.stopFollow, this);
+ this.map.on('pointerdrag', this.stopHandler);
}
if (!this.p) {
this.set("state", "LOCATING");
@@ -88,24 +106,24 @@ OlLocate.prototype.start = function() {
OlLocate.prototype.startFollow = function() {
this.follow = true;
if (this.options.stopFollowingOnDrag) {
- this.map.on('pointerdrag', this.stopFollow, this);
+ this.map.on('pointerdrag', this.stopHandler);
}
if (this.p) {
this._updatePosFt();
}
};
OlLocate.prototype.stop = function() {
- this.geolocate.un('error', this.options.onLocationError, this);
+ this.geolocate.un('error', this.errorHandler);
this.geolocate.setTracking(false);
this.popup.hide = true;
this.map.removeOverlay(this.overlay);
this.layer.setMap( null );
if (this.options.showPopup) {
- this.map.un('click', this.mapClick);
- this.map.un('touch', this.mapClick);
+ this.map.un('click', this.clickHandler);
+ this.map.un('touch', this.clickHandler);
}
if (this.options.stopFollowingOnDrag && !this.follow) {
- this.map.un('pointerdrag', this.stopFollow, this);
+ this.map.un('pointerdrag', this.stopHandler);
}
this.set("state", "DISABLED");
};
@@ -113,7 +131,7 @@ OlLocate.prototype.stop = function() {
OlLocate.prototype.stopFollow = function() {
this.follow = false;
- this.map.un('pointerdrag', this.stopFollow, this);
+ this.map.un('pointerdrag', this.stopHandler);
this.set("state", "ENABLED");
};
@@ -125,12 +143,12 @@ OlLocate.prototype._updatePosFt = function() {
}
let p = this.geolocate.getPosition();
this.p = p;
- let point = new ol.geom.Point([parseFloat(p[0]), parseFloat(p[1])]);
+ let point = new Point([parseFloat(p[0]), parseFloat(p[1])]);
if (this.options.drawCircle) {
- let accuracy = new ol.geom.Circle([parseFloat(p[0]), parseFloat(p[1])], this.geolocate.getAccuracy());
- this.posFt.setGeometry(new ol.geom.GeometryCollection([point, accuracy]));
+ let accuracy = new Circle([parseFloat(p[0]), parseFloat(p[1])], this.geolocate.getAccuracy());
+ this.posFt.setGeometry(new GeometryCollection([point, accuracy]));
} else {
- this.posFt.setGeometry(new ol.geom.GeometryCollection([point]));
+ this.posFt.setGeometry(new GeometryCollection([point]));
}
if (!this.popup.hidden) {
this._updatePopUpCnt();
@@ -185,14 +203,14 @@ OlLocate.prototype.mapClick = function(evt) {
};
OlLocate.prototype._getDefaultStyles = function() {
- return new ol.style.Style({
- image: new ol.style.Circle({
+ return new Style({
+ image: new CircleStyle({
radius: 6,
- fill: new ol.style.Fill({color: 'rgba(42,147,238,0.7)'}),
- stroke: new ol.style.Stroke({color: 'rgba(19,106,236,1)', width: 2})
+ fill: new Fill({color: 'rgba(42,147,238,0.7)'}),
+ stroke: new Stroke({color: 'rgba(19,106,236,1)', width: 2})
}),
- fill: new ol.style.Fill({color: 'rgba(19,106,236,0.15)'}),
- stroke: new ol.style.Stroke({color: 'rgba(19,106,236,1)', width: 2})
+ fill: new Fill({color: 'rgba(19,106,236,0.15)'}),
+ stroke: new Stroke({color: 'rgba(19,106,236,1)', width: 2})
});
};
@@ -200,4 +218,4 @@ OlLocate.prototype.setStrings = function(newStrings) {
this.options.strings = assign({}, this.options.strings, newStrings);
};
-module.exports = OlLocate;
+export default OlLocate;
diff --git a/web/client/utils/openlayers/OlPopUp.js b/web/client/utils/openlayers/OlPopUp.js
index 3d17d259d5..331eed0985 100644
--- a/web/client/utils/openlayers/OlPopUp.js
+++ b/web/client/utils/openlayers/OlPopUp.js
@@ -6,9 +6,9 @@
* LICENSE file in the root directory of this source tree.
*/
-require('./olPopUp.css');
+import './olPopUp.css';
-let popUp = function() {
+export default function() {
let pop = document.createElement('div');
pop.setAttribute("class", "ol-popup");
let popDismis = document.createElement('a');
@@ -29,5 +29,4 @@ let popUp = function() {
pop.appendChild(popCntWrap);
pop.appendChild(popTipWrap);
return pop;
-};
-module.exports = popUp;
+}
diff --git a/web/client/utils/openlayers/StyleUtils.js b/web/client/utils/openlayers/StyleUtils.js
index c21543bda7..4926ee7944 100644
--- a/web/client/utils/openlayers/StyleUtils.js
+++ b/web/client/utils/openlayers/StyleUtils.js
@@ -5,8 +5,9 @@
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
-const assign = require('object-assign');
-const ol = require('openlayers');
+import assign from 'object-assign';
+import {Style, Stroke, Fill} from 'ol/style';
+import CircleStyle from 'ol/style/Circle';
const getColor = function(color) {
return `rgba(${ color.r }, ${ color.g }, ${ color.b }, ${ color.a })`;
@@ -29,18 +30,18 @@ const toVectorStyle = function(layer, style) {
color: getColor(style.color),
fillColor: getColor(style.fill)
};
- let stroke = new ol.style.Stroke({
+ let stroke = new Stroke({
color: getColor(style.color),
width: style.width
});
- let fill = new ol.style.Fill({
+ let fill = new Fill({
color: getColor(style.fill)
});
switch (getGeomType(layer)) {
case 'Polygon':
case 'MultiPolygon': {
// TODO clear this, it goes in maximum call stack size exceeded
- newLayer.nativeStyle = new ol.style.Style({
+ newLayer.nativeStyle = new Style({
stroke: stroke,
fill: fill
});
@@ -50,7 +51,7 @@ const toVectorStyle = function(layer, style) {
case 'LineString':
{
// TODO clear this, it goes in maximum call stack size exceeded
- newLayer.nativeStyle = new ol.style.Style({
+ newLayer.nativeStyle = new Style({
stroke: stroke
});
break;
@@ -58,8 +59,8 @@ const toVectorStyle = function(layer, style) {
case 'Point':
case 'MultiPoint': {
// TODO clear this, it goes in maximum call stack size exceeded
- newLayer.nativeStyle = new ol.style.Style({
- image: new ol.style.Circle({
+ newLayer.nativeStyle = new Style({
+ image: new CircleStyle({
radius: style.radius,
fill: fill,
stroke: stroke
@@ -68,11 +69,11 @@ const toVectorStyle = function(layer, style) {
}
case 'GeometryCollection': {
// TODO clear this, it goes in maximum call stack size exceeded
- newLayer.nativeStyle = new ol.style.Style({
+ newLayer.nativeStyle = new Style({
radius: style.radius,
stroke: stroke,
fill: fill,
- image: new ol.style.Circle({
+ image: new CircleStyle({
radius: style.radius,
fill: fill,
stroke: stroke
@@ -88,4 +89,4 @@ const toVectorStyle = function(layer, style) {
return newLayer;
};
-module.exports = toVectorStyle;
+export default toVectorStyle;
diff --git a/web/client/utils/openlayers/VectorTileUtils.js b/web/client/utils/openlayers/VectorTileUtils.js
new file mode 100644
index 0000000000..669edf2d6f
--- /dev/null
+++ b/web/client/utils/openlayers/VectorTileUtils.js
@@ -0,0 +1,26 @@
+/*
+ * Copyright 2019, GeoSolutions Sas.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+import MVT from 'ol/format/MVT';
+import GeoJSON from 'ol/format/GeoJSON';
+import TopoJSON from 'ol/format/TopoJSON';
+import { getStyle } from '../../components/map/openlayers/VectorStyle';
+
+export const OL_VECTOR_FORMATS = {
+ 'application/vnd.mapbox-vector-tile': MVT,
+ 'application/json;type=geojson': GeoJSON,
+ 'application/json;type=topojson': TopoJSON
+};
+
+export const applyStyle = (vectorStyle, layer) => {
+ getStyle({ asPromise: true, style: vectorStyle }).then((style) => {
+ layer.setStyle(style);
+ }).catch(() => {
+ // TODO: error notifications
+ });
+};
diff --git a/web/client/utils/openlayers/__tests__/Icons-test.js b/web/client/utils/openlayers/__tests__/Icons-test.js
index cc625f6976..23b6e0d846 100644
--- a/web/client/utils/openlayers/__tests__/Icons-test.js
+++ b/web/client/utils/openlayers/__tests__/Icons-test.js
@@ -6,7 +6,7 @@
* LICENSE file in the root directory of this source tree.
*/
-import * as Icons from '../Icons';
+import Icons from '../Icons';
import expect from 'expect';
describe('Icons openlayers styles', () => {
@@ -39,7 +39,6 @@ describe('Icons openlayers styles', () => {
expect(iconImage.getOrigin()).toEqual([72, 46]);
expect(iconImage.getRotation()).toEqual(1);
expect(iconImage.getSize()).toEqual([36, 46]);
- expect(iconImage.getSnapToPixel()).toEqual(true);
expect(new RegExp("/web/client/components/mapcontrols/annotations/img/markers_default.png").test(iconImage.getSrc())).toEqual(true);
const iconText = icon.getText();
expect(iconText).toExist();
@@ -91,7 +90,6 @@ describe('Icons openlayers styles', () => {
expect(iconImage.getOrigin()).toEqual([0, 0]);
expect(iconImage.getRotation()).toEqual(1);
expect(iconImage.getSize()).toEqual([14, 14]);
- expect(iconImage.getSnapToPixel()).toEqual(true);
});
it('test standard getIcon iconUrl, yes shadow, yes highlight', () => {
const getIcon = Icons.standard.getIcon;
@@ -119,7 +117,6 @@ describe('Icons openlayers styles', () => {
expect(iconImage.getOrigin()).toEqual([0, 0]);
expect(iconImage.getRotation()).toEqual(1);
expect(iconImage.getSize()).toEqual([14, 14]);
- expect(iconImage.getSnapToPixel()).toEqual(true);
const highlightStyle = styles[2];
expect(highlightStyle).toExist();
const highlightStyleText = highlightStyle.getText();
diff --git a/web/client/utils/openlayers/__tests__/VectorTileUtils-test.js b/web/client/utils/openlayers/__tests__/VectorTileUtils-test.js
new file mode 100644
index 0000000000..0d01ef9cf5
--- /dev/null
+++ b/web/client/utils/openlayers/__tests__/VectorTileUtils-test.js
@@ -0,0 +1,18 @@
+/*
+ * Copyright 2019, GeoSolutions Sas.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+import expect from 'expect';
+import { OL_VECTOR_FORMATS } from '../VectorTileUtils';
+
+describe('VectorTileUtils openlayers', () => {
+ it('test OL_VECTOR_FORMATS contains entry for all supported formats', () => {
+ expect(OL_VECTOR_FORMATS['application/vnd.mapbox-vector-tile']).toExist();
+ expect(OL_VECTOR_FORMATS['application/json;type=geojson']).toExist();
+ expect(OL_VECTOR_FORMATS['application/json;type=topojson']).toExist();
+ });
+});
diff --git a/web/client/utils/openlayers/projUtils.js b/web/client/utils/openlayers/projUtils.js
index e82ab99818..547940e9ec 100644
--- a/web/client/utils/openlayers/projUtils.js
+++ b/web/client/utils/openlayers/projUtils.js
@@ -5,13 +5,15 @@
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
-const projUtils = {
+
+import {addProjection, Projection} from 'ol/proj';
+export default {
/**
* function needed in openlayer for adding new projection
*/
- addProjections: function(ol, code, extent, worldExtent, axisOrientation) {
- ol.proj.addProjection(new ol.proj.Projection({
+ addProjections: function(code, extent, worldExtent, axisOrientation) {
+ addProjection(new Projection({
code,
extent,
worldExtent,
@@ -20,5 +22,3 @@ const projUtils = {
);
}
};
-
-module.exports = projUtils;