@trailstash/ultra 4.1.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.
- package/MapLibre-Examples/fallback-image.ultra +62 -0
- package/MapLibre-Examples/popup-on-click.ultra +151 -0
- package/MapLibre-Examples/popup-on-hover.ultra +148 -0
- package/components/help-modal.js +14 -2
- package/docs/assets/MapLibre-Examples/fallback-image.png +0 -0
- package/docs/assets/MapLibre-Examples/popup-on-click.png +0 -0
- package/docs/assets/MapLibre-Examples/popup-on-hover.png +0 -0
- package/docs/yaml.md +29 -1
- package/lib/queryMap.js +5 -1
- package/lib/queryProviders/esri.js +2 -1
- package/package.json +1 -1
|
@@ -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/components/help-modal.js
CHANGED
|
@@ -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
|
-
|
|
133
|
+
Overpass & 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
|
|
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
|
`,
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
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
|
|
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/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 (
|
|
48
|
+
if (
|
|
49
|
+
equal(currentFeatures, distinctFeatures) &&
|
|
50
|
+
currentPopup &&
|
|
51
|
+
e.type !== "click"
|
|
52
|
+
) {
|
|
49
53
|
currentPopup.setLngLat(e.lngLat);
|
|
50
54
|
return;
|
|
51
55
|
}
|
package/package.json
CHANGED