basemapkit 0.4.1 → 0.5.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/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "basemapkit",
3
3
  "private": false,
4
- "version": "0.4.1",
4
+ "version": "0.5.1",
5
5
  "type": "module",
6
+ "types": "dist/basemapkit.d.ts",
6
7
  "exports": {
7
8
  ".": {
8
9
  "import": "./dist/basemapkit.js",
package/readme.md CHANGED
@@ -249,7 +249,22 @@ getStyle(
249
249
 
250
250
  Note that the corresponding layers are removed from the style and not just made invisible. If hiding POIs or label, the options `sprite` and `glyph` are unnecessary.
251
251
 
252
- ## Getting creative with `buildStyle()`
252
+ ## Globe or Mercator projection 🌐
253
+ By default, the styles available in basempkit are all showing Earth as a globe, but Mercator projection can still be used. use
254
+ The option `globe` (boolean) can be set to `false` in the functions `getStyle()` and `buildStyle()`. Just like that:
255
+
256
+ ```ts
257
+ getStyle(
258
+ "avenue",
259
+ {
260
+ pmtiles: "...",
261
+ sprite: "...",
262
+ glyphs: "...",
263
+ globe: false,
264
+ });
265
+ ```
266
+
267
+ ## Getting creative with `buildStyle()` 🎨
253
268
  In addition to language and hiding POIs/labels, Basmapkit exposes some methods to modify the colors of the original style (`avenue`) to create *presets*. When the style is generated with some non-default `colorEdit`, a brand new Maplibre style is created and can be directly injected into a Maplibre `Map` instance's `.setStyle()` method, or even written as a static json file.
254
269
 
255
270
  ```ts
@@ -351,7 +366,7 @@ And here is the result:
351
366
  You can live play with these on [basemapkit.jnth.io](https://s.jnth.io/s/basemapkit) and selecting the style `🖌️ custom 🎨`.
352
367
  And from this "color editor" were created the built-in styles available below...
353
368
 
354
- ## Available styles
369
+ ## Available styles 📚
355
370
  So far, we mentioned only the **Avenue** style as it's the first and default one, but there are many others! And while **Avenue** takes pride in being a rich yet generalistic style, Basemapkit provides styles that are better suited for **data visualization**, that are minimalistic and leaves room to your own data. And all the styles come with extra *presets*, meaning variants, playing with color and contrasts, but more on this in the next section.
356
371
 
357
372
  ### Base style: `avenue`
@@ -532,7 +547,7 @@ Spectre comes with many extra presets, mostly to change the hue of the coastline
532
547
  - `spectre-negative-yellow`
533
548
  ![](./public/screenshots/spectre-16.jpg)
534
549
 
535
- # Extra API
550
+ # Extra API 🪄
536
551
  The extra API goes beyond just providing style, yet, it's still minimal and only related to "obtain a style as one need it".
537
552
 
538
553
  ## Swapping two layers