@nextgis/ngw-leaflet 1.12.0 → 1.13.2
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 +156 -70
- 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 +1 -1
- package/lib/ngw-leaflet.global.js +156 -70
- 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 +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Bundle of @nextgis/ngw-leaflet; version: 1.
|
|
1
|
+
/** Bundle of @nextgis/ngw-leaflet; version: 1.13.2; author: NextGIS */
|
|
2
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation.
|
|
4
4
|
|
|
@@ -15396,6 +15396,9 @@ function objectRemoveEmpty(obj) {
|
|
|
15396
15396
|
|
|
15397
15397
|
function isObject$1(val) {
|
|
15398
15398
|
return Object.prototype.toString.call(val) === '[object Object]';
|
|
15399
|
+
}
|
|
15400
|
+
function isArray(val) {
|
|
15401
|
+
return Object.prototype.toString.call(val) === '[object Array]';
|
|
15399
15402
|
}
|
|
15400
15403
|
|
|
15401
15404
|
function fixUrlStr(url) {
|
|
@@ -16459,6 +16462,9 @@ var WebMapMain = /** @class */ (function () {
|
|
|
16459
16462
|
'movestart',
|
|
16460
16463
|
'move',
|
|
16461
16464
|
'moveend',
|
|
16465
|
+
'mousemove',
|
|
16466
|
+
'mouseout',
|
|
16467
|
+
'mouseover',
|
|
16462
16468
|
];
|
|
16463
16469
|
if (opt && opt.include) {
|
|
16464
16470
|
events = events.filter(function (x) { return opt.include.includes(x); });
|
|
@@ -18110,31 +18116,31 @@ var Cache = /** @class */ (function () {
|
|
|
18110
18116
|
/**
|
|
18111
18117
|
* Thrown when...
|
|
18112
18118
|
*/
|
|
18113
|
-
var
|
|
18114
|
-
__extends(
|
|
18115
|
-
function
|
|
18119
|
+
var NetworkError = /** @class */ (function (_super) {
|
|
18120
|
+
__extends(NetworkError, _super);
|
|
18121
|
+
function NetworkError(url) {
|
|
18116
18122
|
var _this = _super.call(this) || this;
|
|
18117
|
-
_this.name = '
|
|
18118
|
-
Object.
|
|
18119
|
-
|
|
18123
|
+
_this.name = 'NetworkError';
|
|
18124
|
+
Object.setPrototypeOf(_this, NetworkError.prototype);
|
|
18125
|
+
_this.message = "Unable to request ".concat(url, ".\n Possibly invalid NGW URL entered or CORS not configured to get request from ").concat(location.origin); // /control-panel/cors
|
|
18120
18126
|
return _this;
|
|
18121
18127
|
}
|
|
18122
|
-
return
|
|
18128
|
+
return NetworkError;
|
|
18123
18129
|
}(Error));
|
|
18124
18130
|
|
|
18125
18131
|
/**
|
|
18126
18132
|
* Thrown when...
|
|
18127
18133
|
*/
|
|
18128
|
-
var
|
|
18129
|
-
__extends(
|
|
18130
|
-
function
|
|
18134
|
+
var NgwError = /** @class */ (function (_super) {
|
|
18135
|
+
__extends(NgwError, _super);
|
|
18136
|
+
function NgwError(er) {
|
|
18131
18137
|
var _this = _super.call(this) || this;
|
|
18132
|
-
_this.name = '
|
|
18133
|
-
Object.
|
|
18134
|
-
|
|
18138
|
+
_this.name = 'NgwError';
|
|
18139
|
+
Object.assign(_this, er);
|
|
18140
|
+
Object.setPrototypeOf(_this, NgwError.prototype);
|
|
18135
18141
|
return _this;
|
|
18136
18142
|
}
|
|
18137
|
-
return
|
|
18143
|
+
return NgwError;
|
|
18138
18144
|
}(Error));
|
|
18139
18145
|
|
|
18140
18146
|
function isObject(val) {
|
|
@@ -18389,7 +18395,12 @@ var ResourcesControl = /** @class */ (function () {
|
|
|
18389
18395
|
forCache.id = resource;
|
|
18390
18396
|
}
|
|
18391
18397
|
else if (isObject(resource)) {
|
|
18392
|
-
|
|
18398
|
+
if (resource.id !== undefined) {
|
|
18399
|
+
forCache.id = resource.id;
|
|
18400
|
+
}
|
|
18401
|
+
else if (resource.keyname) {
|
|
18402
|
+
forCache.keyname = resource.keyname;
|
|
18403
|
+
}
|
|
18393
18404
|
}
|
|
18394
18405
|
var makeRequest = function () {
|
|
18395
18406
|
if (typeof resource === 'string') {
|
|
@@ -18491,20 +18502,35 @@ var ResourcesControl = /** @class */ (function () {
|
|
|
18491
18502
|
};
|
|
18492
18503
|
ResourcesControl.prototype.getChildrenOf = function (resource, requestOptions) {
|
|
18493
18504
|
var _this = this;
|
|
18494
|
-
return this.
|
|
18495
|
-
return _this.
|
|
18496
|
-
|
|
18497
|
-
|
|
18498
|
-
|
|
18499
|
-
|
|
18500
|
-
|
|
18501
|
-
|
|
18502
|
-
|
|
18503
|
-
|
|
18504
|
-
|
|
18505
|
+
return this.getIdOrFail(resource).then(function (parent) {
|
|
18506
|
+
return _this._getChildrenOf(parent, requestOptions);
|
|
18507
|
+
});
|
|
18508
|
+
};
|
|
18509
|
+
ResourcesControl.prototype._getChildrenOf = function (parent, requestOptions, _items) {
|
|
18510
|
+
var _this = this;
|
|
18511
|
+
if (_items === void 0) { _items = []; }
|
|
18512
|
+
return this.connector
|
|
18513
|
+
.get('resource.collection', __assign({ cache: true }, requestOptions), {
|
|
18514
|
+
parent: parent,
|
|
18515
|
+
})
|
|
18516
|
+
.then(function (items) {
|
|
18517
|
+
var recursivePromises = [];
|
|
18518
|
+
for (var _i = 0, items_1 = items; _i < items_1.length; _i++) {
|
|
18519
|
+
var item = items_1[_i];
|
|
18520
|
+
_this.cache.add('resource.item', CancelablePromise.resolve(item), {
|
|
18521
|
+
id: item.resource.id,
|
|
18522
|
+
});
|
|
18523
|
+
_items.push(item);
|
|
18524
|
+
if ((requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.recursive) && item.resource.children) {
|
|
18525
|
+
recursivePromises.push(_this._getChildrenOf(item.resource.id, requestOptions, _items));
|
|
18505
18526
|
}
|
|
18506
|
-
|
|
18507
|
-
|
|
18527
|
+
}
|
|
18528
|
+
if (recursivePromises.length) {
|
|
18529
|
+
return CancelablePromise.all(recursivePromises).then(function () {
|
|
18530
|
+
return _items;
|
|
18531
|
+
});
|
|
18532
|
+
}
|
|
18533
|
+
return _items;
|
|
18508
18534
|
});
|
|
18509
18535
|
};
|
|
18510
18536
|
ResourcesControl.prototype.update = function (resource, data) {
|
|
@@ -19029,7 +19055,7 @@ var NgwConnector = /** @class */ (function () {
|
|
|
19029
19055
|
NgwConnector.prototype._loadData = function (url, options) {
|
|
19030
19056
|
var _this = this;
|
|
19031
19057
|
options.responseType = options.responseType || 'json';
|
|
19032
|
-
|
|
19058
|
+
var request = new CancelablePromise(function (resolve, reject, onCancel) {
|
|
19033
19059
|
if (_this.user) {
|
|
19034
19060
|
options = options || {};
|
|
19035
19061
|
// options.withCredentials = true;
|
|
@@ -19049,6 +19075,13 @@ var NgwConnector = /** @class */ (function () {
|
|
|
19049
19075
|
}
|
|
19050
19076
|
}
|
|
19051
19077
|
});
|
|
19078
|
+
if (options.signal &&
|
|
19079
|
+
typeof options.signal.addEventListener === 'function') {
|
|
19080
|
+
options.signal.addEventListener('abort', function () {
|
|
19081
|
+
request.cancel();
|
|
19082
|
+
});
|
|
19083
|
+
}
|
|
19084
|
+
return request;
|
|
19052
19085
|
};
|
|
19053
19086
|
NgwConnector.prototype._handleHttpError = function (er) {
|
|
19054
19087
|
if (er) {
|
|
@@ -19158,12 +19191,12 @@ function fetchNgwLayerItemExtent(_a) {
|
|
|
19158
19191
|
function fetchNgwExtent(options) {
|
|
19159
19192
|
return options.connector.getResource(options.resourceId).then(function (resource) {
|
|
19160
19193
|
if (resource) {
|
|
19161
|
-
return fetchNgwResourceExtent(resource, options.connector);
|
|
19194
|
+
return fetchNgwResourceExtent(resource, options.connector, options);
|
|
19162
19195
|
}
|
|
19163
19196
|
});
|
|
19164
19197
|
}
|
|
19165
19198
|
/** @deprecated use {@link fetchNgwExtent} instead */
|
|
19166
|
-
function fetchNgwResourceExtent(item, connector) {
|
|
19199
|
+
function fetchNgwResourceExtent(item, connector, options) {
|
|
19167
19200
|
if (item.webmap) {
|
|
19168
19201
|
return CancelablePromise.resolve(getNgwWebmapExtent(item.webmap));
|
|
19169
19202
|
}
|
|
@@ -19172,15 +19205,12 @@ function fetchNgwResourceExtent(item, connector) {
|
|
|
19172
19205
|
if (resource.cls && resource.cls.indexOf('style') !== -1) {
|
|
19173
19206
|
return connector.getResource(resource.parent.id).then(function (res) {
|
|
19174
19207
|
if (res) {
|
|
19175
|
-
return fetchNgwLayerExtent({
|
|
19176
|
-
resourceId: res.resource.id,
|
|
19177
|
-
connector: connector,
|
|
19178
|
-
});
|
|
19208
|
+
return fetchNgwLayerExtent(__assign(__assign({}, options), { resourceId: res.resource.id, connector: connector }));
|
|
19179
19209
|
}
|
|
19180
19210
|
});
|
|
19181
19211
|
}
|
|
19182
19212
|
else {
|
|
19183
|
-
return fetchNgwLayerExtent({ resourceId: resource.id, connector: connector });
|
|
19213
|
+
return fetchNgwLayerExtent(__assign(__assign({}, options), { resourceId: resource.id, connector: connector }));
|
|
19184
19214
|
}
|
|
19185
19215
|
}
|
|
19186
19216
|
}
|
|
@@ -19351,7 +19381,7 @@ function createWktFromCoordArray(coord) {
|
|
|
19351
19381
|
}
|
|
19352
19382
|
function fetchNgwLayerItemsRequest(options) {
|
|
19353
19383
|
var params = __assign({}, FEATURE_REQUEST_PARAMS);
|
|
19354
|
-
var limit = options.limit, offset = options.offset, orderBy = options.orderBy, paramList = options.paramList, connector = options.connector, intersects = options.intersects, resourceId = options.resourceId;
|
|
19384
|
+
var limit = options.limit, cache = options.cache, signal = options.signal, offset = options.offset, orderBy = options.orderBy, paramList = options.paramList, connector = options.connector, intersects = options.intersects, resourceId = options.resourceId;
|
|
19355
19385
|
if (limit) {
|
|
19356
19386
|
if (limit !== Number.POSITIVE_INFINITY) {
|
|
19357
19387
|
params.limit = limit;
|
|
@@ -19381,7 +19411,7 @@ function fetchNgwLayerItemsRequest(options) {
|
|
|
19381
19411
|
params.paramList = paramList;
|
|
19382
19412
|
}
|
|
19383
19413
|
var reqParams = __assign({ id: resourceId }, params);
|
|
19384
|
-
return connector.get('feature_layer.feature.collection', { cache:
|
|
19414
|
+
return connector.get('feature_layer.feature.collection', { cache: cache, signal: signal }, reqParams);
|
|
19385
19415
|
}
|
|
19386
19416
|
|
|
19387
19417
|
function prepareNgwFieldsToPropertiesFilter(fields) {
|
|
@@ -19404,6 +19434,9 @@ function prepareNgwFieldsToPropertiesFilter(fields) {
|
|
|
19404
19434
|
fields[f] = new (Date.bind.apply(Date, __spreadArray([void 0], dt_1, false)))().toISOString();
|
|
19405
19435
|
}
|
|
19406
19436
|
}
|
|
19437
|
+
else if (f === 'id' && typeof field === 'string') {
|
|
19438
|
+
fields[f] = field.split(',').map(Number);
|
|
19439
|
+
}
|
|
19407
19440
|
};
|
|
19408
19441
|
for (f in fields) {
|
|
19409
19442
|
_loop_1();
|
|
@@ -19416,7 +19449,7 @@ function fetchNgwLayerItems(options) {
|
|
|
19416
19449
|
if (filters) {
|
|
19417
19450
|
return createFeatureFieldFilterQueries(__assign(__assign({}, options), { filters: filters })).then(function (data) {
|
|
19418
19451
|
var _a;
|
|
19419
|
-
var clientFilterValidate = (_a = options.clientFilterValidate) !== null && _a !== void 0 ? _a :
|
|
19452
|
+
var clientFilterValidate = (_a = options.clientFilterValidate) !== null && _a !== void 0 ? _a : isFilterWithAnyCase(filters);
|
|
19420
19453
|
// Additional client-side filter check
|
|
19421
19454
|
if (clientFilterValidate) {
|
|
19422
19455
|
data = data.filter(function (y) {
|
|
@@ -19431,6 +19464,21 @@ function fetchNgwLayerItems(options) {
|
|
|
19431
19464
|
else {
|
|
19432
19465
|
return fetchNgwLayerItemsRequest(options);
|
|
19433
19466
|
}
|
|
19467
|
+
}
|
|
19468
|
+
function isFilterWithAnyCase(filters) {
|
|
19469
|
+
if (filters[0] === 'any') {
|
|
19470
|
+
return true;
|
|
19471
|
+
}
|
|
19472
|
+
for (var i = 1; i < filters.length; i++) {
|
|
19473
|
+
var p = filters[i];
|
|
19474
|
+
if (isArray(p)) {
|
|
19475
|
+
var deep = isFilterWithAnyCase(p);
|
|
19476
|
+
if (deep) {
|
|
19477
|
+
return true;
|
|
19478
|
+
}
|
|
19479
|
+
}
|
|
19480
|
+
}
|
|
19481
|
+
return false;
|
|
19434
19482
|
}
|
|
19435
19483
|
|
|
19436
19484
|
function fetchNgwLayerFeatures(options) {
|
|
@@ -21375,7 +21423,7 @@ var NgwResource = /** @class */ (function () {
|
|
|
21375
21423
|
});
|
|
21376
21424
|
});
|
|
21377
21425
|
};
|
|
21378
|
-
NgwResource.prototype.getBounds = function () {
|
|
21426
|
+
NgwResource.prototype.getBounds = function (options) {
|
|
21379
21427
|
return __awaiter(this, void 0, void 0, function () {
|
|
21380
21428
|
var _a;
|
|
21381
21429
|
return __generator(this, function (_b) {
|
|
@@ -21386,7 +21434,7 @@ var NgwResource = /** @class */ (function () {
|
|
|
21386
21434
|
}
|
|
21387
21435
|
if (!this.item) return [3 /*break*/, 2];
|
|
21388
21436
|
_a = this;
|
|
21389
|
-
return [4 /*yield*/, fetchNgwResourceExtent(this.item, this.connector)];
|
|
21437
|
+
return [4 /*yield*/, fetchNgwResourceExtent(this.item, this.connector, options)];
|
|
21390
21438
|
case 1:
|
|
21391
21439
|
_a._extent = _b.sent();
|
|
21392
21440
|
return [2 /*return*/, this._extent];
|
|
@@ -21980,7 +22028,6 @@ function fetchNgwLayerFeature(options) {
|
|
|
21980
22028
|
|
|
21981
22029
|
function getIdentifyItems(identify, multiple) {
|
|
21982
22030
|
if (multiple === void 0) { multiple = false; }
|
|
21983
|
-
var params;
|
|
21984
22031
|
var resources = [];
|
|
21985
22032
|
var paramsList = [];
|
|
21986
22033
|
for (var l in identify) {
|
|
@@ -22001,14 +22048,9 @@ function getIdentifyItems(identify, multiple) {
|
|
|
22001
22048
|
if ('features' in identifyItem) {
|
|
22002
22049
|
var layerFeatures = identifyItem.features;
|
|
22003
22050
|
var resourceId = Number(l);
|
|
22004
|
-
var
|
|
22005
|
-
if (
|
|
22006
|
-
|
|
22007
|
-
featureId: feature.id,
|
|
22008
|
-
resourceId: resourceId,
|
|
22009
|
-
feature: feature,
|
|
22010
|
-
};
|
|
22011
|
-
paramsList.push(params);
|
|
22051
|
+
var featureParams = createParamsFromFeatures(layerFeatures, resourceId, multiple);
|
|
22052
|
+
if (featureParams.length) {
|
|
22053
|
+
paramsList.push.apply(paramsList, featureParams);
|
|
22012
22054
|
if (!multiple) {
|
|
22013
22055
|
break;
|
|
22014
22056
|
}
|
|
@@ -22017,8 +22059,24 @@ function getIdentifyItems(identify, multiple) {
|
|
|
22017
22059
|
}
|
|
22018
22060
|
return paramsList;
|
|
22019
22061
|
}
|
|
22062
|
+
function createParamsFromFeatures(features, resourceId, multiple) {
|
|
22063
|
+
var featureParams = [];
|
|
22064
|
+
for (var _i = 0, features_1 = features; _i < features_1.length; _i++) {
|
|
22065
|
+
var feature = features_1[_i];
|
|
22066
|
+
var params = {
|
|
22067
|
+
featureId: feature.id,
|
|
22068
|
+
resourceId: resourceId,
|
|
22069
|
+
feature: feature,
|
|
22070
|
+
};
|
|
22071
|
+
featureParams.push(params);
|
|
22072
|
+
if (!multiple) {
|
|
22073
|
+
break;
|
|
22074
|
+
}
|
|
22075
|
+
}
|
|
22076
|
+
return featureParams;
|
|
22077
|
+
}
|
|
22020
22078
|
function fetchIdentifyGeoJson(options) {
|
|
22021
|
-
var connector = options.connector, identify = options.identify;
|
|
22079
|
+
var connector = options.connector, identify = options.identify, requestOptions = options.requestOptions;
|
|
22022
22080
|
for (var l in identify) {
|
|
22023
22081
|
var id = Number(l);
|
|
22024
22082
|
if (!isNaN(id)) {
|
|
@@ -22034,7 +22092,7 @@ function fetchIdentifyGeoJson(options) {
|
|
|
22034
22092
|
}
|
|
22035
22093
|
var params = getIdentifyItems(identify);
|
|
22036
22094
|
if (params && params.length) {
|
|
22037
|
-
return fetchNgwLayerFeature(__assign({ connector: connector }, params[0]));
|
|
22095
|
+
return fetchNgwLayerFeature(__assign(__assign(__assign({}, requestOptions), { connector: connector }), params[0]));
|
|
22038
22096
|
}
|
|
22039
22097
|
return CancelablePromise.resolve(undefined);
|
|
22040
22098
|
}
|
|
@@ -22047,21 +22105,25 @@ function fetchIdentifyItem(options) {
|
|
|
22047
22105
|
return CancelablePromise.resolve(undefined);
|
|
22048
22106
|
}
|
|
22049
22107
|
function featureLayerIdentify(options) {
|
|
22050
|
-
var
|
|
22051
|
-
var
|
|
22052
|
-
if (Array.isArray(
|
|
22053
|
-
|
|
22108
|
+
var geom = options.geom, signal = options.signal, cache = options.cache;
|
|
22109
|
+
var geom_ = [];
|
|
22110
|
+
if (Array.isArray(geom)) {
|
|
22111
|
+
geom_ = geom;
|
|
22054
22112
|
}
|
|
22055
22113
|
else {
|
|
22056
|
-
var polygon =
|
|
22114
|
+
var polygon = geom.type === 'Feature'
|
|
22115
|
+
? geom.geometry
|
|
22116
|
+
: geom.type === 'Polygon'
|
|
22117
|
+
? geom
|
|
22118
|
+
: false;
|
|
22057
22119
|
if (polygon) {
|
|
22058
|
-
|
|
22120
|
+
geom_ = polygon.coordinates[0];
|
|
22059
22121
|
}
|
|
22060
22122
|
}
|
|
22061
|
-
if (
|
|
22123
|
+
if (geom_) {
|
|
22062
22124
|
// create wkt string
|
|
22063
22125
|
var polygonStr = [];
|
|
22064
|
-
for (var _i = 0, geom_1 =
|
|
22126
|
+
for (var _i = 0, geom_1 = geom_; _i < geom_1.length; _i++) {
|
|
22065
22127
|
var _a = geom_1[_i], lng = _a[0], lat = _a[1];
|
|
22066
22128
|
var _b = degrees2meters(lng, lat), x = _b[0], y = _b[1];
|
|
22067
22129
|
polygonStr.push(x + ' ' + y);
|
|
@@ -22073,18 +22135,22 @@ function featureLayerIdentify(options) {
|
|
|
22073
22135
|
srs: 3857,
|
|
22074
22136
|
layers: layers,
|
|
22075
22137
|
};
|
|
22076
|
-
return options.connector.post('feature_layer.identify', {
|
|
22138
|
+
return options.connector.post('feature_layer.identify', {
|
|
22139
|
+
data: data,
|
|
22140
|
+
signal: signal,
|
|
22141
|
+
cache: cache,
|
|
22142
|
+
});
|
|
22077
22143
|
}
|
|
22078
22144
|
else {
|
|
22079
22145
|
throw new Error('Not valid geometry format to make intersection');
|
|
22080
22146
|
}
|
|
22081
22147
|
}
|
|
22082
22148
|
function sendIdentifyRequest(ev, options) {
|
|
22083
|
-
var _a;
|
|
22084
22149
|
deprecatedMapClick(ev);
|
|
22085
|
-
var
|
|
22086
|
-
var geom =
|
|
22087
|
-
|
|
22150
|
+
var _a = ev.lngLat, lng = _a[0], lat = _a[1];
|
|
22151
|
+
var geom = options.geom, radius = options.radius, signal = options.signal, cache = options.cache;
|
|
22152
|
+
var geom_ = geom !== null && geom !== void 0 ? geom : getCirclePolygonCoordinates(lng, lat, radius);
|
|
22153
|
+
return featureLayerIdentify(__assign(__assign({}, options), { geom: geom_, signal: signal, cache: cache }));
|
|
22088
22154
|
}
|
|
22089
22155
|
function createIdentifyItem(opt) {
|
|
22090
22156
|
return new IdentifyItem(opt);
|
|
@@ -24244,18 +24310,25 @@ var LeafletMapAdapter = /** @class */ (function () {
|
|
|
24244
24310
|
this._universalEvents = [
|
|
24245
24311
|
'move',
|
|
24246
24312
|
'zoom',
|
|
24247
|
-
'moveend',
|
|
24248
24313
|
'zoomend',
|
|
24249
24314
|
'zoomstart',
|
|
24315
|
+
'moveend',
|
|
24250
24316
|
'movestart',
|
|
24251
24317
|
];
|
|
24318
|
+
this._positionEvents = [
|
|
24319
|
+
'mousemove',
|
|
24320
|
+
'mouseout',
|
|
24321
|
+
'mouseover',
|
|
24322
|
+
];
|
|
24252
24323
|
}
|
|
24253
24324
|
LeafletMapAdapter.prototype.create = function (options) {
|
|
24254
24325
|
var _this = this;
|
|
24255
24326
|
this.options = __assign({}, options);
|
|
24256
24327
|
if (this.options.target) {
|
|
24257
24328
|
var _a = this.options, zoom = _a.zoom, center = _a.center, maxZoom = _a.maxZoom, minZoom = _a.minZoom, mb = _a.maxBounds, mapAdapterOptions = _a.mapAdapterOptions;
|
|
24258
|
-
this.map =
|
|
24329
|
+
this.map =
|
|
24330
|
+
this.options.map ||
|
|
24331
|
+
new leafletSrc.exports.Map(this.options.target, __assign({ attributionControl: false, zoomControl: false, maxBounds: mb ? arrayToBoundsExpression(mb) : undefined, maxZoom: maxZoom, minZoom: minZoom, center: center && [center[1], center[0]], zoom: zoom }, mapAdapterOptions));
|
|
24259
24332
|
// create default pane
|
|
24260
24333
|
var defPane = this.map.createPane('order-0');
|
|
24261
24334
|
this.map._addUnselectCb = function (def) {
|
|
@@ -24501,9 +24574,22 @@ var LeafletMapAdapter = /** @class */ (function () {
|
|
|
24501
24574
|
map.on('click', function (evt) {
|
|
24502
24575
|
_this.onMapClick(evt);
|
|
24503
24576
|
});
|
|
24504
|
-
|
|
24577
|
+
var _loop_1 = function (e) {
|
|
24505
24578
|
map.on(e, function () { return _this.emitter.emit(e, _this); }, map);
|
|
24506
|
-
}
|
|
24579
|
+
};
|
|
24580
|
+
for (var _i = 0, _a = this._universalEvents; _i < _a.length; _i++) {
|
|
24581
|
+
var e = _a[_i];
|
|
24582
|
+
_loop_1(e);
|
|
24583
|
+
}
|
|
24584
|
+
var _loop_2 = function (e) {
|
|
24585
|
+
map.on(e, function (evt) {
|
|
24586
|
+
return _this.emitter.emit(e, convertMapClickEvent(evt));
|
|
24587
|
+
}, map);
|
|
24588
|
+
};
|
|
24589
|
+
for (var _b = 0, _c = this._positionEvents; _b < _c.length; _b++) {
|
|
24590
|
+
var e = _c[_b];
|
|
24591
|
+
_loop_2(e);
|
|
24592
|
+
}
|
|
24507
24593
|
}
|
|
24508
24594
|
};
|
|
24509
24595
|
LeafletMapAdapter.layerAdapters = {
|