mars2d-esri 3.1.18 → 3.1.19
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 +163 -137
- 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-
|
|
4
|
+
* 版本信息:v3.1.19
|
|
5
|
+
* 编译日期:2023-08-22 12:46:23
|
|
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.11";
|
|
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
|
|
|
@@ -857,7 +858,6 @@
|
|
|
857
858
|
return result;
|
|
858
859
|
};
|
|
859
860
|
|
|
860
|
-
var BASE_LEAFLET_ATTRIBUTION_STRING = '<a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>';
|
|
861
861
|
var POWERED_BY_ESRI_ATTRIBUTION_STRING = 'Powered by <a href="https://www.esri.com">Esri</a>';
|
|
862
862
|
|
|
863
863
|
function geojsonToArcGIS (geojson, idAttr) {
|
|
@@ -884,12 +884,12 @@
|
|
|
884
884
|
function boundsToExtent (bounds) {
|
|
885
885
|
bounds = L.latLngBounds(bounds);
|
|
886
886
|
return {
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
887
|
+
xmin: bounds.getSouthWest().lng,
|
|
888
|
+
ymin: bounds.getSouthWest().lat,
|
|
889
|
+
xmax: bounds.getNorthEast().lng,
|
|
890
|
+
ymax: bounds.getNorthEast().lat,
|
|
891
|
+
spatialReference: {
|
|
892
|
+
wkid: 4326
|
|
893
893
|
}
|
|
894
894
|
};
|
|
895
895
|
}
|
|
@@ -959,7 +959,7 @@
|
|
|
959
959
|
return featureCollection;
|
|
960
960
|
}
|
|
961
961
|
|
|
962
|
-
|
|
962
|
+
// trim url whitespace and add a trailing slash if needed
|
|
963
963
|
function cleanUrl (url) {
|
|
964
964
|
// trim leading and trailing spaces, but not spaces inside the url
|
|
965
965
|
url = L.Util.trim(url);
|
|
@@ -1066,7 +1066,6 @@
|
|
|
1066
1066
|
map.attributionControl._esriAttributionAddedOnce = true;
|
|
1067
1067
|
}
|
|
1068
1068
|
|
|
1069
|
-
map.attributionControl.setPrefix(BASE_LEAFLET_ATTRIBUTION_STRING + ' | ' + POWERED_BY_ESRI_ATTRIBUTION_STRING);
|
|
1070
1069
|
L.DomUtil.addClass(map.attributionControl._container, 'esri-truncated-attribution:hover');
|
|
1071
1070
|
L.DomUtil.addClass(map.attributionControl._container, 'esri-truncated-attribution');
|
|
1072
1071
|
}
|
|
@@ -1082,7 +1081,6 @@
|
|
|
1082
1081
|
|
|
1083
1082
|
// Only remove the attribution if we're about to remove the LAST esri-leaflet layer (_esriAttributionLayerCount)
|
|
1084
1083
|
if (map.attributionControl._esriAttributionLayerCount && map.attributionControl._esriAttributionLayerCount === 1) {
|
|
1085
|
-
map.attributionControl.setPrefix(BASE_LEAFLET_ATTRIBUTION_STRING);
|
|
1086
1084
|
L.DomUtil.removeClass(map.attributionControl._container, 'esri-truncated-attribution:hover');
|
|
1087
1085
|
L.DomUtil.removeClass(map.attributionControl._container, 'esri-truncated-attribution');
|
|
1088
1086
|
}
|
|
@@ -1144,8 +1142,6 @@
|
|
|
1144
1142
|
|
|
1145
1143
|
// warn the user if we havn't found an appropriate object
|
|
1146
1144
|
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
1145
|
}
|
|
1150
1146
|
|
|
1151
1147
|
function _getAttributionData (url, map) {
|
|
@@ -1207,7 +1203,7 @@
|
|
|
1207
1203
|
}
|
|
1208
1204
|
}
|
|
1209
1205
|
|
|
1210
|
-
newAttributions = newAttributions.substr(2);
|
|
1206
|
+
newAttributions = POWERED_BY_ESRI_ATTRIBUTION_STRING + ' | ' + newAttributions.substr(2);
|
|
1211
1207
|
attributionElement.innerHTML = newAttributions;
|
|
1212
1208
|
attributionElement.style.maxWidth = calcAttributionWidth(map);
|
|
1213
1209
|
|
|
@@ -1323,15 +1319,15 @@
|
|
|
1323
1319
|
|
|
1324
1320
|
var Query = Task.extend({
|
|
1325
1321
|
setters: {
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1322
|
+
offset: 'resultOffset',
|
|
1323
|
+
limit: 'resultRecordCount',
|
|
1324
|
+
fields: 'outFields',
|
|
1325
|
+
precision: 'geometryPrecision',
|
|
1326
|
+
featureIds: 'objectIds',
|
|
1327
|
+
returnGeometry: 'returnGeometry',
|
|
1328
|
+
returnM: 'returnM',
|
|
1329
|
+
transform: 'datumTransformation',
|
|
1330
|
+
token: 'token'
|
|
1335
1331
|
},
|
|
1336
1332
|
|
|
1337
1333
|
path: 'query',
|
|
@@ -1538,22 +1534,22 @@
|
|
|
1538
1534
|
var Find = Task.extend({
|
|
1539
1535
|
setters: {
|
|
1540
1536
|
// method name > param name
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1537
|
+
contains: 'contains',
|
|
1538
|
+
text: 'searchText',
|
|
1539
|
+
fields: 'searchFields', // denote an array or single string
|
|
1540
|
+
spatialReference: 'sr',
|
|
1541
|
+
sr: 'sr',
|
|
1542
|
+
layers: 'layers',
|
|
1543
|
+
returnGeometry: 'returnGeometry',
|
|
1544
|
+
maxAllowableOffset: 'maxAllowableOffset',
|
|
1545
|
+
precision: 'geometryPrecision',
|
|
1546
|
+
dynamicLayers: 'dynamicLayers',
|
|
1547
|
+
returnZ: 'returnZ',
|
|
1548
|
+
returnM: 'returnM',
|
|
1549
|
+
gdbVersion: 'gdbVersion',
|
|
1554
1550
|
// skipped implementing this (for now) because the REST service implementation isnt consistent between operations
|
|
1555
1551
|
// 'transform': 'datumTransformations',
|
|
1556
|
-
|
|
1552
|
+
token: 'token'
|
|
1557
1553
|
},
|
|
1558
1554
|
|
|
1559
1555
|
path: 'find',
|
|
@@ -1604,12 +1600,12 @@
|
|
|
1604
1600
|
|
|
1605
1601
|
var IdentifyFeatures = Identify.extend({
|
|
1606
1602
|
setters: {
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1603
|
+
layers: 'layers',
|
|
1604
|
+
precision: 'geometryPrecision',
|
|
1605
|
+
tolerance: 'tolerance',
|
|
1610
1606
|
// skipped implementing this (for now) because the REST service implementation isnt consistent between operations.
|
|
1611
1607
|
// 'transform': 'datumTransformations'
|
|
1612
|
-
|
|
1608
|
+
returnGeometry: 'returnGeometry'
|
|
1613
1609
|
},
|
|
1614
1610
|
|
|
1615
1611
|
params: {
|
|
@@ -1653,7 +1649,6 @@
|
|
|
1653
1649
|
// immediately invoke with an error
|
|
1654
1650
|
if (error) {
|
|
1655
1651
|
callback.call(context, error, undefined, response);
|
|
1656
|
-
return;
|
|
1657
1652
|
|
|
1658
1653
|
// ok no error lets just assume we have features...
|
|
1659
1654
|
} else {
|
|
@@ -1681,11 +1676,11 @@
|
|
|
1681
1676
|
|
|
1682
1677
|
var IdentifyImage = Identify.extend({
|
|
1683
1678
|
setters: {
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1679
|
+
setMosaicRule: 'mosaicRule',
|
|
1680
|
+
setRenderingRule: 'renderingRule',
|
|
1681
|
+
setPixelSize: 'pixelSize',
|
|
1682
|
+
returnCatalogItems: 'returnCatalogItems',
|
|
1683
|
+
returnGeometry: 'returnGeometry'
|
|
1689
1684
|
},
|
|
1690
1685
|
|
|
1691
1686
|
params: {
|
|
@@ -1731,24 +1726,24 @@
|
|
|
1731
1726
|
var catalogItems = response.catalogItems;
|
|
1732
1727
|
var catalogItemVisibilities = response.catalogItemVisibilities;
|
|
1733
1728
|
var geoJSON = {
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1729
|
+
pixel: {
|
|
1730
|
+
type: 'Feature',
|
|
1731
|
+
geometry: {
|
|
1732
|
+
type: 'Point',
|
|
1733
|
+
coordinates: [location.x, location.y]
|
|
1739
1734
|
},
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1735
|
+
crs: {
|
|
1736
|
+
type: 'EPSG',
|
|
1737
|
+
properties: {
|
|
1738
|
+
code: location.spatialReference.wkid
|
|
1744
1739
|
}
|
|
1745
1740
|
},
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1741
|
+
properties: {
|
|
1742
|
+
OBJECTID: response.objectId,
|
|
1743
|
+
name: response.name,
|
|
1744
|
+
value: response.value
|
|
1750
1745
|
},
|
|
1751
|
-
|
|
1746
|
+
id: response.objectId
|
|
1752
1747
|
}
|
|
1753
1748
|
};
|
|
1754
1749
|
|
|
@@ -1837,7 +1832,6 @@
|
|
|
1837
1832
|
}
|
|
1838
1833
|
if (this._authenticating) {
|
|
1839
1834
|
this._requestQueue.push([method, path, params, callback, context]);
|
|
1840
|
-
return;
|
|
1841
1835
|
} else {
|
|
1842
1836
|
var url = (this.options.proxy) ? this.options.proxy + '?' + this.options.url + path : this.options.url + path;
|
|
1843
1837
|
|
|
@@ -2303,30 +2297,30 @@
|
|
|
2303
2297
|
|
|
2304
2298
|
statics: {
|
|
2305
2299
|
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
|
-
|
|
2300
|
+
0: 156543.03392799999,
|
|
2301
|
+
1: 78271.516963999893,
|
|
2302
|
+
2: 39135.758482000099,
|
|
2303
|
+
3: 19567.879240999901,
|
|
2304
|
+
4: 9783.9396204999593,
|
|
2305
|
+
5: 4891.9698102499797,
|
|
2306
|
+
6: 2445.9849051249898,
|
|
2307
|
+
7: 1222.9924525624899,
|
|
2308
|
+
8: 611.49622628138002,
|
|
2309
|
+
9: 305.74811314055802,
|
|
2310
|
+
10: 152.874056570411,
|
|
2311
|
+
11: 76.437028285073197,
|
|
2312
|
+
12: 38.218514142536598,
|
|
2313
|
+
13: 19.109257071268299,
|
|
2314
|
+
14: 9.5546285356341496,
|
|
2315
|
+
15: 4.7773142679493699,
|
|
2316
|
+
16: 2.38865713397468,
|
|
2317
|
+
17: 1.1943285668550501,
|
|
2318
|
+
18: 0.59716428355981699,
|
|
2319
|
+
19: 0.29858214164761698,
|
|
2320
|
+
20: 0.14929107082381,
|
|
2321
|
+
21: 0.07464553541191,
|
|
2322
|
+
22: 0.0373227677059525,
|
|
2323
|
+
23: 0.0186613838529763
|
|
2330
2324
|
}
|
|
2331
2325
|
},
|
|
2332
2326
|
|
|
@@ -2435,7 +2429,7 @@
|
|
|
2435
2429
|
this.fire('lodmap');
|
|
2436
2430
|
} else if (map.options.crs && map.options.crs.code && (map.options.crs.code.indexOf(sr) > -1)) ; else {
|
|
2437
2431
|
// 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
|
|
2432
|
+
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
2433
|
}
|
|
2440
2434
|
}
|
|
2441
2435
|
}, this);
|
|
@@ -2699,7 +2693,7 @@
|
|
|
2699
2693
|
};
|
|
2700
2694
|
|
|
2701
2695
|
var onOverlayLoad = function (e) {
|
|
2702
|
-
image.off('error',
|
|
2696
|
+
image.off('error', onOverlayError, this);
|
|
2703
2697
|
if (this._map) {
|
|
2704
2698
|
var newImage = e.target;
|
|
2705
2699
|
var oldImage = this._currentImage;
|
|
@@ -3129,7 +3123,9 @@
|
|
|
3129
3123
|
}
|
|
3130
3124
|
|
|
3131
3125
|
// remove extraneous vertices from response features if it has not already been done
|
|
3132
|
-
identifyRequest.params.maxAllowableOffset
|
|
3126
|
+
if (!identifyRequest.params.maxAllowableOffset) {
|
|
3127
|
+
identifyRequest.simplify(this._map, 0.5);
|
|
3128
|
+
}
|
|
3133
3129
|
|
|
3134
3130
|
if (!(this.options.popup && this.options.popup.params && this.options.popup.params.layers)) {
|
|
3135
3131
|
if (this.options.layers) {
|
|
@@ -3142,7 +3138,7 @@
|
|
|
3142
3138
|
// if present, pass layer ids and sql filters through to the identify task
|
|
3143
3139
|
if (this.options.layerDefs && typeof this.options.layerDefs !== 'string' && !identifyRequest.params.layerDefs) {
|
|
3144
3140
|
for (var id in this.options.layerDefs) {
|
|
3145
|
-
if (this.options.layerDefs
|
|
3141
|
+
if (Object.prototype.hasOwnProperty.call(this.options.layerDefs, id)) {
|
|
3146
3142
|
identifyRequest.layerDef(id, this.options.layerDefs[id]);
|
|
3147
3143
|
}
|
|
3148
3144
|
}
|
|
@@ -3339,19 +3335,19 @@
|
|
|
3339
3335
|
},
|
|
3340
3336
|
|
|
3341
3337
|
removeCell: function () {
|
|
3342
|
-
|
|
3338
|
+
|
|
3343
3339
|
},
|
|
3344
3340
|
|
|
3345
3341
|
reuseCell: function () {
|
|
3346
|
-
|
|
3342
|
+
|
|
3347
3343
|
},
|
|
3348
3344
|
|
|
3349
3345
|
cellLeave: function () {
|
|
3350
|
-
|
|
3346
|
+
|
|
3351
3347
|
},
|
|
3352
3348
|
|
|
3353
3349
|
cellEnter: function () {
|
|
3354
|
-
|
|
3350
|
+
|
|
3355
3351
|
},
|
|
3356
3352
|
// @section
|
|
3357
3353
|
// @method getCellSize: Point
|
|
@@ -3503,14 +3499,14 @@
|
|
|
3503
3499
|
|
|
3504
3500
|
this._wrapX = crs.wrapLng &&
|
|
3505
3501
|
!this.options.noWrap && [
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3502
|
+
Math.floor(map.project([0, crs.wrapLng[0]], cellZoom).x / cellSize.x),
|
|
3503
|
+
Math.ceil(map.project([0, crs.wrapLng[1]], cellZoom).x / cellSize.y)
|
|
3504
|
+
];
|
|
3509
3505
|
this._wrapY = crs.wrapLat &&
|
|
3510
3506
|
!this.options.noWrap && [
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3507
|
+
Math.floor(map.project([crs.wrapLat[0], 0], cellZoom).y / cellSize.x),
|
|
3508
|
+
Math.ceil(map.project([crs.wrapLat[1], 0], cellZoom).y / cellSize.y)
|
|
3509
|
+
];
|
|
3514
3510
|
},
|
|
3515
3511
|
|
|
3516
3512
|
_onMoveEnd: function (e) {
|
|
@@ -4937,8 +4933,38 @@
|
|
|
4937
4933
|
|
|
4938
4934
|
// looks like a path (polygon/polyline)
|
|
4939
4935
|
if (layer && layer.setStyle && this.options.style) {
|
|
4940
|
-
this.
|
|
4936
|
+
this.resetFeatureStyle(geojson.id);
|
|
4941
4937
|
}
|
|
4938
|
+
},
|
|
4939
|
+
|
|
4940
|
+
// This is the same as the Layer.openPopup method except it excludes the `FeatureGroup`
|
|
4941
|
+
// logic to work around https://github.com/Leaflet/Leaflet/issues/8761
|
|
4942
|
+
openPopup (latlng) {
|
|
4943
|
+
if (this._popup) {
|
|
4944
|
+
if (this._popup._prepareOpen(latlng || this._latlng)) {
|
|
4945
|
+
// open the popup on the map
|
|
4946
|
+
this._popup.openOn(this._map);
|
|
4947
|
+
}
|
|
4948
|
+
}
|
|
4949
|
+
return this;
|
|
4950
|
+
},
|
|
4951
|
+
|
|
4952
|
+
// This is the same as the `Layer.openTooltip` method except it excludes the `FeatureGroup`
|
|
4953
|
+
// logic to work around https://github.com/Leaflet/Leaflet/issues/8761
|
|
4954
|
+
openTooltip (latlng) {
|
|
4955
|
+
if (this._tooltip) {
|
|
4956
|
+
if (this._tooltip._prepareOpen(latlng)) {
|
|
4957
|
+
// open the tooltip on the map
|
|
4958
|
+
this._tooltip.openOn(this._map);
|
|
4959
|
+
|
|
4960
|
+
if (this.getElement) {
|
|
4961
|
+
this._setAriaDescribedByOnLayer(this);
|
|
4962
|
+
} else if (this.eachLayer) {
|
|
4963
|
+
this.eachLayer(this._setAriaDescribedByOnLayer, this);
|
|
4964
|
+
}
|
|
4965
|
+
}
|
|
4966
|
+
}
|
|
4967
|
+
return this;
|
|
4942
4968
|
}
|
|
4943
4969
|
});
|
|
4944
4970
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mars2d-esri",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.19",
|
|
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.19"
|
|
12
12
|
},
|
|
13
13
|
"scripts": {
|
|
14
14
|
"lint": "eslint ./src/**/*.{js,ts} --fix"
|