Commit 8b9e96d
committed
fix(Map): resolve Stamen tile 401 errors and add free tile providers
Tile Provider Updates:
- Add 3 new free tile providers (no API key required):
- osm-france: French-language OpenStreetMap style
- osm-bw: Black & white monochrome OSM variant
- wikimedia: Wikimedia Foundation tile service
- Update Stamen provider configs to require API keys:
- Mark stamen-toner, stamen-terrain, stamen-watercolor as requiresApiKey: true
- Update URLs with ?api_key={apiKey} parameter
- Update documentation to reflect authentication requirement
Storybook Changes:
- Remove Stamen tile examples from public Storybook demos
- Prevents 401 errors on GitHub Pages deployment
- Stadia Maps allows localhost without auth but requires API keys for production domains
- Update Premium Providers documentation section:
- Add Stamen (via Stadia Maps) with signup link
- Document Geoapify and Thunderforest providers
- Show code examples with tileApiKey prop usage
- Update intro text: 15+ → 18+ tile providers supported
- Add note clarifying that examples show free providers only
Why this fixes the issue:
- Stadia Maps (hosting Stamen tiles) allows unauthenticated localhost requests for development
- Production domains (like GitHub Pages) require API key authentication
- This explains why tiles work locally but return 401 on deployed Storybook
Result:
- Library now supports 18 tile providers (up from 15)
- Public Storybook shows only free providers (no 401 errors)
- Users with API keys can still use premium providers via tileApiKey prop
- Clear documentation on authentication requirements1 parent 8a03ab1 commit 8b9e96d
File tree
2 files changed
+115
-91
lines changed- packages/ui/src/components/Map
2 files changed
+115
-91
lines changedLines changed: 63 additions & 85 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | 113 | | |
117 | 114 | | |
118 | 115 | | |
| |||
134 | 131 | | |
135 | 132 | | |
136 | 133 | | |
137 | | - | |
138 | | - | |
139 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
140 | 138 | | |
141 | 139 | | |
142 | 140 | | |
| |||
230 | 228 | | |
231 | 229 | | |
232 | 230 | | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
301 | | - | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | 231 | | |
309 | 232 | | |
310 | 233 | | |
| |||
460 | 383 | | |
461 | 384 | | |
462 | 385 | | |
463 | | - | |
464 | | - | |
| 386 | + | |
| 387 | + | |
465 | 388 | | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
466 | 437 | | |
467 | | - | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
468 | 446 | | |
469 | 447 | | |
470 | 448 | | |
471 | 449 | | |
472 | 450 | | |
473 | 451 | | |
474 | | - | |
| 452 | + | |
475 | 453 | | |
476 | 454 | | |
477 | 455 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
54 | 57 | | |
55 | 58 | | |
56 | 59 | | |
| |||
96 | 99 | | |
97 | 100 | | |
98 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
99 | 139 | | |
100 | 140 | | |
101 | 141 | | |
| |||
138 | 178 | | |
139 | 179 | | |
140 | 180 | | |
141 | | - | |
| 181 | + | |
| 182 | + | |
142 | 183 | | |
143 | 184 | | |
144 | | - | |
| 185 | + | |
145 | 186 | | |
146 | 187 | | |
147 | 188 | | |
148 | 189 | | |
| 190 | + | |
149 | 191 | | |
150 | 192 | | |
151 | 193 | | |
152 | 194 | | |
153 | | - | |
| 195 | + | |
| 196 | + | |
154 | 197 | | |
155 | 198 | | |
156 | | - | |
| 199 | + | |
157 | 200 | | |
158 | 201 | | |
159 | 202 | | |
160 | 203 | | |
| 204 | + | |
161 | 205 | | |
162 | 206 | | |
163 | 207 | | |
164 | 208 | | |
165 | | - | |
| 209 | + | |
| 210 | + | |
166 | 211 | | |
167 | 212 | | |
168 | | - | |
| 213 | + | |
169 | 214 | | |
170 | 215 | | |
171 | 216 | | |
172 | 217 | | |
| 218 | + | |
173 | 219 | | |
174 | 220 | | |
175 | 221 | | |
| |||
0 commit comments