@nextgis/ngw-leaflet 1.16.8 → 1.17.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/lib/ngw-leaflet.esm-browser.js +9168 -10124
- package/lib/ngw-leaflet.esm-browser.js.map +1 -1
- package/lib/ngw-leaflet.esm-browser.prod.js +2 -2
- package/lib/ngw-leaflet.esm-browser.prod.js.map +1 -1
- package/lib/ngw-leaflet.esm-bundler.js +47 -125
- package/lib/ngw-leaflet.esm-bundler.js.map +1 -1
- package/lib/ngw-leaflet.esm-bundler.prod.js +1 -1
- package/lib/ngw-leaflet.esm-bundler.prod.js.map +1 -1
- package/lib/ngw-leaflet.global.js +9891 -9862
- package/lib/ngw-leaflet.global.js.map +1 -1
- package/lib/ngw-leaflet.global.prod.js +2 -2
- package/lib/ngw-leaflet.global.prod.js.map +1 -1
- package/package.json +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Bundle of @nextgis/ngw-leaflet; version: 1.
|
|
1
|
+
/** Bundle of @nextgis/ngw-leaflet; version: 1.17.0; author: NextGIS */
|
|
2
2
|
import 'leaflet/dist/leaflet.css';
|
|
3
3
|
import { Icon } from 'leaflet';
|
|
4
4
|
import { NgwMap } from '@nextgis/ngw-map';
|
|
@@ -7,86 +7,6 @@ import iconRetinaUrl from 'leaflet/dist/images/marker-icon-2x.png';
|
|
|
7
7
|
import iconUrl from 'leaflet/dist/images/marker-icon.png';
|
|
8
8
|
import shadowUrl from 'leaflet/dist/images/marker-shadow.png';
|
|
9
9
|
|
|
10
|
-
/******************************************************************************
|
|
11
|
-
Copyright (c) Microsoft Corporation.
|
|
12
|
-
|
|
13
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
14
|
-
purpose with or without fee is hereby granted.
|
|
15
|
-
|
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
17
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
18
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
19
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
20
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
21
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
22
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
23
|
-
***************************************************************************** */
|
|
24
|
-
/* global Reflect, Promise */
|
|
25
|
-
|
|
26
|
-
var extendStatics = function(d, b) {
|
|
27
|
-
extendStatics = Object.setPrototypeOf ||
|
|
28
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
29
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
30
|
-
return extendStatics(d, b);
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
function __extends(d, b) {
|
|
34
|
-
if (typeof b !== "function" && b !== null)
|
|
35
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
36
|
-
extendStatics(d, b);
|
|
37
|
-
function __() { this.constructor = d; }
|
|
38
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
var __assign = function() {
|
|
42
|
-
__assign = Object.assign || function __assign(t) {
|
|
43
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
44
|
-
s = arguments[i];
|
|
45
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
46
|
-
}
|
|
47
|
-
return t;
|
|
48
|
-
};
|
|
49
|
-
return __assign.apply(this, arguments);
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
53
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
54
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
55
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
56
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
57
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
58
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function __generator(thisArg, body) {
|
|
63
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
64
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
65
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
66
|
-
function step(op) {
|
|
67
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
68
|
-
while (_) try {
|
|
69
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
70
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
71
|
-
switch (op[0]) {
|
|
72
|
-
case 0: case 1: t = op; break;
|
|
73
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
74
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
75
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
76
|
-
default:
|
|
77
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
78
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
79
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
80
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
81
|
-
if (t[2]) _.ops.pop();
|
|
82
|
-
_.trys.pop(); continue;
|
|
83
|
-
}
|
|
84
|
-
op = body.call(thisArg, _);
|
|
85
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
86
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
10
|
function styleInject(css, ref) {
|
|
91
11
|
if ( ref === void 0 ) ref = {};
|
|
92
12
|
var insertAt = ref.insertAt;
|
|
@@ -117,50 +37,52 @@ function styleInject(css, ref) {
|
|
|
117
37
|
var css_248z = ".ngw-map-container.leaflet-container{background:#fff}.leaflet-pane .leaflet-popup-pane{z-index:9999999999}";
|
|
118
38
|
styleInject(css_248z);
|
|
119
39
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
40
|
+
/**
|
|
41
|
+
* Single-file bundle for rapid deployment of {@link https://leafletjs.com/ | Leaflet }-based web-gis applications with NextGIS services
|
|
42
|
+
*
|
|
43
|
+
* @remarks
|
|
44
|
+
* Styles images and other assets are already in bundle, you don't need to include anything except one JS file!
|
|
45
|
+
*
|
|
46
|
+
* @packageDocumentation
|
|
47
|
+
* @module ngw-leaflet
|
|
48
|
+
*/
|
|
49
|
+
// @ts-ignore
|
|
50
|
+
delete Icon.Default.prototype._getIconUrl;
|
|
51
|
+
Icon.Default.mergeOptions({
|
|
52
|
+
iconRetinaUrl: iconRetinaUrl,
|
|
53
|
+
iconUrl: iconUrl,
|
|
54
|
+
shadowUrl: shadowUrl,
|
|
55
|
+
});
|
|
56
|
+
/**
|
|
57
|
+
* Displaying the [NgwMap](ngw-map-api)
|
|
58
|
+
* using the [LeafletMapAdapter](leaflet-map-adapter-api)
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```javascript
|
|
62
|
+
* // Base initialization
|
|
63
|
+
* // [live demo](http://code.nextgis.com/ngw-leaflet-examples-ngw-webmap)
|
|
64
|
+
* import { NgwMap } from '@nextgis/ngw-leaflet';
|
|
65
|
+
*
|
|
66
|
+
* const ngwMap = new NgwMap({
|
|
67
|
+
* target: 'map',
|
|
68
|
+
* qmsId: 448,
|
|
69
|
+
* baseUrl: 'https://demo.nextgis.com',
|
|
70
|
+
* webmapId: 3985
|
|
71
|
+
* });
|
|
72
|
+
* ```
|
|
73
|
+
*/
|
|
74
|
+
class NgwLeaflet extends NgwMap {
|
|
75
|
+
constructor(options) {
|
|
76
|
+
options = { ...options, mapAdapter: new LeafletMapAdapter() };
|
|
77
|
+
super(options);
|
|
78
|
+
}
|
|
79
|
+
static async create(options) {
|
|
80
|
+
const ngwMap = new NgwLeaflet(options);
|
|
81
|
+
return ngwMap.onLoad();
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
if (window && !window.NgwMap) {
|
|
85
|
+
window.NgwMap = NgwLeaflet;
|
|
164
86
|
}
|
|
165
87
|
|
|
166
88
|
export { NgwLeaflet as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngw-leaflet.esm-bundler.js","sources":["../../../node_modules/style-inject/dist/style-inject.es.js","../src/index.ts"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","/**\n * Single-file bundle for rapid deployment of {@link https://leafletjs.com/ | Leaflet }-based web-gis applications with NextGIS services\n *\n * @remarks\n * Styles images and other assets are already in bundle, you don't need to include anything except one JS file!\n *\n * @packageDocumentation\n * @module ngw-leaflet\n */\nimport 'leaflet/dist/leaflet.css';\nimport './leaflet-style-override.css';\n\nimport { Icon } from 'leaflet';\nimport { NgwMap, NgwMapOptions } from '@nextgis/ngw-map';\nimport LeafletMapAdapter from '@nextgis/leaflet-map-adapter';\n\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\nimport { Map } from 'leaflet';\n\n// @ts-ignore\ndelete Icon.Default.prototype._getIconUrl;\n\nIcon.Default.mergeOptions({\n iconRetinaUrl: iconRetinaUrl,\n iconUrl: iconUrl,\n shadowUrl: shadowUrl,\n});\n\n/**\n * Displaying the [NgwMap](ngw-map-api)\n * using the [LeafletMapAdapter](leaflet-map-adapter-api)\n *\n * @example\n * ```javascript\n * // Base initialization\n * // [live demo](http://code.nextgis.com/ngw-leaflet-examples-ngw-webmap)\n * import { NgwMap } from '@nextgis/ngw-leaflet';\n *\n * const ngwMap = new NgwMap({\n * target: 'map',\n * qmsId: 448,\n * baseUrl: 'https://demo.nextgis.com',\n * webmapId: 3985\n * });\n * ```\n */\nclass NgwLeaflet extends NgwMap<Map> {\n constructor(options: NgwMapOptions) {\n options = { ...options, mapAdapter: new LeafletMapAdapter() };\n super(options);\n }\n static async create(options: NgwMapOptions): Promise<NgwLeaflet> {\n const ngwMap = new NgwLeaflet(options);\n return ngwMap.onLoad();\n }\n}\n\nexport default NgwLeaflet;\n\nif ((window as any) && !(window as any).NgwMap) {\n (window as any).NgwMap = NgwLeaflet;\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ngw-leaflet.esm-bundler.js","sources":["../../../node_modules/style-inject/dist/style-inject.es.js","../src/index.ts"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","/**\n * Single-file bundle for rapid deployment of {@link https://leafletjs.com/ | Leaflet }-based web-gis applications with NextGIS services\n *\n * @remarks\n * Styles images and other assets are already in bundle, you don't need to include anything except one JS file!\n *\n * @packageDocumentation\n * @module ngw-leaflet\n */\nimport 'leaflet/dist/leaflet.css';\nimport './leaflet-style-override.css';\n\nimport { Icon } from 'leaflet';\nimport { NgwMap, NgwMapOptions } from '@nextgis/ngw-map';\nimport LeafletMapAdapter from '@nextgis/leaflet-map-adapter';\n\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\nimport { Map } from 'leaflet';\n\n// @ts-ignore\ndelete Icon.Default.prototype._getIconUrl;\n\nIcon.Default.mergeOptions({\n iconRetinaUrl: iconRetinaUrl,\n iconUrl: iconUrl,\n shadowUrl: shadowUrl,\n});\n\n/**\n * Displaying the [NgwMap](ngw-map-api)\n * using the [LeafletMapAdapter](leaflet-map-adapter-api)\n *\n * @example\n * ```javascript\n * // Base initialization\n * // [live demo](http://code.nextgis.com/ngw-leaflet-examples-ngw-webmap)\n * import { NgwMap } from '@nextgis/ngw-leaflet';\n *\n * const ngwMap = new NgwMap({\n * target: 'map',\n * qmsId: 448,\n * baseUrl: 'https://demo.nextgis.com',\n * webmapId: 3985\n * });\n * ```\n */\nclass NgwLeaflet extends NgwMap<Map> {\n constructor(options: NgwMapOptions) {\n options = { ...options, mapAdapter: new LeafletMapAdapter() };\n super(options);\n }\n static async create(options: NgwMapOptions): Promise<NgwLeaflet> {\n const ngwMap = new NgwLeaflet(options);\n return ngwMap.onLoad();\n }\n}\n\nexport default NgwLeaflet;\n\nif ((window as any) && !(window as any).NgwMap) {\n (window as any).NgwMap = NgwLeaflet;\n}\n"],"names":[],"mappings":";;;;;;;;;AAAA,SAAS,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE;AAC/B,EAAE,KAAK,GAAG,KAAK,KAAK,CAAC,GAAG,GAAG,GAAG,EAAE,CAAC;AACjC,EAAE,IAAI,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;AAC9B;AACA,EAAE,IAAI,CAAC,GAAG,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,EAAE,OAAO,EAAE;AAC1D;AACA,EAAE,IAAI,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AACvE,EAAE,IAAI,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AAC9C,EAAE,KAAK,CAAC,IAAI,GAAG,UAAU,CAAC;AAC1B;AACA,EAAE,IAAI,QAAQ,KAAK,KAAK,EAAE;AAC1B,IAAI,IAAI,IAAI,CAAC,UAAU,EAAE;AACzB,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;AAChD,KAAK,MAAM;AACX,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC9B,KAAK;AACL,GAAG,MAAM;AACT,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5B,GAAG;AACH;AACA,EAAE,IAAI,KAAK,CAAC,UAAU,EAAE;AACxB,IAAI,KAAK,CAAC,UAAU,CAAC,OAAO,GAAG,GAAG,CAAC;AACnC,GAAG,MAAM;AACT,IAAI,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;AACpD,GAAG;AACH;;;;;ACzBA;;;;;;;;AAQG;AAcH;AACA,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC;AAE1C,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC;AACxB,IAAA,aAAa,EAAE,aAAa;AAC5B,IAAA,OAAO,EAAE,OAAO;AAChB,IAAA,SAAS,EAAE,SAAS;AACrB,CAAA,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;AAiBG;AACH,MAAM,UAAW,SAAQ,MAAW,CAAA;AAClC,IAAA,WAAA,CAAY,OAAsB,EAAA;QAChC,OAAO,GAAG,EAAE,GAAG,OAAO,EAAE,UAAU,EAAE,IAAI,iBAAiB,EAAE,EAAE,CAAC;QAC9D,KAAK,CAAC,OAAO,CAAC,CAAC;KAChB;AACD,IAAA,aAAa,MAAM,CAAC,OAAsB,EAAA;AACxC,QAAA,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC;AACvC,QAAA,OAAO,MAAM,CAAC,MAAM,EAAE,CAAC;KACxB;AACF,CAAA;AAID,IAAK,MAAc,IAAI,CAAE,MAAc,CAAC,MAAM,EAAE;AAC7C,IAAA,MAAc,CAAC,MAAM,GAAG,UAAU,CAAC;AACrC;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"leaflet/dist/leaflet.css";import{Icon as
|
|
1
|
+
import"leaflet/dist/leaflet.css";import{Icon as e}from"leaflet";import{NgwMap as t}from"@nextgis/ngw-map";import a from"@nextgis/leaflet-map-adapter";import n from"leaflet/dist/images/marker-icon-2x.png";import o from"leaflet/dist/images/marker-icon.png";import r from"leaflet/dist/images/marker-shadow.png";!function(e,t){void 0===t&&(t={});var a=t.insertAt;if(e&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===a&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".ngw-map-container.leaflet-container{background:#fff}.leaflet-pane .leaflet-popup-pane{z-index:9999999999}"),delete e.Default.prototype._getIconUrl,e.Default.mergeOptions({iconRetinaUrl:n,iconUrl:o,shadowUrl:r});class i extends t{constructor(e){super(e={...e,mapAdapter:new a})}static async create(e){return new i(e).onLoad()}}window&&!window.NgwMap&&(window.NgwMap=i);export{i as default};
|
|
2
2
|
//# sourceMappingURL=ngw-leaflet.esm-bundler.prod.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngw-leaflet.esm-bundler.prod.js","sources":["../../../node_modules/style-inject/dist/style-inject.es.js","../src/index.ts"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","/**\n * Single-file bundle for rapid deployment of {@link https://leafletjs.com/ | Leaflet }-based web-gis applications with NextGIS services\n *\n * @remarks\n * Styles images and other assets are already in bundle, you don't need to include anything except one JS file!\n *\n * @packageDocumentation\n * @module ngw-leaflet\n */\nimport 'leaflet/dist/leaflet.css';\nimport './leaflet-style-override.css';\n\nimport { Icon } from 'leaflet';\nimport { NgwMap, NgwMapOptions } from '@nextgis/ngw-map';\nimport LeafletMapAdapter from '@nextgis/leaflet-map-adapter';\n\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\nimport { Map } from 'leaflet';\n\n// @ts-ignore\ndelete Icon.Default.prototype._getIconUrl;\n\nIcon.Default.mergeOptions({\n iconRetinaUrl: iconRetinaUrl,\n iconUrl: iconUrl,\n shadowUrl: shadowUrl,\n});\n\n/**\n * Displaying the [NgwMap](ngw-map-api)\n * using the [LeafletMapAdapter](leaflet-map-adapter-api)\n *\n * @example\n * ```javascript\n * // Base initialization\n * // [live demo](http://code.nextgis.com/ngw-leaflet-examples-ngw-webmap)\n * import { NgwMap } from '@nextgis/ngw-leaflet';\n *\n * const ngwMap = new NgwMap({\n * target: 'map',\n * qmsId: 448,\n * baseUrl: 'https://demo.nextgis.com',\n * webmapId: 3985\n * });\n * ```\n */\nclass NgwLeaflet extends NgwMap<Map> {\n constructor(options: NgwMapOptions) {\n options = { ...options, mapAdapter: new LeafletMapAdapter() };\n super(options);\n }\n static async create(options: NgwMapOptions): Promise<NgwLeaflet> {\n const ngwMap = new NgwLeaflet(options);\n return ngwMap.onLoad();\n }\n}\n\nexport default NgwLeaflet;\n\nif ((window as any) && !(window as any).NgwMap) {\n (window as any).NgwMap = NgwLeaflet;\n}\n"],"names":["css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","Icon","Default","prototype","_getIconUrl","mergeOptions","iconRetinaUrl","iconUrl","shadowUrl","NgwLeaflet","
|
|
1
|
+
{"version":3,"file":"ngw-leaflet.esm-bundler.prod.js","sources":["../../../node_modules/style-inject/dist/style-inject.es.js","../src/index.ts"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","/**\n * Single-file bundle for rapid deployment of {@link https://leafletjs.com/ | Leaflet }-based web-gis applications with NextGIS services\n *\n * @remarks\n * Styles images and other assets are already in bundle, you don't need to include anything except one JS file!\n *\n * @packageDocumentation\n * @module ngw-leaflet\n */\nimport 'leaflet/dist/leaflet.css';\nimport './leaflet-style-override.css';\n\nimport { Icon } from 'leaflet';\nimport { NgwMap, NgwMapOptions } from '@nextgis/ngw-map';\nimport LeafletMapAdapter from '@nextgis/leaflet-map-adapter';\n\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\nimport { Map } from 'leaflet';\n\n// @ts-ignore\ndelete Icon.Default.prototype._getIconUrl;\n\nIcon.Default.mergeOptions({\n iconRetinaUrl: iconRetinaUrl,\n iconUrl: iconUrl,\n shadowUrl: shadowUrl,\n});\n\n/**\n * Displaying the [NgwMap](ngw-map-api)\n * using the [LeafletMapAdapter](leaflet-map-adapter-api)\n *\n * @example\n * ```javascript\n * // Base initialization\n * // [live demo](http://code.nextgis.com/ngw-leaflet-examples-ngw-webmap)\n * import { NgwMap } from '@nextgis/ngw-leaflet';\n *\n * const ngwMap = new NgwMap({\n * target: 'map',\n * qmsId: 448,\n * baseUrl: 'https://demo.nextgis.com',\n * webmapId: 3985\n * });\n * ```\n */\nclass NgwLeaflet extends NgwMap<Map> {\n constructor(options: NgwMapOptions) {\n options = { ...options, mapAdapter: new LeafletMapAdapter() };\n super(options);\n }\n static async create(options: NgwMapOptions): Promise<NgwLeaflet> {\n const ngwMap = new NgwLeaflet(options);\n return ngwMap.onLoad();\n }\n}\n\nexport default NgwLeaflet;\n\nif ((window as any) && !(window as any).NgwMap) {\n (window as any).NgwMap = NgwLeaflet;\n}\n"],"names":["css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","Icon","Default","prototype","_getIconUrl","mergeOptions","iconRetinaUrl","iconUrl","shadowUrl","NgwLeaflet","NgwMap","constructor","options","super","mapAdapter","LeafletMapAdapter","create","onLoad","window"],"mappings":"qTAAA,SAAqBA,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAKF,GAA2B,oBAAbG,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,GAnBY,CAqB1D,uHCFOe,EAAKC,QAAQC,UAAUC,YAE9BH,EAAKC,QAAQG,aAAa,CACxBC,cAAeA,EACfC,QAASA,EACTC,UAAWA,IAqBb,MAAMC,UAAmBC,EACvB,WAAAC,CAAYC,GAEVC,MADAD,EAAU,IAAKA,EAASE,WAAY,IAAIC,GAEzC,CACD,mBAAaC,CAAOJ,GAElB,OADe,IAAIH,EAAWG,GAChBK,QACf,EAKEC,SAAoBA,OAAeR,SACrCQ,OAAeR,OAASD"}
|