basemapkit 0.5.0 β 0.5.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.
- package/.husky/pre-commit +2 -0
- package/dist/basemapkit.d.ts +2 -1
- package/dist/basemapkit.js +580 -86
- package/dist/basemapkit.js.map +1 -1
- package/package.json +11 -5
- package/readme.md +20 -3
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "basemapkit",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.2",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"types": "dist/basemapkit.d.ts",
|
|
6
7
|
"exports": {
|
|
7
8
|
".": {
|
|
8
9
|
"import": "./dist/basemapkit.js",
|
|
@@ -20,26 +21,31 @@
|
|
|
20
21
|
"map style"
|
|
21
22
|
],
|
|
22
23
|
"homepage": "https://github.com/jonathanlurie/basemapkit",
|
|
24
|
+
"author": "Jonathan Lurie",
|
|
25
|
+
"description": "Maplibre Basemaps for the people! β Basemaps for Protomaps / pmtiles πΊοΈ",
|
|
23
26
|
"scripts": {
|
|
24
27
|
"dev": "vite",
|
|
25
28
|
"build": "tsc && vite build",
|
|
26
29
|
"preview": "vite preview",
|
|
27
30
|
"build-lib": "rm -rf ./dist/* && tsc && vite build -c vite.config-lib.ts",
|
|
28
31
|
"biome": "biome check --max-diagnostics=1000",
|
|
29
|
-
"biome:fix": "biome check --max-diagnostics=1000 --write"
|
|
32
|
+
"biome:fix": "biome check --max-diagnostics=1000 --write",
|
|
33
|
+
"prepare": "husky",
|
|
34
|
+
"type-check": "tsc --noEmit"
|
|
30
35
|
},
|
|
31
36
|
"devDependencies": {
|
|
32
37
|
"@biomejs/biome": "^2.0.0",
|
|
33
38
|
"@types/node": "^24.0.13",
|
|
39
|
+
"husky": "^9.1.7",
|
|
34
40
|
"typescript": "~5.8.3",
|
|
35
41
|
"vite": "^6.3.5",
|
|
36
42
|
"vite-plugin-dts": "^4.5.4"
|
|
37
43
|
},
|
|
38
44
|
"dependencies": {
|
|
39
|
-
"@protomaps/basemaps": "^5.
|
|
45
|
+
"@protomaps/basemaps": "^5.7.2",
|
|
40
46
|
"color": "^5.0.0",
|
|
41
|
-
"maplibre-gl": "^
|
|
42
|
-
"pmtiles": "^4.
|
|
47
|
+
"maplibre-gl": "^6.4.0",
|
|
48
|
+
"pmtiles": "^4.5.0"
|
|
43
49
|
},
|
|
44
50
|
"license": "MIT"
|
|
45
51
|
}
|
package/readme.md
CHANGED
|
@@ -24,8 +24,7 @@ Compatible with <a href="https://maplibre.org/maplibre-gl-js/docs/">Maplibre GL
|
|
|
24
24
|
|  |  |  |
|
|
25
25
|
|  |  |  |
|
|
26
26
|
|  |  |  |
|
|
27
|
-
|
|
28
|
-

|
|
27
|
+
|  |  | |
|
|
29
28
|
|
|
30
29
|
## Getting started π·
|
|
31
30
|
### Install
|
|
@@ -40,7 +39,10 @@ The following example instantiates a Maplibre `Map`, then initializes the Protom
|
|
|
40
39
|
```ts
|
|
41
40
|
import "maplibre-gl/dist/maplibre-gl.css";
|
|
42
41
|
|
|
43
|
-
|
|
42
|
+
// Since Maplibre-gl v6:
|
|
43
|
+
import * as maplibregl from "maplibre-gl";
|
|
44
|
+
import workerUrl from "maplibre-gl/dist/maplibre-gl-worker.mjs?worker&url";
|
|
45
|
+
|
|
44
46
|
import { Protocol } from "pmtiles";
|
|
45
47
|
import { getStyle, getStyleList } from "basemapkit";
|
|
46
48
|
|
|
@@ -547,6 +549,21 @@ Spectre comes with many extra presets, mostly to change the hue of the coastline
|
|
|
547
549
|
- `spectre-negative-yellow`
|
|
548
550
|

|
|
549
551
|
|
|
552
|
+
### Base style: `atmosphere`
|
|
553
|
+
The **Atmosphere** style was first inpired by a [series of post by ECMWF](https://atmosphere.copernicus.eu/lowest-global-biomass-burning-emissions-record-during-first-half-2026) about aerosol spreadings. I like the neutral gray, the very thin borders and coastal line, the very dominant hillshading.
|
|
554
|
+
|
|
555
|
+
The inspo:
|
|
556
|
+

|
|
557
|
+
|
|
558
|
+
```ts
|
|
559
|
+
// Create the style
|
|
560
|
+
const style = getStyle("atmosphere", options);
|
|
561
|
+
```
|
|
562
|
+
[DEMO π](https://basemapkit.jnth.io/?styleid=atmosphere)
|
|
563
|
+
|
|
564
|
+

|
|
565
|
+

|
|
566
|
+
|
|
550
567
|
# Extra API πͺ
|
|
551
568
|
The extra API goes beyond just providing style, yet, it's still minimal and only related to "obtain a style as one need it".
|
|
552
569
|
|