@trailstash/ultra 4.1.1 → 4.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -6,7 +6,6 @@ options:
|
|
|
6
6
|
center: [-77.016, 38.899]
|
|
7
7
|
---
|
|
8
8
|
/* To run for your own city, replace with the wikidata ID for your city below */
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
nwr[highway=bus_stop](area.a);
|
|
9
|
+
area[wikidata=Q3551781][type=boundary] -> .searchArea;
|
|
10
|
+
nwr[highway=bus_stop](area.searchArea);
|
|
12
11
|
out center;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import EsriDump from "esri-dump";
|
|
2
|
+
import YAML from "yaml";
|
|
2
3
|
|
|
3
4
|
const layers = (source) => [
|
|
4
5
|
{
|
|
@@ -54,9 +55,15 @@ async function detect(query) {
|
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
export default {
|
|
57
|
-
source: function geojson(query, controller) {
|
|
58
|
+
source: function geojson(query, controller, { server }) {
|
|
58
59
|
return new Promise((resolve, reject) => {
|
|
59
|
-
|
|
60
|
+
let esri;
|
|
61
|
+
if (server) {
|
|
62
|
+
const params = YAML.parse(query);
|
|
63
|
+
esri = new EsriDump(server, { params });
|
|
64
|
+
} else {
|
|
65
|
+
esri = new EsriDump(query);
|
|
66
|
+
}
|
|
60
67
|
|
|
61
68
|
const data = {
|
|
62
69
|
type: "FeatureCollection",
|
package/package.json
CHANGED