@nextgis/ngw-map 4.0.0-alpha.8 → 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 CHANGED
@@ -2,21 +2,28 @@
2
2
 
3
3
  ![size](https://img.shields.io/bundlephobia/minzip/@nextgis/ngw-map) ![version](https://img.shields.io/npm/v/@nextgis/ngw-map)
4
4
 
5
- Abstract Map for NGW
5
+ Framework-independent NextGIS Web map class used by `ngw-leaflet`, `ngw-ol`,
6
+ and `ngw-maplibre-gl`.
6
7
 
7
- This library is not intended for using directly in the browser.
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
- Use NgwMap with NPM installation method for building large scale applications. It pairs nicely with module bundlers such as [Webpack](https://webpack.js.org/)
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
- # latest stable
13
- npm install @nextgis/ngw-map
19
+ npm install @nextgis/ngw-map @nextgis/leaflet-map-adapter leaflet
14
20
  ```
15
21
 
16
- ```javascript
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!
@@ -1,4 +1,4 @@
1
- /** Bundle of @nextgis/ngw-map; version: 4.0.0-alpha.8; author: NextGIS */
1
+ /** Bundle of @nextgis/ngw-map; version: 4.0.0-rc.0; author: NextGIS */
2
2
  'use strict';
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,4 +1,4 @@
1
- /** Bundle of @nextgis/ngw-map; version: 4.0.0-alpha.8; author: NextGIS */
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-alpha.8"};
1080
+ version: "4.0.0-rc.0"};
1081
1081
 
1082
1082
  class AbortError extends Error {
1083
1083
  constructor(message = "AbortError") {