xy-map 1.1.50 → 1.1.52
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/package.json +2 -2
- package/xy-map.common.js +274 -103
- package/xy-map.umd.js +274 -103
- package/xy-map.umd.min.js +4 -4
package/xy-map.common.js
CHANGED
|
@@ -224,7 +224,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, ".snow[data-v-20664206]{position:absolu
|
|
|
224
224
|
|
|
225
225
|
/***/ }),
|
|
226
226
|
|
|
227
|
-
/***/
|
|
227
|
+
/***/ 9195:
|
|
228
228
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
229
229
|
|
|
230
230
|
"use strict";
|
|
@@ -238,7 +238,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
238
238
|
|
|
239
239
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
|
240
240
|
// Module
|
|
241
|
-
___CSS_LOADER_EXPORT___.push([module.id, ".tools[data-v-
|
|
241
|
+
___CSS_LOADER_EXPORT___.push([module.id, ".tools[data-v-32331762]{position:absolute;left:0;top:0;margin:15px;background-color:hsla(0,0%,100%,.9);padding:14px;border-radius:5px}.tools .tools-bar[data-v-32331762]{cursor:pointer}.right-fixed[data-v-32331762]{position:absolute;right:0;top:0;margin:15px}", ""]);
|
|
242
242
|
// Exports
|
|
243
243
|
/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
|
|
244
244
|
|
|
@@ -266,7 +266,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, ".upload[data-v-5a5f8c5d]{position:rela
|
|
|
266
266
|
|
|
267
267
|
/***/ }),
|
|
268
268
|
|
|
269
|
-
/***/
|
|
269
|
+
/***/ 1798:
|
|
270
270
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
271
271
|
|
|
272
272
|
"use strict";
|
|
@@ -280,7 +280,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
280
280
|
|
|
281
281
|
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
|
282
282
|
// Module
|
|
283
|
-
___CSS_LOADER_EXPORT___.push([module.id, ".upload[data-v-
|
|
283
|
+
___CSS_LOADER_EXPORT___.push([module.id, ".upload[data-v-6e60926f]{position:relative}.upload input[data-v-6e60926f]{position:absolute;width:100%;height:100%;left:0;top:0;opacity:0}", ""]);
|
|
284
284
|
// Exports
|
|
285
285
|
/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
|
|
286
286
|
|
|
@@ -42891,19 +42891,19 @@ var update = add("4a7b31d4", content, true, {"sourceMap":false,"shadowMode":fals
|
|
|
42891
42891
|
|
|
42892
42892
|
/***/ }),
|
|
42893
42893
|
|
|
42894
|
-
/***/
|
|
42894
|
+
/***/ 4210:
|
|
42895
42895
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
42896
42896
|
|
|
42897
42897
|
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
42898
42898
|
|
|
42899
42899
|
// load the styles
|
|
42900
|
-
var content = __webpack_require__(
|
|
42900
|
+
var content = __webpack_require__(9195);
|
|
42901
42901
|
if(content.__esModule) content = content.default;
|
|
42902
42902
|
if(typeof content === 'string') content = [[module.id, content, '']];
|
|
42903
42903
|
if(content.locals) module.exports = content.locals;
|
|
42904
42904
|
// add the styles to the DOM
|
|
42905
42905
|
var add = (__webpack_require__(7037)/* ["default"] */ .Z)
|
|
42906
|
-
var update = add("
|
|
42906
|
+
var update = add("64ed7672", content, true, {"sourceMap":false,"shadowMode":false});
|
|
42907
42907
|
|
|
42908
42908
|
/***/ }),
|
|
42909
42909
|
|
|
@@ -42923,19 +42923,19 @@ var update = add("44d9d48a", content, true, {"sourceMap":false,"shadowMode":fals
|
|
|
42923
42923
|
|
|
42924
42924
|
/***/ }),
|
|
42925
42925
|
|
|
42926
|
-
/***/
|
|
42926
|
+
/***/ 1998:
|
|
42927
42927
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
42928
42928
|
|
|
42929
42929
|
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
42930
42930
|
|
|
42931
42931
|
// load the styles
|
|
42932
|
-
var content = __webpack_require__(
|
|
42932
|
+
var content = __webpack_require__(1798);
|
|
42933
42933
|
if(content.__esModule) content = content.default;
|
|
42934
42934
|
if(typeof content === 'string') content = [[module.id, content, '']];
|
|
42935
42935
|
if(content.locals) module.exports = content.locals;
|
|
42936
42936
|
// add the styles to the DOM
|
|
42937
42937
|
var add = (__webpack_require__(7037)/* ["default"] */ .Z)
|
|
42938
|
-
var update = add("
|
|
42938
|
+
var update = add("2766b1e0", content, true, {"sourceMap":false,"shadowMode":false});
|
|
42939
42939
|
|
|
42940
42940
|
/***/ }),
|
|
42941
42941
|
|
|
@@ -43643,9 +43643,9 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
43643
43643
|
"MapboxDraw": function() { return /* reexport */ (mapbox_gl_draw_default()); },
|
|
43644
43644
|
"default": function() { return /* binding */ entry_lib; },
|
|
43645
43645
|
"drawLine": function() { return /* reexport */ draw_line; },
|
|
43646
|
-
"drawPoint": function() { return /* reexport */
|
|
43646
|
+
"drawPoint": function() { return /* reexport */ point; },
|
|
43647
43647
|
"drawPolygon": function() { return /* reexport */ polygon; },
|
|
43648
|
-
"drawTools": function() { return /* reexport */
|
|
43648
|
+
"drawTools": function() { return /* reexport */ package_draw; },
|
|
43649
43649
|
"jsonFile": function() { return /* reexport */ jsonFile; },
|
|
43650
43650
|
"mapDraw": function() { return /* reexport */ mapDraw; },
|
|
43651
43651
|
"mapEvent": function() { return /* reexport */ mapEvent; },
|
|
@@ -43685,7 +43685,7 @@ __webpack_require__.d(es_namespaceObject, {
|
|
|
43685
43685
|
"multiLineString": function() { return multiLineString; },
|
|
43686
43686
|
"multiPoint": function() { return multiPoint; },
|
|
43687
43687
|
"multiPolygon": function() { return multiPolygon; },
|
|
43688
|
-
"point": function() { return
|
|
43688
|
+
"point": function() { return es_point; },
|
|
43689
43689
|
"points": function() { return points; },
|
|
43690
43690
|
"polygon": function() { return es_polygon; },
|
|
43691
43691
|
"polygons": function() { return polygons; },
|
|
@@ -43899,7 +43899,7 @@ __webpack_require__.d(turf_dist_es_namespaceObject, {
|
|
|
43899
43899
|
"nearestPointOnLine": function() { return nearest_point_on_line_dist_es; },
|
|
43900
43900
|
"nearestPointToLine": function() { return nearest_point_to_line_dist_es; },
|
|
43901
43901
|
"planepoint": function() { return planepoint_dist_es; },
|
|
43902
|
-
"point": function() { return
|
|
43902
|
+
"point": function() { return es_point; },
|
|
43903
43903
|
"pointGrid": function() { return point_grid_dist_es; },
|
|
43904
43904
|
"pointOnFeature": function() { return point_on_feature_dist_es; },
|
|
43905
43905
|
"pointOnLine": function() { return nearest_point_on_line_dist_es; },
|
|
@@ -44043,9 +44043,9 @@ __webpack_require__.r(package_namespaceObject);
|
|
|
44043
44043
|
__webpack_require__.d(package_namespaceObject, {
|
|
44044
44044
|
"CT": function() { return (mapbox_gl_draw_default()); },
|
|
44045
44045
|
"pS": function() { return draw_line; },
|
|
44046
|
-
"Qd": function() { return
|
|
44046
|
+
"Qd": function() { return point; },
|
|
44047
44047
|
"is": function() { return polygon; },
|
|
44048
|
-
"Cx": function() { return
|
|
44048
|
+
"Cx": function() { return package_draw; },
|
|
44049
44049
|
"tP": function() { return jsonFile; },
|
|
44050
44050
|
"Gx": function() { return mapDraw; },
|
|
44051
44051
|
"A": function() { return mapEvent; },
|
|
@@ -44217,7 +44217,7 @@ function geometry(type, coordinates, _options) {
|
|
|
44217
44217
|
}
|
|
44218
44218
|
switch (type) {
|
|
44219
44219
|
case "Point":
|
|
44220
|
-
return
|
|
44220
|
+
return es_point(coordinates).geometry;
|
|
44221
44221
|
case "LineString":
|
|
44222
44222
|
return lineString(coordinates).geometry;
|
|
44223
44223
|
case "Polygon":
|
|
@@ -44247,7 +44247,7 @@ function geometry(type, coordinates, _options) {
|
|
|
44247
44247
|
*
|
|
44248
44248
|
* //=point
|
|
44249
44249
|
*/
|
|
44250
|
-
function
|
|
44250
|
+
function es_point(coordinates, properties, options) {
|
|
44251
44251
|
if (options === void 0) {
|
|
44252
44252
|
options = {};
|
|
44253
44253
|
}
|
|
@@ -44294,7 +44294,7 @@ function points(coordinates, properties, options) {
|
|
|
44294
44294
|
options = {};
|
|
44295
44295
|
}
|
|
44296
44296
|
return es_featureCollection(coordinates.map(function (coords) {
|
|
44297
|
-
return
|
|
44297
|
+
return es_point(coords, properties);
|
|
44298
44298
|
}), options);
|
|
44299
44299
|
}
|
|
44300
44300
|
/**
|
|
@@ -45897,26 +45897,26 @@ function findPoint(geojson, options) {
|
|
|
45897
45897
|
var coords = geometry.coordinates;
|
|
45898
45898
|
switch (geometry.type) {
|
|
45899
45899
|
case "Point":
|
|
45900
|
-
return
|
|
45900
|
+
return es_point(coords, properties, options);
|
|
45901
45901
|
case "MultiPoint":
|
|
45902
45902
|
if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
|
|
45903
|
-
return
|
|
45903
|
+
return es_point(coords[multiFeatureIndex], properties, options);
|
|
45904
45904
|
case "LineString":
|
|
45905
45905
|
if (coordIndex < 0) coordIndex = coords.length + coordIndex;
|
|
45906
|
-
return
|
|
45906
|
+
return es_point(coords[coordIndex], properties, options);
|
|
45907
45907
|
case "Polygon":
|
|
45908
45908
|
if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;
|
|
45909
45909
|
if (coordIndex < 0) coordIndex = coords[geometryIndex].length + coordIndex;
|
|
45910
|
-
return
|
|
45910
|
+
return es_point(coords[geometryIndex][coordIndex], properties, options);
|
|
45911
45911
|
case "MultiLineString":
|
|
45912
45912
|
if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
|
|
45913
45913
|
if (coordIndex < 0) coordIndex = coords[multiFeatureIndex].length + coordIndex;
|
|
45914
|
-
return
|
|
45914
|
+
return es_point(coords[multiFeatureIndex][coordIndex], properties, options);
|
|
45915
45915
|
case "MultiPolygon":
|
|
45916
45916
|
if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
|
|
45917
45917
|
if (geometryIndex < 0) geometryIndex = coords[multiFeatureIndex].length + geometryIndex;
|
|
45918
45918
|
if (coordIndex < 0) coordIndex = coords[multiFeatureIndex][geometryIndex].length - coordIndex;
|
|
45919
|
-
return
|
|
45919
|
+
return es_point(coords[multiFeatureIndex][geometryIndex][coordIndex], properties, options);
|
|
45920
45920
|
}
|
|
45921
45921
|
throw new Error("geojson is invalid");
|
|
45922
45922
|
}
|
|
@@ -49865,7 +49865,7 @@ function destination(origin, distance, bearing, options) {
|
|
|
49865
49865
|
var longitude2 = longitude1 + Math.atan2(Math.sin(bearingRad) * Math.sin(radians) * Math.cos(latitude1), Math.cos(radians) - Math.sin(latitude1) * Math.sin(latitude2));
|
|
49866
49866
|
var lng = radiansToDegrees(longitude2);
|
|
49867
49867
|
var lat = radiansToDegrees(latitude2);
|
|
49868
|
-
return
|
|
49868
|
+
return es_point([lng, lat], options.properties);
|
|
49869
49869
|
}
|
|
49870
49870
|
;// CONCATENATED MODULE: ./node_modules/@turf/circle/dist/es/index.js
|
|
49871
49871
|
|
|
@@ -50029,7 +50029,7 @@ function center(geojson, options) {
|
|
|
50029
50029
|
var ext = es(geojson);
|
|
50030
50030
|
var x = (ext[0] + ext[2]) / 2;
|
|
50031
50031
|
var y = (ext[1] + ext[3]) / 2;
|
|
50032
|
-
return
|
|
50032
|
+
return es_point([x, y], options.properties, options);
|
|
50033
50033
|
}
|
|
50034
50034
|
/* harmony default export */ var center_dist_es = (center);
|
|
50035
50035
|
;// CONCATENATED MODULE: ./node_modules/@turf/centroid/dist/es/index.js
|
|
@@ -50064,7 +50064,7 @@ function centroid(geojson, options) {
|
|
|
50064
50064
|
ySum += coord[1];
|
|
50065
50065
|
len++;
|
|
50066
50066
|
}, true);
|
|
50067
|
-
return
|
|
50067
|
+
return es_point([xSum / len, ySum / len], options.properties);
|
|
50068
50068
|
}
|
|
50069
50069
|
/* harmony default export */ var centroid_dist_es = (centroid);
|
|
50070
50070
|
;// CONCATENATED MODULE: ./node_modules/@turf/center-of-mass/dist/es/index.js
|
|
@@ -50095,7 +50095,7 @@ function centerOfMass(geojson, options) {
|
|
|
50095
50095
|
}
|
|
50096
50096
|
switch (getType(geojson)) {
|
|
50097
50097
|
case "Point":
|
|
50098
|
-
return
|
|
50098
|
+
return es_point(getCoord(geojson), options.properties);
|
|
50099
50099
|
case "Polygon":
|
|
50100
50100
|
var coords = [];
|
|
50101
50101
|
coordEach(geojson, function (coord) {
|
|
@@ -50139,7 +50139,7 @@ function centerOfMass(geojson, options) {
|
|
|
50139
50139
|
var area = sArea * 0.5;
|
|
50140
50140
|
var areaFactor = 1 / (6 * area);
|
|
50141
50141
|
// Compute the final coordinates, adding back the values that have been neutralized
|
|
50142
|
-
return
|
|
50142
|
+
return es_point([translation[0] + areaFactor * sx, translation[1] + areaFactor * sy], options.properties);
|
|
50143
50143
|
}
|
|
50144
50144
|
default:
|
|
50145
50145
|
// Not a polygon: Compute the convex hull and work with that
|
|
@@ -50260,12 +50260,12 @@ function explode(geojson) {
|
|
|
50260
50260
|
if (geojson.type === "FeatureCollection") {
|
|
50261
50261
|
featureEach(geojson, function (feature) {
|
|
50262
50262
|
coordEach(feature, function (coord) {
|
|
50263
|
-
points.push(
|
|
50263
|
+
points.push(es_point(coord, feature.properties));
|
|
50264
50264
|
});
|
|
50265
50265
|
});
|
|
50266
50266
|
} else {
|
|
50267
50267
|
coordEach(geojson, function (coord) {
|
|
50268
|
-
points.push(
|
|
50268
|
+
points.push(es_point(coord, geojson.properties));
|
|
50269
50269
|
});
|
|
50270
50270
|
}
|
|
50271
50271
|
return es_featureCollection(points);
|
|
@@ -50585,7 +50585,7 @@ function intersects(line1, line2) {
|
|
|
50585
50585
|
if (uA >= 0 && uA <= 1 && uB >= 0 && uB <= 1) {
|
|
50586
50586
|
var x = x1 + uA * (x2 - x1);
|
|
50587
50587
|
var y = y1 + uA * (y2 - y1);
|
|
50588
|
-
return
|
|
50588
|
+
return es_point([x, y]);
|
|
50589
50589
|
}
|
|
50590
50590
|
return null;
|
|
50591
50591
|
}
|
|
@@ -50628,7 +50628,7 @@ function nearestPointOnLine(lines, pt, options) {
|
|
|
50628
50628
|
if (options === void 0) {
|
|
50629
50629
|
options = {};
|
|
50630
50630
|
}
|
|
50631
|
-
var closestPt =
|
|
50631
|
+
var closestPt = es_point([Infinity, Infinity], {
|
|
50632
50632
|
dist: Infinity
|
|
50633
50633
|
});
|
|
50634
50634
|
var length = 0.0;
|
|
@@ -50636,10 +50636,10 @@ function nearestPointOnLine(lines, pt, options) {
|
|
|
50636
50636
|
var coords = getCoords(line);
|
|
50637
50637
|
for (var i = 0; i < coords.length - 1; i++) {
|
|
50638
50638
|
//start
|
|
50639
|
-
var start =
|
|
50639
|
+
var start = es_point(coords[i]);
|
|
50640
50640
|
start.properties.dist = distance_dist_es(pt, start, options);
|
|
50641
50641
|
//stop
|
|
50642
|
-
var stop_1 =
|
|
50642
|
+
var stop_1 = es_point(coords[i + 1]);
|
|
50643
50643
|
stop_1.properties.dist = distance_dist_es(pt, stop_1, options);
|
|
50644
50644
|
// sectionLength
|
|
50645
50645
|
var sectionLength = distance_dist_es(start, stop_1, options);
|
|
@@ -50801,7 +50801,7 @@ function pointToLineDistance(pt, line, options) {
|
|
|
50801
50801
|
throw new Error("pt is required");
|
|
50802
50802
|
}
|
|
50803
50803
|
if (Array.isArray(pt)) {
|
|
50804
|
-
pt =
|
|
50804
|
+
pt = es_point(pt);
|
|
50805
50805
|
} else if (pt.type === "Point") {
|
|
50806
50806
|
pt = es_feature(pt);
|
|
50807
50807
|
} else {
|
|
@@ -51107,7 +51107,7 @@ function kinks(featureIn) {
|
|
|
51107
51107
|
}
|
|
51108
51108
|
var intersection = lineIntersects(line1[i][0], line1[i][1], line1[i + 1][0], line1[i + 1][1], line2[k][0], line2[k][1], line2[k + 1][0], line2[k + 1][1]);
|
|
51109
51109
|
if (intersection) {
|
|
51110
|
-
results.features.push(
|
|
51110
|
+
results.features.push(es_point([intersection[0], intersection[1]]));
|
|
51111
51111
|
}
|
|
51112
51112
|
}
|
|
51113
51113
|
}
|
|
@@ -51275,7 +51275,7 @@ function pointOnFeature(geojson) {
|
|
|
51275
51275
|
vertices.features = vertices.features.concat(explode_dist_es(fc.features[i]).features);
|
|
51276
51276
|
}
|
|
51277
51277
|
// Remove distanceToPoint properties from nearestPoint()
|
|
51278
|
-
return
|
|
51278
|
+
return es_point(nearest_point_dist_es(cent, vertices).geometry.coordinates);
|
|
51279
51279
|
}
|
|
51280
51280
|
}
|
|
51281
51281
|
|
|
@@ -51454,7 +51454,7 @@ function along(line, distance, options) {
|
|
|
51454
51454
|
} else if (travelled >= distance) {
|
|
51455
51455
|
var overshot = distance - travelled;
|
|
51456
51456
|
if (!overshot) {
|
|
51457
|
-
return
|
|
51457
|
+
return es_point(coords[i]);
|
|
51458
51458
|
} else {
|
|
51459
51459
|
var direction = bearing(coords[i], coords[i - 1]) - 180;
|
|
51460
51460
|
var interpolated = destination(coords[i], overshot, direction, options);
|
|
@@ -51464,7 +51464,7 @@ function along(line, distance, options) {
|
|
|
51464
51464
|
travelled += distance_dist_es(coords[i], coords[i + 1], options);
|
|
51465
51465
|
}
|
|
51466
51466
|
}
|
|
51467
|
-
return
|
|
51467
|
+
return es_point(coords[coords.length - 1]);
|
|
51468
51468
|
}
|
|
51469
51469
|
;// CONCATENATED MODULE: ./node_modules/@turf/length/dist/es/index.js
|
|
51470
51470
|
|
|
@@ -52005,7 +52005,7 @@ function pointGrid(bbox, cellSide, options) {
|
|
|
52005
52005
|
while (currentX <= east) {
|
|
52006
52006
|
var currentY = south + deltaY;
|
|
52007
52007
|
while (currentY <= north) {
|
|
52008
|
-
var cellPt =
|
|
52008
|
+
var cellPt = es_point([currentX, currentY], options.properties);
|
|
52009
52009
|
if (options.mask) {
|
|
52010
52010
|
if (boolean_within_dist_es(cellPt, options.mask)) results.push(cellPt);
|
|
52011
52011
|
} else {
|
|
@@ -54000,7 +54000,7 @@ function rhumbDestination(origin, distance, bearing, options) {
|
|
|
54000
54000
|
// compensate the crossing of the 180th meridian (https://macwright.org/2016/09/26/the-180th-meridian.html)
|
|
54001
54001
|
// solution from https://github.com/mapbox/mapbox-gl-js/issues/3250#issuecomment-294887678
|
|
54002
54002
|
destination[0] += destination[0] - coords[0] > 180 ? -360 : coords[0] - destination[0] > 180 ? 360 : 0;
|
|
54003
|
-
return
|
|
54003
|
+
return es_point(destination, options.properties);
|
|
54004
54004
|
}
|
|
54005
54005
|
/**
|
|
54006
54006
|
* Returns the destination point having travelled along a rhumb line from origin point the given
|
|
@@ -54121,7 +54121,7 @@ function polygonTangents(pt, polygon) {
|
|
|
54121
54121
|
});
|
|
54122
54122
|
break;
|
|
54123
54123
|
}
|
|
54124
|
-
return es_featureCollection([
|
|
54124
|
+
return es_featureCollection([es_point(rtan), es_point(ltan)]);
|
|
54125
54125
|
}
|
|
54126
54126
|
function es_processPolygon(polygonCoords, ptCoords, eprev, enext, rtan, ltan) {
|
|
54127
54127
|
for (var i = 0; i < polygonCoords.length; i++) {
|
|
@@ -58084,22 +58084,22 @@ function defineOrigin(geojson, origin) {
|
|
|
58084
58084
|
case "southwest":
|
|
58085
58085
|
case "westsouth":
|
|
58086
58086
|
case "bottomleft":
|
|
58087
|
-
return
|
|
58087
|
+
return es_point([west, south]);
|
|
58088
58088
|
case "se":
|
|
58089
58089
|
case "southeast":
|
|
58090
58090
|
case "eastsouth":
|
|
58091
58091
|
case "bottomright":
|
|
58092
|
-
return
|
|
58092
|
+
return es_point([east, south]);
|
|
58093
58093
|
case "nw":
|
|
58094
58094
|
case "northwest":
|
|
58095
58095
|
case "westnorth":
|
|
58096
58096
|
case "topleft":
|
|
58097
|
-
return
|
|
58097
|
+
return es_point([west, north]);
|
|
58098
58098
|
case "ne":
|
|
58099
58099
|
case "northeast":
|
|
58100
58100
|
case "eastnorth":
|
|
58101
58101
|
case "topright":
|
|
58102
|
-
return
|
|
58102
|
+
return es_point([east, north]);
|
|
58103
58103
|
case "center":
|
|
58104
58104
|
return center_dist_es(geojson);
|
|
58105
58105
|
case undefined:
|
|
@@ -58468,7 +58468,7 @@ function envelopeIsEqual(env1, env2) {
|
|
|
58468
58468
|
*/
|
|
58469
58469
|
function envelopeContains(self, env) {
|
|
58470
58470
|
return env.geometry.coordinates[0].every(function (c) {
|
|
58471
|
-
return booleanPointInPolygon(
|
|
58471
|
+
return booleanPointInPolygon(es_point(c), self);
|
|
58472
58472
|
});
|
|
58473
58473
|
}
|
|
58474
58474
|
/**
|
|
@@ -58833,7 +58833,7 @@ var EdgeRing = /** @class */function () {
|
|
|
58833
58833
|
var pt = testEdgeRingCoordinates_1[_i];
|
|
58834
58834
|
_loop_1(pt);
|
|
58835
58835
|
}
|
|
58836
|
-
if (testPoint && shell.inside(
|
|
58836
|
+
if (testPoint && shell.inside(es_point(testPoint))) {
|
|
58837
58837
|
if (!minShell || envelopeContains(minEnvelope, tryEnvelope)) minShell = shell;
|
|
58838
58838
|
}
|
|
58839
58839
|
}
|
|
@@ -59726,7 +59726,7 @@ function doesMultiPointCrossPoly(multiPoint, polygon) {
|
|
|
59726
59726
|
var foundExtPoint = false;
|
|
59727
59727
|
var pointLength = multiPoint.coordinates.length;
|
|
59728
59728
|
for (var i = 0; i < pointLength && (!foundIntPoint || !foundExtPoint); i++) {
|
|
59729
|
-
if (booleanPointInPolygon(
|
|
59729
|
+
if (booleanPointInPolygon(es_point(multiPoint.coordinates[i]), polygon)) {
|
|
59730
59730
|
foundIntPoint = true;
|
|
59731
59731
|
} else {
|
|
59732
59732
|
foundExtPoint = true;
|
|
@@ -60516,8 +60516,8 @@ function shortestPath(start, end, options) {
|
|
|
60516
60516
|
// Normalize Inputs
|
|
60517
60517
|
var startCoord = getCoord(start);
|
|
60518
60518
|
var endCoord = getCoord(end);
|
|
60519
|
-
start =
|
|
60520
|
-
end =
|
|
60519
|
+
start = es_point(startCoord);
|
|
60520
|
+
end = es_point(endCoord);
|
|
60521
60521
|
|
|
60522
60522
|
// Handle obstacles
|
|
60523
60523
|
switch (getType(obstacles)) {
|
|
@@ -60575,7 +60575,7 @@ function shortestPath(start, end, options) {
|
|
|
60575
60575
|
var currentX = west + deltaX;
|
|
60576
60576
|
var c = 0;
|
|
60577
60577
|
while (currentX <= east) {
|
|
60578
|
-
var pt =
|
|
60578
|
+
var pt = es_point([currentX, currentY]);
|
|
60579
60579
|
var isInsideObstacle = es_isInside(pt, obstacles);
|
|
60580
60580
|
// feed obstacles matrix
|
|
60581
60581
|
matrixRow.push(isInsideObstacle ? 0 : 1); // with javascript-astar
|
|
@@ -61745,7 +61745,7 @@ options) {
|
|
|
61745
61745
|
});
|
|
61746
61746
|
}
|
|
61747
61747
|
});
|
|
61748
|
-
return
|
|
61748
|
+
return es_point([sumXs / sumNs, sumYs / sumNs], options.properties, options);
|
|
61749
61749
|
}
|
|
61750
61750
|
/* harmony default export */ var center_mean_dist_es = (centerMean);
|
|
61751
61751
|
;// CONCATENATED MODULE: ./node_modules/@turf/center-median/dist/es/index.js
|
|
@@ -61872,7 +61872,7 @@ function findMedian(candidateMedian, previousCandidate, centroids, properties, c
|
|
|
61872
61872
|
var candidateX = candidateXsum / kSum;
|
|
61873
61873
|
var candidateY = candidateYsum / kSum;
|
|
61874
61874
|
if (centroidCount === 1 || counter === 0 || Math.abs(candidateX - previousCandidate[0]) < tolerance && Math.abs(candidateY - previousCandidate[1]) < tolerance) {
|
|
61875
|
-
return
|
|
61875
|
+
return es_point([candidateX, candidateY], {
|
|
61876
61876
|
medianCandidates: properties.medianCandidates
|
|
61877
61877
|
});
|
|
61878
61878
|
} else {
|
|
@@ -62607,7 +62607,7 @@ function randomPoint(count, options) {
|
|
|
62607
62607
|
}
|
|
62608
62608
|
var features = [];
|
|
62609
62609
|
for (var i = 0; i < count; i++) {
|
|
62610
|
-
features.push(
|
|
62610
|
+
features.push(es_point(randomPosition(options.bbox)));
|
|
62611
62611
|
}
|
|
62612
62612
|
return es_featureCollection(features);
|
|
62613
62613
|
}
|
|
@@ -70876,8 +70876,8 @@ const mapTools_distance = (fromLngLat, toLngLat) => {
|
|
|
70876
70876
|
// from = [-75.343, 39.984]
|
|
70877
70877
|
// to = [-75.534, 39.123]
|
|
70878
70878
|
|
|
70879
|
-
let from =
|
|
70880
|
-
let to =
|
|
70879
|
+
let from = es_point(fromLngLat);
|
|
70880
|
+
let to = es_point(toLngLat);
|
|
70881
70881
|
let distance = distance_dist_es(from, to, {
|
|
70882
70882
|
units: 'miles'
|
|
70883
70883
|
});
|
|
@@ -70889,8 +70889,8 @@ const lineCenter = (LngLat1, LngLat2) => {
|
|
|
70889
70889
|
// LngLat1 = [-75.343, 39.984]
|
|
70890
70890
|
// LngLat2 = [-75.534, 39.123]
|
|
70891
70891
|
|
|
70892
|
-
var point1 =
|
|
70893
|
-
var point2 =
|
|
70892
|
+
var point1 = es_point(LngLat1);
|
|
70893
|
+
var point2 = es_point(LngLat2);
|
|
70894
70894
|
var midpoint = midpoint_dist_es(point1, point2);
|
|
70895
70895
|
return midpoint;
|
|
70896
70896
|
};
|
|
@@ -120449,8 +120449,8 @@ var mapStyle_component = normalizeComponent(
|
|
|
120449
120449
|
)
|
|
120450
120450
|
|
|
120451
120451
|
/* harmony default export */ var mapStyle = (mapStyle_component.exports);
|
|
120452
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/draw/index.vue?vue&type=template&id=
|
|
120453
|
-
var
|
|
120452
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/draw/index.vue?vue&type=template&id=32331762&scoped=true&
|
|
120453
|
+
var drawvue_type_template_id_32331762_scoped_true_render = function render() {
|
|
120454
120454
|
var _vm = this,
|
|
120455
120455
|
_c = _vm._self._c;
|
|
120456
120456
|
return _c('div', [_c('div', {
|
|
@@ -120587,10 +120587,147 @@ var drawvue_type_template_id_29ae25b4_scoped_true_render = function render() {
|
|
|
120587
120587
|
staticClass: "right-fixed"
|
|
120588
120588
|
}, [_vm._t("right-fixed")], 2)]);
|
|
120589
120589
|
};
|
|
120590
|
-
var
|
|
120590
|
+
var drawvue_type_template_id_32331762_scoped_true_staticRenderFns = [];
|
|
120591
120591
|
|
|
120592
120592
|
// EXTERNAL MODULE: ./node_modules/@mapbox/mapbox-gl-draw/dist/mapbox-gl-draw.css
|
|
120593
120593
|
var dist_mapbox_gl_draw = __webpack_require__(6957);
|
|
120594
|
+
;// CONCATENATED MODULE: ./src/package/util/mapDrawAdsorb.js
|
|
120595
|
+
|
|
120596
|
+
|
|
120597
|
+
|
|
120598
|
+
|
|
120599
|
+
let mouseMarker = null;
|
|
120600
|
+
let lastPosition = {
|
|
120601
|
+
coordinates: [],
|
|
120602
|
+
//吸附后经纬度
|
|
120603
|
+
isAdsorb: false,
|
|
120604
|
+
//是否被吸附
|
|
120605
|
+
properties: {} //吸附元素属性
|
|
120606
|
+
};
|
|
120607
|
+
|
|
120608
|
+
let opt = {
|
|
120609
|
+
layerId: null,
|
|
120610
|
+
// 吸附图层id
|
|
120611
|
+
boundP: 20 //吸附边界范围 像素
|
|
120612
|
+
};
|
|
120613
|
+
|
|
120614
|
+
let mapDrawAdsorb_map = null;
|
|
120615
|
+
let draw = null;
|
|
120616
|
+
|
|
120617
|
+
/**
|
|
120618
|
+
* 添加点吸附效果
|
|
120619
|
+
* @param {Object} view 地图
|
|
120620
|
+
* @param {Object} params 吸附参数
|
|
120621
|
+
*/
|
|
120622
|
+
const startAdsorb = (params = {}, view = package_map.map) => {
|
|
120623
|
+
mapDrawAdsorb_map = view;
|
|
120624
|
+
opt = Object.assign(opt, params);
|
|
120625
|
+
if (!opt.layerId) return;
|
|
120626
|
+
// 初始化一个点标记
|
|
120627
|
+
if (!mouseMarker) addMouseMarker();
|
|
120628
|
+
// 监听鼠标移动事件并更新点标记的位置
|
|
120629
|
+
mapDrawAdsorb_map.on('mousemove', e => {
|
|
120630
|
+
if (mouseMarker) {
|
|
120631
|
+
let lngLat = e.lngLat;
|
|
120632
|
+
//获取吸附后的坐标
|
|
120633
|
+
lastPosition = getAdsorbPoint([lngLat.lng, lngLat.lat]);
|
|
120634
|
+
mouseMarker.setLngLat(lastPosition.coordinates);
|
|
120635
|
+
}
|
|
120636
|
+
});
|
|
120637
|
+
};
|
|
120638
|
+
|
|
120639
|
+
/**
|
|
120640
|
+
* 获取吸附坐标
|
|
120641
|
+
* @param {array} coordinates 经纬度
|
|
120642
|
+
*/
|
|
120643
|
+
const getAdsorbPoint = coordinates => {
|
|
120644
|
+
//是否被吸附
|
|
120645
|
+
let isAdsorb = false;
|
|
120646
|
+
let properties = null;
|
|
120647
|
+
if (hasLayer(opt.layerId)) {
|
|
120648
|
+
//吸附图层id
|
|
120649
|
+
const point = es_point(coordinates);
|
|
120650
|
+
// 经纬度转换为屏幕像素坐标
|
|
120651
|
+
var screenCoordinate = mapDrawAdsorb_map.project(coordinates);
|
|
120652
|
+
//获取边界范围
|
|
120653
|
+
const bbox = [[screenCoordinate.x - opt.boundP, screenCoordinate.y - opt.boundP], [screenCoordinate.x + opt.boundP, screenCoordinate.y + opt.boundP]];
|
|
120654
|
+
const nearbyFeatures = mapDrawAdsorb_map.queryRenderedFeatures(bbox, {
|
|
120655
|
+
// 查询附近的要素
|
|
120656
|
+
layers: [opt.layerId] // 吸附图层id
|
|
120657
|
+
});
|
|
120658
|
+
// 找到最近的边缘并吸附
|
|
120659
|
+
let nearestEdge;
|
|
120660
|
+
let minDistance = Infinity;
|
|
120661
|
+
nearbyFeatures.forEach(feat => {
|
|
120662
|
+
const edge = lineString(feat.geometry.coordinates); // 假设每个坐标都是线的端点
|
|
120663
|
+
const distance = point_to_line_distance_dist_es(point, edge, {
|
|
120664
|
+
units: 'meters'
|
|
120665
|
+
});
|
|
120666
|
+
if (distance < minDistance) {
|
|
120667
|
+
minDistance = distance;
|
|
120668
|
+
nearestEdge = edge;
|
|
120669
|
+
properties = feat.properties;
|
|
120670
|
+
}
|
|
120671
|
+
});
|
|
120672
|
+
if (nearestEdge) {
|
|
120673
|
+
//吸附后的坐标
|
|
120674
|
+
const snappedPoint = nearest_point_on_line_dist_es(nearestEdge, point);
|
|
120675
|
+
coordinates = snappedPoint.geometry.coordinates;
|
|
120676
|
+
isAdsorb = true;
|
|
120677
|
+
}
|
|
120678
|
+
}
|
|
120679
|
+
return {
|
|
120680
|
+
coordinates,
|
|
120681
|
+
isAdsorb,
|
|
120682
|
+
properties
|
|
120683
|
+
};
|
|
120684
|
+
};
|
|
120685
|
+
|
|
120686
|
+
/**
|
|
120687
|
+
* 结束吸附
|
|
120688
|
+
* @param {Object} draw 绘制组件
|
|
120689
|
+
* @param {Object} feature 绘制要素
|
|
120690
|
+
*/
|
|
120691
|
+
const endAdsorb = (d = draw, feature) => {
|
|
120692
|
+
draw = d;
|
|
120693
|
+
//获取最后鼠标移入坐标
|
|
120694
|
+
if (lastPosition.isAdsorb && draw && feature) {
|
|
120695
|
+
draw.delete(feature.id);
|
|
120696
|
+
feature.geometry.coordinates = lastPosition.coordinates;
|
|
120697
|
+
//直接绘制,会不更新画布
|
|
120698
|
+
setTimeout(() => {
|
|
120699
|
+
draw.add(feature);
|
|
120700
|
+
}, 300);
|
|
120701
|
+
draw.changeMode('simple_select', {
|
|
120702
|
+
features: [feature]
|
|
120703
|
+
});
|
|
120704
|
+
}
|
|
120705
|
+
//移除marker
|
|
120706
|
+
removeMarker();
|
|
120707
|
+
mapDrawAdsorb_map.off('mousemove');
|
|
120708
|
+
return lastPosition;
|
|
120709
|
+
};
|
|
120710
|
+
|
|
120711
|
+
/**
|
|
120712
|
+
* 添加定位点
|
|
120713
|
+
*/
|
|
120714
|
+
const addMouseMarker = () => {
|
|
120715
|
+
const el = document.createElement('div');
|
|
120716
|
+
el.className = 'marker';
|
|
120717
|
+
el.style.backgroundImage = 'url(/img/marker2.png)';
|
|
120718
|
+
el.style.width = '10px';
|
|
120719
|
+
el.style.height = '10px';
|
|
120720
|
+
el.style.backgroundSize = '100%';
|
|
120721
|
+
mouseMarker = new (mapbox_gl_default()).Marker(el).setLngLat([0, 0]).addTo(mapDrawAdsorb_map);
|
|
120722
|
+
};
|
|
120723
|
+
|
|
120724
|
+
/**
|
|
120725
|
+
* 移除定位点
|
|
120726
|
+
*/
|
|
120727
|
+
const removeMarker = () => {
|
|
120728
|
+
mouseMarker && mouseMarker.remove();
|
|
120729
|
+
mouseMarker = null;
|
|
120730
|
+
};
|
|
120594
120731
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/draw/jsonFile.vue?vue&type=template&id=5a5f8c5d&scoped=true&
|
|
120595
120732
|
var jsonFilevue_type_template_id_5a5f8c5d_scoped_true_render = function render() {
|
|
120596
120733
|
var _vm = this,
|
|
@@ -120675,8 +120812,8 @@ var jsonFile_component = normalizeComponent(
|
|
|
120675
120812
|
)
|
|
120676
120813
|
|
|
120677
120814
|
/* harmony default export */ var jsonFile = (jsonFile_component.exports);
|
|
120678
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/draw/shpFile.vue?vue&type=template&id=
|
|
120679
|
-
var
|
|
120815
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/draw/shpFile.vue?vue&type=template&id=6e60926f&scoped=true&
|
|
120816
|
+
var shpFilevue_type_template_id_6e60926f_scoped_true_render = function render() {
|
|
120680
120817
|
var _vm = this,
|
|
120681
120818
|
_c = _vm._self._c;
|
|
120682
120819
|
return _c('el-button', {
|
|
@@ -120697,7 +120834,7 @@ var shpFilevue_type_template_id_766fb941_scoped_true_render = function render()
|
|
|
120697
120834
|
}
|
|
120698
120835
|
})]);
|
|
120699
120836
|
};
|
|
120700
|
-
var
|
|
120837
|
+
var shpFilevue_type_template_id_6e60926f_scoped_true_staticRenderFns = [];
|
|
120701
120838
|
|
|
120702
120839
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/draw/shpFile.vue?vue&type=script&lang=js&
|
|
120703
120840
|
|
|
@@ -120754,7 +120891,6 @@ const shapeFile = __webpack_require__(1393);
|
|
|
120754
120891
|
*/
|
|
120755
120892
|
getFile(e) {
|
|
120756
120893
|
const files = Array.from(e.target.files || []);
|
|
120757
|
-
console.log('文件上传事件', files);
|
|
120758
120894
|
if (files.length === 0) return;
|
|
120759
120895
|
|
|
120760
120896
|
// 清空input的value,这样同一个文件可以重复选择
|
|
@@ -120812,7 +120948,6 @@ const shapeFile = __webpack_require__(1393);
|
|
|
120812
120948
|
readShpOnly(shpFile) {
|
|
120813
120949
|
this.readFileAsArrayBuffer(shpFile).then(shpBuffer => {
|
|
120814
120950
|
shapeFile.read(shpBuffer).then(json => {
|
|
120815
|
-
console.log('result', json);
|
|
120816
120951
|
this.validateAndProcessGeoJSON(json);
|
|
120817
120952
|
}).catch(error => {
|
|
120818
120953
|
console.error('读取文件错误:', error);
|
|
@@ -120824,9 +120959,9 @@ const shapeFile = __webpack_require__(1393);
|
|
|
120824
120959
|
});
|
|
120825
120960
|
;// CONCATENATED MODULE: ./src/package/draw/shpFile.vue?vue&type=script&lang=js&
|
|
120826
120961
|
/* harmony default export */ var draw_shpFilevue_type_script_lang_js_ = (shpFilevue_type_script_lang_js_);
|
|
120827
|
-
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[4]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/draw/shpFile.vue?vue&type=style&index=0&id=
|
|
120828
|
-
var
|
|
120829
|
-
;// CONCATENATED MODULE: ./src/package/draw/shpFile.vue?vue&type=style&index=0&id=
|
|
120962
|
+
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[4]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/draw/shpFile.vue?vue&type=style&index=0&id=6e60926f&prod&lang=scss&scoped=true&
|
|
120963
|
+
var shpFilevue_type_style_index_0_id_6e60926f_prod_lang_scss_scoped_true_ = __webpack_require__(1998);
|
|
120964
|
+
;// CONCATENATED MODULE: ./src/package/draw/shpFile.vue?vue&type=style&index=0&id=6e60926f&prod&lang=scss&scoped=true&
|
|
120830
120965
|
|
|
120831
120966
|
;// CONCATENATED MODULE: ./src/package/draw/shpFile.vue
|
|
120832
120967
|
|
|
@@ -120839,11 +120974,11 @@ var shpFilevue_type_style_index_0_id_766fb941_prod_lang_scss_scoped_true_ = __we
|
|
|
120839
120974
|
|
|
120840
120975
|
var shpFile_component = normalizeComponent(
|
|
120841
120976
|
draw_shpFilevue_type_script_lang_js_,
|
|
120842
|
-
|
|
120843
|
-
|
|
120977
|
+
shpFilevue_type_template_id_6e60926f_scoped_true_render,
|
|
120978
|
+
shpFilevue_type_template_id_6e60926f_scoped_true_staticRenderFns,
|
|
120844
120979
|
false,
|
|
120845
120980
|
null,
|
|
120846
|
-
"
|
|
120981
|
+
"6e60926f",
|
|
120847
120982
|
null
|
|
120848
120983
|
|
|
120849
120984
|
)
|
|
@@ -120860,6 +120995,7 @@ var shpFile_component = normalizeComponent(
|
|
|
120860
120995
|
|
|
120861
120996
|
|
|
120862
120997
|
|
|
120998
|
+
|
|
120863
120999
|
/* harmony default export */ var drawvue_type_script_lang_js_ = ({
|
|
120864
121000
|
components: {
|
|
120865
121001
|
mapFullScreen: mapFullScreen,
|
|
@@ -120923,6 +121059,16 @@ var shpFile_component = normalizeComponent(
|
|
|
120923
121059
|
// 是否需要dbf文件 上传可获取属性数据
|
|
120924
121060
|
type: Boolean,
|
|
120925
121061
|
default: false
|
|
121062
|
+
},
|
|
121063
|
+
isAdsorb: {
|
|
121064
|
+
//是否可吸附
|
|
121065
|
+
type: Boolean,
|
|
121066
|
+
default: false
|
|
121067
|
+
},
|
|
121068
|
+
adsorbParams: {
|
|
121069
|
+
//是否可吸附
|
|
121070
|
+
type: Object,
|
|
121071
|
+
default: () => {}
|
|
120926
121072
|
}
|
|
120927
121073
|
},
|
|
120928
121074
|
data() {
|
|
@@ -121059,6 +121205,10 @@ var shpFile_component = normalizeComponent(
|
|
|
121059
121205
|
}
|
|
121060
121206
|
console.log('开始绘制');
|
|
121061
121207
|
this.draw.changeMode(type);
|
|
121208
|
+
if (this.isAdsorb) {
|
|
121209
|
+
//是否可吸附
|
|
121210
|
+
startAdsorb(this.adsorbParams, this.map);
|
|
121211
|
+
}
|
|
121062
121212
|
this.$emit('start');
|
|
121063
121213
|
},
|
|
121064
121214
|
drawEnd(e) {
|
|
@@ -121067,6 +121217,11 @@ var shpFile_component = normalizeComponent(
|
|
|
121067
121217
|
console.log('绘制结束', data);
|
|
121068
121218
|
this.type = 'move';
|
|
121069
121219
|
this.geoJson = data;
|
|
121220
|
+
if (this.isAdsorb) {
|
|
121221
|
+
//是否可吸附
|
|
121222
|
+
let feature = e.features[0];
|
|
121223
|
+
data.lastPosition = endAdsorb(this.draw, feature);
|
|
121224
|
+
}
|
|
121070
121225
|
this.$emit('end', data);
|
|
121071
121226
|
},
|
|
121072
121227
|
drawUpdate(e) {
|
|
@@ -121178,9 +121333,9 @@ var shpFile_component = normalizeComponent(
|
|
|
121178
121333
|
});
|
|
121179
121334
|
;// CONCATENATED MODULE: ./src/package/draw/index.vue?vue&type=script&lang=js&
|
|
121180
121335
|
/* harmony default export */ var package_drawvue_type_script_lang_js_ = (drawvue_type_script_lang_js_);
|
|
121181
|
-
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[4]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/draw/index.vue?vue&type=style&index=0&id=
|
|
121182
|
-
var
|
|
121183
|
-
;// CONCATENATED MODULE: ./src/package/draw/index.vue?vue&type=style&index=0&id=
|
|
121336
|
+
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[4]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/draw/index.vue?vue&type=style&index=0&id=32331762&prod&lang=scss&scoped=true&
|
|
121337
|
+
var drawvue_type_style_index_0_id_32331762_prod_lang_scss_scoped_true_ = __webpack_require__(4210);
|
|
121338
|
+
;// CONCATENATED MODULE: ./src/package/draw/index.vue?vue&type=style&index=0&id=32331762&prod&lang=scss&scoped=true&
|
|
121184
121339
|
|
|
121185
121340
|
;// CONCATENATED MODULE: ./src/package/draw/index.vue
|
|
121186
121341
|
|
|
@@ -121193,18 +121348,18 @@ var drawvue_type_style_index_0_id_29ae25b4_prod_lang_scss_scoped_true_ = __webpa
|
|
|
121193
121348
|
|
|
121194
121349
|
var draw_component = normalizeComponent(
|
|
121195
121350
|
package_drawvue_type_script_lang_js_,
|
|
121196
|
-
|
|
121197
|
-
|
|
121351
|
+
drawvue_type_template_id_32331762_scoped_true_render,
|
|
121352
|
+
drawvue_type_template_id_32331762_scoped_true_staticRenderFns,
|
|
121198
121353
|
false,
|
|
121199
121354
|
null,
|
|
121200
|
-
"
|
|
121355
|
+
"32331762",
|
|
121201
121356
|
null
|
|
121202
121357
|
|
|
121203
121358
|
)
|
|
121204
121359
|
|
|
121205
|
-
/* harmony default export */ var
|
|
121206
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/draw/point.vue?vue&type=template&id=
|
|
121207
|
-
var
|
|
121360
|
+
/* harmony default export */ var package_draw = (draw_component.exports);
|
|
121361
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/draw/point.vue?vue&type=template&id=93462f90&
|
|
121362
|
+
var pointvue_type_template_id_93462f90_render = function render() {
|
|
121208
121363
|
var _vm = this,
|
|
121209
121364
|
_c = _vm._self._c;
|
|
121210
121365
|
return _c('div', {
|
|
@@ -121222,7 +121377,8 @@ var pointvue_type_template_id_1da299f2_render = function render() {
|
|
|
121222
121377
|
attrs: {
|
|
121223
121378
|
"list": ['point'],
|
|
121224
121379
|
"showMoveInput": false,
|
|
121225
|
-
"showDeleteBtn": false
|
|
121380
|
+
"showDeleteBtn": false,
|
|
121381
|
+
"isAdsorb": _vm.isAdsorb
|
|
121226
121382
|
},
|
|
121227
121383
|
on: {
|
|
121228
121384
|
"update": _vm.drawUpdate,
|
|
@@ -121258,7 +121414,7 @@ var pointvue_type_template_id_1da299f2_render = function render() {
|
|
|
121258
121414
|
staticClass: "margin-top font-12"
|
|
121259
121415
|
}, [_vm._v(" 地址:" + _vm._s(_vm.address.formattedAddress) + " ")]) : _vm._e()])])], 1);
|
|
121260
121416
|
};
|
|
121261
|
-
var
|
|
121417
|
+
var pointvue_type_template_id_93462f90_staticRenderFns = [];
|
|
121262
121418
|
|
|
121263
121419
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/draw/point.vue?vue&type=script&lang=js&
|
|
121264
121420
|
|
|
@@ -121266,7 +121422,7 @@ var pointvue_type_template_id_1da299f2_staticRenderFns = [];
|
|
|
121266
121422
|
|
|
121267
121423
|
/* harmony default export */ var pointvue_type_script_lang_js_ = ({
|
|
121268
121424
|
components: {
|
|
121269
|
-
drawTools:
|
|
121425
|
+
drawTools: package_draw
|
|
121270
121426
|
},
|
|
121271
121427
|
props: {
|
|
121272
121428
|
config: {
|
|
@@ -121288,6 +121444,11 @@ var pointvue_type_template_id_1da299f2_staticRenderFns = [];
|
|
|
121288
121444
|
zoom: {
|
|
121289
121445
|
type: Number,
|
|
121290
121446
|
default: 14
|
|
121447
|
+
},
|
|
121448
|
+
isAdsorb: {
|
|
121449
|
+
//是否可吸附
|
|
121450
|
+
type: Boolean,
|
|
121451
|
+
default: false
|
|
121291
121452
|
}
|
|
121292
121453
|
},
|
|
121293
121454
|
data() {
|
|
@@ -121321,6 +121482,7 @@ var pointvue_type_template_id_1da299f2_staticRenderFns = [];
|
|
|
121321
121482
|
package_map.initMap(config).then(map => {
|
|
121322
121483
|
this.$refs.draw.initDraw(map);
|
|
121323
121484
|
this.draw();
|
|
121485
|
+
this.$emit('map-load');
|
|
121324
121486
|
});
|
|
121325
121487
|
},
|
|
121326
121488
|
draw() {
|
|
@@ -121352,6 +121514,8 @@ var pointvue_type_template_id_1da299f2_staticRenderFns = [];
|
|
|
121352
121514
|
this.geoJson = data;
|
|
121353
121515
|
if (list.length > 0) {
|
|
121354
121516
|
this.position = list[0].geometry.coordinates;
|
|
121517
|
+
//格式化坐标
|
|
121518
|
+
this.position = this.position.map(item => Number(item).toFixed(6));
|
|
121355
121519
|
this.$nextTick(() => {
|
|
121356
121520
|
package_map.easeTo(this.position);
|
|
121357
121521
|
GeoAddress(this.position).then(data => {
|
|
@@ -121393,8 +121557,8 @@ var pointvue_type_template_id_1da299f2_staticRenderFns = [];
|
|
|
121393
121557
|
;
|
|
121394
121558
|
var point_component = normalizeComponent(
|
|
121395
121559
|
draw_pointvue_type_script_lang_js_,
|
|
121396
|
-
|
|
121397
|
-
|
|
121560
|
+
pointvue_type_template_id_93462f90_render,
|
|
121561
|
+
pointvue_type_template_id_93462f90_staticRenderFns,
|
|
121398
121562
|
false,
|
|
121399
121563
|
null,
|
|
121400
121564
|
null,
|
|
@@ -121402,9 +121566,9 @@ var point_component = normalizeComponent(
|
|
|
121402
121566
|
|
|
121403
121567
|
)
|
|
121404
121568
|
|
|
121405
|
-
/* harmony default export */ var
|
|
121406
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/draw/line.vue?vue&type=template&id=
|
|
121407
|
-
var
|
|
121569
|
+
/* harmony default export */ var point = (point_component.exports);
|
|
121570
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/draw/line.vue?vue&type=template&id=3a6a9292&
|
|
121571
|
+
var linevue_type_template_id_3a6a9292_render = function render() {
|
|
121408
121572
|
var _vm = this,
|
|
121409
121573
|
_c = _vm._self._c;
|
|
121410
121574
|
return _c('div', {
|
|
@@ -121459,7 +121623,7 @@ var linevue_type_template_id_098acb57_render = function render() {
|
|
|
121459
121623
|
}
|
|
121460
121624
|
}, [_vm._v("保存")]), _vm._t("default")], 2)])], 1);
|
|
121461
121625
|
};
|
|
121462
|
-
var
|
|
121626
|
+
var linevue_type_template_id_3a6a9292_staticRenderFns = [];
|
|
121463
121627
|
|
|
121464
121628
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/draw/line.vue?vue&type=script&lang=js&
|
|
121465
121629
|
|
|
@@ -121467,7 +121631,7 @@ var linevue_type_template_id_098acb57_staticRenderFns = [];
|
|
|
121467
121631
|
|
|
121468
121632
|
/* harmony default export */ var linevue_type_script_lang_js_ = ({
|
|
121469
121633
|
components: {
|
|
121470
|
-
drawTools:
|
|
121634
|
+
drawTools: package_draw
|
|
121471
121635
|
},
|
|
121472
121636
|
props: {
|
|
121473
121637
|
config: {
|
|
@@ -121560,7 +121724,10 @@ var linevue_type_template_id_098acb57_staticRenderFns = [];
|
|
|
121560
121724
|
this.geoJson = data;
|
|
121561
121725
|
this.position = data.features.map(item => item.geometry.coordinates.flat(Infinity));
|
|
121562
121726
|
this.position = spArray(2, ...this.position); // 数组分割,两两一组
|
|
121563
|
-
|
|
121727
|
+
this.position.forEach(item => {
|
|
121728
|
+
item[0] = Number(item[0]).toFixed(6);
|
|
121729
|
+
item[1] = Number(item[1]).toFixed(6);
|
|
121730
|
+
});
|
|
121564
121731
|
if (this.autoZoom || autoZoom) {
|
|
121565
121732
|
// 开启缩放动画
|
|
121566
121733
|
this.$nextTick(() => {
|
|
@@ -121602,8 +121769,8 @@ var linevue_type_template_id_098acb57_staticRenderFns = [];
|
|
|
121602
121769
|
;
|
|
121603
121770
|
var line_component = normalizeComponent(
|
|
121604
121771
|
draw_linevue_type_script_lang_js_,
|
|
121605
|
-
|
|
121606
|
-
|
|
121772
|
+
linevue_type_template_id_3a6a9292_render,
|
|
121773
|
+
linevue_type_template_id_3a6a9292_staticRenderFns,
|
|
121607
121774
|
false,
|
|
121608
121775
|
null,
|
|
121609
121776
|
null,
|
|
@@ -121612,8 +121779,8 @@ var line_component = normalizeComponent(
|
|
|
121612
121779
|
)
|
|
121613
121780
|
|
|
121614
121781
|
/* harmony default export */ var draw_line = (line_component.exports);
|
|
121615
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/draw/polygon.vue?vue&type=template&id=
|
|
121616
|
-
var
|
|
121782
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/draw/polygon.vue?vue&type=template&id=75043640&
|
|
121783
|
+
var polygonvue_type_template_id_75043640_render = function render() {
|
|
121617
121784
|
var _vm = this,
|
|
121618
121785
|
_c = _vm._self._c;
|
|
121619
121786
|
return _c('div', {
|
|
@@ -121668,7 +121835,7 @@ var polygonvue_type_template_id_02d388c8_render = function render() {
|
|
|
121668
121835
|
}
|
|
121669
121836
|
}, [_vm._v("保存")]), _vm._t("default")], 2)])], 1);
|
|
121670
121837
|
};
|
|
121671
|
-
var
|
|
121838
|
+
var polygonvue_type_template_id_75043640_staticRenderFns = [];
|
|
121672
121839
|
|
|
121673
121840
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/package/draw/polygon.vue?vue&type=script&lang=js&
|
|
121674
121841
|
|
|
@@ -121676,7 +121843,7 @@ var polygonvue_type_template_id_02d388c8_staticRenderFns = [];
|
|
|
121676
121843
|
|
|
121677
121844
|
/* harmony default export */ var polygonvue_type_script_lang_js_ = ({
|
|
121678
121845
|
components: {
|
|
121679
|
-
drawTools:
|
|
121846
|
+
drawTools: package_draw
|
|
121680
121847
|
},
|
|
121681
121848
|
props: {
|
|
121682
121849
|
config: {
|
|
@@ -121769,6 +121936,10 @@ var polygonvue_type_template_id_02d388c8_staticRenderFns = [];
|
|
|
121769
121936
|
this.geoJson = data;
|
|
121770
121937
|
this.position = data.features.map(item => item.geometry.coordinates.flat(Infinity));
|
|
121771
121938
|
this.position = spArray(2, ...this.position);
|
|
121939
|
+
this.position.forEach(item => {
|
|
121940
|
+
item[0] = Number(item[0]).toFixed(6);
|
|
121941
|
+
item[1] = Number(item[1]).toFixed(6);
|
|
121942
|
+
});
|
|
121772
121943
|
if (this.autoZoom || autoZoom) {
|
|
121773
121944
|
this.$nextTick(() => {
|
|
121774
121945
|
package_map.fitJsonBounds(data, {
|
|
@@ -121809,8 +121980,8 @@ var polygonvue_type_template_id_02d388c8_staticRenderFns = [];
|
|
|
121809
121980
|
;
|
|
121810
121981
|
var polygon_component = normalizeComponent(
|
|
121811
121982
|
draw_polygonvue_type_script_lang_js_,
|
|
121812
|
-
|
|
121813
|
-
|
|
121983
|
+
polygonvue_type_template_id_75043640_render,
|
|
121984
|
+
polygonvue_type_template_id_75043640_staticRenderFns,
|
|
121814
121985
|
false,
|
|
121815
121986
|
null,
|
|
121816
121987
|
null,
|