@trailstash/ultra 4.0.0 → 4.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,62 @@
1
+ ---
2
+ title: Use a fallback image
3
+ description: Use a coalesce expression to display another image when a requested image is not available.
4
+ options:
5
+ center: [-77, 38.75]
6
+ zoom: 5
7
+ style:
8
+ layers:
9
+ - type: symbol
10
+ icon-image:
11
+ - coalesce
12
+ - [image, [concat, "maki:", [get, icon]]]
13
+ - [image, maki:marker]
14
+ extends: https://styles.trailsta.sh/osm-liberty.json
15
+ ---
16
+ {
17
+ "type": "FeatureCollection",
18
+ "features": [
19
+ {
20
+ "type": "Feature",
21
+ "geometry": {
22
+ "type": "Point",
23
+ "coordinates": [
24
+ -77.03238901390978,
25
+ 38.913188059745586
26
+ ]
27
+ },
28
+ "properties": {
29
+ "title": "Washington DC",
30
+ "icon": "monument"
31
+ }
32
+ },
33
+ {
34
+ "type": "Feature",
35
+ "geometry": {
36
+ "type": "Point",
37
+ "coordinates": [
38
+ -79.9959,
39
+ 40.4406
40
+ ]
41
+ },
42
+ "properties": {
43
+ "title": "Pittsburgh",
44
+ "icon": "bridges"
45
+ }
46
+ },
47
+ {
48
+ "type": "Feature",
49
+ "geometry": {
50
+ "type": "Point",
51
+ "coordinates": [
52
+ -76.2859,
53
+ 36.8508
54
+ ]
55
+ },
56
+ "properties": {
57
+ "title": "Norfolk",
58
+ "icon": "harbor"
59
+ }
60
+ }
61
+ ]
62
+ }
@@ -0,0 +1,151 @@
1
+ ---
2
+ title: Display a popup on click
3
+ description: When a user clicks a symbol, show a popup containing more information.
4
+ popupTemplate: '{{ properties.description }}'
5
+ options:
6
+ center: [-77.04, 38.907]
7
+ zoom: 11.15
8
+ style:
9
+ layers:
10
+ - type: symbol
11
+ icon-image:
12
+ - concat
13
+ - 'maki:'
14
+ - [ get, icon ]
15
+ icon-size: 0.75
16
+ icon-halo-width: 2
17
+ icon-halo-color: white
18
+ icon-color: '#5d60be'
19
+ extends: https://styles.trailsta.sh/osm-liberty.json
20
+ ---
21
+ {
22
+ "type": "FeatureCollection",
23
+ "features": [
24
+ {
25
+ "type": "Feature",
26
+ "properties": {
27
+ "description": "<strong>Make it Mount Pleasant</strong><p><a href=\"http://www.mtpleasantdc.com/makeitmtpleasant\" target=\"_blank\" title=\"Opens in a new window\">Make it Mount Pleasant</a> is a handmade and vintage market and afternoon of live entertainment and kids activities. 12:00-6:00 p.m.</p>",
28
+ "icon": "theatre"
29
+ },
30
+ "geometry": {
31
+ "type": "Point",
32
+ "coordinates": [
33
+ -77.038659,
34
+ 38.931567
35
+ ]
36
+ }
37
+ },
38
+ {
39
+ "type": "Feature",
40
+ "properties": {
41
+ "description": "<strong>Mad Men Season Five Finale Watch Party</strong><p>Head to Lounge 201 (201 Massachusetts Avenue NE) Sunday for a <a href=\"http://madmens5finale.eventbrite.com/\" target=\"_blank\" title=\"Opens in a new window\">Mad Men Season Five Finale Watch Party</a>, complete with 60s costume contest, Mad Men trivia, and retro food and drink. 8:00-11:00 p.m. $10 general admission, $20 admission and two hour open bar.</p>",
42
+ "icon": "theatre"
43
+ },
44
+ "geometry": {
45
+ "type": "Point",
46
+ "coordinates": [
47
+ -77.003168,
48
+ 38.894651
49
+ ]
50
+ }
51
+ },
52
+ {
53
+ "type": "Feature",
54
+ "properties": {
55
+ "description": "<strong>Big Backyard Beach Bash and Wine Fest</strong><p>EatBar (2761 Washington Boulevard Arlington VA) is throwing a <a href=\"http://tallulaeatbar.ticketleap.com/2012beachblanket/\" target=\"_blank\" title=\"Opens in a new window\">Big Backyard Beach Bash and Wine Fest</a> on Saturday, serving up conch fritters, fish tacos and crab sliders, and Red Apron hot dogs. 12:00-3:00 p.m. $25.grill hot dogs.</p>",
56
+ "icon": "bar"
57
+ },
58
+ "geometry": {
59
+ "type": "Point",
60
+ "coordinates": [
61
+ -77.090372,
62
+ 38.881189
63
+ ]
64
+ }
65
+ },
66
+ {
67
+ "type": "Feature",
68
+ "properties": {
69
+ "description": "<strong>Ballston Arts & Crafts Market</strong><p>The <a href=\"https://ballstonarts-craftsmarket.blogspot.com/\" target=\"_blank\" title=\"Opens in a new window\">Ballston Arts & Crafts Market</a> sets up shop next to the Ballston metro this Saturday for the first of five dates this summer. Nearly 35 artists and crafters will be on hand selling their wares. 10:00-4:00 p.m.</p>",
70
+ "icon": "art-gallery"
71
+ },
72
+ "geometry": {
73
+ "type": "Point",
74
+ "coordinates": [
75
+ -77.111561,
76
+ 38.882342
77
+ ]
78
+ }
79
+ },
80
+ {
81
+ "type": "Feature",
82
+ "properties": {
83
+ "description": "<strong>Seersucker Bike Ride and Social</strong><p>Feeling dandy? Get fancy, grab your bike, and take part in this year's <a href=\"http://dandiesandquaintrelles.com/2012/04/the-seersucker-social-is-set-for-june-9th-save-the-date-and-start-planning-your-look/\" target=\"_blank\" title=\"Opens in a new window\">Seersucker Social</a> bike ride from Dandies and Quaintrelles. After the ride enjoy a lawn party at Hillwood with jazz, cocktails, paper hat-making, and more. 11:00-7:00 p.m.</p>",
84
+ "icon": "bicycle"
85
+ },
86
+ "geometry": {
87
+ "type": "Point",
88
+ "coordinates": [
89
+ -77.052477,
90
+ 38.943951
91
+ ]
92
+ }
93
+ },
94
+ {
95
+ "type": "Feature",
96
+ "properties": {
97
+ "description": "<strong>Capital Pride Parade</strong><p>The annual <a href=\"https://www.capitalpride.org/parade\" target=\"_blank\" title=\"Opens in a new window\">Capital Pride Parade</a> makes its way through Dupont this Saturday. 4:30 p.m. Free.</p>",
98
+ "icon": "rocket"
99
+ },
100
+ "geometry": {
101
+ "type": "Point",
102
+ "coordinates": [
103
+ -77.043444,
104
+ 38.909664
105
+ ]
106
+ }
107
+ },
108
+ {
109
+ "type": "Feature",
110
+ "properties": {
111
+ "description": "<strong>Muhsinah</strong><p>Jazz-influenced hip hop artist <a href=\"https://www.muhsinah.com\" target=\"_blank\" title=\"Opens in a new window\">Muhsinah</a> plays the <a href=\"https://www.blackcatdc.com\">Black Cat</a> (1811 14th Street NW) tonight with <a href=\"https://www.exitclov.com\" target=\"_blank\" title=\"Opens in a new window\">Exit Clov</a> and <a href=\"https://godsilla.bandcamp.com\" target=\"_blank\" title=\"Opens in a new window\">Gods’illa</a>. 9:00 p.m. $12.</p>",
112
+ "icon": "music"
113
+ },
114
+ "geometry": {
115
+ "type": "Point",
116
+ "coordinates": [
117
+ -77.031706,
118
+ 38.914581
119
+ ]
120
+ }
121
+ },
122
+ {
123
+ "type": "Feature",
124
+ "properties": {
125
+ "description": "<strong>A Little Night Music</strong><p>The Arlington Players' production of Stephen Sondheim's <a href=\"http://www.thearlingtonplayers.org/drupal-6.20/node/4661/show\" target=\"_blank\" title=\"Opens in a new window\"><em>A Little Night Music</em></a> comes to the Kogod Cradle at The Mead Center for American Theater (1101 6th Street SW) this weekend and next. 8:00 p.m.</p>",
126
+ "icon": "music"
127
+ },
128
+ "geometry": {
129
+ "type": "Point",
130
+ "coordinates": [
131
+ -77.020945,
132
+ 38.878241
133
+ ]
134
+ }
135
+ },
136
+ {
137
+ "type": "Feature",
138
+ "properties": {
139
+ "description": "<strong>Truckeroo</strong><p><a href=\"http://www.truckeroodc.com/www/\" target=\"_blank\">Truckeroo</a> brings dozens of food trucks, live music, and games to half and M Street SE (across from Navy Yard Metro Station) today from 11:00 a.m. to 11:00 p.m.</p>",
140
+ "icon": "music"
141
+ },
142
+ "geometry": {
143
+ "type": "Point",
144
+ "coordinates": [
145
+ -77.007481,
146
+ 38.876516
147
+ ]
148
+ }
149
+ }
150
+ ]
151
+ }
@@ -0,0 +1,148 @@
1
+ ---
2
+ title: Display a popup on hover
3
+ description: When a user hovers over a custom marker, show a popup containing more information.
4
+ popupTemplate: '{{ properties.description }}'
5
+ options:
6
+ center: [-77.04, 38.907]
7
+ zoom: 11.15
8
+ popupOnHover: true
9
+ style:
10
+ layers:
11
+ - type: symbol
12
+ icon-image: maki:marker
13
+ icon-halo-width: 2
14
+ icon-halo-color: white
15
+ icon-color: '#95befa'
16
+ extends: https://styles.trailsta.sh/osm-liberty.json
17
+ ---
18
+ {
19
+ "type": "FeatureCollection",
20
+ "features": [
21
+ {
22
+ "type": "Feature",
23
+ "properties": {
24
+ "description": "<strong>Make it Mount Pleasant</strong><p><a href=\"http://www.mtpleasantdc.com/makeitmtpleasant\" target=\"_blank\" title=\"Opens in a new window\">Make it Mount Pleasant</a> is a handmade and vintage market and afternoon of live entertainment and kids activities. 12:00-6:00 p.m.</p>",
25
+ "icon": "theatre"
26
+ },
27
+ "geometry": {
28
+ "type": "Point",
29
+ "coordinates": [
30
+ -77.038659,
31
+ 38.931567
32
+ ]
33
+ }
34
+ },
35
+ {
36
+ "type": "Feature",
37
+ "properties": {
38
+ "description": "<strong>Mad Men Season Five Finale Watch Party</strong><p>Head to Lounge 201 (201 Massachusetts Avenue NE) Sunday for a <a href=\"http://madmens5finale.eventbrite.com/\" target=\"_blank\" title=\"Opens in a new window\">Mad Men Season Five Finale Watch Party</a>, complete with 60s costume contest, Mad Men trivia, and retro food and drink. 8:00-11:00 p.m. $10 general admission, $20 admission and two hour open bar.</p>",
39
+ "icon": "theatre"
40
+ },
41
+ "geometry": {
42
+ "type": "Point",
43
+ "coordinates": [
44
+ -77.003168,
45
+ 38.894651
46
+ ]
47
+ }
48
+ },
49
+ {
50
+ "type": "Feature",
51
+ "properties": {
52
+ "description": "<strong>Big Backyard Beach Bash and Wine Fest</strong><p>EatBar (2761 Washington Boulevard Arlington VA) is throwing a <a href=\"http://tallulaeatbar.ticketleap.com/2012beachblanket/\" target=\"_blank\" title=\"Opens in a new window\">Big Backyard Beach Bash and Wine Fest</a> on Saturday, serving up conch fritters, fish tacos and crab sliders, and Red Apron hot dogs. 12:00-3:00 p.m. $25.grill hot dogs.</p>",
53
+ "icon": "bar"
54
+ },
55
+ "geometry": {
56
+ "type": "Point",
57
+ "coordinates": [
58
+ -77.090372,
59
+ 38.881189
60
+ ]
61
+ }
62
+ },
63
+ {
64
+ "type": "Feature",
65
+ "properties": {
66
+ "description": "<strong>Ballston Arts & Crafts Market</strong><p>The <a href=\"https://ballstonarts-craftsmarket.blogspot.com/\" target=\"_blank\" title=\"Opens in a new window\">Ballston Arts & Crafts Market</a> sets up shop next to the Ballston metro this Saturday for the first of five dates this summer. Nearly 35 artists and crafters will be on hand selling their wares. 10:00-4:00 p.m.</p>",
67
+ "icon": "art-gallery"
68
+ },
69
+ "geometry": {
70
+ "type": "Point",
71
+ "coordinates": [
72
+ -77.111561,
73
+ 38.882342
74
+ ]
75
+ }
76
+ },
77
+ {
78
+ "type": "Feature",
79
+ "properties": {
80
+ "description": "<strong>Seersucker Bike Ride and Social</strong><p>Feeling dandy? Get fancy, grab your bike, and take part in this year's <a href=\"http://dandiesandquaintrelles.com/2012/04/the-seersucker-social-is-set-for-june-9th-save-the-date-and-start-planning-your-look/\" target=\"_blank\" title=\"Opens in a new window\">Seersucker Social</a> bike ride from Dandies and Quaintrelles. After the ride enjoy a lawn party at Hillwood with jazz, cocktails, paper hat-making, and more. 11:00-7:00 p.m.</p>",
81
+ "icon": "bicycle"
82
+ },
83
+ "geometry": {
84
+ "type": "Point",
85
+ "coordinates": [
86
+ -77.052477,
87
+ 38.943951
88
+ ]
89
+ }
90
+ },
91
+ {
92
+ "type": "Feature",
93
+ "properties": {
94
+ "description": "<strong>Capital Pride Parade</strong><p>The annual <a href=\"https://www.capitalpride.org/parade\" target=\"_blank\" title=\"Opens in a new window\">Capital Pride Parade</a> makes its way through Dupont this Saturday. 4:30 p.m. Free.</p>",
95
+ "icon": "rocket"
96
+ },
97
+ "geometry": {
98
+ "type": "Point",
99
+ "coordinates": [
100
+ -77.043444,
101
+ 38.909664
102
+ ]
103
+ }
104
+ },
105
+ {
106
+ "type": "Feature",
107
+ "properties": {
108
+ "description": "<strong>Muhsinah</strong><p>Jazz-influenced hip hop artist <a href=\"https://www.muhsinah.com\" target=\"_blank\" title=\"Opens in a new window\">Muhsinah</a> plays the <a href=\"https://www.blackcatdc.com\">Black Cat</a> (1811 14th Street NW) tonight with <a href=\"https://www.exitclov.com\" target=\"_blank\" title=\"Opens in a new window\">Exit Clov</a> and <a href=\"https://godsilla.bandcamp.com\" target=\"_blank\" title=\"Opens in a new window\">Gods’illa</a>. 9:00 p.m. $12.</p>",
109
+ "icon": "music"
110
+ },
111
+ "geometry": {
112
+ "type": "Point",
113
+ "coordinates": [
114
+ -77.031706,
115
+ 38.914581
116
+ ]
117
+ }
118
+ },
119
+ {
120
+ "type": "Feature",
121
+ "properties": {
122
+ "description": "<strong>A Little Night Music</strong><p>The Arlington Players' production of Stephen Sondheim's <a href=\"http://www.thearlingtonplayers.org/drupal-6.20/node/4661/show\" target=\"_blank\" title=\"Opens in a new window\"><em>A Little Night Music</em></a> comes to the Kogod Cradle at The Mead Center for American Theater (1101 6th Street SW) this weekend and next. 8:00 p.m.</p>",
123
+ "icon": "music"
124
+ },
125
+ "geometry": {
126
+ "type": "Point",
127
+ "coordinates": [
128
+ -77.020945,
129
+ 38.878241
130
+ ]
131
+ }
132
+ },
133
+ {
134
+ "type": "Feature",
135
+ "properties": {
136
+ "description": "<strong>Truckeroo</strong><p><a href=\"http://www.truckeroodc.com/www/\" target=\"_blank\">Truckeroo</a> brings dozens of food trucks, live music, and games to half and M Street SE (across from Navy Yard Metro Station) today from 11:00 a.m. to 11:00 p.m.</p>",
137
+ "icon": "music"
138
+ },
139
+ "geometry": {
140
+ "type": "Point",
141
+ "coordinates": [
142
+ -77.007481,
143
+ 38.876516
144
+ ]
145
+ }
146
+ }
147
+ ]
148
+ }
package/cli/build.js CHANGED
@@ -46,6 +46,7 @@ export const buildOptions = (config, watch = false) => ({
46
46
  },
47
47
  alias: {
48
48
  "ultra-config": config,
49
+ "node:events": "node-events", // esri-dump support
49
50
  },
50
51
  plugins: [
51
52
  copy({
@@ -6,6 +6,7 @@ import { toQueryParams } from "../lib/queryParams.js";
6
6
  import { version } from "../package.json";
7
7
  import { version as maplibreVersion } from "maplibre-gl/package.json";
8
8
  import { version as osmtogeojsonVersion } from "osmtogeojson/package.json";
9
+ import { version as esridumpVersion } from "esri-dump/package.json";
9
10
 
10
11
  const help = `# Introduction
11
12
 
@@ -129,7 +130,7 @@ export class HelpModal extends HTMLElement {
129
130
  this.queryProviders.osmjson ||
130
131
  this.queryProviders.osmxml
131
132
  ? `<li>
132
- OSM to GeoJSON conversion powered by
133
+ Overpass &amp; OSM support powered by
133
134
  <a target="_blank" href="https://github.com/tyrasd/osmtogeojson"
134
135
  >osmtogeojson</a
135
136
  > <code>${osmtogeojsonVersion}</code>
@@ -142,13 +143,24 @@ export class HelpModal extends HTMLElement {
142
143
  this.queryProviders.tcx ||
143
144
  this.queryProviders.kml
144
145
  ? `<li>
145
- KML/GPX/TCX to GeoJSON conversion powered by
146
+ KML/GPX/TCX support powered by
146
147
  <a target="_blank" href="https://github.com/placemark/togeojson"
147
148
  >@tmcw/togeojson</a
148
149
  >
149
150
  </li>`
150
151
  : ""
151
152
  }
153
+
154
+ ${
155
+ this.queryProviders.esri
156
+ ? `<li>
157
+ Esri support powered by
158
+ <a target="_blank" href="https://github.com/openaddresses/esri-dump"
159
+ >esri-dump</a
160
+ > <code>${esridumpVersion}</code>
161
+ </li>`
162
+ : ""
163
+ }
152
164
  </ul>
153
165
  </div>
154
166
  `,
package/docs/resources.md CHANGED
@@ -78,6 +78,12 @@ appropriate headers yourself.
78
78
  The [Overture foundation](https://overturemaps.org/) makes map data derived from various sources
79
79
  available. It needs to be processed and hosted before use with Ultra.
80
80
 
81
+ ### Esri
82
+
83
+ mappingsupport.com maintains an excellent list of ArcGIS REST servers:
84
+
85
+ https://mappingsupport.com/p/surf_gis/list-federal-state-county-city-GIS-servers.pdf
86
+
81
87
  ## Base Style resources
82
88
 
83
89
  ### TrailStash Style Server
package/docs/yaml.md CHANGED
@@ -27,7 +27,7 @@ server: https://overpass.private.coffee/api/
27
27
  ---
28
28
  ```
29
29
 
30
- <small>Only applies to Overpass queries.</small>
30
+ <small>Only applies to Overpass, SPARQL, & Esri.</small>
31
31
 
32
32
  ## `popupTemplate`
33
33
 
@@ -40,6 +40,16 @@ popupTemplate: "{{type}} {{id}} - {{tags.name}}"
40
40
  ---
41
41
  ```
42
42
 
43
+ ## `popupOnHover`
44
+
45
+ Show the features inspection popup on hover rather than on click.
46
+
47
+ ```
48
+ ---
49
+ popupOnHover: true
50
+ ---
51
+ ```
52
+
43
53
  ## `type`
44
54
 
45
55
  Specify the type of source in the query.
@@ -55,6 +65,7 @@ Automatically detects and chooses the right query provider out of the following:
55
65
  - `kml`
56
66
  - `gpx`
57
67
  - `tcx`
68
+ - `esri`
58
69
  - `vector`
59
70
  - `raster`
60
71
  - `raw`
@@ -182,6 +193,23 @@ Detected if
182
193
 
183
194
  - Parses as XML and contains a top level `tcx` tag
184
195
 
196
+ ### `esri`
197
+
198
+ Load vector features from an Esri FeatureServer or MapServer.
199
+
200
+ Detected if
201
+
202
+ - A URL ending in `/FeatureServer/NUMBER` or `/MapServer/NUMBER`
203
+
204
+ *Simple usage*
205
+
206
+ To load all features in a layer, specify the layer URL on the EsriServer as the query text
207
+
208
+ *Advanced usage*
209
+
210
+ To specify query parameters, specify them as the query text using YAML encoding. Specify the layer
211
+ URL using [`server`](#server).
212
+
185
213
  ### `raw`
186
214
 
187
215
  A full [MapLibre Source](https://maplibre.org/maplibre-style-spec/sources/) as JSON or YAML.
package/index.js CHANGED
@@ -22,6 +22,9 @@ import { FontAwesomeIcon } from "./components/fontawesome-icon.js";
22
22
  import { ButtonModal } from "./components/button-modal.js";
23
23
  import { MapPopup } from "./components/map-popup.js";
24
24
 
25
+ // esri dump expects to be running in a node env, so add global process.env
26
+ window.process = { env: {} };
27
+
25
28
  // Allow pages in new windows securely
26
29
  DOMPurify.addHook("afterSanitizeAttributes", function (node) {
27
30
  // set all elements owning target to target=_blank
package/lib/queryMap.js CHANGED
@@ -45,7 +45,11 @@ export const handleMouseClick = (
45
45
  for (const f of features) {
46
46
  distinctFeatures[f.id] = f;
47
47
  }
48
- if (equal(currentFeatures, distinctFeatures) && currentPopup && e.type !== "click") {
48
+ if (
49
+ equal(currentFeatures, distinctFeatures) &&
50
+ currentPopup &&
51
+ e.type !== "click"
52
+ ) {
49
53
  currentPopup.setLngLat(e.lngLat);
50
54
  return;
51
55
  }
@@ -0,0 +1,89 @@
1
+ import EsriDump from "esri-dump";
2
+
3
+ const layers = (source) => [
4
+ {
5
+ id: `${source}-geojson-fill`,
6
+ type: "fill",
7
+ source,
8
+ filter: ["==", ["geometry-type"], "Polygon"],
9
+ paint: {
10
+ "fill-color": "#555",
11
+ "fill-opacity": 0.3,
12
+ },
13
+ },
14
+ {
15
+ id: `${source}-geojson-fill-outline`,
16
+ type: "line",
17
+ source,
18
+ filter: ["==", ["geometry-type"], "Polygon"],
19
+ layout: { "line-cap": "round" },
20
+ paint: {
21
+ "line-color": "#555",
22
+ "line-width": 2,
23
+ "line-opacity": 1,
24
+ },
25
+ },
26
+ {
27
+ id: `${source}-geojson-line-2`,
28
+ type: "line",
29
+ source,
30
+ filter: ["==", ["geometry-type"], "LineString"],
31
+ layout: { "line-cap": "round" },
32
+ paint: {
33
+ "line-color": "#555",
34
+ "line-width": 2,
35
+ "line-opacity": 1,
36
+ },
37
+ },
38
+ {
39
+ id: `${source}-geojson-point`,
40
+ type: "circle",
41
+ source,
42
+ filter: ["==", ["geometry-type"], "Point"],
43
+ paint: {
44
+ "circle-stroke-width": 2,
45
+ "circle-stroke-color": "#555",
46
+ "circle-color": "rgba(85, 85, 85, 0.3)",
47
+ },
48
+ },
49
+ ];
50
+
51
+ async function detect(query) {
52
+ const url = new URL(query);
53
+ return !!url.pathname.match(/\/(Map|Feature)Server\/\d+$/);
54
+ }
55
+
56
+ export default {
57
+ source: function geojson(query, controller) {
58
+ return new Promise((resolve, reject) => {
59
+ const esri = new EsriDump(query);
60
+
61
+ const data = {
62
+ type: "FeatureCollection",
63
+ features: [],
64
+ };
65
+
66
+ esri.fetch();
67
+
68
+ esri.on("type", (type) => {
69
+ //Emitted before any data events
70
+ //emits one of
71
+ // - `MapServer'
72
+ // - `FeatureServer'
73
+ });
74
+
75
+ esri.on("feature", (feature) => {
76
+ data.features.push(feature);
77
+ });
78
+
79
+ esri.on("done", () => {
80
+ resolve({ type: "geojson", data, generateId: true });
81
+ });
82
+
83
+ esri.on("error", reject);
84
+ });
85
+ },
86
+ fitBounds: true,
87
+ layers,
88
+ detect,
89
+ };
@@ -10,6 +10,7 @@ import kml from "./kml.js";
10
10
  import gpx from "./gpx.js";
11
11
  import tcx from "./tcx.js";
12
12
  import raw from "./raw.js";
13
+ import esri from "./esri.js";
13
14
 
14
15
  export const all = {
15
16
  overpass,
@@ -21,6 +22,7 @@ export const all = {
21
22
  tcx,
22
23
  osmxml,
23
24
  osmjson,
25
+ esri,
24
26
  raster,
25
27
  vector,
26
28
  raw,
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "4.0.0",
6
+ "version": "4.1.1",
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": {
@@ -64,12 +64,14 @@
64
64
  "dompurify": "^3.1.7",
65
65
  "esbuild": "^0.24.0",
66
66
  "esbuild-plugin-copy": "^2.1.1",
67
+ "esri-dump": "^5.4.0",
67
68
  "fast-deep-equal": "^3.1.3",
68
69
  "liquidjs": "^10.17.0",
69
70
  "lodash.pick": "^4.4.0",
70
71
  "lz-string": "^1.5.0",
71
72
  "maplibre-gl": "^5.0.1",
72
73
  "marked": "^14.1.2",
74
+ "node-events": "^0.0.2",
73
75
  "normalize.css": "^8.0.1",
74
76
  "osmtogeojson": "^3.0.0-beta.5",
75
77
  "pmtiles": "^3.2.0",