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.umd.js
CHANGED
|
@@ -234,7 +234,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, ".snow[data-v-20664206]{position:absolu
|
|
|
234
234
|
|
|
235
235
|
/***/ }),
|
|
236
236
|
|
|
237
|
-
/***/
|
|
237
|
+
/***/ 3833:
|
|
238
238
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
239
239
|
|
|
240
240
|
"use strict";
|
|
@@ -248,7 +248,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
248
248
|
|
|
249
249
|
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()));
|
|
250
250
|
// Module
|
|
251
|
-
___CSS_LOADER_EXPORT___.push([module.id, ".tools[data-v-
|
|
251
|
+
___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}", ""]);
|
|
252
252
|
// Exports
|
|
253
253
|
/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
|
|
254
254
|
|
|
@@ -276,7 +276,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, ".upload[data-v-5a5f8c5d]{position:rela
|
|
|
276
276
|
|
|
277
277
|
/***/ }),
|
|
278
278
|
|
|
279
|
-
/***/
|
|
279
|
+
/***/ 3686:
|
|
280
280
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
281
281
|
|
|
282
282
|
"use strict";
|
|
@@ -290,7 +290,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
290
290
|
|
|
291
291
|
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()));
|
|
292
292
|
// Module
|
|
293
|
-
___CSS_LOADER_EXPORT___.push([module.id, ".upload[data-v-
|
|
293
|
+
___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}", ""]);
|
|
294
294
|
// Exports
|
|
295
295
|
/* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
|
|
296
296
|
|
|
@@ -42901,19 +42901,19 @@ var update = add("33a2ac54", content, true, {"sourceMap":false,"shadowMode":fals
|
|
|
42901
42901
|
|
|
42902
42902
|
/***/ }),
|
|
42903
42903
|
|
|
42904
|
-
/***/
|
|
42904
|
+
/***/ 8097:
|
|
42905
42905
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
42906
42906
|
|
|
42907
42907
|
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
42908
42908
|
|
|
42909
42909
|
// load the styles
|
|
42910
|
-
var content = __webpack_require__(
|
|
42910
|
+
var content = __webpack_require__(3833);
|
|
42911
42911
|
if(content.__esModule) content = content.default;
|
|
42912
42912
|
if(typeof content === 'string') content = [[module.id, content, '']];
|
|
42913
42913
|
if(content.locals) module.exports = content.locals;
|
|
42914
42914
|
// add the styles to the DOM
|
|
42915
42915
|
var add = (__webpack_require__(208)/* ["default"] */ .Z)
|
|
42916
|
-
var update = add("
|
|
42916
|
+
var update = add("1f604172", content, true, {"sourceMap":false,"shadowMode":false});
|
|
42917
42917
|
|
|
42918
42918
|
/***/ }),
|
|
42919
42919
|
|
|
@@ -42933,19 +42933,19 @@ var update = add("469bd03b", content, true, {"sourceMap":false,"shadowMode":fals
|
|
|
42933
42933
|
|
|
42934
42934
|
/***/ }),
|
|
42935
42935
|
|
|
42936
|
-
/***/
|
|
42936
|
+
/***/ 346:
|
|
42937
42937
|
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
42938
42938
|
|
|
42939
42939
|
// style-loader: Adds some css to the DOM by adding a <style> tag
|
|
42940
42940
|
|
|
42941
42941
|
// load the styles
|
|
42942
|
-
var content = __webpack_require__(
|
|
42942
|
+
var content = __webpack_require__(3686);
|
|
42943
42943
|
if(content.__esModule) content = content.default;
|
|
42944
42944
|
if(typeof content === 'string') content = [[module.id, content, '']];
|
|
42945
42945
|
if(content.locals) module.exports = content.locals;
|
|
42946
42946
|
// add the styles to the DOM
|
|
42947
42947
|
var add = (__webpack_require__(208)/* ["default"] */ .Z)
|
|
42948
|
-
var update = add("
|
|
42948
|
+
var update = add("0f47e740", content, true, {"sourceMap":false,"shadowMode":false});
|
|
42949
42949
|
|
|
42950
42950
|
/***/ }),
|
|
42951
42951
|
|
|
@@ -43661,9 +43661,9 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
43661
43661
|
"MapboxDraw": function() { return /* reexport */ (mapbox_gl_draw_default()); },
|
|
43662
43662
|
"default": function() { return /* binding */ entry_lib; },
|
|
43663
43663
|
"drawLine": function() { return /* reexport */ draw_line; },
|
|
43664
|
-
"drawPoint": function() { return /* reexport */
|
|
43664
|
+
"drawPoint": function() { return /* reexport */ point; },
|
|
43665
43665
|
"drawPolygon": function() { return /* reexport */ polygon; },
|
|
43666
|
-
"drawTools": function() { return /* reexport */
|
|
43666
|
+
"drawTools": function() { return /* reexport */ package_draw; },
|
|
43667
43667
|
"jsonFile": function() { return /* reexport */ jsonFile; },
|
|
43668
43668
|
"mapDraw": function() { return /* reexport */ mapDraw; },
|
|
43669
43669
|
"mapEvent": function() { return /* reexport */ mapEvent; },
|
|
@@ -43703,7 +43703,7 @@ __webpack_require__.d(es_namespaceObject, {
|
|
|
43703
43703
|
"multiLineString": function() { return multiLineString; },
|
|
43704
43704
|
"multiPoint": function() { return multiPoint; },
|
|
43705
43705
|
"multiPolygon": function() { return multiPolygon; },
|
|
43706
|
-
"point": function() { return
|
|
43706
|
+
"point": function() { return es_point; },
|
|
43707
43707
|
"points": function() { return points; },
|
|
43708
43708
|
"polygon": function() { return es_polygon; },
|
|
43709
43709
|
"polygons": function() { return polygons; },
|
|
@@ -43917,7 +43917,7 @@ __webpack_require__.d(turf_dist_es_namespaceObject, {
|
|
|
43917
43917
|
"nearestPointOnLine": function() { return nearest_point_on_line_dist_es; },
|
|
43918
43918
|
"nearestPointToLine": function() { return nearest_point_to_line_dist_es; },
|
|
43919
43919
|
"planepoint": function() { return planepoint_dist_es; },
|
|
43920
|
-
"point": function() { return
|
|
43920
|
+
"point": function() { return es_point; },
|
|
43921
43921
|
"pointGrid": function() { return point_grid_dist_es; },
|
|
43922
43922
|
"pointOnFeature": function() { return point_on_feature_dist_es; },
|
|
43923
43923
|
"pointOnLine": function() { return nearest_point_on_line_dist_es; },
|
|
@@ -44061,9 +44061,9 @@ __webpack_require__.r(package_namespaceObject);
|
|
|
44061
44061
|
__webpack_require__.d(package_namespaceObject, {
|
|
44062
44062
|
"CT": function() { return (mapbox_gl_draw_default()); },
|
|
44063
44063
|
"pS": function() { return draw_line; },
|
|
44064
|
-
"Qd": function() { return
|
|
44064
|
+
"Qd": function() { return point; },
|
|
44065
44065
|
"is": function() { return polygon; },
|
|
44066
|
-
"Cx": function() { return
|
|
44066
|
+
"Cx": function() { return package_draw; },
|
|
44067
44067
|
"tP": function() { return jsonFile; },
|
|
44068
44068
|
"Gx": function() { return mapDraw; },
|
|
44069
44069
|
"A": function() { return mapEvent; },
|
|
@@ -44235,7 +44235,7 @@ function geometry(type, coordinates, _options) {
|
|
|
44235
44235
|
}
|
|
44236
44236
|
switch (type) {
|
|
44237
44237
|
case "Point":
|
|
44238
|
-
return
|
|
44238
|
+
return es_point(coordinates).geometry;
|
|
44239
44239
|
case "LineString":
|
|
44240
44240
|
return lineString(coordinates).geometry;
|
|
44241
44241
|
case "Polygon":
|
|
@@ -44265,7 +44265,7 @@ function geometry(type, coordinates, _options) {
|
|
|
44265
44265
|
*
|
|
44266
44266
|
* //=point
|
|
44267
44267
|
*/
|
|
44268
|
-
function
|
|
44268
|
+
function es_point(coordinates, properties, options) {
|
|
44269
44269
|
if (options === void 0) {
|
|
44270
44270
|
options = {};
|
|
44271
44271
|
}
|
|
@@ -44312,7 +44312,7 @@ function points(coordinates, properties, options) {
|
|
|
44312
44312
|
options = {};
|
|
44313
44313
|
}
|
|
44314
44314
|
return es_featureCollection(coordinates.map(function (coords) {
|
|
44315
|
-
return
|
|
44315
|
+
return es_point(coords, properties);
|
|
44316
44316
|
}), options);
|
|
44317
44317
|
}
|
|
44318
44318
|
/**
|
|
@@ -45915,26 +45915,26 @@ function findPoint(geojson, options) {
|
|
|
45915
45915
|
var coords = geometry.coordinates;
|
|
45916
45916
|
switch (geometry.type) {
|
|
45917
45917
|
case "Point":
|
|
45918
|
-
return
|
|
45918
|
+
return es_point(coords, properties, options);
|
|
45919
45919
|
case "MultiPoint":
|
|
45920
45920
|
if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
|
|
45921
|
-
return
|
|
45921
|
+
return es_point(coords[multiFeatureIndex], properties, options);
|
|
45922
45922
|
case "LineString":
|
|
45923
45923
|
if (coordIndex < 0) coordIndex = coords.length + coordIndex;
|
|
45924
|
-
return
|
|
45924
|
+
return es_point(coords[coordIndex], properties, options);
|
|
45925
45925
|
case "Polygon":
|
|
45926
45926
|
if (geometryIndex < 0) geometryIndex = coords.length + geometryIndex;
|
|
45927
45927
|
if (coordIndex < 0) coordIndex = coords[geometryIndex].length + coordIndex;
|
|
45928
|
-
return
|
|
45928
|
+
return es_point(coords[geometryIndex][coordIndex], properties, options);
|
|
45929
45929
|
case "MultiLineString":
|
|
45930
45930
|
if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
|
|
45931
45931
|
if (coordIndex < 0) coordIndex = coords[multiFeatureIndex].length + coordIndex;
|
|
45932
|
-
return
|
|
45932
|
+
return es_point(coords[multiFeatureIndex][coordIndex], properties, options);
|
|
45933
45933
|
case "MultiPolygon":
|
|
45934
45934
|
if (multiFeatureIndex < 0) multiFeatureIndex = coords.length + multiFeatureIndex;
|
|
45935
45935
|
if (geometryIndex < 0) geometryIndex = coords[multiFeatureIndex].length + geometryIndex;
|
|
45936
45936
|
if (coordIndex < 0) coordIndex = coords[multiFeatureIndex][geometryIndex].length - coordIndex;
|
|
45937
|
-
return
|
|
45937
|
+
return es_point(coords[multiFeatureIndex][geometryIndex][coordIndex], properties, options);
|
|
45938
45938
|
}
|
|
45939
45939
|
throw new Error("geojson is invalid");
|
|
45940
45940
|
}
|
|
@@ -49883,7 +49883,7 @@ function destination(origin, distance, bearing, options) {
|
|
|
49883
49883
|
var longitude2 = longitude1 + Math.atan2(Math.sin(bearingRad) * Math.sin(radians) * Math.cos(latitude1), Math.cos(radians) - Math.sin(latitude1) * Math.sin(latitude2));
|
|
49884
49884
|
var lng = radiansToDegrees(longitude2);
|
|
49885
49885
|
var lat = radiansToDegrees(latitude2);
|
|
49886
|
-
return
|
|
49886
|
+
return es_point([lng, lat], options.properties);
|
|
49887
49887
|
}
|
|
49888
49888
|
;// CONCATENATED MODULE: ./node_modules/@turf/circle/dist/es/index.js
|
|
49889
49889
|
|
|
@@ -50047,7 +50047,7 @@ function center(geojson, options) {
|
|
|
50047
50047
|
var ext = es(geojson);
|
|
50048
50048
|
var x = (ext[0] + ext[2]) / 2;
|
|
50049
50049
|
var y = (ext[1] + ext[3]) / 2;
|
|
50050
|
-
return
|
|
50050
|
+
return es_point([x, y], options.properties, options);
|
|
50051
50051
|
}
|
|
50052
50052
|
/* harmony default export */ var center_dist_es = (center);
|
|
50053
50053
|
;// CONCATENATED MODULE: ./node_modules/@turf/centroid/dist/es/index.js
|
|
@@ -50082,7 +50082,7 @@ function centroid(geojson, options) {
|
|
|
50082
50082
|
ySum += coord[1];
|
|
50083
50083
|
len++;
|
|
50084
50084
|
}, true);
|
|
50085
|
-
return
|
|
50085
|
+
return es_point([xSum / len, ySum / len], options.properties);
|
|
50086
50086
|
}
|
|
50087
50087
|
/* harmony default export */ var centroid_dist_es = (centroid);
|
|
50088
50088
|
;// CONCATENATED MODULE: ./node_modules/@turf/center-of-mass/dist/es/index.js
|
|
@@ -50113,7 +50113,7 @@ function centerOfMass(geojson, options) {
|
|
|
50113
50113
|
}
|
|
50114
50114
|
switch (getType(geojson)) {
|
|
50115
50115
|
case "Point":
|
|
50116
|
-
return
|
|
50116
|
+
return es_point(getCoord(geojson), options.properties);
|
|
50117
50117
|
case "Polygon":
|
|
50118
50118
|
var coords = [];
|
|
50119
50119
|
coordEach(geojson, function (coord) {
|
|
@@ -50157,7 +50157,7 @@ function centerOfMass(geojson, options) {
|
|
|
50157
50157
|
var area = sArea * 0.5;
|
|
50158
50158
|
var areaFactor = 1 / (6 * area);
|
|
50159
50159
|
// Compute the final coordinates, adding back the values that have been neutralized
|
|
50160
|
-
return
|
|
50160
|
+
return es_point([translation[0] + areaFactor * sx, translation[1] + areaFactor * sy], options.properties);
|
|
50161
50161
|
}
|
|
50162
50162
|
default:
|
|
50163
50163
|
// Not a polygon: Compute the convex hull and work with that
|
|
@@ -50278,12 +50278,12 @@ function explode(geojson) {
|
|
|
50278
50278
|
if (geojson.type === "FeatureCollection") {
|
|
50279
50279
|
featureEach(geojson, function (feature) {
|
|
50280
50280
|
coordEach(feature, function (coord) {
|
|
50281
|
-
points.push(
|
|
50281
|
+
points.push(es_point(coord, feature.properties));
|
|
50282
50282
|
});
|
|
50283
50283
|
});
|
|
50284
50284
|
} else {
|
|
50285
50285
|
coordEach(geojson, function (coord) {
|
|
50286
|
-
points.push(
|
|
50286
|
+
points.push(es_point(coord, geojson.properties));
|
|
50287
50287
|
});
|
|
50288
50288
|
}
|
|
50289
50289
|
return es_featureCollection(points);
|
|
@@ -50603,7 +50603,7 @@ function intersects(line1, line2) {
|
|
|
50603
50603
|
if (uA >= 0 && uA <= 1 && uB >= 0 && uB <= 1) {
|
|
50604
50604
|
var x = x1 + uA * (x2 - x1);
|
|
50605
50605
|
var y = y1 + uA * (y2 - y1);
|
|
50606
|
-
return
|
|
50606
|
+
return es_point([x, y]);
|
|
50607
50607
|
}
|
|
50608
50608
|
return null;
|
|
50609
50609
|
}
|
|
@@ -50646,7 +50646,7 @@ function nearestPointOnLine(lines, pt, options) {
|
|
|
50646
50646
|
if (options === void 0) {
|
|
50647
50647
|
options = {};
|
|
50648
50648
|
}
|
|
50649
|
-
var closestPt =
|
|
50649
|
+
var closestPt = es_point([Infinity, Infinity], {
|
|
50650
50650
|
dist: Infinity
|
|
50651
50651
|
});
|
|
50652
50652
|
var length = 0.0;
|
|
@@ -50654,10 +50654,10 @@ function nearestPointOnLine(lines, pt, options) {
|
|
|
50654
50654
|
var coords = getCoords(line);
|
|
50655
50655
|
for (var i = 0; i < coords.length - 1; i++) {
|
|
50656
50656
|
//start
|
|
50657
|
-
var start =
|
|
50657
|
+
var start = es_point(coords[i]);
|
|
50658
50658
|
start.properties.dist = distance_dist_es(pt, start, options);
|
|
50659
50659
|
//stop
|
|
50660
|
-
var stop_1 =
|
|
50660
|
+
var stop_1 = es_point(coords[i + 1]);
|
|
50661
50661
|
stop_1.properties.dist = distance_dist_es(pt, stop_1, options);
|
|
50662
50662
|
// sectionLength
|
|
50663
50663
|
var sectionLength = distance_dist_es(start, stop_1, options);
|
|
@@ -50819,7 +50819,7 @@ function pointToLineDistance(pt, line, options) {
|
|
|
50819
50819
|
throw new Error("pt is required");
|
|
50820
50820
|
}
|
|
50821
50821
|
if (Array.isArray(pt)) {
|
|
50822
|
-
pt =
|
|
50822
|
+
pt = es_point(pt);
|
|
50823
50823
|
} else if (pt.type === "Point") {
|
|
50824
50824
|
pt = es_feature(pt);
|
|
50825
50825
|
} else {
|
|
@@ -51125,7 +51125,7 @@ function kinks(featureIn) {
|
|
|
51125
51125
|
}
|
|
51126
51126
|
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]);
|
|
51127
51127
|
if (intersection) {
|
|
51128
|
-
results.features.push(
|
|
51128
|
+
results.features.push(es_point([intersection[0], intersection[1]]));
|
|
51129
51129
|
}
|
|
51130
51130
|
}
|
|
51131
51131
|
}
|
|
@@ -51293,7 +51293,7 @@ function pointOnFeature(geojson) {
|
|
|
51293
51293
|
vertices.features = vertices.features.concat(explode_dist_es(fc.features[i]).features);
|
|
51294
51294
|
}
|
|
51295
51295
|
// Remove distanceToPoint properties from nearestPoint()
|
|
51296
|
-
return
|
|
51296
|
+
return es_point(nearest_point_dist_es(cent, vertices).geometry.coordinates);
|
|
51297
51297
|
}
|
|
51298
51298
|
}
|
|
51299
51299
|
|
|
@@ -51472,7 +51472,7 @@ function along(line, distance, options) {
|
|
|
51472
51472
|
} else if (travelled >= distance) {
|
|
51473
51473
|
var overshot = distance - travelled;
|
|
51474
51474
|
if (!overshot) {
|
|
51475
|
-
return
|
|
51475
|
+
return es_point(coords[i]);
|
|
51476
51476
|
} else {
|
|
51477
51477
|
var direction = bearing(coords[i], coords[i - 1]) - 180;
|
|
51478
51478
|
var interpolated = destination(coords[i], overshot, direction, options);
|
|
@@ -51482,7 +51482,7 @@ function along(line, distance, options) {
|
|
|
51482
51482
|
travelled += distance_dist_es(coords[i], coords[i + 1], options);
|
|
51483
51483
|
}
|
|
51484
51484
|
}
|
|
51485
|
-
return
|
|
51485
|
+
return es_point(coords[coords.length - 1]);
|
|
51486
51486
|
}
|
|
51487
51487
|
;// CONCATENATED MODULE: ./node_modules/@turf/length/dist/es/index.js
|
|
51488
51488
|
|
|
@@ -52023,7 +52023,7 @@ function pointGrid(bbox, cellSide, options) {
|
|
|
52023
52023
|
while (currentX <= east) {
|
|
52024
52024
|
var currentY = south + deltaY;
|
|
52025
52025
|
while (currentY <= north) {
|
|
52026
|
-
var cellPt =
|
|
52026
|
+
var cellPt = es_point([currentX, currentY], options.properties);
|
|
52027
52027
|
if (options.mask) {
|
|
52028
52028
|
if (boolean_within_dist_es(cellPt, options.mask)) results.push(cellPt);
|
|
52029
52029
|
} else {
|
|
@@ -54018,7 +54018,7 @@ function rhumbDestination(origin, distance, bearing, options) {
|
|
|
54018
54018
|
// compensate the crossing of the 180th meridian (https://macwright.org/2016/09/26/the-180th-meridian.html)
|
|
54019
54019
|
// solution from https://github.com/mapbox/mapbox-gl-js/issues/3250#issuecomment-294887678
|
|
54020
54020
|
destination[0] += destination[0] - coords[0] > 180 ? -360 : coords[0] - destination[0] > 180 ? 360 : 0;
|
|
54021
|
-
return
|
|
54021
|
+
return es_point(destination, options.properties);
|
|
54022
54022
|
}
|
|
54023
54023
|
/**
|
|
54024
54024
|
* Returns the destination point having travelled along a rhumb line from origin point the given
|
|
@@ -54139,7 +54139,7 @@ function polygonTangents(pt, polygon) {
|
|
|
54139
54139
|
});
|
|
54140
54140
|
break;
|
|
54141
54141
|
}
|
|
54142
|
-
return es_featureCollection([
|
|
54142
|
+
return es_featureCollection([es_point(rtan), es_point(ltan)]);
|
|
54143
54143
|
}
|
|
54144
54144
|
function es_processPolygon(polygonCoords, ptCoords, eprev, enext, rtan, ltan) {
|
|
54145
54145
|
for (var i = 0; i < polygonCoords.length; i++) {
|
|
@@ -58102,22 +58102,22 @@ function defineOrigin(geojson, origin) {
|
|
|
58102
58102
|
case "southwest":
|
|
58103
58103
|
case "westsouth":
|
|
58104
58104
|
case "bottomleft":
|
|
58105
|
-
return
|
|
58105
|
+
return es_point([west, south]);
|
|
58106
58106
|
case "se":
|
|
58107
58107
|
case "southeast":
|
|
58108
58108
|
case "eastsouth":
|
|
58109
58109
|
case "bottomright":
|
|
58110
|
-
return
|
|
58110
|
+
return es_point([east, south]);
|
|
58111
58111
|
case "nw":
|
|
58112
58112
|
case "northwest":
|
|
58113
58113
|
case "westnorth":
|
|
58114
58114
|
case "topleft":
|
|
58115
|
-
return
|
|
58115
|
+
return es_point([west, north]);
|
|
58116
58116
|
case "ne":
|
|
58117
58117
|
case "northeast":
|
|
58118
58118
|
case "eastnorth":
|
|
58119
58119
|
case "topright":
|
|
58120
|
-
return
|
|
58120
|
+
return es_point([east, north]);
|
|
58121
58121
|
case "center":
|
|
58122
58122
|
return center_dist_es(geojson);
|
|
58123
58123
|
case undefined:
|
|
@@ -58486,7 +58486,7 @@ function envelopeIsEqual(env1, env2) {
|
|
|
58486
58486
|
*/
|
|
58487
58487
|
function envelopeContains(self, env) {
|
|
58488
58488
|
return env.geometry.coordinates[0].every(function (c) {
|
|
58489
|
-
return booleanPointInPolygon(
|
|
58489
|
+
return booleanPointInPolygon(es_point(c), self);
|
|
58490
58490
|
});
|
|
58491
58491
|
}
|
|
58492
58492
|
/**
|
|
@@ -58851,7 +58851,7 @@ var EdgeRing = /** @class */function () {
|
|
|
58851
58851
|
var pt = testEdgeRingCoordinates_1[_i];
|
|
58852
58852
|
_loop_1(pt);
|
|
58853
58853
|
}
|
|
58854
|
-
if (testPoint && shell.inside(
|
|
58854
|
+
if (testPoint && shell.inside(es_point(testPoint))) {
|
|
58855
58855
|
if (!minShell || envelopeContains(minEnvelope, tryEnvelope)) minShell = shell;
|
|
58856
58856
|
}
|
|
58857
58857
|
}
|
|
@@ -59744,7 +59744,7 @@ function doesMultiPointCrossPoly(multiPoint, polygon) {
|
|
|
59744
59744
|
var foundExtPoint = false;
|
|
59745
59745
|
var pointLength = multiPoint.coordinates.length;
|
|
59746
59746
|
for (var i = 0; i < pointLength && (!foundIntPoint || !foundExtPoint); i++) {
|
|
59747
|
-
if (booleanPointInPolygon(
|
|
59747
|
+
if (booleanPointInPolygon(es_point(multiPoint.coordinates[i]), polygon)) {
|
|
59748
59748
|
foundIntPoint = true;
|
|
59749
59749
|
} else {
|
|
59750
59750
|
foundExtPoint = true;
|
|
@@ -60534,8 +60534,8 @@ function shortestPath(start, end, options) {
|
|
|
60534
60534
|
// Normalize Inputs
|
|
60535
60535
|
var startCoord = getCoord(start);
|
|
60536
60536
|
var endCoord = getCoord(end);
|
|
60537
|
-
start =
|
|
60538
|
-
end =
|
|
60537
|
+
start = es_point(startCoord);
|
|
60538
|
+
end = es_point(endCoord);
|
|
60539
60539
|
|
|
60540
60540
|
// Handle obstacles
|
|
60541
60541
|
switch (getType(obstacles)) {
|
|
@@ -60593,7 +60593,7 @@ function shortestPath(start, end, options) {
|
|
|
60593
60593
|
var currentX = west + deltaX;
|
|
60594
60594
|
var c = 0;
|
|
60595
60595
|
while (currentX <= east) {
|
|
60596
|
-
var pt =
|
|
60596
|
+
var pt = es_point([currentX, currentY]);
|
|
60597
60597
|
var isInsideObstacle = es_isInside(pt, obstacles);
|
|
60598
60598
|
// feed obstacles matrix
|
|
60599
60599
|
matrixRow.push(isInsideObstacle ? 0 : 1); // with javascript-astar
|
|
@@ -61763,7 +61763,7 @@ options) {
|
|
|
61763
61763
|
});
|
|
61764
61764
|
}
|
|
61765
61765
|
});
|
|
61766
|
-
return
|
|
61766
|
+
return es_point([sumXs / sumNs, sumYs / sumNs], options.properties, options);
|
|
61767
61767
|
}
|
|
61768
61768
|
/* harmony default export */ var center_mean_dist_es = (centerMean);
|
|
61769
61769
|
;// CONCATENATED MODULE: ./node_modules/@turf/center-median/dist/es/index.js
|
|
@@ -61890,7 +61890,7 @@ function findMedian(candidateMedian, previousCandidate, centroids, properties, c
|
|
|
61890
61890
|
var candidateX = candidateXsum / kSum;
|
|
61891
61891
|
var candidateY = candidateYsum / kSum;
|
|
61892
61892
|
if (centroidCount === 1 || counter === 0 || Math.abs(candidateX - previousCandidate[0]) < tolerance && Math.abs(candidateY - previousCandidate[1]) < tolerance) {
|
|
61893
|
-
return
|
|
61893
|
+
return es_point([candidateX, candidateY], {
|
|
61894
61894
|
medianCandidates: properties.medianCandidates
|
|
61895
61895
|
});
|
|
61896
61896
|
} else {
|
|
@@ -62625,7 +62625,7 @@ function randomPoint(count, options) {
|
|
|
62625
62625
|
}
|
|
62626
62626
|
var features = [];
|
|
62627
62627
|
for (var i = 0; i < count; i++) {
|
|
62628
|
-
features.push(
|
|
62628
|
+
features.push(es_point(randomPosition(options.bbox)));
|
|
62629
62629
|
}
|
|
62630
62630
|
return es_featureCollection(features);
|
|
62631
62631
|
}
|
|
@@ -70894,8 +70894,8 @@ const mapTools_distance = (fromLngLat, toLngLat) => {
|
|
|
70894
70894
|
// from = [-75.343, 39.984]
|
|
70895
70895
|
// to = [-75.534, 39.123]
|
|
70896
70896
|
|
|
70897
|
-
let from =
|
|
70898
|
-
let to =
|
|
70897
|
+
let from = es_point(fromLngLat);
|
|
70898
|
+
let to = es_point(toLngLat);
|
|
70899
70899
|
let distance = distance_dist_es(from, to, {
|
|
70900
70900
|
units: 'miles'
|
|
70901
70901
|
});
|
|
@@ -70907,8 +70907,8 @@ const lineCenter = (LngLat1, LngLat2) => {
|
|
|
70907
70907
|
// LngLat1 = [-75.343, 39.984]
|
|
70908
70908
|
// LngLat2 = [-75.534, 39.123]
|
|
70909
70909
|
|
|
70910
|
-
var point1 =
|
|
70911
|
-
var point2 =
|
|
70910
|
+
var point1 = es_point(LngLat1);
|
|
70911
|
+
var point2 = es_point(LngLat2);
|
|
70912
70912
|
var midpoint = midpoint_dist_es(point1, point2);
|
|
70913
70913
|
return midpoint;
|
|
70914
70914
|
};
|
|
@@ -120467,8 +120467,8 @@ var mapStyle_component = normalizeComponent(
|
|
|
120467
120467
|
)
|
|
120468
120468
|
|
|
120469
120469
|
/* harmony default export */ var mapStyle = (mapStyle_component.exports);
|
|
120470
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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=
|
|
120471
|
-
var
|
|
120470
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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&
|
|
120471
|
+
var drawvue_type_template_id_32331762_scoped_true_render = function render() {
|
|
120472
120472
|
var _vm = this,
|
|
120473
120473
|
_c = _vm._self._c;
|
|
120474
120474
|
return _c('div', [_c('div', {
|
|
@@ -120605,10 +120605,147 @@ var drawvue_type_template_id_29ae25b4_scoped_true_render = function render() {
|
|
|
120605
120605
|
staticClass: "right-fixed"
|
|
120606
120606
|
}, [_vm._t("right-fixed")], 2)]);
|
|
120607
120607
|
};
|
|
120608
|
-
var
|
|
120608
|
+
var drawvue_type_template_id_32331762_scoped_true_staticRenderFns = [];
|
|
120609
120609
|
|
|
120610
120610
|
// EXTERNAL MODULE: ./node_modules/@mapbox/mapbox-gl-draw/dist/mapbox-gl-draw.css
|
|
120611
120611
|
var dist_mapbox_gl_draw = __webpack_require__(5620);
|
|
120612
|
+
;// CONCATENATED MODULE: ./src/package/util/mapDrawAdsorb.js
|
|
120613
|
+
|
|
120614
|
+
|
|
120615
|
+
|
|
120616
|
+
|
|
120617
|
+
let mouseMarker = null;
|
|
120618
|
+
let lastPosition = {
|
|
120619
|
+
coordinates: [],
|
|
120620
|
+
//吸附后经纬度
|
|
120621
|
+
isAdsorb: false,
|
|
120622
|
+
//是否被吸附
|
|
120623
|
+
properties: {} //吸附元素属性
|
|
120624
|
+
};
|
|
120625
|
+
|
|
120626
|
+
let opt = {
|
|
120627
|
+
layerId: null,
|
|
120628
|
+
// 吸附图层id
|
|
120629
|
+
boundP: 20 //吸附边界范围 像素
|
|
120630
|
+
};
|
|
120631
|
+
|
|
120632
|
+
let mapDrawAdsorb_map = null;
|
|
120633
|
+
let draw = null;
|
|
120634
|
+
|
|
120635
|
+
/**
|
|
120636
|
+
* 添加点吸附效果
|
|
120637
|
+
* @param {Object} view 地图
|
|
120638
|
+
* @param {Object} params 吸附参数
|
|
120639
|
+
*/
|
|
120640
|
+
const startAdsorb = (params = {}, view = package_map.map) => {
|
|
120641
|
+
mapDrawAdsorb_map = view;
|
|
120642
|
+
opt = Object.assign(opt, params);
|
|
120643
|
+
if (!opt.layerId) return;
|
|
120644
|
+
// 初始化一个点标记
|
|
120645
|
+
if (!mouseMarker) addMouseMarker();
|
|
120646
|
+
// 监听鼠标移动事件并更新点标记的位置
|
|
120647
|
+
mapDrawAdsorb_map.on('mousemove', e => {
|
|
120648
|
+
if (mouseMarker) {
|
|
120649
|
+
let lngLat = e.lngLat;
|
|
120650
|
+
//获取吸附后的坐标
|
|
120651
|
+
lastPosition = getAdsorbPoint([lngLat.lng, lngLat.lat]);
|
|
120652
|
+
mouseMarker.setLngLat(lastPosition.coordinates);
|
|
120653
|
+
}
|
|
120654
|
+
});
|
|
120655
|
+
};
|
|
120656
|
+
|
|
120657
|
+
/**
|
|
120658
|
+
* 获取吸附坐标
|
|
120659
|
+
* @param {array} coordinates 经纬度
|
|
120660
|
+
*/
|
|
120661
|
+
const getAdsorbPoint = coordinates => {
|
|
120662
|
+
//是否被吸附
|
|
120663
|
+
let isAdsorb = false;
|
|
120664
|
+
let properties = null;
|
|
120665
|
+
if (hasLayer(opt.layerId)) {
|
|
120666
|
+
//吸附图层id
|
|
120667
|
+
const point = es_point(coordinates);
|
|
120668
|
+
// 经纬度转换为屏幕像素坐标
|
|
120669
|
+
var screenCoordinate = mapDrawAdsorb_map.project(coordinates);
|
|
120670
|
+
//获取边界范围
|
|
120671
|
+
const bbox = [[screenCoordinate.x - opt.boundP, screenCoordinate.y - opt.boundP], [screenCoordinate.x + opt.boundP, screenCoordinate.y + opt.boundP]];
|
|
120672
|
+
const nearbyFeatures = mapDrawAdsorb_map.queryRenderedFeatures(bbox, {
|
|
120673
|
+
// 查询附近的要素
|
|
120674
|
+
layers: [opt.layerId] // 吸附图层id
|
|
120675
|
+
});
|
|
120676
|
+
// 找到最近的边缘并吸附
|
|
120677
|
+
let nearestEdge;
|
|
120678
|
+
let minDistance = Infinity;
|
|
120679
|
+
nearbyFeatures.forEach(feat => {
|
|
120680
|
+
const edge = lineString(feat.geometry.coordinates); // 假设每个坐标都是线的端点
|
|
120681
|
+
const distance = point_to_line_distance_dist_es(point, edge, {
|
|
120682
|
+
units: 'meters'
|
|
120683
|
+
});
|
|
120684
|
+
if (distance < minDistance) {
|
|
120685
|
+
minDistance = distance;
|
|
120686
|
+
nearestEdge = edge;
|
|
120687
|
+
properties = feat.properties;
|
|
120688
|
+
}
|
|
120689
|
+
});
|
|
120690
|
+
if (nearestEdge) {
|
|
120691
|
+
//吸附后的坐标
|
|
120692
|
+
const snappedPoint = nearest_point_on_line_dist_es(nearestEdge, point);
|
|
120693
|
+
coordinates = snappedPoint.geometry.coordinates;
|
|
120694
|
+
isAdsorb = true;
|
|
120695
|
+
}
|
|
120696
|
+
}
|
|
120697
|
+
return {
|
|
120698
|
+
coordinates,
|
|
120699
|
+
isAdsorb,
|
|
120700
|
+
properties
|
|
120701
|
+
};
|
|
120702
|
+
};
|
|
120703
|
+
|
|
120704
|
+
/**
|
|
120705
|
+
* 结束吸附
|
|
120706
|
+
* @param {Object} draw 绘制组件
|
|
120707
|
+
* @param {Object} feature 绘制要素
|
|
120708
|
+
*/
|
|
120709
|
+
const endAdsorb = (d = draw, feature) => {
|
|
120710
|
+
draw = d;
|
|
120711
|
+
//获取最后鼠标移入坐标
|
|
120712
|
+
if (lastPosition.isAdsorb && draw && feature) {
|
|
120713
|
+
draw.delete(feature.id);
|
|
120714
|
+
feature.geometry.coordinates = lastPosition.coordinates;
|
|
120715
|
+
//直接绘制,会不更新画布
|
|
120716
|
+
setTimeout(() => {
|
|
120717
|
+
draw.add(feature);
|
|
120718
|
+
}, 300);
|
|
120719
|
+
draw.changeMode('simple_select', {
|
|
120720
|
+
features: [feature]
|
|
120721
|
+
});
|
|
120722
|
+
}
|
|
120723
|
+
//移除marker
|
|
120724
|
+
removeMarker();
|
|
120725
|
+
mapDrawAdsorb_map.off('mousemove');
|
|
120726
|
+
return lastPosition;
|
|
120727
|
+
};
|
|
120728
|
+
|
|
120729
|
+
/**
|
|
120730
|
+
* 添加定位点
|
|
120731
|
+
*/
|
|
120732
|
+
const addMouseMarker = () => {
|
|
120733
|
+
const el = document.createElement('div');
|
|
120734
|
+
el.className = 'marker';
|
|
120735
|
+
el.style.backgroundImage = 'url(/img/marker2.png)';
|
|
120736
|
+
el.style.width = '10px';
|
|
120737
|
+
el.style.height = '10px';
|
|
120738
|
+
el.style.backgroundSize = '100%';
|
|
120739
|
+
mouseMarker = new (mapbox_gl_default()).Marker(el).setLngLat([0, 0]).addTo(mapDrawAdsorb_map);
|
|
120740
|
+
};
|
|
120741
|
+
|
|
120742
|
+
/**
|
|
120743
|
+
* 移除定位点
|
|
120744
|
+
*/
|
|
120745
|
+
const removeMarker = () => {
|
|
120746
|
+
mouseMarker && mouseMarker.remove();
|
|
120747
|
+
mouseMarker = null;
|
|
120748
|
+
};
|
|
120612
120749
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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&
|
|
120613
120750
|
var jsonFilevue_type_template_id_5a5f8c5d_scoped_true_render = function render() {
|
|
120614
120751
|
var _vm = this,
|
|
@@ -120693,8 +120830,8 @@ var jsonFile_component = normalizeComponent(
|
|
|
120693
120830
|
)
|
|
120694
120831
|
|
|
120695
120832
|
/* harmony default export */ var jsonFile = (jsonFile_component.exports);
|
|
120696
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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=
|
|
120697
|
-
var
|
|
120833
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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&
|
|
120834
|
+
var shpFilevue_type_template_id_6e60926f_scoped_true_render = function render() {
|
|
120698
120835
|
var _vm = this,
|
|
120699
120836
|
_c = _vm._self._c;
|
|
120700
120837
|
return _c('el-button', {
|
|
@@ -120715,7 +120852,7 @@ var shpFilevue_type_template_id_766fb941_scoped_true_render = function render()
|
|
|
120715
120852
|
}
|
|
120716
120853
|
})]);
|
|
120717
120854
|
};
|
|
120718
|
-
var
|
|
120855
|
+
var shpFilevue_type_template_id_6e60926f_scoped_true_staticRenderFns = [];
|
|
120719
120856
|
|
|
120720
120857
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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&
|
|
120721
120858
|
|
|
@@ -120772,7 +120909,6 @@ const shapeFile = __webpack_require__(4952);
|
|
|
120772
120909
|
*/
|
|
120773
120910
|
getFile(e) {
|
|
120774
120911
|
const files = Array.from(e.target.files || []);
|
|
120775
|
-
console.log('文件上传事件', files);
|
|
120776
120912
|
if (files.length === 0) return;
|
|
120777
120913
|
|
|
120778
120914
|
// 清空input的value,这样同一个文件可以重复选择
|
|
@@ -120830,7 +120966,6 @@ const shapeFile = __webpack_require__(4952);
|
|
|
120830
120966
|
readShpOnly(shpFile) {
|
|
120831
120967
|
this.readFileAsArrayBuffer(shpFile).then(shpBuffer => {
|
|
120832
120968
|
shapeFile.read(shpBuffer).then(json => {
|
|
120833
|
-
console.log('result', json);
|
|
120834
120969
|
this.validateAndProcessGeoJSON(json);
|
|
120835
120970
|
}).catch(error => {
|
|
120836
120971
|
console.error('读取文件错误:', error);
|
|
@@ -120842,9 +120977,9 @@ const shapeFile = __webpack_require__(4952);
|
|
|
120842
120977
|
});
|
|
120843
120978
|
;// CONCATENATED MODULE: ./src/package/draw/shpFile.vue?vue&type=script&lang=js&
|
|
120844
120979
|
/* harmony default export */ var draw_shpFilevue_type_script_lang_js_ = (shpFilevue_type_script_lang_js_);
|
|
120845
|
-
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-64.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-64.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-64.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-64.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=
|
|
120846
|
-
var
|
|
120847
|
-
;// CONCATENATED MODULE: ./src/package/draw/shpFile.vue?vue&type=style&index=0&id=
|
|
120980
|
+
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-64.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-64.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-64.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-64.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&
|
|
120981
|
+
var shpFilevue_type_style_index_0_id_6e60926f_prod_lang_scss_scoped_true_ = __webpack_require__(346);
|
|
120982
|
+
;// CONCATENATED MODULE: ./src/package/draw/shpFile.vue?vue&type=style&index=0&id=6e60926f&prod&lang=scss&scoped=true&
|
|
120848
120983
|
|
|
120849
120984
|
;// CONCATENATED MODULE: ./src/package/draw/shpFile.vue
|
|
120850
120985
|
|
|
@@ -120857,11 +120992,11 @@ var shpFilevue_type_style_index_0_id_766fb941_prod_lang_scss_scoped_true_ = __we
|
|
|
120857
120992
|
|
|
120858
120993
|
var shpFile_component = normalizeComponent(
|
|
120859
120994
|
draw_shpFilevue_type_script_lang_js_,
|
|
120860
|
-
|
|
120861
|
-
|
|
120995
|
+
shpFilevue_type_template_id_6e60926f_scoped_true_render,
|
|
120996
|
+
shpFilevue_type_template_id_6e60926f_scoped_true_staticRenderFns,
|
|
120862
120997
|
false,
|
|
120863
120998
|
null,
|
|
120864
|
-
"
|
|
120999
|
+
"6e60926f",
|
|
120865
121000
|
null
|
|
120866
121001
|
|
|
120867
121002
|
)
|
|
@@ -120878,6 +121013,7 @@ var shpFile_component = normalizeComponent(
|
|
|
120878
121013
|
|
|
120879
121014
|
|
|
120880
121015
|
|
|
121016
|
+
|
|
120881
121017
|
/* harmony default export */ var drawvue_type_script_lang_js_ = ({
|
|
120882
121018
|
components: {
|
|
120883
121019
|
mapFullScreen: mapFullScreen,
|
|
@@ -120941,6 +121077,16 @@ var shpFile_component = normalizeComponent(
|
|
|
120941
121077
|
// 是否需要dbf文件 上传可获取属性数据
|
|
120942
121078
|
type: Boolean,
|
|
120943
121079
|
default: false
|
|
121080
|
+
},
|
|
121081
|
+
isAdsorb: {
|
|
121082
|
+
//是否可吸附
|
|
121083
|
+
type: Boolean,
|
|
121084
|
+
default: false
|
|
121085
|
+
},
|
|
121086
|
+
adsorbParams: {
|
|
121087
|
+
//是否可吸附
|
|
121088
|
+
type: Object,
|
|
121089
|
+
default: () => {}
|
|
120944
121090
|
}
|
|
120945
121091
|
},
|
|
120946
121092
|
data() {
|
|
@@ -121077,6 +121223,10 @@ var shpFile_component = normalizeComponent(
|
|
|
121077
121223
|
}
|
|
121078
121224
|
console.log('开始绘制');
|
|
121079
121225
|
this.draw.changeMode(type);
|
|
121226
|
+
if (this.isAdsorb) {
|
|
121227
|
+
//是否可吸附
|
|
121228
|
+
startAdsorb(this.adsorbParams, this.map);
|
|
121229
|
+
}
|
|
121080
121230
|
this.$emit('start');
|
|
121081
121231
|
},
|
|
121082
121232
|
drawEnd(e) {
|
|
@@ -121085,6 +121235,11 @@ var shpFile_component = normalizeComponent(
|
|
|
121085
121235
|
console.log('绘制结束', data);
|
|
121086
121236
|
this.type = 'move';
|
|
121087
121237
|
this.geoJson = data;
|
|
121238
|
+
if (this.isAdsorb) {
|
|
121239
|
+
//是否可吸附
|
|
121240
|
+
let feature = e.features[0];
|
|
121241
|
+
data.lastPosition = endAdsorb(this.draw, feature);
|
|
121242
|
+
}
|
|
121088
121243
|
this.$emit('end', data);
|
|
121089
121244
|
},
|
|
121090
121245
|
drawUpdate(e) {
|
|
@@ -121196,9 +121351,9 @@ var shpFile_component = normalizeComponent(
|
|
|
121196
121351
|
});
|
|
121197
121352
|
;// CONCATENATED MODULE: ./src/package/draw/index.vue?vue&type=script&lang=js&
|
|
121198
121353
|
/* harmony default export */ var package_drawvue_type_script_lang_js_ = (drawvue_type_script_lang_js_);
|
|
121199
|
-
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-64.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-64.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-64.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-64.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=
|
|
121200
|
-
var
|
|
121201
|
-
;// CONCATENATED MODULE: ./src/package/draw/index.vue?vue&type=style&index=0&id=
|
|
121354
|
+
// EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-64.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-64.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-64.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-64.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&
|
|
121355
|
+
var drawvue_type_style_index_0_id_32331762_prod_lang_scss_scoped_true_ = __webpack_require__(8097);
|
|
121356
|
+
;// CONCATENATED MODULE: ./src/package/draw/index.vue?vue&type=style&index=0&id=32331762&prod&lang=scss&scoped=true&
|
|
121202
121357
|
|
|
121203
121358
|
;// CONCATENATED MODULE: ./src/package/draw/index.vue
|
|
121204
121359
|
|
|
@@ -121211,18 +121366,18 @@ var drawvue_type_style_index_0_id_29ae25b4_prod_lang_scss_scoped_true_ = __webpa
|
|
|
121211
121366
|
|
|
121212
121367
|
var draw_component = normalizeComponent(
|
|
121213
121368
|
package_drawvue_type_script_lang_js_,
|
|
121214
|
-
|
|
121215
|
-
|
|
121369
|
+
drawvue_type_template_id_32331762_scoped_true_render,
|
|
121370
|
+
drawvue_type_template_id_32331762_scoped_true_staticRenderFns,
|
|
121216
121371
|
false,
|
|
121217
121372
|
null,
|
|
121218
|
-
"
|
|
121373
|
+
"32331762",
|
|
121219
121374
|
null
|
|
121220
121375
|
|
|
121221
121376
|
)
|
|
121222
121377
|
|
|
121223
|
-
/* harmony default export */ var
|
|
121224
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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=
|
|
121225
|
-
var
|
|
121378
|
+
/* harmony default export */ var package_draw = (draw_component.exports);
|
|
121379
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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&
|
|
121380
|
+
var pointvue_type_template_id_93462f90_render = function render() {
|
|
121226
121381
|
var _vm = this,
|
|
121227
121382
|
_c = _vm._self._c;
|
|
121228
121383
|
return _c('div', {
|
|
@@ -121240,7 +121395,8 @@ var pointvue_type_template_id_1da299f2_render = function render() {
|
|
|
121240
121395
|
attrs: {
|
|
121241
121396
|
"list": ['point'],
|
|
121242
121397
|
"showMoveInput": false,
|
|
121243
|
-
"showDeleteBtn": false
|
|
121398
|
+
"showDeleteBtn": false,
|
|
121399
|
+
"isAdsorb": _vm.isAdsorb
|
|
121244
121400
|
},
|
|
121245
121401
|
on: {
|
|
121246
121402
|
"update": _vm.drawUpdate,
|
|
@@ -121276,7 +121432,7 @@ var pointvue_type_template_id_1da299f2_render = function render() {
|
|
|
121276
121432
|
staticClass: "margin-top font-12"
|
|
121277
121433
|
}, [_vm._v(" 地址:" + _vm._s(_vm.address.formattedAddress) + " ")]) : _vm._e()])])], 1);
|
|
121278
121434
|
};
|
|
121279
|
-
var
|
|
121435
|
+
var pointvue_type_template_id_93462f90_staticRenderFns = [];
|
|
121280
121436
|
|
|
121281
121437
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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&
|
|
121282
121438
|
|
|
@@ -121284,7 +121440,7 @@ var pointvue_type_template_id_1da299f2_staticRenderFns = [];
|
|
|
121284
121440
|
|
|
121285
121441
|
/* harmony default export */ var pointvue_type_script_lang_js_ = ({
|
|
121286
121442
|
components: {
|
|
121287
|
-
drawTools:
|
|
121443
|
+
drawTools: package_draw
|
|
121288
121444
|
},
|
|
121289
121445
|
props: {
|
|
121290
121446
|
config: {
|
|
@@ -121306,6 +121462,11 @@ var pointvue_type_template_id_1da299f2_staticRenderFns = [];
|
|
|
121306
121462
|
zoom: {
|
|
121307
121463
|
type: Number,
|
|
121308
121464
|
default: 14
|
|
121465
|
+
},
|
|
121466
|
+
isAdsorb: {
|
|
121467
|
+
//是否可吸附
|
|
121468
|
+
type: Boolean,
|
|
121469
|
+
default: false
|
|
121309
121470
|
}
|
|
121310
121471
|
},
|
|
121311
121472
|
data() {
|
|
@@ -121339,6 +121500,7 @@ var pointvue_type_template_id_1da299f2_staticRenderFns = [];
|
|
|
121339
121500
|
package_map.initMap(config).then(map => {
|
|
121340
121501
|
this.$refs.draw.initDraw(map);
|
|
121341
121502
|
this.draw();
|
|
121503
|
+
this.$emit('map-load');
|
|
121342
121504
|
});
|
|
121343
121505
|
},
|
|
121344
121506
|
draw() {
|
|
@@ -121370,6 +121532,8 @@ var pointvue_type_template_id_1da299f2_staticRenderFns = [];
|
|
|
121370
121532
|
this.geoJson = data;
|
|
121371
121533
|
if (list.length > 0) {
|
|
121372
121534
|
this.position = list[0].geometry.coordinates;
|
|
121535
|
+
//格式化坐标
|
|
121536
|
+
this.position = this.position.map(item => Number(item).toFixed(6));
|
|
121373
121537
|
this.$nextTick(() => {
|
|
121374
121538
|
package_map.easeTo(this.position);
|
|
121375
121539
|
GeoAddress(this.position).then(data => {
|
|
@@ -121411,8 +121575,8 @@ var pointvue_type_template_id_1da299f2_staticRenderFns = [];
|
|
|
121411
121575
|
;
|
|
121412
121576
|
var point_component = normalizeComponent(
|
|
121413
121577
|
draw_pointvue_type_script_lang_js_,
|
|
121414
|
-
|
|
121415
|
-
|
|
121578
|
+
pointvue_type_template_id_93462f90_render,
|
|
121579
|
+
pointvue_type_template_id_93462f90_staticRenderFns,
|
|
121416
121580
|
false,
|
|
121417
121581
|
null,
|
|
121418
121582
|
null,
|
|
@@ -121420,9 +121584,9 @@ var point_component = normalizeComponent(
|
|
|
121420
121584
|
|
|
121421
121585
|
)
|
|
121422
121586
|
|
|
121423
|
-
/* harmony default export */ var
|
|
121424
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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=
|
|
121425
|
-
var
|
|
121587
|
+
/* harmony default export */ var point = (point_component.exports);
|
|
121588
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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&
|
|
121589
|
+
var linevue_type_template_id_3a6a9292_render = function render() {
|
|
121426
121590
|
var _vm = this,
|
|
121427
121591
|
_c = _vm._self._c;
|
|
121428
121592
|
return _c('div', {
|
|
@@ -121477,7 +121641,7 @@ var linevue_type_template_id_098acb57_render = function render() {
|
|
|
121477
121641
|
}
|
|
121478
121642
|
}, [_vm._v("保存")]), _vm._t("default")], 2)])], 1);
|
|
121479
121643
|
};
|
|
121480
|
-
var
|
|
121644
|
+
var linevue_type_template_id_3a6a9292_staticRenderFns = [];
|
|
121481
121645
|
|
|
121482
121646
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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&
|
|
121483
121647
|
|
|
@@ -121485,7 +121649,7 @@ var linevue_type_template_id_098acb57_staticRenderFns = [];
|
|
|
121485
121649
|
|
|
121486
121650
|
/* harmony default export */ var linevue_type_script_lang_js_ = ({
|
|
121487
121651
|
components: {
|
|
121488
|
-
drawTools:
|
|
121652
|
+
drawTools: package_draw
|
|
121489
121653
|
},
|
|
121490
121654
|
props: {
|
|
121491
121655
|
config: {
|
|
@@ -121578,7 +121742,10 @@ var linevue_type_template_id_098acb57_staticRenderFns = [];
|
|
|
121578
121742
|
this.geoJson = data;
|
|
121579
121743
|
this.position = data.features.map(item => item.geometry.coordinates.flat(Infinity));
|
|
121580
121744
|
this.position = spArray(2, ...this.position); // 数组分割,两两一组
|
|
121581
|
-
|
|
121745
|
+
this.position.forEach(item => {
|
|
121746
|
+
item[0] = Number(item[0]).toFixed(6);
|
|
121747
|
+
item[1] = Number(item[1]).toFixed(6);
|
|
121748
|
+
});
|
|
121582
121749
|
if (this.autoZoom || autoZoom) {
|
|
121583
121750
|
// 开启缩放动画
|
|
121584
121751
|
this.$nextTick(() => {
|
|
@@ -121620,8 +121787,8 @@ var linevue_type_template_id_098acb57_staticRenderFns = [];
|
|
|
121620
121787
|
;
|
|
121621
121788
|
var line_component = normalizeComponent(
|
|
121622
121789
|
draw_linevue_type_script_lang_js_,
|
|
121623
|
-
|
|
121624
|
-
|
|
121790
|
+
linevue_type_template_id_3a6a9292_render,
|
|
121791
|
+
linevue_type_template_id_3a6a9292_staticRenderFns,
|
|
121625
121792
|
false,
|
|
121626
121793
|
null,
|
|
121627
121794
|
null,
|
|
@@ -121630,8 +121797,8 @@ var line_component = normalizeComponent(
|
|
|
121630
121797
|
)
|
|
121631
121798
|
|
|
121632
121799
|
/* harmony default export */ var draw_line = (line_component.exports);
|
|
121633
|
-
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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=
|
|
121634
|
-
var
|
|
121800
|
+
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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&
|
|
121801
|
+
var polygonvue_type_template_id_75043640_render = function render() {
|
|
121635
121802
|
var _vm = this,
|
|
121636
121803
|
_c = _vm._self._c;
|
|
121637
121804
|
return _c('div', {
|
|
@@ -121686,7 +121853,7 @@ var polygonvue_type_template_id_02d388c8_render = function render() {
|
|
|
121686
121853
|
}
|
|
121687
121854
|
}, [_vm._v("保存")]), _vm._t("default")], 2)])], 1);
|
|
121688
121855
|
};
|
|
121689
|
-
var
|
|
121856
|
+
var polygonvue_type_template_id_75043640_staticRenderFns = [];
|
|
121690
121857
|
|
|
121691
121858
|
;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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&
|
|
121692
121859
|
|
|
@@ -121694,7 +121861,7 @@ var polygonvue_type_template_id_02d388c8_staticRenderFns = [];
|
|
|
121694
121861
|
|
|
121695
121862
|
/* harmony default export */ var polygonvue_type_script_lang_js_ = ({
|
|
121696
121863
|
components: {
|
|
121697
|
-
drawTools:
|
|
121864
|
+
drawTools: package_draw
|
|
121698
121865
|
},
|
|
121699
121866
|
props: {
|
|
121700
121867
|
config: {
|
|
@@ -121787,6 +121954,10 @@ var polygonvue_type_template_id_02d388c8_staticRenderFns = [];
|
|
|
121787
121954
|
this.geoJson = data;
|
|
121788
121955
|
this.position = data.features.map(item => item.geometry.coordinates.flat(Infinity));
|
|
121789
121956
|
this.position = spArray(2, ...this.position);
|
|
121957
|
+
this.position.forEach(item => {
|
|
121958
|
+
item[0] = Number(item[0]).toFixed(6);
|
|
121959
|
+
item[1] = Number(item[1]).toFixed(6);
|
|
121960
|
+
});
|
|
121790
121961
|
if (this.autoZoom || autoZoom) {
|
|
121791
121962
|
this.$nextTick(() => {
|
|
121792
121963
|
package_map.fitJsonBounds(data, {
|
|
@@ -121827,8 +121998,8 @@ var polygonvue_type_template_id_02d388c8_staticRenderFns = [];
|
|
|
121827
121998
|
;
|
|
121828
121999
|
var polygon_component = normalizeComponent(
|
|
121829
122000
|
draw_polygonvue_type_script_lang_js_,
|
|
121830
|
-
|
|
121831
|
-
|
|
122001
|
+
polygonvue_type_template_id_75043640_render,
|
|
122002
|
+
polygonvue_type_template_id_75043640_staticRenderFns,
|
|
121832
122003
|
false,
|
|
121833
122004
|
null,
|
|
121834
122005
|
null,
|