@nextgis/ngw-map 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 +29 -8
- package/lib/ngw-map.cjs.js +1 -1
- package/lib/ngw-map.esm-browser.js +2 -2
- package/lib/ngw-map.esm-browser.prod.js +1 -1
- package/lib/ngw-map.esm-browser.prod.js.map +1 -1
- package/lib/ngw-map.esm-bundler.js +1 -1
- package/lib/ngw-map.global.js +2 -2
- package/lib/ngw-map.global.prod.js +1 -1
- package/lib/ngw-map.global.prod.js.map +1 -1
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -2,21 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
 
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Framework-independent NextGIS Web map class used by `ngw-leaflet`, `ngw-ol`,
|
|
6
|
+
and `ngw-maplibre-gl`.
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
Most applications should import one of those ready-to-use packages. Use
|
|
9
|
+
`@nextgis/ngw-map` directly when creating another map distribution, injecting a
|
|
10
|
+
custom map adapter, or extending the common NextGIS Web behavior.
|
|
8
11
|
|
|
9
|
-
|
|
12
|
+
`NgwMap` extends [`WebMap`](../webmap/README.md), adds an `NgwConnector`, and
|
|
13
|
+
provides NextGIS Web resources, feature requests, identification, selection,
|
|
14
|
+
and extent operations. It also re-exports the public `@nextgis/webmap` API.
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
10
17
|
|
|
11
18
|
```bash
|
|
12
|
-
|
|
13
|
-
npm install @nextgis/ngw-map
|
|
19
|
+
npm install @nextgis/ngw-map @nextgis/leaflet-map-adapter leaflet
|
|
14
20
|
```
|
|
15
21
|
|
|
16
|
-
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
```ts
|
|
17
25
|
import { NgwMap } from '@nextgis/ngw-map';
|
|
18
26
|
import MapAdapter from '@nextgis/leaflet-map-adapter';
|
|
19
|
-
// manually added styles
|
|
20
27
|
import 'leaflet/dist/leaflet.css';
|
|
21
28
|
|
|
22
29
|
const ngwMap = new NgwMap({
|
|
@@ -24,11 +31,25 @@ const ngwMap = new NgwMap({
|
|
|
24
31
|
baseUrl: 'https://demo.nextgis.com',
|
|
25
32
|
target: 'map',
|
|
26
33
|
qmsId: 448,
|
|
27
|
-
webmapId: 3985
|
|
34
|
+
webmapId: 3985,
|
|
28
35
|
});
|
|
29
36
|
|
|
37
|
+
await ngwMap.onLoad();
|
|
30
38
|
```
|
|
31
39
|
|
|
40
|
+
The map adapter is required when this package is used directly. The
|
|
41
|
+
ready-to-use map packages create it automatically.
|
|
42
|
+
|
|
43
|
+
Important inherited API groups include:
|
|
44
|
+
|
|
45
|
+
- NextGIS Web resources: `addNgwLayer()`, `fitResource()`, and `connector`;
|
|
46
|
+
- features and identification: `fetchNgwLayerItems()`,
|
|
47
|
+
`fetchIdentifyGeoJson()`, and `ngw:select` events;
|
|
48
|
+
- common WebMap layers, controls, events, filtering, and view methods.
|
|
49
|
+
|
|
50
|
+
See the [API Documentation](https://code-api.nextgis.com/modules/_nextgis_ngw-map.html)
|
|
51
|
+
and the [package architecture guide](../../docs/PACKAGES.md).
|
|
52
|
+
|
|
32
53
|
## Commercial support
|
|
33
54
|
|
|
34
55
|
Need to fix a bug or add a feature to `@nextgis/ngw-map`? We provide custom development and support for this software. [Contact us](http://nextgis.com/contact/) to discuss options!
|
package/lib/ngw-map.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Bundle of @nextgis/ngw-map; version: 4.0.0-
|
|
1
|
+
/** Bundle of @nextgis/ngw-map; version: 4.0.0-rc.0; author: NextGIS */
|
|
2
2
|
const svgPath = {
|
|
3
3
|
brill: '<path d="m6 0-5 6 5 6 5-6z"/>',
|
|
4
4
|
circle: '<circle cx="6" cy="6" r="6"/>',
|
|
@@ -1077,7 +1077,7 @@ function unwrapListeners(arr) {
|
|
|
1077
1077
|
}
|
|
1078
1078
|
|
|
1079
1079
|
var pkg = {
|
|
1080
|
-
version: "4.0.0-
|
|
1080
|
+
version: "4.0.0-rc.0"};
|
|
1081
1081
|
|
|
1082
1082
|
class AbortError extends Error {
|
|
1083
1083
|
constructor(message = "AbortError") {
|