@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
- nwr[wikidata=Q3551781][type=boundary];
10
- map_to_area -> .a;
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
- const esri = new EsriDump(query);
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
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "4.1.1",
6
+ "version": "4.1.2",
7
7
  "description": "A web based tool for making MapLibre GL maps with data from sources such as Overpass, GeoJSON, GPX, KML, TCX, etc",
8
8
  "main": "index.js",
9
9
  "scripts": {