@nextgis/react-ngw-leaflet 1.19.5 → 2.0.0-alpha.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 +15 -2
- package/lib/index.d.ts +8 -9
- package/lib/react-ngw-leaflet.esm-bundler.js +27 -8
- package/lib/react-ngw-leaflet.esm-bundler.js.map +1 -1
- package/lib/react-ngw-leaflet.esm-bundler.prod.js +1 -1
- package/lib/react-ngw-leaflet.esm-bundler.prod.js.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -4,12 +4,25 @@
|
|
|
4
4
|
|
|
5
5
|
Plugin to integrate NGW maps into react with leaflet adapter
|
|
6
6
|
|
|
7
|
-
```
|
|
7
|
+
```jsx
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import { render } from 'react-dom';
|
|
10
|
+
import ReactNgwMap from '@nextgis/react-ngw-leaflet';
|
|
8
11
|
|
|
12
|
+
function App() {
|
|
13
|
+
return (
|
|
14
|
+
<ReactNgwMap
|
|
15
|
+
baseUrl="https://demo.nextgis.com"
|
|
16
|
+
resources={[{ resource: 6118, id: 'webmap', fit: true }]}
|
|
17
|
+
/>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
render(<App />, document.getElementById('app'));
|
|
9
22
|
```
|
|
10
23
|
|
|
11
24
|
## Commercial support
|
|
12
25
|
|
|
13
26
|
Need to fix a bug or add a feature to `@nextgis/react-ngw-leaflet`? We provide custom development and support for this software. [Contact us](http://nextgis.com/contact/) to discuss options!
|
|
14
27
|
|
|
15
|
-
[](http://nextgis.com)
|
package/lib/index.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
declare function ReactNgwLeaflet<Props extends MapContainerProps = MapContainerProps<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export { }
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import * as _nextgis_react_ngw_map from '@nextgis/react-ngw-map';
|
|
3
|
+
import { MapContainerProps } from '@nextgis/react-ngw-map';
|
|
4
|
+
import { Map } from 'leaflet';
|
|
5
|
+
|
|
6
|
+
declare function ReactNgwLeaflet<Props extends MapContainerProps = MapContainerProps<Map>>(props: Props): react.FunctionComponentElement<_nextgis_react_ngw_map.ReactNgwMapProps>;
|
|
7
|
+
|
|
8
|
+
export { ReactNgwLeaflet as default };
|
|
@@ -1,22 +1,41 @@
|
|
|
1
|
-
/** Bundle of @nextgis/react-ngw-leaflet; version:
|
|
2
|
-
import { createElement } from 'react';
|
|
3
|
-
import { Icon } from 'leaflet';
|
|
1
|
+
/** Bundle of @nextgis/react-ngw-leaflet; version: 2.0.0-alpha.0; author: NextGIS */
|
|
4
2
|
import MapAdapter from '@nextgis/leaflet-map-adapter';
|
|
5
3
|
import { ReactNgwMap } from '@nextgis/react-ngw-map';
|
|
4
|
+
import { Icon } from 'leaflet';
|
|
5
|
+
import { createElement } from 'react';
|
|
6
6
|
import 'leaflet/dist/leaflet.css';
|
|
7
7
|
import iconRetinaUrl from 'leaflet/dist/images/marker-icon-2x.png';
|
|
8
8
|
import iconUrl from 'leaflet/dist/images/marker-icon.png';
|
|
9
9
|
import shadowUrl from 'leaflet/dist/images/marker-shadow.png';
|
|
10
10
|
|
|
11
|
+
var __defProp = Object.defineProperty;
|
|
12
|
+
var __defProps = Object.defineProperties;
|
|
13
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
14
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
15
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
17
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
18
|
+
var __spreadValues = (a, b) => {
|
|
19
|
+
for (var prop in b || (b = {}))
|
|
20
|
+
if (__hasOwnProp.call(b, prop))
|
|
21
|
+
__defNormalProp(a, prop, b[prop]);
|
|
22
|
+
if (__getOwnPropSymbols)
|
|
23
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
24
|
+
if (__propIsEnum.call(b, prop))
|
|
25
|
+
__defNormalProp(a, prop, b[prop]);
|
|
26
|
+
}
|
|
27
|
+
return a;
|
|
28
|
+
};
|
|
29
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
11
30
|
delete Icon.Default.prototype._getIconUrl;
|
|
12
31
|
Icon.Default.mergeOptions({
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
32
|
+
iconRetinaUrl,
|
|
33
|
+
iconUrl,
|
|
34
|
+
shadowUrl
|
|
16
35
|
});
|
|
17
36
|
function ReactNgwLeaflet(props) {
|
|
18
|
-
|
|
19
|
-
|
|
37
|
+
const p = __spreadProps(__spreadValues({}, props), { mapAdapter: new MapAdapter() });
|
|
38
|
+
return createElement(ReactNgwMap, p);
|
|
20
39
|
}
|
|
21
40
|
|
|
22
41
|
export { ReactNgwLeaflet as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-ngw-leaflet.esm-bundler.js","sources":["../src/ReactNgwLeaflet.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"react-ngw-leaflet.esm-bundler.js","sources":["../src/ReactNgwLeaflet.ts"],"sourcesContent":["/* eslint-disable import/order */\nimport MapAdapter from '@nextgis/leaflet-map-adapter';\nimport { ReactNgwMap } from '@nextgis/react-ngw-map';\nimport { Icon } from 'leaflet';\nimport { createElement } from 'react';\n\nimport type { MapContainerProps } from '@nextgis/react-ngw-map';\nimport type { Map } from 'leaflet';\n\nimport 'leaflet/dist/leaflet.css';\nimport iconRetinaUrl from 'leaflet/dist/images/marker-icon-2x.png';\nimport iconUrl from 'leaflet/dist/images/marker-icon.png';\nimport shadowUrl from 'leaflet/dist/images/marker-shadow.png';\n\ndelete (Icon.Default as any).prototype._getIconUrl;\n\nIcon.Default.mergeOptions({\n iconRetinaUrl: iconRetinaUrl,\n iconUrl: iconUrl,\n shadowUrl: shadowUrl,\n});\n\nexport function ReactNgwLeaflet<\n Props extends MapContainerProps = MapContainerProps<Map>,\n>(props: Props) {\n const p = { ...props, mapAdapter: new MapAdapter() };\n return createElement(ReactNgwMap, p);\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,OAAQ,IAAA,CAAK,QAAgB,SAAU,CAAA,WAAA,CAAA;AAEvC,IAAA,CAAK,QAAQ,YAAa,CAAA;AAAA,EACxB,aAAA;AAAA,EACA,OAAA;AAAA,EACA,SAAA;AACF,CAAC,CAAA,CAAA;AAEM,SAAS,gBAEd,KAAc,EAAA;AACd,EAAA,MAAM,IAAI,aAAK,CAAA,cAAA,CAAA,EAAA,EAAA,KAAA,CAAA,EAAL,EAAY,UAAY,EAAA,IAAI,YAAa,EAAA,CAAA,CAAA;AACnD,EAAO,OAAA,aAAA,CAAc,aAAa,CAAC,CAAA,CAAA;AACrC;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"@nextgis/leaflet-map-adapter";import{ReactNgwMap as r}from"@nextgis/react-ngw-map";import{Icon as t}from"leaflet";import{createElement as o}from"react";import"leaflet/dist/leaflet.css";import a from"leaflet/dist/images/marker-icon-2x.png";import i from"leaflet/dist/images/marker-icon.png";import l from"leaflet/dist/images/marker-shadow.png";var p=Object.defineProperty,n=Object.defineProperties,m=Object.getOwnPropertyDescriptors,f=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,g=(e,r,t)=>r in e?p(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;function d(t){const a=(i=((e,r)=>{for(var t in r||(r={}))s.call(r,t)&&g(e,t,r[t]);if(f)for(var t of f(r))c.call(r,t)&&g(e,t,r[t]);return e})({},t),l={mapAdapter:new e},n(i,m(l)));var i,l;return o(r,a)}delete t.Default.prototype._getIconUrl,t.Default.mergeOptions({iconRetinaUrl:a,iconUrl:i,shadowUrl:l});export{d as default};
|
|
2
2
|
//# sourceMappingURL=react-ngw-leaflet.esm-bundler.prod.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-ngw-leaflet.esm-bundler.prod.js","sources":["../src/ReactNgwLeaflet.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"react-ngw-leaflet.esm-bundler.prod.js","sources":["../src/ReactNgwLeaflet.ts"],"sourcesContent":["/* eslint-disable import/order */\nimport MapAdapter from '@nextgis/leaflet-map-adapter';\nimport { ReactNgwMap } from '@nextgis/react-ngw-map';\nimport { Icon } from 'leaflet';\nimport { createElement } from 'react';\n\nimport type { MapContainerProps } from '@nextgis/react-ngw-map';\nimport type { Map } from 'leaflet';\n\nimport 'leaflet/dist/leaflet.css';\nimport iconRetinaUrl from 'leaflet/dist/images/marker-icon-2x.png';\nimport iconUrl from 'leaflet/dist/images/marker-icon.png';\nimport shadowUrl from 'leaflet/dist/images/marker-shadow.png';\n\ndelete (Icon.Default as any).prototype._getIconUrl;\n\nIcon.Default.mergeOptions({\n iconRetinaUrl: iconRetinaUrl,\n iconUrl: iconUrl,\n shadowUrl: shadowUrl,\n});\n\nexport function ReactNgwLeaflet<\n Props extends MapContainerProps = MapContainerProps<Map>,\n>(props: Props) {\n const p = { ...props, mapAdapter: new MapAdapter() };\n return createElement(ReactNgwMap, p);\n}\n"],"names":["ReactNgwLeaflet","props","p","__spreadValues","mapAdapter","MapAdapter","createElement","ReactNgwMap","Icon","Default","prototype","_getIconUrl","mergeOptions","iconRetinaUrl","iconUrl","shadowUrl"],"mappings":"2nBAsBO,SAASA,EAEdC,GACA,MAAMC,wHAASC,CAAA,GAAAF,KAAL,CAAYG,WAAY,IAAIC,sBAC/B,OAAAC,EAAcC,EAAaL,EACpC,QAbQM,EAAKC,QAAgBC,UAAUC,YAEvCH,EAAKC,QAAQG,aAAa,CACxBC,gBACAC,UACAC"}
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nextgis/react-ngw-leaflet",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-alpha.0",
|
|
4
4
|
"description": "React NGW map component for leaflet",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/react-ngw-leaflet.esm-bundler.js",
|
|
7
7
|
"types": "lib/index.d.ts",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@nextgis/leaflet-map-adapter": "^
|
|
10
|
-
"@nextgis/react-ngw-map": "^
|
|
9
|
+
"@nextgis/leaflet-map-adapter": "^2.0.0-alpha.0",
|
|
10
|
+
"@nextgis/react-ngw-map": "^2.0.0-alpha.0"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@nextgis/build-tools": "^
|
|
13
|
+
"@nextgis/build-tools": "^2.0.0-alpha.0"
|
|
14
14
|
},
|
|
15
15
|
"buildOptions": {
|
|
16
16
|
"name": "ReactNgwLeaflet",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"bugs": {
|
|
45
45
|
"url": "https://github.com/nextgis/nextgis_frontend/issues"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "6a4a43d17a08e468d2362f1ae9590094e39aa6cc"
|
|
48
48
|
}
|