@supermapgis/iclient-ol 11.2.1 → 11.3.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/core/Util.js +2 -18
- package/dist/iclient-openlayers-es6.js +1295 -958
- package/dist/iclient-openlayers-es6.min.js +2 -2
- package/dist/iclient-openlayers.css +1 -1
- package/dist/iclient-openlayers.js +2131 -1770
- package/dist/iclient-openlayers.min.css +1 -1
- package/dist/iclient-openlayers.min.js +2 -2
- package/mapping/WebMap.js +31 -48
- package/overlay/vectortile/MapboxStyles.js +1 -1
- package/package.json +4 -4
- package/mapping/webmap/config/MunicipalCenter.json +0 -1
- package/mapping/webmap/config/ProvinceCenter.json +0 -1
package/core/Util.js
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
import { Bounds } from '@supermapgis/iclient-common/commontypes/Bounds';
|
|
5
5
|
import { GeoJSON as GeoJSONFormat } from '@supermapgis/iclient-common/format/GeoJSON';
|
|
6
6
|
import { getMeterPerMapUnit, scalesToResolutions, getZoomByResolution, getDpi } from '@supermapgis/iclient-common/util/MapCalculateUtil';
|
|
7
|
+
import { isString, isArray } from '@supermapgis/iclient-common/util/BaseUtil';
|
|
8
|
+
import { isMatchAdministrativeName } from '@supermapgis/iclient-common/mapping/utils/util';
|
|
7
9
|
import * as olUtil from 'ol/util';
|
|
8
10
|
import Geometry from 'ol/geom/Geometry';
|
|
9
11
|
import { getVectorContext } from 'ol/render';
|
|
@@ -464,12 +466,6 @@
|
|
|
464
466
|
}
|
|
465
467
|
}
|
|
466
468
|
|
|
467
|
-
function isString(str) {
|
|
468
|
-
return typeof str === 'string' && str.constructor === String;
|
|
469
|
-
}
|
|
470
|
-
function isArray(obj) {
|
|
471
|
-
return Object.prototype.toString.call(obj) === '[object Array]';
|
|
472
|
-
}
|
|
473
469
|
function unsetMask(layers) {
|
|
474
470
|
const todoLayers = Array.isArray(layers) ? layers : [layers];
|
|
475
471
|
for (let index = 0; index < todoLayers.length; index++) {
|
|
@@ -486,15 +482,3 @@ function isArray(obj) {
|
|
|
486
482
|
layer.changed();
|
|
487
483
|
}
|
|
488
484
|
}
|
|
489
|
-
|
|
490
|
-
function isMatchAdministrativeName(featureName, fieldName) {
|
|
491
|
-
if (isString(fieldName)) {
|
|
492
|
-
let shortName = featureName.substr(0, 2);
|
|
493
|
-
// 张家口市和张家界市 特殊处理
|
|
494
|
-
if (shortName === '张家') {
|
|
495
|
-
shortName = featureName.substr(0, 3);
|
|
496
|
-
}
|
|
497
|
-
return !!fieldName.match(new RegExp(shortName));
|
|
498
|
-
}
|
|
499
|
-
return false;
|
|
500
|
-
}
|