mars2d-esri 3.1.12 → 3.1.13
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/dist/mars2d-esri.js +178 -135
- package/package.json +2 -2
package/dist/mars2d-esri.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Mars2D平台插件,ArcGIS Server功能支持插件 mars2d-esri
|
|
3
3
|
*
|
|
4
|
-
* 版本信息:v3.1.
|
|
5
|
-
* 编译日期:2023-03
|
|
4
|
+
* 版本信息:v3.1.13
|
|
5
|
+
* 编译日期:2023-04-03 20:31:42
|
|
6
6
|
* 版权所有:Copyright by 火星科技 http://mars2d.cn
|
|
7
7
|
* 使用单位:免费公开版 ,2021-10-01
|
|
8
8
|
*/
|
|
@@ -37,48 +37,50 @@
|
|
|
37
37
|
|
|
38
38
|
var name = "esri-leaflet";
|
|
39
39
|
var description = "Leaflet plugins for consuming ArcGIS Online and ArcGIS Server services.";
|
|
40
|
-
var version$1 = "3.0.
|
|
40
|
+
var version$1 = "3.0.10";
|
|
41
41
|
var author = "Patrick Arlt <parlt@esri.com> (http://patrickarlt.com)";
|
|
42
42
|
var bugs = {
|
|
43
43
|
url: "https://github.com/esri/esri-leaflet/issues"
|
|
44
44
|
};
|
|
45
45
|
var contributors = [
|
|
46
46
|
"Patrick Arlt <parlt@esri.com> (http://patrickarlt.com)",
|
|
47
|
-
"John Gravois
|
|
47
|
+
"John Gravois (https://johngravois.com)",
|
|
48
48
|
"Gavin Rehkemper <grehkemper@esri.com> (https://gavinr.com)",
|
|
49
|
-
"Jacob Wasilkowski
|
|
49
|
+
"Jacob Wasilkowski (https://jwasilgeo.github.io)"
|
|
50
50
|
];
|
|
51
51
|
var dependencies = {
|
|
52
52
|
"@terraformer/arcgis": "^2.1.0",
|
|
53
53
|
"tiny-binary-search": "^1.0.3"
|
|
54
54
|
};
|
|
55
55
|
var devDependencies = {
|
|
56
|
-
"@rollup/plugin-json": "^
|
|
57
|
-
"@rollup/plugin-node-resolve": "^
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
"
|
|
61
|
-
"
|
|
56
|
+
"@rollup/plugin-json": "^6.0.0",
|
|
57
|
+
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
58
|
+
"@rollup/plugin-terser": "^0.3.0",
|
|
59
|
+
chai: "4.3.7",
|
|
60
|
+
"chokidar-cli": "^3.0.0",
|
|
61
|
+
"gh-release": "^7.0.1",
|
|
62
|
+
"highlight.js": "^11.7.0",
|
|
63
|
+
"http-server": "^14.1.1",
|
|
62
64
|
husky: "^1.1.1",
|
|
63
|
-
karma: "^6.
|
|
64
|
-
"karma-
|
|
65
|
-
"karma-chrome-launcher": "^3.1.0",
|
|
65
|
+
karma: "^6.4.1",
|
|
66
|
+
"karma-chrome-launcher": "^3.1.1",
|
|
66
67
|
"karma-coverage": "^2.2.0",
|
|
68
|
+
"karma-edgium-launcher": "github:matracey/karma-edgium-launcher",
|
|
69
|
+
"karma-firefox-launcher": "^2.1.2",
|
|
67
70
|
"karma-mocha": "^2.0.1",
|
|
68
71
|
"karma-mocha-reporter": "^2.2.5",
|
|
72
|
+
"karma-safari-launcher": "~1.0.0",
|
|
73
|
+
"karma-sinon-chai": "^2.0.2",
|
|
69
74
|
"karma-sourcemap-loader": "^0.3.8",
|
|
70
75
|
leaflet: "^1.6.0",
|
|
71
76
|
mkdirp: "^1.0.4",
|
|
72
|
-
mocha: "^
|
|
77
|
+
mocha: "^10.2.0",
|
|
73
78
|
"npm-run-all": "^4.1.5",
|
|
74
|
-
rollup: "^2.
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
sinon: "^13.0.1",
|
|
79
|
+
rollup: "^2.79.1",
|
|
80
|
+
semistandard: "^14.2.3",
|
|
81
|
+
sinon: "^15.0.1",
|
|
78
82
|
"sinon-chai": "3.7.0",
|
|
79
|
-
snazzy: "^9.0.0"
|
|
80
|
-
"uglify-js": "^3.15.1",
|
|
81
|
-
watch: "^1.0.2"
|
|
83
|
+
snazzy: "^9.0.0"
|
|
82
84
|
};
|
|
83
85
|
var files = [
|
|
84
86
|
"src/**/*.js",
|
|
@@ -88,7 +90,7 @@
|
|
|
88
90
|
"dist/siteData.json",
|
|
89
91
|
"profiles/*.js"
|
|
90
92
|
];
|
|
91
|
-
var homepage = "
|
|
93
|
+
var homepage = "https://developers.arcgis.com/esri-leaflet/";
|
|
92
94
|
var module = "src/EsriLeaflet.js";
|
|
93
95
|
var jspm = {
|
|
94
96
|
registry: "npm",
|
|
@@ -121,11 +123,10 @@
|
|
|
121
123
|
precommit: "npm run lint",
|
|
122
124
|
fix: "semistandard --fix",
|
|
123
125
|
release: "./scripts/release.sh",
|
|
124
|
-
"start-watch": "
|
|
126
|
+
"start-watch": "chokidar src -c \"npm run build\"",
|
|
125
127
|
start: "run-p start-watch serve",
|
|
126
128
|
serve: "http-server -p 5000 -c-1 -o",
|
|
127
|
-
test: "npm run lint && karma start"
|
|
128
|
-
"test:ci": "npm run lint && karma start --browsers Chrome_travis_ci"
|
|
129
|
+
test: "npm run lint && karma start"
|
|
129
130
|
};
|
|
130
131
|
var semistandard = {
|
|
131
132
|
globals: [
|
|
@@ -183,7 +184,7 @@
|
|
|
183
184
|
params.f = params.f || 'json';
|
|
184
185
|
|
|
185
186
|
for (var key in params) {
|
|
186
|
-
if (
|
|
187
|
+
if (Object.prototype.hasOwnProperty.call(params, key)) {
|
|
187
188
|
var param = params[key];
|
|
188
189
|
var type = Object.prototype.toString.call(param);
|
|
189
190
|
var value;
|
|
@@ -325,7 +326,7 @@
|
|
|
325
326
|
|
|
326
327
|
// request is longer then 2000 characters and the browser does not support CORS, log a warning
|
|
327
328
|
} else {
|
|
328
|
-
warn('a request to ' + url + ' was longer then 2000 characters and this browser cannot make a cross-domain post request. Please use a proxy
|
|
329
|
+
warn('a request to ' + url + ' was longer then 2000 characters and this browser cannot make a cross-domain post request. Please use a proxy https://developers.arcgis.com/esri-leaflet/api-reference/request/');
|
|
329
330
|
return;
|
|
330
331
|
}
|
|
331
332
|
|
|
@@ -414,9 +415,9 @@
|
|
|
414
415
|
};
|
|
415
416
|
|
|
416
417
|
/* @preserve
|
|
417
|
-
* @terraformer/arcgis - v2.
|
|
418
|
-
* Copyright (c) 2012-
|
|
419
|
-
*
|
|
418
|
+
* @terraformer/arcgis - v2.1.1 - MIT
|
|
419
|
+
* Copyright (c) 2012-2022 Environmental Systems Research Institute, Inc.
|
|
420
|
+
* Tue Aug 02 2022 14:23:48 GMT-0700 (Pacific Daylight Time)
|
|
420
421
|
*/
|
|
421
422
|
/* Copyright (c) 2012-2019 Environmental Systems Research Institute, Inc.
|
|
422
423
|
* Apache-2.0 */
|
|
@@ -765,7 +766,7 @@
|
|
|
765
766
|
result.x = geojson.coordinates[0];
|
|
766
767
|
result.y = geojson.coordinates[1];
|
|
767
768
|
|
|
768
|
-
if (geojson.coordinates[2]) {
|
|
769
|
+
if (geojson.coordinates[2] != null) {
|
|
769
770
|
result.z = geojson.coordinates[2];
|
|
770
771
|
}
|
|
771
772
|
|
|
@@ -775,7 +776,7 @@
|
|
|
775
776
|
case 'MultiPoint':
|
|
776
777
|
result.points = geojson.coordinates.slice(0);
|
|
777
778
|
|
|
778
|
-
if (geojson.coordinates[0][2]) {
|
|
779
|
+
if (geojson.coordinates[0][2] != null) {
|
|
779
780
|
result.hasZ = true;
|
|
780
781
|
}
|
|
781
782
|
|
|
@@ -785,7 +786,7 @@
|
|
|
785
786
|
case 'LineString':
|
|
786
787
|
result.paths = [geojson.coordinates.slice(0)];
|
|
787
788
|
|
|
788
|
-
if (geojson.coordinates[0][2]) {
|
|
789
|
+
if (geojson.coordinates[0][2] != null) {
|
|
789
790
|
result.hasZ = true;
|
|
790
791
|
}
|
|
791
792
|
|
|
@@ -795,7 +796,7 @@
|
|
|
795
796
|
case 'MultiLineString':
|
|
796
797
|
result.paths = geojson.coordinates.slice(0);
|
|
797
798
|
|
|
798
|
-
if (geojson.coordinates[0][0][2]) {
|
|
799
|
+
if (geojson.coordinates[0][0][2] != null) {
|
|
799
800
|
result.hasZ = true;
|
|
800
801
|
}
|
|
801
802
|
|
|
@@ -805,7 +806,7 @@
|
|
|
805
806
|
case 'Polygon':
|
|
806
807
|
result.rings = orientRings(geojson.coordinates.slice(0));
|
|
807
808
|
|
|
808
|
-
if (geojson.coordinates[0][0][2]) {
|
|
809
|
+
if (geojson.coordinates[0][0][2] != null) {
|
|
809
810
|
result.hasZ = true;
|
|
810
811
|
}
|
|
811
812
|
|
|
@@ -815,7 +816,7 @@
|
|
|
815
816
|
case 'MultiPolygon':
|
|
816
817
|
result.rings = flattenMultiPolygonRings(geojson.coordinates.slice(0));
|
|
817
818
|
|
|
818
|
-
if (geojson.coordinates[0][0][0][2]) {
|
|
819
|
+
if (geojson.coordinates[0][0][0][2] != null) {
|
|
819
820
|
result.hasZ = true;
|
|
820
821
|
}
|
|
821
822
|
|
|
@@ -884,12 +885,12 @@
|
|
|
884
885
|
function boundsToExtent (bounds) {
|
|
885
886
|
bounds = L.latLngBounds(bounds);
|
|
886
887
|
return {
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
888
|
+
xmin: bounds.getSouthWest().lng,
|
|
889
|
+
ymin: bounds.getSouthWest().lat,
|
|
890
|
+
xmax: bounds.getNorthEast().lng,
|
|
891
|
+
ymax: bounds.getNorthEast().lat,
|
|
892
|
+
spatialReference: {
|
|
893
|
+
wkid: 4326
|
|
893
894
|
}
|
|
894
895
|
};
|
|
895
896
|
}
|
|
@@ -959,7 +960,7 @@
|
|
|
959
960
|
return featureCollection;
|
|
960
961
|
}
|
|
961
962
|
|
|
962
|
-
|
|
963
|
+
// trim url whitespace and add a trailing slash if needed
|
|
963
964
|
function cleanUrl (url) {
|
|
964
965
|
// trim leading and trailing spaces, but not spaces inside the url
|
|
965
966
|
url = L.Util.trim(url);
|
|
@@ -1144,8 +1145,6 @@
|
|
|
1144
1145
|
|
|
1145
1146
|
// warn the user if we havn't found an appropriate object
|
|
1146
1147
|
warn('invalid geometry passed to spatial query. Should be L.LatLng, L.LatLngBounds, L.Marker or a GeoJSON Point, Line, Polygon or MultiPolygon object');
|
|
1147
|
-
|
|
1148
|
-
return;
|
|
1149
1148
|
}
|
|
1150
1149
|
|
|
1151
1150
|
function _getAttributionData (url, map) {
|
|
@@ -1323,15 +1322,15 @@
|
|
|
1323
1322
|
|
|
1324
1323
|
var Query = Task.extend({
|
|
1325
1324
|
setters: {
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1325
|
+
offset: 'resultOffset',
|
|
1326
|
+
limit: 'resultRecordCount',
|
|
1327
|
+
fields: 'outFields',
|
|
1328
|
+
precision: 'geometryPrecision',
|
|
1329
|
+
featureIds: 'objectIds',
|
|
1330
|
+
returnGeometry: 'returnGeometry',
|
|
1331
|
+
returnM: 'returnM',
|
|
1332
|
+
transform: 'datumTransformation',
|
|
1333
|
+
token: 'token'
|
|
1335
1334
|
},
|
|
1336
1335
|
|
|
1337
1336
|
path: 'query',
|
|
@@ -1538,22 +1537,22 @@
|
|
|
1538
1537
|
var Find = Task.extend({
|
|
1539
1538
|
setters: {
|
|
1540
1539
|
// method name > param name
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1540
|
+
contains: 'contains',
|
|
1541
|
+
text: 'searchText',
|
|
1542
|
+
fields: 'searchFields', // denote an array or single string
|
|
1543
|
+
spatialReference: 'sr',
|
|
1544
|
+
sr: 'sr',
|
|
1545
|
+
layers: 'layers',
|
|
1546
|
+
returnGeometry: 'returnGeometry',
|
|
1547
|
+
maxAllowableOffset: 'maxAllowableOffset',
|
|
1548
|
+
precision: 'geometryPrecision',
|
|
1549
|
+
dynamicLayers: 'dynamicLayers',
|
|
1550
|
+
returnZ: 'returnZ',
|
|
1551
|
+
returnM: 'returnM',
|
|
1552
|
+
gdbVersion: 'gdbVersion',
|
|
1554
1553
|
// skipped implementing this (for now) because the REST service implementation isnt consistent between operations
|
|
1555
1554
|
// 'transform': 'datumTransformations',
|
|
1556
|
-
|
|
1555
|
+
token: 'token'
|
|
1557
1556
|
},
|
|
1558
1557
|
|
|
1559
1558
|
path: 'find',
|
|
@@ -1604,12 +1603,12 @@
|
|
|
1604
1603
|
|
|
1605
1604
|
var IdentifyFeatures = Identify.extend({
|
|
1606
1605
|
setters: {
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1606
|
+
layers: 'layers',
|
|
1607
|
+
precision: 'geometryPrecision',
|
|
1608
|
+
tolerance: 'tolerance',
|
|
1610
1609
|
// skipped implementing this (for now) because the REST service implementation isnt consistent between operations.
|
|
1611
1610
|
// 'transform': 'datumTransformations'
|
|
1612
|
-
|
|
1611
|
+
returnGeometry: 'returnGeometry'
|
|
1613
1612
|
},
|
|
1614
1613
|
|
|
1615
1614
|
params: {
|
|
@@ -1653,7 +1652,6 @@
|
|
|
1653
1652
|
// immediately invoke with an error
|
|
1654
1653
|
if (error) {
|
|
1655
1654
|
callback.call(context, error, undefined, response);
|
|
1656
|
-
return;
|
|
1657
1655
|
|
|
1658
1656
|
// ok no error lets just assume we have features...
|
|
1659
1657
|
} else {
|
|
@@ -1681,11 +1679,11 @@
|
|
|
1681
1679
|
|
|
1682
1680
|
var IdentifyImage = Identify.extend({
|
|
1683
1681
|
setters: {
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1682
|
+
setMosaicRule: 'mosaicRule',
|
|
1683
|
+
setRenderingRule: 'renderingRule',
|
|
1684
|
+
setPixelSize: 'pixelSize',
|
|
1685
|
+
returnCatalogItems: 'returnCatalogItems',
|
|
1686
|
+
returnGeometry: 'returnGeometry'
|
|
1689
1687
|
},
|
|
1690
1688
|
|
|
1691
1689
|
params: {
|
|
@@ -1731,24 +1729,24 @@
|
|
|
1731
1729
|
var catalogItems = response.catalogItems;
|
|
1732
1730
|
var catalogItemVisibilities = response.catalogItemVisibilities;
|
|
1733
1731
|
var geoJSON = {
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1732
|
+
pixel: {
|
|
1733
|
+
type: 'Feature',
|
|
1734
|
+
geometry: {
|
|
1735
|
+
type: 'Point',
|
|
1736
|
+
coordinates: [location.x, location.y]
|
|
1739
1737
|
},
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1738
|
+
crs: {
|
|
1739
|
+
type: 'EPSG',
|
|
1740
|
+
properties: {
|
|
1741
|
+
code: location.spatialReference.wkid
|
|
1744
1742
|
}
|
|
1745
1743
|
},
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1744
|
+
properties: {
|
|
1745
|
+
OBJECTID: response.objectId,
|
|
1746
|
+
name: response.name,
|
|
1747
|
+
value: response.value
|
|
1750
1748
|
},
|
|
1751
|
-
|
|
1749
|
+
id: response.objectId
|
|
1752
1750
|
}
|
|
1753
1751
|
};
|
|
1754
1752
|
|
|
@@ -1837,7 +1835,6 @@
|
|
|
1837
1835
|
}
|
|
1838
1836
|
if (this._authenticating) {
|
|
1839
1837
|
this._requestQueue.push([method, path, params, callback, context]);
|
|
1840
|
-
return;
|
|
1841
1838
|
} else {
|
|
1842
1839
|
var url = (this.options.proxy) ? this.options.proxy + '?' + this.options.url + path : this.options.url + path;
|
|
1843
1840
|
|
|
@@ -2303,30 +2300,30 @@
|
|
|
2303
2300
|
|
|
2304
2301
|
statics: {
|
|
2305
2302
|
MercatorZoomLevels: {
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2303
|
+
0: 156543.03392799999,
|
|
2304
|
+
1: 78271.516963999893,
|
|
2305
|
+
2: 39135.758482000099,
|
|
2306
|
+
3: 19567.879240999901,
|
|
2307
|
+
4: 9783.9396204999593,
|
|
2308
|
+
5: 4891.9698102499797,
|
|
2309
|
+
6: 2445.9849051249898,
|
|
2310
|
+
7: 1222.9924525624899,
|
|
2311
|
+
8: 611.49622628138002,
|
|
2312
|
+
9: 305.74811314055802,
|
|
2313
|
+
10: 152.874056570411,
|
|
2314
|
+
11: 76.437028285073197,
|
|
2315
|
+
12: 38.218514142536598,
|
|
2316
|
+
13: 19.109257071268299,
|
|
2317
|
+
14: 9.5546285356341496,
|
|
2318
|
+
15: 4.7773142679493699,
|
|
2319
|
+
16: 2.38865713397468,
|
|
2320
|
+
17: 1.1943285668550501,
|
|
2321
|
+
18: 0.59716428355981699,
|
|
2322
|
+
19: 0.29858214164761698,
|
|
2323
|
+
20: 0.14929107082381,
|
|
2324
|
+
21: 0.07464553541191,
|
|
2325
|
+
22: 0.0373227677059525,
|
|
2326
|
+
23: 0.0186613838529763
|
|
2330
2327
|
}
|
|
2331
2328
|
},
|
|
2332
2329
|
|
|
@@ -2435,7 +2432,7 @@
|
|
|
2435
2432
|
this.fire('lodmap');
|
|
2436
2433
|
} else if (map.options.crs && map.options.crs.code && (map.options.crs.code.indexOf(sr) > -1)) ; else {
|
|
2437
2434
|
// if the service was cached in a custom projection and an appropriate LOD hasn't been defined in the map, guide the developer to our Proj4 sample
|
|
2438
|
-
warn('L.esri.TiledMapLayer is using a non-mercator spatial reference. Support may be available through Proj4Leaflet
|
|
2435
|
+
warn('L.esri.TiledMapLayer is using a non-mercator spatial reference. Support may be available through Proj4Leaflet https://developers.arcgis.com/esri-leaflet/samples/non-mercator-projection/');
|
|
2439
2436
|
}
|
|
2440
2437
|
}
|
|
2441
2438
|
}, this);
|
|
@@ -2699,7 +2696,7 @@
|
|
|
2699
2696
|
};
|
|
2700
2697
|
|
|
2701
2698
|
var onOverlayLoad = function (e) {
|
|
2702
|
-
image.off('error',
|
|
2699
|
+
image.off('error', onOverlayError, this);
|
|
2703
2700
|
if (this._map) {
|
|
2704
2701
|
var newImage = e.target;
|
|
2705
2702
|
var oldImage = this._currentImage;
|
|
@@ -3129,7 +3126,9 @@
|
|
|
3129
3126
|
}
|
|
3130
3127
|
|
|
3131
3128
|
// remove extraneous vertices from response features if it has not already been done
|
|
3132
|
-
identifyRequest.params.maxAllowableOffset
|
|
3129
|
+
if (!identifyRequest.params.maxAllowableOffset) {
|
|
3130
|
+
identifyRequest.simplify(this._map, 0.5);
|
|
3131
|
+
}
|
|
3133
3132
|
|
|
3134
3133
|
if (!(this.options.popup && this.options.popup.params && this.options.popup.params.layers)) {
|
|
3135
3134
|
if (this.options.layers) {
|
|
@@ -3142,7 +3141,7 @@
|
|
|
3142
3141
|
// if present, pass layer ids and sql filters through to the identify task
|
|
3143
3142
|
if (this.options.layerDefs && typeof this.options.layerDefs !== 'string' && !identifyRequest.params.layerDefs) {
|
|
3144
3143
|
for (var id in this.options.layerDefs) {
|
|
3145
|
-
if (this.options.layerDefs
|
|
3144
|
+
if (Object.prototype.hasOwnProperty.call(this.options.layerDefs, id)) {
|
|
3146
3145
|
identifyRequest.layerDef(id, this.options.layerDefs[id]);
|
|
3147
3146
|
}
|
|
3148
3147
|
}
|
|
@@ -3339,19 +3338,19 @@
|
|
|
3339
3338
|
},
|
|
3340
3339
|
|
|
3341
3340
|
removeCell: function () {
|
|
3342
|
-
|
|
3341
|
+
|
|
3343
3342
|
},
|
|
3344
3343
|
|
|
3345
3344
|
reuseCell: function () {
|
|
3346
|
-
|
|
3345
|
+
|
|
3347
3346
|
},
|
|
3348
3347
|
|
|
3349
3348
|
cellLeave: function () {
|
|
3350
|
-
|
|
3349
|
+
|
|
3351
3350
|
},
|
|
3352
3351
|
|
|
3353
3352
|
cellEnter: function () {
|
|
3354
|
-
|
|
3353
|
+
|
|
3355
3354
|
},
|
|
3356
3355
|
// @section
|
|
3357
3356
|
// @method getCellSize: Point
|
|
@@ -3503,14 +3502,14 @@
|
|
|
3503
3502
|
|
|
3504
3503
|
this._wrapX = crs.wrapLng &&
|
|
3505
3504
|
!this.options.noWrap && [
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3505
|
+
Math.floor(map.project([0, crs.wrapLng[0]], cellZoom).x / cellSize.x),
|
|
3506
|
+
Math.ceil(map.project([0, crs.wrapLng[1]], cellZoom).x / cellSize.y)
|
|
3507
|
+
];
|
|
3509
3508
|
this._wrapY = crs.wrapLat &&
|
|
3510
3509
|
!this.options.noWrap && [
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3510
|
+
Math.floor(map.project([crs.wrapLat[0], 0], cellZoom).y / cellSize.x),
|
|
3511
|
+
Math.ceil(map.project([crs.wrapLat[1], 0], cellZoom).y / cellSize.y)
|
|
3512
|
+
];
|
|
3514
3513
|
},
|
|
3515
3514
|
|
|
3516
3515
|
_onMoveEnd: function (e) {
|
|
@@ -4937,8 +4936,38 @@
|
|
|
4937
4936
|
|
|
4938
4937
|
// looks like a path (polygon/polyline)
|
|
4939
4938
|
if (layer && layer.setStyle && this.options.style) {
|
|
4940
|
-
this.
|
|
4939
|
+
this.resetFeatureStyle(geojson.id);
|
|
4940
|
+
}
|
|
4941
|
+
},
|
|
4942
|
+
|
|
4943
|
+
// This is the same as the Layer.openPopup method except it excludes the `FeatureGroup`
|
|
4944
|
+
// logic to work around https://github.com/Leaflet/Leaflet/issues/8761
|
|
4945
|
+
openPopup (latlng) {
|
|
4946
|
+
if (this._popup) {
|
|
4947
|
+
if (this._popup._prepareOpen(latlng || this._latlng)) {
|
|
4948
|
+
// open the popup on the map
|
|
4949
|
+
this._popup.openOn(this._map);
|
|
4950
|
+
}
|
|
4941
4951
|
}
|
|
4952
|
+
return this;
|
|
4953
|
+
},
|
|
4954
|
+
|
|
4955
|
+
// This is the same as the `Layer.openTooltip` method except it excludes the `FeatureGroup`
|
|
4956
|
+
// logic to work around https://github.com/Leaflet/Leaflet/issues/8761
|
|
4957
|
+
openTooltip (latlng) {
|
|
4958
|
+
if (this._tooltip) {
|
|
4959
|
+
if (this._tooltip._prepareOpen(latlng)) {
|
|
4960
|
+
// open the tooltip on the map
|
|
4961
|
+
this._tooltip.openOn(this._map);
|
|
4962
|
+
|
|
4963
|
+
if (this.getElement) {
|
|
4964
|
+
this._setAriaDescribedByOnLayer(this);
|
|
4965
|
+
} else if (this.eachLayer) {
|
|
4966
|
+
this.eachLayer(this._setAriaDescribedByOnLayer, this);
|
|
4967
|
+
}
|
|
4968
|
+
}
|
|
4969
|
+
}
|
|
4970
|
+
return this;
|
|
4942
4971
|
}
|
|
4943
4972
|
});
|
|
4944
4973
|
|
|
@@ -13917,13 +13946,20 @@
|
|
|
13917
13946
|
if (popupConifg) {
|
|
13918
13947
|
var popupOptions = this.options.popupOptions || {};
|
|
13919
13948
|
this.bindPopup(function (evt) {
|
|
13949
|
+
var _evt$feature;
|
|
13950
|
+
|
|
13920
13951
|
// if (layer.hasOwnProperty("isPopup") && !layer.isPopup) {
|
|
13921
13952
|
// return;
|
|
13922
13953
|
// }
|
|
13923
13954
|
// if (_calbackClickFeature) {
|
|
13924
13955
|
// _calbackClickFeature("arcgis_feature", evt);
|
|
13925
13956
|
// }
|
|
13926
|
-
var attr = evt.feature.properties;
|
|
13957
|
+
var attr = (_evt$feature = evt.feature) === null || _evt$feature === void 0 ? void 0 : _evt$feature.properties;
|
|
13958
|
+
|
|
13959
|
+
if (!attr) {
|
|
13960
|
+
return "";
|
|
13961
|
+
}
|
|
13962
|
+
|
|
13927
13963
|
var title = _this.name;
|
|
13928
13964
|
|
|
13929
13965
|
if (popupOptions.noTitle) {
|
|
@@ -13948,7 +13984,14 @@
|
|
|
13948
13984
|
var _popupOptions = this.options.tooltipOptions || {};
|
|
13949
13985
|
|
|
13950
13986
|
this.bindTooltip(function (evt) {
|
|
13951
|
-
var
|
|
13987
|
+
var _evt$feature2;
|
|
13988
|
+
|
|
13989
|
+
var attr = (_evt$feature2 = evt.feature) === null || _evt$feature2 === void 0 ? void 0 : _evt$feature2.properties;
|
|
13990
|
+
|
|
13991
|
+
if (!attr) {
|
|
13992
|
+
return "";
|
|
13993
|
+
}
|
|
13994
|
+
|
|
13952
13995
|
var title = _this.name;
|
|
13953
13996
|
|
|
13954
13997
|
if (_popupOptions.noTitle) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mars2d-esri",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.13",
|
|
4
4
|
"description": "Mars2D平台插件,ArcGIS Server功能支持插件",
|
|
5
5
|
"main": "dist/mars2d-esri.js",
|
|
6
6
|
"files": [
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
],
|
|
9
9
|
"dependencies": {},
|
|
10
10
|
"devDependencies": {
|
|
11
|
-
"mars2d": "~3.1.
|
|
11
|
+
"mars2d": "~3.1.13"
|
|
12
12
|
},
|
|
13
13
|
"scripts": {
|
|
14
14
|
"lint": "eslint ./src/**/*.{js,ts} --fix"
|