@nextgis/ngw-leaflet 4.0.0-alpha.6 → 4.0.0-rc.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 +34 -5
- package/lib/ngw-leaflet.esm-browser.js +3 -2
- package/lib/ngw-leaflet.esm-browser.js.map +1 -1
- package/lib/ngw-leaflet.esm-browser.prod.js +1 -1
- package/lib/ngw-leaflet.esm-browser.prod.js.map +1 -1
- package/lib/ngw-leaflet.esm-bundler.js +1 -1
- package/lib/ngw-leaflet.global.js +3 -2
- package/lib/ngw-leaflet.global.js.map +1 -1
- package/lib/ngw-leaflet.global.prod.js +1 -1
- package/lib/ngw-leaflet.global.prod.js.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -2,9 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
 
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Ready-to-use [Leaflet](https://leafletjs.com)-based map for NextGIS Web.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
This package configures the Leaflet map adapter and includes its styles and
|
|
8
|
+
marker images. Its default export extends `NgwMap`, so the common APIs from
|
|
9
|
+
[`@nextgis/ngw-map`](../ngw-map/README.md) and
|
|
10
|
+
[`@nextgis/webmap`](../webmap/README.md) are available on the map instance.
|
|
8
11
|
|
|
9
12
|
## Installation
|
|
10
13
|
|
|
@@ -45,6 +48,20 @@ jsdelivr
|
|
|
45
48
|
|
|
46
49
|
We recommend linking to a specific version number `/ngw-leaflet@[version]`
|
|
47
50
|
|
|
51
|
+
#### ES module
|
|
52
|
+
|
|
53
|
+
```html
|
|
54
|
+
<script type="module">
|
|
55
|
+
import NgwMap from 'https://cdn.jsdelivr.net/npm/@nextgis/ngw-leaflet@VERSION/lib/ngw-leaflet.esm-browser.prod.js';
|
|
56
|
+
|
|
57
|
+
const ngwMap = await NgwMap.create({
|
|
58
|
+
baseUrl: 'https://demo.nextgis.com',
|
|
59
|
+
target: 'map',
|
|
60
|
+
resources: [{ resource: 2011, fit: true }],
|
|
61
|
+
});
|
|
62
|
+
</script>
|
|
63
|
+
```
|
|
64
|
+
|
|
48
65
|
### In Node.js
|
|
49
66
|
|
|
50
67
|
```bash
|
|
@@ -56,15 +73,27 @@ npm install leaflet @nextgis/ngw-leaflet
|
|
|
56
73
|
```javascript
|
|
57
74
|
import NgwMap from '@nextgis/ngw-leaflet';
|
|
58
75
|
|
|
59
|
-
const ngwMap =
|
|
76
|
+
const ngwMap = await NgwMap.create({
|
|
60
77
|
baseUrl: 'https://demo.nextgis.com',
|
|
61
78
|
target: 'map',
|
|
62
79
|
qmsId: 448,
|
|
63
|
-
webmapId: 3985
|
|
80
|
+
webmapId: 3985,
|
|
64
81
|
});
|
|
65
82
|
```
|
|
66
83
|
|
|
67
|
-
|
|
84
|
+
Use `new NgwMap(options)` when the instance is needed before initialization is
|
|
85
|
+
complete. Use `NgwMap.create(options)` when subsequent code requires a ready
|
|
86
|
+
map.
|
|
87
|
+
|
|
88
|
+
TypeScript users should generate declarations for the NextGIS Web deployment
|
|
89
|
+
used by the application:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
npx @nextgis/ngw-types-loader https://your-ngw-server.com
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Check out the [API Documentation](https://code-api.nextgis.com/modules/_nextgis_ngw-leaflet.html)
|
|
96
|
+
and the [package architecture guide](../../docs/PACKAGES.md).
|
|
68
97
|
|
|
69
98
|
## Commercial support
|
|
70
99
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Bundle of @nextgis/ngw-leaflet; version: 4.0.0-
|
|
1
|
+
/** Bundle of @nextgis/ngw-leaflet; version: 4.0.0-rc.0; author: NextGIS */
|
|
2
2
|
function getElement(el) {
|
|
3
3
|
if (typeof el === "string") {
|
|
4
4
|
let el_ = document.getElementById(el);
|
|
@@ -20641,6 +20641,7 @@ const _LeafletMapAdapter = class _LeafletMapAdapter {
|
|
|
20641
20641
|
attributionControl: false,
|
|
20642
20642
|
zoomControl: false,
|
|
20643
20643
|
maxBounds: mb ? arrayToBoundsExpression(mb) : void 0,
|
|
20644
|
+
zoomSnap: 0,
|
|
20644
20645
|
maxZoom,
|
|
20645
20646
|
minZoom,
|
|
20646
20647
|
center: center && [center[1], center[0]],
|
|
@@ -21256,7 +21257,7 @@ __publicField$s(_Cache, "instance", {});
|
|
|
21256
21257
|
let Cache = _Cache;
|
|
21257
21258
|
|
|
21258
21259
|
var pkg = {
|
|
21259
|
-
version: "4.0.0-
|
|
21260
|
+
version: "4.0.0-rc.0"};
|
|
21260
21261
|
|
|
21261
21262
|
class AbortError extends Error {
|
|
21262
21263
|
constructor(message = "AbortError") {
|