@mapcreator/sdk 0.0.10 → 1.0.0
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/README.md +29 -0
- package/package.json +2 -1
package/README.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
[Mapcreator](https://mapcreator.io/) JavaScript SDK. Renders Mapcreator projects on a [MapLibre](https://maplibre.org/) interactive map.
|
|
2
|
+
|
|
3
|
+
## Installation
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
npm i --save @mapcreator/sdk
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```javascript
|
|
12
|
+
// Import scripts
|
|
13
|
+
import { initMap } from '@mapcreator/sdk';
|
|
14
|
+
|
|
15
|
+
// Import styles
|
|
16
|
+
import '@mapcreator/sdk/dist/mapcreator-sdk.css';
|
|
17
|
+
|
|
18
|
+
// Initialize the map
|
|
19
|
+
const { map } = await initMap({
|
|
20
|
+
container: '<map container element or its id>',
|
|
21
|
+
job: '<interactive map id>',
|
|
22
|
+
accessToken: '<mapcreator access token>',
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
// map is now an instance of MapLibre GL JS:
|
|
26
|
+
//
|
|
27
|
+
// map.setZoom(10);
|
|
28
|
+
// map.getZoom();
|
|
29
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mapcreator/sdk",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": "^24.0.0",
|
|
6
6
|
"npm": "^11.0.0"
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
"@types/d3-geo": "^3.1.0",
|
|
44
44
|
"@types/d3-interpolate": "^3.0.4",
|
|
45
45
|
"@types/d3-scale": "^4.0.9",
|
|
46
|
+
"@types/node": "^25.5.0",
|
|
46
47
|
"@types/topojson-client": "^3.1.5",
|
|
47
48
|
"@vue/eslint-config-prettier": "^10.2.0",
|
|
48
49
|
"@vue/eslint-config-typescript": "^13.0.0",
|