augustine-jkmap 1.1.0 → 1.1.2
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/README.md +57 -0
- package/dist/augustine-jkmap.common.js +577 -544
- package/dist/augustine-jkmap.common.js.map +1 -1
- package/dist/augustine-jkmap.css +1 -1
- package/dist/augustine-jkmap.umd.js +577 -544
- package/dist/augustine-jkmap.umd.js.map +1 -1
- package/dist/augustine-jkmap.umd.min.js +1 -1
- package/dist/augustine-jkmap.umd.min.js.map +1 -1
- package/package.json +3 -2
- package/src/README.md +46 -0
- package/src/utils/index.js +16 -1
- package/src/utils/loadLayers.js +153 -0
- package/src/utils/index copy 2.js +0 -303
- package/src/utils/index copy.js +0 -1045
|
@@ -3054,8 +3054,6 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
3054
3054
|
"default": () => (/* binding */ entry_lib)
|
|
3055
3055
|
});
|
|
3056
3056
|
|
|
3057
|
-
// UNUSED EXPORTS: augustineGjMap, augustineMap, createBase, createGrahic, createGraphicsLayer, createMapView, createMaskLayer, drawPoint, drawPolygon, drawPolygonArr, drawPolyline, getArea, getPictureMarker, getSimpleFill, getSimpleLine, getSimpleMarker, getSimpleText, initMapPack, locationMap, mapJumpTo, mapList, toArcGISPoint
|
|
3058
|
-
|
|
3059
3057
|
// NAMESPACE OBJECT: ./node_modules/axios/lib/platform/common/utils.js
|
|
3060
3058
|
var common_utils_namespaceObject = {};
|
|
3061
3059
|
__webpack_require__.r(common_utils_namespaceObject);
|
|
@@ -3085,7 +3083,7 @@ if (typeof window !== 'undefined') {
|
|
|
3085
3083
|
// Indicate to webpack that this file can be concatenated
|
|
3086
3084
|
/* harmony default export */ const setPublicPath = (null);
|
|
3087
3085
|
|
|
3088
|
-
;// ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/vue2/augustineGjMap.vue?vue&type=template&id=
|
|
3086
|
+
;// ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/vue2/augustineGjMap.vue?vue&type=template&id=eb2cfe64
|
|
3089
3087
|
var render = function render(){var _vm=this,_c=_vm._self._c;return _c('loading-box',{attrs:{"loading":_vm.isLoading}},[_c('div',{staticClass:"arcgisMap-box"},[_c('div',{staticClass:"arcgisMapBox",attrs:{"id":_vm.mapId}}),(_vm.pathCoordinates.length > 0 && _vm.noAbleMoving)?_c('div',{staticClass:"controls",class:'controls_' + _vm.postion},[_c('div',{staticClass:"controls-item",class:{ 'controls-active': _vm.currentPathIndex > 0 },on:{"click":_vm.changeMove}},[_vm._v(" "+_vm._s(_vm.currentPathIndex == 0 ? '开始' : _vm.isPaused ? '继续' : '暂停')+" ")]),_c('div',{staticClass:"controls-item",on:{"click":_vm.changeSpeed}},[_c('p',[_vm._v(_vm._s(_vm.speedNum)+" "),_c('svgIcon',{attrs:{"name":"close","width":"14","color":"#000"}})],1),_c('p',[_vm._v("加速")])]),_c('div',{staticClass:"controls-item",on:{"click":_vm.stopAnimation}},[_vm._v("重置")]),(_vm.postion == 'top' || _vm.postion == 'bottom')?_c('div',{staticClass:"controls-item",on:{"click":function($event){return _vm.drawMeasurement('distance')}}},[_vm._v(" 测距 ")]):_vm._e(),(_vm.postion == 'top' || _vm.postion == 'bottom')?_c('div',{staticClass:"controls-item",on:{"click":function($event){return _vm.drawMeasurement('area')}}},[_vm._v("测面积")]):_vm._e(),(_vm.postion == 'top' || _vm.postion == 'bottom')?_c('div',{staticClass:"controls-item",on:{"click":_vm.clearMeasurement}},[_vm._v("清除")]):_vm._e()]):_vm._e(),_c('CustomTooltip',{ref:"tooltip",scopedSlots:_vm._u([{key:"default",fn:function({ data }){return [_c('div',[_vm._v(" 经纬度: "),_c('b',[_vm._v(_vm._s(data.longitude)+"-"+_vm._s(data.latitude))])]),_c('div',[_vm._v(" 时间: "),_c('b',[_vm._v(_vm._s(data.time))])])]}}])})],1)])
|
|
3090
3088
|
}
|
|
3091
3089
|
var staticRenderFns = []
|
|
@@ -3150,6 +3148,162 @@ const mapConfig = {
|
|
|
3150
3148
|
}
|
|
3151
3149
|
/* harmony default export */ const mapGj_config = (mapConfig);
|
|
3152
3150
|
|
|
3151
|
+
;// ./src/utils/loadLayers.js
|
|
3152
|
+
/**
|
|
3153
|
+
* 返回roles
|
|
3154
|
+
* @param {*} maxLevel
|
|
3155
|
+
* @returns
|
|
3156
|
+
*/
|
|
3157
|
+
function returnRole(maxLevel = 18, type = '2d') {
|
|
3158
|
+
const lods = [],
|
|
3159
|
+
isWebMercator = false
|
|
3160
|
+
if (isWebMercator) {
|
|
3161
|
+
// EPSG:3857(Web墨卡托)的LODs(单位:米/像素)
|
|
3162
|
+
// 级别从0开始(行业惯例),分辨率逐级减半
|
|
3163
|
+
const startResolution = 156543.03390625 // level 0的分辨率(米/像素)
|
|
3164
|
+
const startScale = 591657527.591555 // level 0的比例尺(1:591657527.591555)
|
|
3165
|
+
for (let level = 0; level <= maxLevel; level++) {
|
|
3166
|
+
const levelValue = type == '2d' ? level : level + 1
|
|
3167
|
+
// 0-20级(共21级)
|
|
3168
|
+
lods.push({
|
|
3169
|
+
level: level,
|
|
3170
|
+
levelValue,
|
|
3171
|
+
resolution: startResolution / Math.pow(2, level), // 逐级减半
|
|
3172
|
+
scale: startScale / Math.pow(2, level)
|
|
3173
|
+
})
|
|
3174
|
+
}
|
|
3175
|
+
} else {
|
|
3176
|
+
// EPSG:4490/4326(地理坐标系)的LODs(单位:度/像素)
|
|
3177
|
+
// 级别从1开始(保持原逻辑兼容)
|
|
3178
|
+
const startResolution = 0.703125 // level 1的分辨率(度/像素)
|
|
3179
|
+
const startScale = 295497593.05875003 // level 1的比例尺
|
|
3180
|
+
for (let level = 1; level <= maxLevel; level++) {
|
|
3181
|
+
// 1-20级(共20级)
|
|
3182
|
+
const levelValue = type == '2d' ? level - 1 : level
|
|
3183
|
+
lods.push({
|
|
3184
|
+
level: level - 1,
|
|
3185
|
+
levelValue,
|
|
3186
|
+
resolution: startResolution / Math.pow(2, level - 1), // 逐级减半(level 2是level 1的1/2)
|
|
3187
|
+
scale: startScale / Math.pow(2, level - 1)
|
|
3188
|
+
})
|
|
3189
|
+
}
|
|
3190
|
+
}
|
|
3191
|
+
return lods
|
|
3192
|
+
}
|
|
3193
|
+
/**
|
|
3194
|
+
* 加载
|
|
3195
|
+
* @param {*} options-传参
|
|
3196
|
+
* @param {*} url 服务地址
|
|
3197
|
+
* @param {*} subDomains 当瓦片服务器支持跨多个子域名请求以提高性能时使用。提供一个子域名数组
|
|
3198
|
+
* @param {*} title 服务标题
|
|
3199
|
+
* @param {*} id 为图层指定一个唯一的标识符
|
|
3200
|
+
* @param {*} tileInfo 图层的名称或标题,通常用于图例或图层列表中展示
|
|
3201
|
+
* @param {*} wkid 服务地图层级
|
|
3202
|
+
* @param {*} fullExtent 服务地图层级
|
|
3203
|
+
* @param {*} loadInfo 是否加载titleInfo
|
|
3204
|
+
* @param {*} visible 布尔值,决定图层是否可见,默认是 true。设置为 false 可隐藏图层
|
|
3205
|
+
* @param {*} opacity 图层的透明度,范围从0到1,默认是 1(完全不透明
|
|
3206
|
+
* @param {*} minScale | maxScale 分别定义了图层的最大和最小比例尺。超出这些范围的缩放级别,图层将不会显示
|
|
3207
|
+
* @param {*} popupTemplate 定义了点击图层上的要素时弹出窗口的内容模板
|
|
3208
|
+
* @param {*} copyright 版权信息字符串,用于声明数据来源或版权声明
|
|
3209
|
+
*
|
|
3210
|
+
*/
|
|
3211
|
+
function loadWmsLayer(options) {
|
|
3212
|
+
if (!options) return ''
|
|
3213
|
+
let {
|
|
3214
|
+
url,
|
|
3215
|
+
subDomains,
|
|
3216
|
+
title,
|
|
3217
|
+
id,
|
|
3218
|
+
tileInfo,
|
|
3219
|
+
wkid,
|
|
3220
|
+
fullExtent,
|
|
3221
|
+
loadInfo = false,
|
|
3222
|
+
visible = true,
|
|
3223
|
+
opacity = 1,
|
|
3224
|
+
minScale = 1,
|
|
3225
|
+
maxScale = 22,
|
|
3226
|
+
popupTemplate,
|
|
3227
|
+
copyright = 'jk'
|
|
3228
|
+
} = options
|
|
3229
|
+
|
|
3230
|
+
if (!url) return ''
|
|
3231
|
+
|
|
3232
|
+
const isVisible = visible || false
|
|
3233
|
+
isVisible
|
|
3234
|
+
minScale
|
|
3235
|
+
maxScale
|
|
3236
|
+
copyright
|
|
3237
|
+
let params = {
|
|
3238
|
+
visible: isVisible,
|
|
3239
|
+
opacity,
|
|
3240
|
+
|
|
3241
|
+
spatialReference: {
|
|
3242
|
+
wkid: 4490
|
|
3243
|
+
}
|
|
3244
|
+
}
|
|
3245
|
+
if (subDomains) params.subDomains = subDomains
|
|
3246
|
+
if (title) params.title = title
|
|
3247
|
+
if (id) params.id = id
|
|
3248
|
+
if (tileInfo) params.tileInfo = tileInfo
|
|
3249
|
+
if (loadInfo) {
|
|
3250
|
+
if (tileInfo) params.tileInfo = tileInfo
|
|
3251
|
+
else if (window.jkEsri && window.jkEsri.TileInfo)
|
|
3252
|
+
params.tileInfo = new window.jkEsri.TileInfo({
|
|
3253
|
+
dpi: '90.71428571427429',
|
|
3254
|
+
rows: 256,
|
|
3255
|
+
cols: 256,
|
|
3256
|
+
compressionQuality: 0,
|
|
3257
|
+
origin: {
|
|
3258
|
+
x: -180,
|
|
3259
|
+
y: 90
|
|
3260
|
+
},
|
|
3261
|
+
spatialReference: {
|
|
3262
|
+
wkid: 4490
|
|
3263
|
+
},
|
|
3264
|
+
lods: returnRole(28, '3d')
|
|
3265
|
+
})
|
|
3266
|
+
}
|
|
3267
|
+
if (wkid) params.spatialReference.wkid = wkid
|
|
3268
|
+
if (fullExtent) params.fullExtent = fullExtent
|
|
3269
|
+
if (popupTemplate) params.popupTemplate = popupTemplate
|
|
3270
|
+
return new window.jkEsri.WebTileLayer(url, params)
|
|
3271
|
+
|
|
3272
|
+
// removed by dead control flow
|
|
3273
|
+
|
|
3274
|
+
}
|
|
3275
|
+
/**
|
|
3276
|
+
* 加载wmts服务
|
|
3277
|
+
* @param Object options = {url,id,title} 参数
|
|
3278
|
+
*/
|
|
3279
|
+
function WMTSlayer(options) {
|
|
3280
|
+
let tileInfo = new window.jkEsri.TileInfo({
|
|
3281
|
+
dpi: 90,
|
|
3282
|
+
rows: 256,
|
|
3283
|
+
cols: 256,
|
|
3284
|
+
compressionQuality: 0,
|
|
3285
|
+
origin: {
|
|
3286
|
+
x: -180,
|
|
3287
|
+
y: 90
|
|
3288
|
+
},
|
|
3289
|
+
spatialReference: {
|
|
3290
|
+
wkid: 4490
|
|
3291
|
+
},
|
|
3292
|
+
lods: returnRole(25)
|
|
3293
|
+
})
|
|
3294
|
+
const url = `${options.url}?layers=jk_map_server%3Atgzx&REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&LAYER=${options.id}&STYLE=&TILEMATRIX=EPSG:4490:{z}&TILEMATRIXSET=EPSG:4490&FORMAT=image%2Fpng&TILECOL={x}&TILEROW={y}&key=586f4e24c298419e9d76302147f98cca`
|
|
3295
|
+
const layer = new window.jkEsri.WebTileLayer({
|
|
3296
|
+
urlTemplate: url,
|
|
3297
|
+
id: options.id,
|
|
3298
|
+
title: options.title,
|
|
3299
|
+
tileInfo: tileInfo,
|
|
3300
|
+
spatialReference: {
|
|
3301
|
+
wkid: 4490
|
|
3302
|
+
}
|
|
3303
|
+
})
|
|
3304
|
+
return layer
|
|
3305
|
+
}
|
|
3306
|
+
|
|
3153
3307
|
;// ./src/config/toArcGISPoint.js
|
|
3154
3308
|
/**
|
|
3155
3309
|
* 判断值是否为空
|
|
@@ -3313,166 +3467,222 @@ function toArcGISPoint(crPoint, strict = true) {
|
|
|
3313
3467
|
|
|
3314
3468
|
|
|
3315
3469
|
|
|
3316
|
-
|
|
3470
|
+
// EXTERNAL MODULE: ./node_modules/terraformer-arcgis-parser/terraformer-arcgis-parser.js
|
|
3471
|
+
var terraformer_arcgis_parser = __webpack_require__(979);
|
|
3472
|
+
var terraformer_arcgis_parser_default = /*#__PURE__*/__webpack_require__.n(terraformer_arcgis_parser);
|
|
3473
|
+
// EXTERNAL MODULE: ./node_modules/terraformer-wkt-parser/terraformer-wkt-parser.js
|
|
3474
|
+
var terraformer_wkt_parser = __webpack_require__(337);
|
|
3475
|
+
var terraformer_wkt_parser_default = /*#__PURE__*/__webpack_require__.n(terraformer_wkt_parser);
|
|
3476
|
+
;// ./src/config/wktMethods.js
|
|
3477
|
+
// import { judgmentMapDataType, isValidArcGISPoint } from './comstom'
|
|
3478
|
+
/**
|
|
3479
|
+
* ArcGIS用于 ArcGIS JSON ⇄ GeoJSON 互转
|
|
3480
|
+
* ArcGIS.parse(arcgisJson) → 用于将 ArcGIS JSON 转为 GeoJSON { x: 30, y: 10 }==>{type: "Point",coordinates: [30, 10]}
|
|
3481
|
+
* ArcGIS.convert({geojson,options}) → 将 GeoJSON 转为 ArcGIS 格式。{type: "Point",coordinates: [30, 10]}==>{ x: 30, y: 10 }
|
|
3482
|
+
* options ==>{idAttribute: 'OBJECTID', // 指定 ID 字段名(默认 "id")
|
|
3483
|
+
* spatialReference: { wkid: 4326 } // 添加空间参考
|
|
3484
|
+
* } ==> {x: 30,y: 10,spatialReference: { wkid: 4326 }}
|
|
3485
|
+
*/
|
|
3486
|
+
|
|
3487
|
+
/**
|
|
3488
|
+
* ArcGIS 转 GeoJSON
|
|
3489
|
+
* @param {Object} data - 对象
|
|
3490
|
+
* @param {Object} data.geometry- 点:{x,y},线:{paths:[]},面:{rings:[]}
|
|
3491
|
+
* @returns {GeoJSON} GeoJSON 对象
|
|
3492
|
+
*/
|
|
3493
|
+
function arcGISTranformGeoJson(data) {
|
|
3494
|
+
try {
|
|
3495
|
+
if (!data || !data.geometry) {
|
|
3496
|
+
throw new Error(
|
|
3497
|
+
`${JSON.stringify(
|
|
3498
|
+
data
|
|
3499
|
+
)}-arcGISTranformGeoJson对象包含geometry:{点:{x,y},线:{paths:[]},面:{rings:[]}}`
|
|
3500
|
+
)
|
|
3501
|
+
}
|
|
3502
|
+
return terraformer_arcgis_parser_default().parse(data.geometry)
|
|
3503
|
+
} catch (error) {
|
|
3504
|
+
throw new Error(`arcGISTranformGeoJson: ${error}`)
|
|
3505
|
+
}
|
|
3506
|
+
}
|
|
3507
|
+
/**
|
|
3508
|
+
* GeoJSON 转 ArcGIS
|
|
3509
|
+
* @param {Object} data - 对象
|
|
3510
|
+
* @param {Object} data.geometry {type:Point|MultiPoint|LineString|Polygon|MultiPolygon,coordinates:[]}
|
|
3511
|
+
* @returns {ArcGIS} ArcGIS 对象
|
|
3512
|
+
*/
|
|
3513
|
+
function geoJsonTranformArcgis(data) {
|
|
3514
|
+
const errorText = `geoJsonTranformArcgis数据格式=>{geometry:{type:Point|MultiPoint|LineString|Polygon|MultiPolygon,coordinates:[]}}<=>错误对象${JSON.stringify(
|
|
3515
|
+
data
|
|
3516
|
+
)}`
|
|
3517
|
+
try {
|
|
3518
|
+
if (
|
|
3519
|
+
!data ||
|
|
3520
|
+
!data.geometry ||
|
|
3521
|
+
!data.geometry.coordinates ||
|
|
3522
|
+
data.geometry.coordinates.length === 0
|
|
3523
|
+
) {
|
|
3524
|
+
console.error(errorText)
|
|
3525
|
+
return null
|
|
3526
|
+
}
|
|
3527
|
+
let geometry = data.geometry,
|
|
3528
|
+
jsonData = geometry
|
|
3529
|
+
if (!geometry.type) {
|
|
3530
|
+
console.error(errorText)
|
|
3531
|
+
return null
|
|
3532
|
+
}
|
|
3533
|
+
if (geometry.type == 'Point') {
|
|
3534
|
+
jsonData = {
|
|
3535
|
+
type: 'Feature',
|
|
3536
|
+
geometry: geometry,
|
|
3537
|
+
properties: {}
|
|
3538
|
+
}
|
|
3539
|
+
}
|
|
3540
|
+
const arcgisData = terraformer_arcgis_parser_default().convert(jsonData)
|
|
3541
|
+
if (arcgisData && JSON.stringify(arcgisData) != '{}') {
|
|
3542
|
+
return arcgisData.geometry ? arcgisData.geometry : arcgisData
|
|
3543
|
+
} else throw new Error(errorText)
|
|
3544
|
+
} catch (error) {
|
|
3545
|
+
throw new Error(error)
|
|
3546
|
+
}
|
|
3547
|
+
}
|
|
3548
|
+
// import { drawLayer } from '../utils/index.js'
|
|
3549
|
+
|
|
3550
|
+
/**
|
|
3551
|
+
* WKT用于 WKT ⇄ GeoJSON 互转
|
|
3552
|
+
* WKT支持格式-POINT、LINESTRING、POLYGON、MULTIPOINT、MULTILINESTRING、MULTIPOLYGON、GEOMETRYCOLLECTION
|
|
3553
|
+
* WKT.parse(wktString) → 将WKT字符串解析为 GeoJSON 对象。'POINT (30 10)'==>{type: "Point",coordinates: [30, 10]}
|
|
3554
|
+
* WKT.convert(geojson) → 将 GeoJSON 对象转换为 WKT 字符串。{type: "Point",coordinates: [30, 10]}==>POINT (30 10)
|
|
3555
|
+
*/
|
|
3556
|
+
|
|
3557
|
+
|
|
3558
|
+
/**
|
|
3559
|
+
* 安全判断是否为非空字符串
|
|
3560
|
+
*/
|
|
3561
|
+
function isValidString(str) {
|
|
3562
|
+
return str && typeof str === 'string' && str.trim() !== '' && str != 'null' && str != 'undefined'
|
|
3563
|
+
}
|
|
3564
|
+
/**
|
|
3565
|
+
* 判断点
|
|
3566
|
+
* @param {*} value
|
|
3567
|
+
* @returns
|
|
3568
|
+
*/
|
|
3569
|
+
function isNumeric(value) {
|
|
3570
|
+
// 排除 null 和 boolean(因为 typeof null === 'object',但 Number(null) = 0)
|
|
3571
|
+
if (value === null || !value || typeof value === 'boolean') {
|
|
3572
|
+
return false
|
|
3573
|
+
}
|
|
3574
|
+
|
|
3575
|
+
// 如果是 number 类型,必须是有限数(排除 NaN, Infinity)
|
|
3576
|
+
if (typeof value === 'number') {
|
|
3577
|
+
return isFinite(value)
|
|
3578
|
+
}
|
|
3579
|
+
|
|
3580
|
+
// 如果是 string 类型,尝试转换
|
|
3581
|
+
if (typeof value === 'string') {
|
|
3582
|
+
// 去除首尾空格
|
|
3583
|
+
const trimmed = value.trim()
|
|
3584
|
+
// 空字符串直接返回 false
|
|
3585
|
+
if (trimmed === '') return false
|
|
3586
|
+
// 使用 isFinite 检查是否可转为有效数字
|
|
3587
|
+
return isFinite(trimmed) && !isNaN(Number(trimmed))
|
|
3588
|
+
}
|
|
3589
|
+
|
|
3590
|
+
// 其他类型(object, array, undefined 等)一律 false
|
|
3591
|
+
return false
|
|
3592
|
+
}
|
|
3593
|
+
/**
|
|
3594
|
+
* 粗略判断是否为 ArcGIS JSON 对象(至少包含 x/y 或 paths/rings)
|
|
3595
|
+
*/
|
|
3596
|
+
function isValidArcGIS(obj) {
|
|
3597
|
+
if (typeof obj !== 'object' || obj === null) return false
|
|
3598
|
+
// Point: {x, y}
|
|
3599
|
+
if (isNumeric(obj.x) && isNumeric(obj.y)) return true
|
|
3600
|
+
// Point: {longitude, latitude}
|
|
3601
|
+
if (isNumeric(obj.longitude) && isNumeric(obj.latitude)) return true
|
|
3602
|
+
// Multipoint: {points: [...]}
|
|
3603
|
+
if (Array.isArray(obj.points)) return true
|
|
3604
|
+
|
|
3605
|
+
// Polyline: {paths: [...]}
|
|
3606
|
+
if (Array.isArray(obj.paths)) return true
|
|
3607
|
+
|
|
3608
|
+
// Polygon: {rings: [...]}
|
|
3609
|
+
if (Array.isArray(obj.rings)) return true
|
|
3610
|
+
|
|
3611
|
+
return false
|
|
3612
|
+
}
|
|
3317
3613
|
/**
|
|
3318
|
-
*
|
|
3319
|
-
* @param {*}
|
|
3614
|
+
* geojson转wkt
|
|
3615
|
+
* @param {*} geojson
|
|
3320
3616
|
* @returns
|
|
3321
3617
|
*/
|
|
3322
|
-
function
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
// EPSG:3857(Web墨卡托)的LODs(单位:米/像素)
|
|
3327
|
-
// 级别从0开始(行业惯例),分辨率逐级减半
|
|
3328
|
-
const startResolution = 156543.03390625 // level 0的分辨率(米/像素)
|
|
3329
|
-
const startScale = 591657527.591555 // level 0的比例尺(1:591657527.591555)
|
|
3330
|
-
for (let level = 0; level <= maxLevel; level++) {
|
|
3331
|
-
const levelValue = type == '2d' ? level : level + 1
|
|
3332
|
-
// 0-20级(共21级)
|
|
3333
|
-
lods.push({
|
|
3334
|
-
level: level,
|
|
3335
|
-
levelValue,
|
|
3336
|
-
resolution: startResolution / Math.pow(2, level), // 逐级减半
|
|
3337
|
-
scale: startScale / Math.pow(2, level)
|
|
3338
|
-
})
|
|
3339
|
-
}
|
|
3340
|
-
} else {
|
|
3341
|
-
// EPSG:4490/4326(地理坐标系)的LODs(单位:度/像素)
|
|
3342
|
-
// 级别从1开始(保持原逻辑兼容)
|
|
3343
|
-
const startResolution = 0.703125 // level 1的分辨率(度/像素)
|
|
3344
|
-
const startScale = 295497593.05875003 // level 1的比例尺
|
|
3345
|
-
for (let level = 1; level <= maxLevel; level++) {
|
|
3346
|
-
// 1-20级(共20级)
|
|
3347
|
-
const levelValue = type == '2d' ? level - 1 : level
|
|
3348
|
-
lods.push({
|
|
3349
|
-
level: level - 1,
|
|
3350
|
-
levelValue,
|
|
3351
|
-
resolution: startResolution / Math.pow(2, level - 1), // 逐级减半(level 2是level 1的1/2)
|
|
3352
|
-
scale: startScale / Math.pow(2, level - 1)
|
|
3353
|
-
})
|
|
3618
|
+
function geoJsonTranformWkt(geojson) {
|
|
3619
|
+
try {
|
|
3620
|
+
if (!geojson && !geojson.type) {
|
|
3621
|
+
throw new Error(`[geoJsonTranformWkt] 期望字符串,但收到: ${geojson}`)
|
|
3354
3622
|
}
|
|
3623
|
+
return terraformer_wkt_parser_default().convert(geojson)
|
|
3624
|
+
} catch (error) {
|
|
3625
|
+
throw new Error(`geojson解析失败: ${error.message}`)
|
|
3355
3626
|
}
|
|
3356
|
-
return lods
|
|
3357
3627
|
}
|
|
3358
3628
|
/**
|
|
3359
|
-
*
|
|
3360
|
-
* @param {*}
|
|
3361
|
-
* @
|
|
3362
|
-
* @param {*} subDomains 当瓦片服务器支持跨多个子域名请求以提高性能时使用。提供一个子域名数组
|
|
3363
|
-
* @param {*} title 服务标题
|
|
3364
|
-
* @param {*} id 为图层指定一个唯一的标识符
|
|
3365
|
-
* @param {*} tileInfo 图层的名称或标题,通常用于图例或图层列表中展示
|
|
3366
|
-
* @param {*} wkid 服务地图层级
|
|
3367
|
-
* @param {*} fullExtent 服务地图层级
|
|
3368
|
-
* @param {*} loadInfo 是否加载titleInfo
|
|
3369
|
-
* @param {*} visible 布尔值,决定图层是否可见,默认是 true。设置为 false 可隐藏图层
|
|
3370
|
-
* @param {*} opacity 图层的透明度,范围从0到1,默认是 1(完全不透明
|
|
3371
|
-
* @param {*} minScale | maxScale 分别定义了图层的最大和最小比例尺。超出这些范围的缩放级别,图层将不会显示
|
|
3372
|
-
* @param {*} popupTemplate 定义了点击图层上的要素时弹出窗口的内容模板
|
|
3373
|
-
* @param {*} copyright 版权信息字符串,用于声明数据来源或版权声明
|
|
3374
|
-
*
|
|
3629
|
+
* wkt转geojson
|
|
3630
|
+
* @param {*} wkt
|
|
3631
|
+
* @returns
|
|
3375
3632
|
*/
|
|
3376
|
-
function
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
subDomains,
|
|
3381
|
-
title,
|
|
3382
|
-
id,
|
|
3383
|
-
tileInfo,
|
|
3384
|
-
wkid,
|
|
3385
|
-
fullExtent,
|
|
3386
|
-
loadInfo = false,
|
|
3387
|
-
visible = true,
|
|
3388
|
-
opacity = 1,
|
|
3389
|
-
minScale = 1,
|
|
3390
|
-
maxScale = 22,
|
|
3391
|
-
popupTemplate,
|
|
3392
|
-
copyright = 'jk'
|
|
3393
|
-
} = options
|
|
3394
|
-
|
|
3395
|
-
if (!url) return ''
|
|
3396
|
-
|
|
3397
|
-
const isVisible = visible || false
|
|
3398
|
-
isVisible
|
|
3399
|
-
minScale
|
|
3400
|
-
maxScale
|
|
3401
|
-
copyright
|
|
3402
|
-
let params = {
|
|
3403
|
-
visible: isVisible,
|
|
3404
|
-
opacity,
|
|
3405
|
-
|
|
3406
|
-
spatialReference: {
|
|
3407
|
-
wkid: 4490
|
|
3633
|
+
function wktTranformGeoJson(wkt) {
|
|
3634
|
+
try {
|
|
3635
|
+
if (!wkt) {
|
|
3636
|
+
throw new Error(`[wktTranformGeoJson] 期望字符串,但收到: ${wkt}`)
|
|
3408
3637
|
}
|
|
3638
|
+
return terraformer_wkt_parser_default().parse(wkt)
|
|
3639
|
+
} catch (error) {
|
|
3640
|
+
throw new Error(`wkt解析失败: ${error.message}`)
|
|
3409
3641
|
}
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
compressionQuality: 0,
|
|
3422
|
-
origin: {
|
|
3423
|
-
x: -180,
|
|
3424
|
-
y: 90
|
|
3425
|
-
},
|
|
3426
|
-
spatialReference: {
|
|
3427
|
-
wkid: 4490
|
|
3428
|
-
},
|
|
3429
|
-
lods: returnRole(28, '3d')
|
|
3430
|
-
})
|
|
3431
|
-
}
|
|
3432
|
-
if (wkid) params.spatialReference.wkid = wkid
|
|
3433
|
-
if (fullExtent) params.fullExtent = fullExtent
|
|
3434
|
-
if (popupTemplate) params.popupTemplate = popupTemplate
|
|
3435
|
-
return new window.jkEsri.WebTileLayer(url, params)
|
|
3436
|
-
|
|
3437
|
-
// removed by dead control flow
|
|
3642
|
+
}
|
|
3643
|
+
/**
|
|
3644
|
+
* WKT 转 ArcGIS(安全版)
|
|
3645
|
+
* @param {string} wktString - WKT 字符串,如 "POINT (30 10)"
|
|
3646
|
+
* @returns {Object|null} ArcGIS JSON 对象,失败返回 null
|
|
3647
|
+
*/
|
|
3648
|
+
function wktTranformArcgis(wktString) {
|
|
3649
|
+
try {
|
|
3650
|
+
if (!isValidString(wktString)) {
|
|
3651
|
+
throw new Error(`[wktTranformArcgis] 期望字符串,但收到: ${typeof wktString}`)
|
|
3652
|
+
}
|
|
3438
3653
|
|
|
3654
|
+
const geojson = terraformer_wkt_parser_default().parse(wktString.trim())
|
|
3655
|
+
const arcgis = terraformer_arcgis_parser_default().convert(geojson)
|
|
3656
|
+
return arcgis
|
|
3657
|
+
} catch (error) {
|
|
3658
|
+
throw new Error(`WKT 解析失败: ${error.message}`)
|
|
3659
|
+
}
|
|
3439
3660
|
}
|
|
3440
3661
|
/**
|
|
3441
|
-
*
|
|
3442
|
-
* @param
|
|
3662
|
+
* ArcGIS 转 WKT(安全版)
|
|
3663
|
+
* @param {Object} arcgisJson - ArcGIS 格式对象
|
|
3664
|
+
* @returns {string|null} WKT 字符串,失败返回 null
|
|
3443
3665
|
*/
|
|
3444
|
-
function
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
cols: 256,
|
|
3449
|
-
compressionQuality: 0,
|
|
3450
|
-
origin: {
|
|
3451
|
-
x: -180,
|
|
3452
|
-
y: 90
|
|
3453
|
-
},
|
|
3454
|
-
spatialReference: {
|
|
3455
|
-
wkid: 4490
|
|
3456
|
-
},
|
|
3457
|
-
lods: returnRole(25)
|
|
3458
|
-
})
|
|
3459
|
-
const url = `${options.url}?layers=jk_map_server%3Atgzx&REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&LAYER=${options.id}&STYLE=&TILEMATRIX=EPSG:4490:{z}&TILEMATRIXSET=EPSG:4490&FORMAT=image%2Fpng&TILECOL={x}&TILEROW={y}&key=586f4e24c298419e9d76302147f98cca`
|
|
3460
|
-
const layer = new window.jkEsri.WebTileLayer({
|
|
3461
|
-
urlTemplate: url,
|
|
3462
|
-
id: options.id,
|
|
3463
|
-
title: options.title,
|
|
3464
|
-
tileInfo: tileInfo,
|
|
3465
|
-
spatialReference: {
|
|
3466
|
-
wkid: 4490
|
|
3666
|
+
function arcgisTranformWkt(arcgisJson) {
|
|
3667
|
+
try {
|
|
3668
|
+
if (!isValidArcGIS(arcgisJson)) {
|
|
3669
|
+
throw new Error(`[arcgisTranformWkt] 期望字符串,但收到: ${arcgisJson}`)
|
|
3467
3670
|
}
|
|
3468
|
-
|
|
3469
|
-
|
|
3671
|
+
const geojson = terraformer_arcgis_parser_default().parse(arcgisJson)
|
|
3672
|
+
const wkt = terraformer_wkt_parser_default().convert(geojson)
|
|
3673
|
+
return wkt
|
|
3674
|
+
} catch (error) {
|
|
3675
|
+
throw new Error(`[arcgisTranformWkt] ArcGIS 解析失败:${error.message}输入:${arcgisJson}`)
|
|
3676
|
+
}
|
|
3470
3677
|
}
|
|
3471
3678
|
|
|
3679
|
+
|
|
3472
3680
|
;// ./src/utils/index.js
|
|
3473
3681
|
/* eslint-disable require-jsdoc */
|
|
3474
3682
|
|
|
3475
3683
|
|
|
3684
|
+
|
|
3685
|
+
|
|
3476
3686
|
/**
|
|
3477
3687
|
* 加载2D地图
|
|
3478
3688
|
* @param String mapId 地图容器id
|
|
@@ -5454,10 +5664,10 @@ var loading_component = normalizeComponent(
|
|
|
5454
5664
|
)
|
|
5455
5665
|
|
|
5456
5666
|
/* harmony default export */ const loading = (loading_component.exports);
|
|
5457
|
-
;// ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/vue2/customTooltip.vue?vue&type=template&id=
|
|
5458
|
-
var
|
|
5667
|
+
;// ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/vue2/customTooltip.vue?vue&type=template&id=46427b1b
|
|
5668
|
+
var customTooltipvue_type_template_id_46427b1b_render = function render(){var _vm=this,_c=_vm._self._c;return _c('Teleport',{attrs:{"to":"body"}},[(_vm.visible)?_c('div',{ref:"tooltipRef",staticClass:"arcgis-custom-tooltip",style:(_vm.tooltipStyle)},[_vm._t("default",null,{"data":_vm.showData})],2):_vm._e()])
|
|
5459
5669
|
}
|
|
5460
|
-
var
|
|
5670
|
+
var customTooltipvue_type_template_id_46427b1b_staticRenderFns = []
|
|
5461
5671
|
|
|
5462
5672
|
|
|
5463
5673
|
;// ./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/vue2/customTooltip.vue?vue&type=script&lang=js
|
|
@@ -5505,27 +5715,21 @@ var customTooltipvue_type_template_id_533a75ed_scoped_true_staticRenderFns = []
|
|
|
5505
5715
|
|
|
5506
5716
|
;// ./src/vue2/customTooltip.vue?vue&type=script&lang=js
|
|
5507
5717
|
/* harmony default export */ const vue2_customTooltipvue_type_script_lang_js = (customTooltipvue_type_script_lang_js);
|
|
5508
|
-
;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-52.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-52.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-52.use[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/vue2/customTooltip.vue?vue&type=style&index=0&id=533a75ed&prod&scoped=true&lang=css
|
|
5509
|
-
// extracted by mini-css-extract-plugin
|
|
5510
|
-
|
|
5511
|
-
;// ./src/vue2/customTooltip.vue?vue&type=style&index=0&id=533a75ed&prod&scoped=true&lang=css
|
|
5512
|
-
|
|
5513
5718
|
;// ./src/vue2/customTooltip.vue
|
|
5514
5719
|
|
|
5515
5720
|
|
|
5516
5721
|
|
|
5517
|
-
;
|
|
5518
5722
|
|
|
5519
5723
|
|
|
5520
5724
|
/* normalize component */
|
|
5521
|
-
|
|
5725
|
+
;
|
|
5522
5726
|
var customTooltip_component = normalizeComponent(
|
|
5523
5727
|
vue2_customTooltipvue_type_script_lang_js,
|
|
5524
|
-
|
|
5525
|
-
|
|
5728
|
+
customTooltipvue_type_template_id_46427b1b_render,
|
|
5729
|
+
customTooltipvue_type_template_id_46427b1b_staticRenderFns,
|
|
5526
5730
|
false,
|
|
5527
5731
|
null,
|
|
5528
|
-
|
|
5732
|
+
null,
|
|
5529
5733
|
null
|
|
5530
5734
|
|
|
5531
5735
|
)
|
|
@@ -5544,6 +5748,7 @@ var customTooltip_component = normalizeComponent(
|
|
|
5544
5748
|
|
|
5545
5749
|
|
|
5546
5750
|
|
|
5751
|
+
|
|
5547
5752
|
//自定义弹框
|
|
5548
5753
|
var jk_map,
|
|
5549
5754
|
jk_view,
|
|
@@ -5582,7 +5787,7 @@ function debounce(fn, delay) {
|
|
|
5582
5787
|
center: {
|
|
5583
5788
|
type: Array,
|
|
5584
5789
|
default: () => {
|
|
5585
|
-
return [113.
|
|
5790
|
+
return [113.33799948954312, 23.14565684412003]
|
|
5586
5791
|
}
|
|
5587
5792
|
},
|
|
5588
5793
|
iconData: {
|
|
@@ -5624,7 +5829,7 @@ function debounce(fn, delay) {
|
|
|
5624
5829
|
isPaused: false,
|
|
5625
5830
|
speedNum: 1,
|
|
5626
5831
|
speed: 500,
|
|
5627
|
-
noAbleMoving:
|
|
5832
|
+
noAbleMoving: true,
|
|
5628
5833
|
imgPathData: null
|
|
5629
5834
|
}
|
|
5630
5835
|
},
|
|
@@ -6013,42 +6218,30 @@ function debounce(fn, delay) {
|
|
|
6013
6218
|
|
|
6014
6219
|
;// ./src/vue2/augustineGjMap.vue?vue&type=script&lang=js
|
|
6015
6220
|
/* harmony default export */ const vue2_augustineGjMapvue_type_script_lang_js = (augustineGjMapvue_type_script_lang_js);
|
|
6016
|
-
;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-52.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-52.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-52.use[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/vue2/augustineGjMap.vue?vue&type=style&index=0&id=6ef612a2&prod&scoped=true&lang=css
|
|
6017
|
-
// extracted by mini-css-extract-plugin
|
|
6018
|
-
|
|
6019
|
-
;// ./src/vue2/augustineGjMap.vue?vue&type=style&index=0&id=6ef612a2&prod&scoped=true&lang=css
|
|
6020
|
-
|
|
6021
|
-
;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-52.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-52.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-52.use[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/vue2/augustineGjMap.vue?vue&type=style&index=1&id=6ef612a2&prod&lang=css
|
|
6022
|
-
// extracted by mini-css-extract-plugin
|
|
6023
|
-
|
|
6024
|
-
;// ./src/vue2/augustineGjMap.vue?vue&type=style&index=1&id=6ef612a2&prod&lang=css
|
|
6025
|
-
|
|
6026
6221
|
;// ./src/vue2/augustineGjMap.vue
|
|
6027
6222
|
|
|
6028
6223
|
|
|
6029
6224
|
|
|
6030
|
-
;
|
|
6031
|
-
|
|
6032
6225
|
|
|
6033
6226
|
|
|
6034
6227
|
/* normalize component */
|
|
6035
|
-
|
|
6228
|
+
;
|
|
6036
6229
|
var augustineGjMap_component = normalizeComponent(
|
|
6037
6230
|
vue2_augustineGjMapvue_type_script_lang_js,
|
|
6038
6231
|
render,
|
|
6039
6232
|
staticRenderFns,
|
|
6040
6233
|
false,
|
|
6041
6234
|
null,
|
|
6042
|
-
|
|
6235
|
+
null,
|
|
6043
6236
|
null
|
|
6044
6237
|
|
|
6045
6238
|
)
|
|
6046
6239
|
|
|
6047
6240
|
/* harmony default export */ const augustineGjMap = (augustineGjMap_component.exports);
|
|
6048
|
-
;// ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/vue2/locationMap.vue?vue&type=template&id=
|
|
6049
|
-
var
|
|
6241
|
+
;// ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/vue2/locationMap.vue?vue&type=template&id=759ad7fe
|
|
6242
|
+
var locationMapvue_type_template_id_759ad7fe_render = function render(){var _vm=this,_c=_vm._self._c;return _c('loading-box',{attrs:{"loading":_vm.isLoading}},[_c('div',{staticClass:"arcgisMap-box"},[_c('div',{staticClass:"map-canvans",attrs:{"id":_vm.mapId}}),(!_vm.isLoading && _vm.isSearch)?_c('searchMap',{ref:"searchRef",on:{"selectPoint":_vm.refreshPoint,"clearSearchMap":_vm.clearSearchMap}}):_vm._e()],1)])
|
|
6050
6243
|
}
|
|
6051
|
-
var
|
|
6244
|
+
var locationMapvue_type_template_id_759ad7fe_staticRenderFns = []
|
|
6052
6245
|
|
|
6053
6246
|
|
|
6054
6247
|
;// ./src/config/map.config.js
|
|
@@ -6110,133 +6303,127 @@ const map_config_mapConfig = {
|
|
|
6110
6303
|
}
|
|
6111
6304
|
/* harmony default export */ const map_config = (map_config_mapConfig);
|
|
6112
6305
|
|
|
6113
|
-
;// ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/vue2/search_map.vue?vue&type=template&id=
|
|
6114
|
-
var
|
|
6306
|
+
;// ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/vue2/search_map.vue?vue&type=template&id=9a9e2760
|
|
6307
|
+
var search_mapvue_type_template_id_9a9e2760_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"arcgis-search-wrapper"},[_c('div',{staticClass:"arcigs-search-box"},[_c('CustomSearchInput',{on:{"checked-point":_vm.changeCheckedPoint,"search":_vm.searchMap,"clear":_vm.clearSearch},model:{value:(_vm.keyWord),callback:function ($$v) {_vm.keyWord=$$v},expression:"keyWord"}}),(_vm.keyWord && _vm.isSearch && !_vm.checkedPoint)?_c('div',{staticClass:"search-item-box"},[_c('div',{staticClass:"arcgis-line"}),_c('div',{staticClass:"search-item-wrapper"},[(_vm.mapNameList.length > 0)?[_vm._l((_vm.mapNameList),function(item,idx){return _c('div',{key:idx,staticClass:"search-item",on:{"click":function($event){$event.stopPropagation();return _vm.goDetail(item)}}},[_c('div',{staticClass:"search-name"},[_vm._v(_vm._s(item.name))]),_c('div',{staticClass:"search-address"},[_vm._v(_vm._s(item.address))])])}),(_vm.loadPage)?_c('div',{staticClass:"loaded-box"},[_vm._v(" "+_vm._s(_vm.finished ? '数据加载中...' : '数据已到底!!!')+" ")]):_vm._e()]:_c('div',{staticClass:"search-no-data"},[_vm._v(" "+_vm._s(_vm.loadSearch ? '数据加载中...' : '暂无数据')+" ")])],2)]):_vm._e()],1),_c('CustomModal',{ref:"message",attrs:{"z-index":2000,"animation":"fade","width":"400px"}},[_c('p',[_vm._v("这是淡入弹框")])])],1)
|
|
6115
6308
|
}
|
|
6116
|
-
var
|
|
6309
|
+
var search_mapvue_type_template_id_9a9e2760_staticRenderFns = []
|
|
6117
6310
|
|
|
6118
6311
|
|
|
6119
|
-
;// ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/vue2/CustomModal.vue?vue&type=template&id=
|
|
6120
|
-
var
|
|
6312
|
+
;// ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/vue2/CustomModal.vue?vue&type=template&id=867722ce
|
|
6313
|
+
var CustomModalvue_type_template_id_867722ce_render = function render(){var _vm=this,_c=_vm._self._c;return _c('transition',{attrs:{"name":"message-fade"}},[(_vm.localVisible)?_c('div',{staticClass:"custom-message",class:`custom-message--${_vm.type}`,on:{"click":_vm.handleClick}},[(_vm.showIcon && false)?0:_vm._e(),_c('span',{staticClass:"custom-message__content"},[_vm._v(_vm._s(_vm.message))]),(_vm.closable)?_c('button',{staticClass:"custom-message__close",attrs:{"type":"button","aria-label":"关闭提示"},on:{"click":function($event){$event.stopPropagation();return _vm.close.apply(null, arguments)}}},[_vm._v(" × ")]):_vm._e()]):_vm._e()])
|
|
6121
6314
|
}
|
|
6122
|
-
var
|
|
6315
|
+
var CustomModalvue_type_template_id_867722ce_staticRenderFns = []
|
|
6123
6316
|
|
|
6124
6317
|
|
|
6125
6318
|
;// ./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/vue2/CustomModal.vue?vue&type=script&lang=js
|
|
6126
|
-
|
|
6127
|
-
/* harmony default export */ const CustomModalvue_type_script_lang_js = ({
|
|
6128
|
-
name: 'CustomMessage',
|
|
6129
|
-
props: {
|
|
6130
|
-
// 是否可手动关闭
|
|
6131
|
-
closable: {
|
|
6132
|
-
type: Boolean,
|
|
6133
|
-
default: false
|
|
6134
|
-
},
|
|
6135
|
-
// 点击消息体是否关闭(仅当 closable=false 时有效)
|
|
6136
|
-
closeOnClick: {
|
|
6137
|
-
type: Boolean,
|
|
6138
|
-
default: false
|
|
6139
|
-
}
|
|
6140
|
-
},
|
|
6141
|
-
data() {
|
|
6142
|
-
return {
|
|
6143
|
-
timer: null,
|
|
6144
|
-
message: '',
|
|
6145
|
-
showIcon: false,
|
|
6146
|
-
localVisible: false,
|
|
6147
|
-
duration: 3000,
|
|
6148
|
-
type: 'info' //'success', 'error', 'warning', 'info'
|
|
6149
|
-
}
|
|
6150
|
-
},
|
|
6151
|
-
computed: {
|
|
6152
|
-
iconMap() {
|
|
6153
|
-
return {
|
|
6154
|
-
success: '✓',
|
|
6155
|
-
error: '✗',
|
|
6156
|
-
warning: '⚠',
|
|
6157
|
-
info: 'ℹ'
|
|
6158
|
-
}
|
|
6159
|
-
}
|
|
6160
|
-
},
|
|
6161
|
-
|
|
6162
|
-
mounted() {
|
|
6163
|
-
if (this.localVisible) {
|
|
6164
|
-
this.startTimer()
|
|
6165
|
-
}
|
|
6166
|
-
},
|
|
6167
|
-
beforeUnmount() {
|
|
6168
|
-
this.clearTimer()
|
|
6169
|
-
},
|
|
6170
|
-
methods: {
|
|
6171
|
-
startTimer() {
|
|
6172
|
-
this.clearTimer()
|
|
6173
|
-
if (this.duration > 0 && !this.closable) {
|
|
6174
|
-
this.timer = setTimeout(() => {
|
|
6175
|
-
this.close()
|
|
6176
|
-
}, this.duration)
|
|
6177
|
-
}
|
|
6178
|
-
},
|
|
6179
|
-
clearTimer() {
|
|
6180
|
-
if (this.timer) {
|
|
6181
|
-
clearTimeout(this.timer)
|
|
6182
|
-
this.timer = null
|
|
6183
|
-
}
|
|
6184
|
-
},
|
|
6185
|
-
close() {
|
|
6186
|
-
this.localVisible = false
|
|
6187
|
-
},
|
|
6188
|
-
handleClick() {
|
|
6189
|
-
if (this.closeOnClick && !this.closable) {
|
|
6190
|
-
this.close()
|
|
6191
|
-
}
|
|
6192
|
-
},
|
|
6193
|
-
// 对外暴露的 show 方法(用于 ref 调用)
|
|
6194
|
-
show(options = {}) {
|
|
6195
|
-
const { message, type = 'info', duration = 3000, closable, closeOnClick } = options
|
|
6196
|
-
if (message !== undefined) this.message = message
|
|
6197
|
-
this.type = type
|
|
6198
|
-
if (duration !== undefined) this.duration = duration
|
|
6199
|
-
if (closable !== undefined) this.$props.closable = closable
|
|
6200
|
-
if (closeOnClick !== undefined) this.$props.closeOnClick = closeOnClick
|
|
6201
|
-
|
|
6202
|
-
this.localVisible = true
|
|
6203
|
-
this.startTimer()
|
|
6204
|
-
}
|
|
6205
|
-
}
|
|
6206
|
-
});
|
|
6319
|
+
|
|
6320
|
+
/* harmony default export */ const CustomModalvue_type_script_lang_js = ({
|
|
6321
|
+
name: 'CustomMessage',
|
|
6322
|
+
props: {
|
|
6323
|
+
// 是否可手动关闭
|
|
6324
|
+
closable: {
|
|
6325
|
+
type: Boolean,
|
|
6326
|
+
default: false
|
|
6327
|
+
},
|
|
6328
|
+
// 点击消息体是否关闭(仅当 closable=false 时有效)
|
|
6329
|
+
closeOnClick: {
|
|
6330
|
+
type: Boolean,
|
|
6331
|
+
default: false
|
|
6332
|
+
}
|
|
6333
|
+
},
|
|
6334
|
+
data() {
|
|
6335
|
+
return {
|
|
6336
|
+
timer: null,
|
|
6337
|
+
message: '',
|
|
6338
|
+
showIcon: false,
|
|
6339
|
+
localVisible: false,
|
|
6340
|
+
duration: 3000,
|
|
6341
|
+
type: 'info' //'success', 'error', 'warning', 'info'
|
|
6342
|
+
}
|
|
6343
|
+
},
|
|
6344
|
+
computed: {
|
|
6345
|
+
iconMap() {
|
|
6346
|
+
return {
|
|
6347
|
+
success: '✓',
|
|
6348
|
+
error: '✗',
|
|
6349
|
+
warning: '⚠',
|
|
6350
|
+
info: 'ℹ'
|
|
6351
|
+
}
|
|
6352
|
+
}
|
|
6353
|
+
},
|
|
6354
|
+
|
|
6355
|
+
mounted() {
|
|
6356
|
+
if (this.localVisible) {
|
|
6357
|
+
this.startTimer()
|
|
6358
|
+
}
|
|
6359
|
+
},
|
|
6360
|
+
beforeUnmount() {
|
|
6361
|
+
this.clearTimer()
|
|
6362
|
+
},
|
|
6363
|
+
methods: {
|
|
6364
|
+
startTimer() {
|
|
6365
|
+
this.clearTimer()
|
|
6366
|
+
if (this.duration > 0 && !this.closable) {
|
|
6367
|
+
this.timer = setTimeout(() => {
|
|
6368
|
+
this.close()
|
|
6369
|
+
}, this.duration)
|
|
6370
|
+
}
|
|
6371
|
+
},
|
|
6372
|
+
clearTimer() {
|
|
6373
|
+
if (this.timer) {
|
|
6374
|
+
clearTimeout(this.timer)
|
|
6375
|
+
this.timer = null
|
|
6376
|
+
}
|
|
6377
|
+
},
|
|
6378
|
+
close() {
|
|
6379
|
+
this.localVisible = false
|
|
6380
|
+
},
|
|
6381
|
+
handleClick() {
|
|
6382
|
+
if (this.closeOnClick && !this.closable) {
|
|
6383
|
+
this.close()
|
|
6384
|
+
}
|
|
6385
|
+
},
|
|
6386
|
+
// 对外暴露的 show 方法(用于 ref 调用)
|
|
6387
|
+
show(options = {}) {
|
|
6388
|
+
const { message, type = 'info', duration = 3000, closable, closeOnClick } = options
|
|
6389
|
+
if (message !== undefined) this.message = message
|
|
6390
|
+
this.type = type
|
|
6391
|
+
if (duration !== undefined) this.duration = duration
|
|
6392
|
+
if (closable !== undefined) this.$props.closable = closable
|
|
6393
|
+
if (closeOnClick !== undefined) this.$props.closeOnClick = closeOnClick
|
|
6394
|
+
|
|
6395
|
+
this.localVisible = true
|
|
6396
|
+
this.startTimer()
|
|
6397
|
+
}
|
|
6398
|
+
}
|
|
6399
|
+
});
|
|
6207
6400
|
|
|
6208
6401
|
;// ./src/vue2/CustomModal.vue?vue&type=script&lang=js
|
|
6209
6402
|
/* harmony default export */ const vue2_CustomModalvue_type_script_lang_js = (CustomModalvue_type_script_lang_js);
|
|
6210
|
-
;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-52.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-52.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-52.use[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/vue2/CustomModal.vue?vue&type=style&index=0&id=5b0941a0&prod&scoped=true&lang=css
|
|
6211
|
-
// extracted by mini-css-extract-plugin
|
|
6212
|
-
|
|
6213
|
-
;// ./src/vue2/CustomModal.vue?vue&type=style&index=0&id=5b0941a0&prod&scoped=true&lang=css
|
|
6214
|
-
|
|
6215
6403
|
;// ./src/vue2/CustomModal.vue
|
|
6216
6404
|
|
|
6217
6405
|
|
|
6218
6406
|
|
|
6219
|
-
;
|
|
6220
6407
|
|
|
6221
6408
|
|
|
6222
6409
|
/* normalize component */
|
|
6223
|
-
|
|
6410
|
+
;
|
|
6224
6411
|
var CustomModal_component = normalizeComponent(
|
|
6225
6412
|
vue2_CustomModalvue_type_script_lang_js,
|
|
6226
|
-
|
|
6227
|
-
|
|
6413
|
+
CustomModalvue_type_template_id_867722ce_render,
|
|
6414
|
+
CustomModalvue_type_template_id_867722ce_staticRenderFns,
|
|
6228
6415
|
false,
|
|
6229
6416
|
null,
|
|
6230
|
-
|
|
6417
|
+
null,
|
|
6231
6418
|
null
|
|
6232
6419
|
|
|
6233
6420
|
)
|
|
6234
6421
|
|
|
6235
6422
|
/* harmony default export */ const CustomModal = (CustomModal_component.exports);
|
|
6236
|
-
;// ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/vue2/CustomSearchInput.vue?vue&type=template&id=
|
|
6237
|
-
var
|
|
6423
|
+
;// ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/vue2/CustomSearchInput.vue?vue&type=template&id=edf0fc34
|
|
6424
|
+
var CustomSearchInputvue_type_template_id_edf0fc34_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"search-input-wrapper"},[_c('div',{staticClass:"input-container"},[_c('input',{directives:[{name:"model",rawName:"v-model",value:(_vm.localValue),expression:"localValue"}],ref:"input",staticClass:"custom-input",attrs:{"type":"text","placeholder":_vm.computedPlaceholder},domProps:{"value":(_vm.localValue)},on:{"keyup":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter"))return null;return _vm.handleSearch.apply(null, arguments)},"input":[function($event){if($event.target.composing)return;_vm.localValue=$event.target.value},_vm.onInput],"focus":function($event){_vm.isFocused = true},"blur":function($event){_vm.isFocused = false}}}),(_vm.localValue && (_vm.isFocused || !_vm.isMobile))?_c('button',{staticClass:"clear-btn",attrs:{"type":"button","aria-label":"清除内容"},on:{"click":function($event){$event.stopPropagation();return _vm.handleClear.apply(null, arguments)}}},[_vm._v(" × ")]):_vm._e(),_c('button',{staticClass:"search-btn",attrs:{"type":"button","aria-label":"搜索"},on:{"click":function($event){$event.stopPropagation();return _vm.handleSearch.apply(null, arguments)}}},[_c('svg',{attrs:{"width":"14","height":"14","viewBox":"0 0 24 24","fill":"none","stroke":"currentColor"}},[_c('circle',{attrs:{"cx":"11","cy":"11","r":"8"}}),_c('path',{attrs:{"d":"m21 21-4.35-4.35"}})])])]),_c('label',{staticClass:"custom-checkbox"},[_c('input',{staticClass:"checkbox-input",attrs:{"type":"checkbox"},domProps:{"checked":_vm.localCheckedPoint},on:{"change":_vm.toggleCheckedPoint}}),_c('span',{staticClass:"checkbox-box"},[_c('svg',{staticClass:"check-icon",attrs:{"width":"10","height":"8","viewBox":"0 0 10 8","fill":"none","xmlns":"http://www.w3.org/2000/svg"}},[_c('path',{attrs:{"d":"M1 4L3.5 6.5L9 1","stroke":"white","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}})])]),_c('span',{staticClass:"checkbox-label",style:({ color: _vm.localCheckedPoint ? '#409eff' : '#fff' })},[_vm._v("坐标反查")])])])
|
|
6238
6425
|
}
|
|
6239
|
-
var
|
|
6426
|
+
var CustomSearchInputvue_type_template_id_edf0fc34_staticRenderFns = []
|
|
6240
6427
|
|
|
6241
6428
|
|
|
6242
6429
|
;// ./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/vue2/CustomSearchInput.vue?vue&type=script&lang=js
|
|
@@ -6293,27 +6480,21 @@ var CustomSearchInputvue_type_template_id_3e01720b_scoped_true_staticRenderFns =
|
|
|
6293
6480
|
|
|
6294
6481
|
;// ./src/vue2/CustomSearchInput.vue?vue&type=script&lang=js
|
|
6295
6482
|
/* harmony default export */ const vue2_CustomSearchInputvue_type_script_lang_js = (CustomSearchInputvue_type_script_lang_js);
|
|
6296
|
-
;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-52.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-52.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-52.use[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/vue2/CustomSearchInput.vue?vue&type=style&index=0&id=3e01720b&prod&scoped=true&lang=css
|
|
6297
|
-
// extracted by mini-css-extract-plugin
|
|
6298
|
-
|
|
6299
|
-
;// ./src/vue2/CustomSearchInput.vue?vue&type=style&index=0&id=3e01720b&prod&scoped=true&lang=css
|
|
6300
|
-
|
|
6301
6483
|
;// ./src/vue2/CustomSearchInput.vue
|
|
6302
6484
|
|
|
6303
6485
|
|
|
6304
6486
|
|
|
6305
|
-
;
|
|
6306
6487
|
|
|
6307
6488
|
|
|
6308
6489
|
/* normalize component */
|
|
6309
|
-
|
|
6490
|
+
;
|
|
6310
6491
|
var CustomSearchInput_component = normalizeComponent(
|
|
6311
6492
|
vue2_CustomSearchInputvue_type_script_lang_js,
|
|
6312
|
-
|
|
6313
|
-
|
|
6493
|
+
CustomSearchInputvue_type_template_id_edf0fc34_render,
|
|
6494
|
+
CustomSearchInputvue_type_template_id_edf0fc34_staticRenderFns,
|
|
6314
6495
|
false,
|
|
6315
6496
|
null,
|
|
6316
|
-
|
|
6497
|
+
null,
|
|
6317
6498
|
null
|
|
6318
6499
|
|
|
6319
6500
|
)
|
|
@@ -10680,7 +10861,7 @@ function getDriveRoute(data) {
|
|
|
10680
10861
|
var search_Map = null
|
|
10681
10862
|
/* harmony default export */ const search_mapvue_type_script_lang_js = ({
|
|
10682
10863
|
name: 'SearchMap',
|
|
10683
|
-
components: {
|
|
10864
|
+
components: { CustomSearchInput: CustomSearchInput, CustomModal: CustomModal },
|
|
10684
10865
|
data() {
|
|
10685
10866
|
return {
|
|
10686
10867
|
keyWord: '',
|
|
@@ -10799,8 +10980,8 @@ var search_Map = null
|
|
|
10799
10980
|
;
|
|
10800
10981
|
var search_map_component = normalizeComponent(
|
|
10801
10982
|
vue2_search_mapvue_type_script_lang_js,
|
|
10802
|
-
|
|
10803
|
-
|
|
10983
|
+
search_mapvue_type_template_id_9a9e2760_render,
|
|
10984
|
+
search_mapvue_type_template_id_9a9e2760_staticRenderFns,
|
|
10804
10985
|
false,
|
|
10805
10986
|
null,
|
|
10806
10987
|
null,
|
|
@@ -11472,8 +11653,8 @@ class MapWrapper {
|
|
|
11472
11653
|
;
|
|
11473
11654
|
var locationMap_component = normalizeComponent(
|
|
11474
11655
|
vue2_locationMapvue_type_script_lang_js,
|
|
11475
|
-
|
|
11476
|
-
|
|
11656
|
+
locationMapvue_type_template_id_759ad7fe_render,
|
|
11657
|
+
locationMapvue_type_template_id_759ad7fe_staticRenderFns,
|
|
11477
11658
|
false,
|
|
11478
11659
|
null,
|
|
11479
11660
|
null,
|
|
@@ -11482,10 +11663,10 @@ var locationMap_component = normalizeComponent(
|
|
|
11482
11663
|
)
|
|
11483
11664
|
|
|
11484
11665
|
/* harmony default export */ const locationMap = (locationMap_component.exports);
|
|
11485
|
-
;// ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/vue2/augustineMap.vue?vue&type=template&id=
|
|
11486
|
-
var
|
|
11666
|
+
;// ./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[2]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/vue2/augustineMap.vue?vue&type=template&id=2ff95724
|
|
11667
|
+
var augustineMapvue_type_template_id_2ff95724_render = function render(){var _vm=this,_c=_vm._self._c;return _c('loading-box',{attrs:{"loading":_vm.isLoading}},[_c('div',{staticClass:"arcgisMap-box"},[_c('div',{staticClass:"map-canvans",attrs:{"id":_vm.mapId}}),(_vm.isShowBtnBox)?_c('div',{staticClass:"edit-btn-box"},[(_vm.drawIngArea)?_c('div',{staticClass:"edit-area"},[_vm._v(" "+_vm._s(_vm.drawIngArea)+"(平方米) ")]):_vm._e(),(_vm.module.indexOf('screen') > -1)?_c('div',{staticClass:"edit-btn",attrs:{"title":"全屏"},on:{"click":_vm.changeFull}},[_c('svgIcon',{attrs:{"name":"full","width":"24","color":"#000"}})],1):_vm._e(),(_vm.isUseSketch)?[(_vm.type && _vm.type.indexOf('point') > -1)?_c('div',{staticClass:"edit-btn",attrs:{"title":"点"},on:{"click":function($event){return _vm.drawLayerType('point')}}},[_c('svgIcon')],1):_vm._e(),(_vm.type && _vm.type.indexOf('polyline') > -1)?_c('div',{staticClass:"edit-btn",attrs:{"title":"线"},on:{"click":function($event){return _vm.drawLayerType('polyline')}}},[_c('svgIcon',{attrs:{"name":"line"}})],1):_vm._e(),(_vm.type && _vm.type.indexOf('polygon') > -1)?_c('div',{staticClass:"edit-btn",attrs:{"title":"面"},on:{"click":function($event){return _vm.drawLayerType('polygon')}}},[_c('svgIcon',{attrs:{"name":"polygon"}})],1):_vm._e(),_c('div',{staticClass:"edit-btn",class:{ 'btn-disable': !_vm.isDel },attrs:{"title":"删除单个"},on:{"click":_vm.delDraw}},[_c('svgIcon',{attrs:{"name":"del","width":"22","color":_vm.isDel ? '#6a6a6a' : '#dadada'}})],1),_c('div',{staticClass:"edit-btn",class:{ 'btn-disable': !_vm.isDelAll },attrs:{"title":"全部删除"},on:{"click":function($event){return _vm.delDraw('all')}}},[_c('svgIcon',{attrs:{"name":"delAll","width":"23","color":_vm.isDelAll ? '#6a6a6a' : '#dadada'}})],1),_c('div',{staticClass:"edit-btn",class:{ 'btn-disable': !_vm.isActive },attrs:{"title":"上一步"},on:{"click":_vm.undo}},[_c('svgIcon',{attrs:{"name":"perv","width":"22","color":_vm.isActive ? '#6a6a6a' : '#dadada'}})],1),_c('div',{staticClass:"edit-btn",class:{ 'btn-disable': !_vm.isPer },attrs:{"title":"下一步"},on:{"click":_vm.redo}},[_c('svgIcon',{attrs:{"name":"next","width":"22","color":_vm.isPer ? '#6a6a6a' : '#dadada'}})],1)]:_vm._e()],2):_vm._e(),(!_vm.isLoading && _vm.isSearch)?_c('searchMap',{ref:"searchRef",on:{"selectPoint":_vm.refreshPoint,"clearSearchMap":_vm.clearSearchMap}}):_vm._e()],1)])
|
|
11487
11668
|
}
|
|
11488
|
-
var
|
|
11669
|
+
var augustineMapvue_type_template_id_2ff95724_staticRenderFns = []
|
|
11489
11670
|
|
|
11490
11671
|
|
|
11491
11672
|
;// ./src/mixins/SketchManager.js
|
|
@@ -11841,216 +12022,9 @@ class SketchManager {
|
|
|
11841
12022
|
|
|
11842
12023
|
/* harmony default export */ const mixins_SketchManager = (SketchManager);
|
|
11843
12024
|
|
|
11844
|
-
|
|
11845
|
-
var terraformer_arcgis_parser = __webpack_require__(979);
|
|
11846
|
-
var terraformer_arcgis_parser_default = /*#__PURE__*/__webpack_require__.n(terraformer_arcgis_parser);
|
|
11847
|
-
// EXTERNAL MODULE: ./node_modules/terraformer-wkt-parser/terraformer-wkt-parser.js
|
|
11848
|
-
var terraformer_wkt_parser = __webpack_require__(337);
|
|
11849
|
-
;// ./src/config/wktMethods.js
|
|
11850
|
-
// import { judgmentMapDataType, isValidArcGISPoint } from './comstom'
|
|
11851
|
-
/**
|
|
11852
|
-
* ArcGIS用于 ArcGIS JSON ⇄ GeoJSON 互转
|
|
11853
|
-
* ArcGIS.parse(arcgisJson) → 用于将 ArcGIS JSON 转为 GeoJSON { x: 30, y: 10 }==>{type: "Point",coordinates: [30, 10]}
|
|
11854
|
-
* ArcGIS.convert({geojson,options}) → 将 GeoJSON 转为 ArcGIS 格式。{type: "Point",coordinates: [30, 10]}==>{ x: 30, y: 10 }
|
|
11855
|
-
* options ==>{idAttribute: 'OBJECTID', // 指定 ID 字段名(默认 "id")
|
|
11856
|
-
* spatialReference: { wkid: 4326 } // 添加空间参考
|
|
11857
|
-
* } ==> {x: 30,y: 10,spatialReference: { wkid: 4326 }}
|
|
11858
|
-
*/
|
|
11859
|
-
|
|
11860
|
-
/**
|
|
11861
|
-
* ArcGIS 转 GeoJSON
|
|
11862
|
-
* @param {Object} data - 对象
|
|
11863
|
-
* @param {Object} data.geometry- 点:{x,y},线:{paths:[]},面:{rings:[]}
|
|
11864
|
-
* @returns {GeoJSON} GeoJSON 对象
|
|
11865
|
-
*/
|
|
11866
|
-
function arcGISTranformGeoJson(data) {
|
|
11867
|
-
try {
|
|
11868
|
-
if (!data || !data.geometry) {
|
|
11869
|
-
throw new Error(
|
|
11870
|
-
`${JSON.stringify(
|
|
11871
|
-
data
|
|
11872
|
-
)}-arcGISTranformGeoJson对象包含geometry:{点:{x,y},线:{paths:[]},面:{rings:[]}}`
|
|
11873
|
-
)
|
|
11874
|
-
}
|
|
11875
|
-
return terraformer_arcgis_parser_default().parse(data.geometry)
|
|
11876
|
-
} catch (error) {
|
|
11877
|
-
throw new Error(`arcGISTranformGeoJson: ${error}`)
|
|
11878
|
-
}
|
|
11879
|
-
}
|
|
11880
|
-
/**
|
|
11881
|
-
* GeoJSON 转 ArcGIS
|
|
11882
|
-
* @param {Object} data - 对象
|
|
11883
|
-
* @param {Object} data.geometry {type:Point|MultiPoint|LineString|Polygon|MultiPolygon,coordinates:[]}
|
|
11884
|
-
* @returns {ArcGIS} ArcGIS 对象
|
|
11885
|
-
*/
|
|
11886
|
-
function geoJsonTranformArcgis(data) {
|
|
11887
|
-
const errorText = `geoJsonTranformArcgis数据格式=>{geometry:{type:Point|MultiPoint|LineString|Polygon|MultiPolygon,coordinates:[]}}<=>错误对象${JSON.stringify(
|
|
11888
|
-
data
|
|
11889
|
-
)}`
|
|
11890
|
-
try {
|
|
11891
|
-
if (
|
|
11892
|
-
!data ||
|
|
11893
|
-
!data.geometry ||
|
|
11894
|
-
!data.geometry.coordinates ||
|
|
11895
|
-
data.geometry.coordinates.length === 0
|
|
11896
|
-
) {
|
|
11897
|
-
console.error(errorText)
|
|
11898
|
-
return null
|
|
11899
|
-
}
|
|
11900
|
-
let geometry = data.geometry,
|
|
11901
|
-
jsonData = geometry
|
|
11902
|
-
if (!geometry.type) {
|
|
11903
|
-
console.error(errorText)
|
|
11904
|
-
return null
|
|
11905
|
-
}
|
|
11906
|
-
if (geometry.type == 'Point') {
|
|
11907
|
-
jsonData = {
|
|
11908
|
-
type: 'Feature',
|
|
11909
|
-
geometry: geometry,
|
|
11910
|
-
properties: {}
|
|
11911
|
-
}
|
|
11912
|
-
}
|
|
11913
|
-
const arcgisData = ArcGIS.convert(jsonData)
|
|
11914
|
-
if (arcgisData && JSON.stringify(arcgisData) != '{}') {
|
|
11915
|
-
return arcgisData.geometry ? arcgisData.geometry : arcgisData
|
|
11916
|
-
} else throw new Error(errorText)
|
|
11917
|
-
} catch (error) {
|
|
11918
|
-
throw new Error(error)
|
|
11919
|
-
}
|
|
11920
|
-
}
|
|
11921
|
-
// import { drawLayer } from '../utils/index.js'
|
|
11922
|
-
|
|
11923
|
-
/**
|
|
11924
|
-
* WKT用于 WKT ⇄ GeoJSON 互转
|
|
11925
|
-
* WKT支持格式-POINT、LINESTRING、POLYGON、MULTIPOINT、MULTILINESTRING、MULTIPOLYGON、GEOMETRYCOLLECTION
|
|
11926
|
-
* WKT.parse(wktString) → 将WKT字符串解析为 GeoJSON 对象。'POINT (30 10)'==>{type: "Point",coordinates: [30, 10]}
|
|
11927
|
-
* WKT.convert(geojson) → 将 GeoJSON 对象转换为 WKT 字符串。{type: "Point",coordinates: [30, 10]}==>POINT (30 10)
|
|
11928
|
-
*/
|
|
11929
|
-
|
|
11930
|
-
|
|
11931
|
-
/**
|
|
11932
|
-
* 安全判断是否为非空字符串
|
|
11933
|
-
*/
|
|
11934
|
-
function isValidString(str) {
|
|
11935
|
-
return str && typeof str === 'string' && str.trim() !== '' && str != 'null' && str != 'undefined'
|
|
11936
|
-
}
|
|
11937
|
-
/**
|
|
11938
|
-
* 判断点
|
|
11939
|
-
* @param {*} value
|
|
11940
|
-
* @returns
|
|
11941
|
-
*/
|
|
11942
|
-
function isNumeric(value) {
|
|
11943
|
-
// 排除 null 和 boolean(因为 typeof null === 'object',但 Number(null) = 0)
|
|
11944
|
-
if (value === null || !value || typeof value === 'boolean') {
|
|
11945
|
-
return false
|
|
11946
|
-
}
|
|
11947
|
-
|
|
11948
|
-
// 如果是 number 类型,必须是有限数(排除 NaN, Infinity)
|
|
11949
|
-
if (typeof value === 'number') {
|
|
11950
|
-
return isFinite(value)
|
|
11951
|
-
}
|
|
11952
|
-
|
|
11953
|
-
// 如果是 string 类型,尝试转换
|
|
11954
|
-
if (typeof value === 'string') {
|
|
11955
|
-
// 去除首尾空格
|
|
11956
|
-
const trimmed = value.trim()
|
|
11957
|
-
// 空字符串直接返回 false
|
|
11958
|
-
if (trimmed === '') return false
|
|
11959
|
-
// 使用 isFinite 检查是否可转为有效数字
|
|
11960
|
-
return isFinite(trimmed) && !isNaN(Number(trimmed))
|
|
11961
|
-
}
|
|
11962
|
-
|
|
11963
|
-
// 其他类型(object, array, undefined 等)一律 false
|
|
11964
|
-
return false
|
|
11965
|
-
}
|
|
11966
|
-
/**
|
|
11967
|
-
* 粗略判断是否为 ArcGIS JSON 对象(至少包含 x/y 或 paths/rings)
|
|
11968
|
-
*/
|
|
11969
|
-
function isValidArcGIS(obj) {
|
|
11970
|
-
if (typeof obj !== 'object' || obj === null) return false
|
|
11971
|
-
// Point: {x, y}
|
|
11972
|
-
if (isNumeric(obj.x) && isNumeric(obj.y)) return true
|
|
11973
|
-
// Point: {longitude, latitude}
|
|
11974
|
-
if (isNumeric(obj.longitude) && isNumeric(obj.latitude)) return true
|
|
11975
|
-
// Multipoint: {points: [...]}
|
|
11976
|
-
if (Array.isArray(obj.points)) return true
|
|
11977
|
-
|
|
11978
|
-
// Polyline: {paths: [...]}
|
|
11979
|
-
if (Array.isArray(obj.paths)) return true
|
|
11980
|
-
|
|
11981
|
-
// Polygon: {rings: [...]}
|
|
11982
|
-
if (Array.isArray(obj.rings)) return true
|
|
11983
|
-
|
|
11984
|
-
return false
|
|
11985
|
-
}
|
|
11986
|
-
/**
|
|
11987
|
-
* geojson转wkt
|
|
11988
|
-
* @param {*} geojson
|
|
11989
|
-
* @returns
|
|
11990
|
-
*/
|
|
11991
|
-
function geoJsonTranformWkt(geojson) {
|
|
11992
|
-
try {
|
|
11993
|
-
if (!geojson && !geojson.type) {
|
|
11994
|
-
throw new Error(`[geoJsonTranformWkt] 期望字符串,但收到: ${geojson}`)
|
|
11995
|
-
}
|
|
11996
|
-
return WKT.convert(geojson)
|
|
11997
|
-
} catch (error) {
|
|
11998
|
-
throw new Error(`geojson解析失败: ${error.message}`)
|
|
11999
|
-
}
|
|
12000
|
-
}
|
|
12001
|
-
|
|
12002
|
-
/**
|
|
12003
|
-
* WKT 转 ArcGIS(安全版)
|
|
12004
|
-
* @param {string} wktString - WKT 字符串,如 "POINT (30 10)"
|
|
12005
|
-
* @returns {Object|null} ArcGIS JSON 对象,失败返回 null
|
|
12006
|
-
*/
|
|
12007
|
-
function wktTranformArcgis(wktString) {
|
|
12008
|
-
try {
|
|
12009
|
-
if (!isValidString(wktString)) {
|
|
12010
|
-
throw new Error(`[wktTranformArcgis] 期望字符串,但收到: ${typeof wktString}`)
|
|
12011
|
-
}
|
|
12012
|
-
|
|
12013
|
-
const geojson = WKT.parse(wktString.trim())
|
|
12014
|
-
const arcgis = ArcGIS.convert(geojson)
|
|
12015
|
-
return arcgis
|
|
12016
|
-
} catch (error) {
|
|
12017
|
-
throw new Error(`WKT 解析失败: ${error.message}`)
|
|
12018
|
-
}
|
|
12019
|
-
}
|
|
12020
|
-
/**
|
|
12021
|
-
* ArcGIS 转 WKT(安全版)
|
|
12022
|
-
* @param {Object} arcgisJson - ArcGIS 格式对象
|
|
12023
|
-
* @returns {string|null} WKT 字符串,失败返回 null
|
|
12024
|
-
*/
|
|
12025
|
-
function arcgisTranformWkt(arcgisJson) {
|
|
12026
|
-
try {
|
|
12027
|
-
if (!isValidArcGIS(arcgisJson)) {
|
|
12028
|
-
throw new Error(`[arcgisTranformWkt] 期望字符串,但收到: ${arcgisJson}`)
|
|
12029
|
-
}
|
|
12030
|
-
const geojson = ArcGIS.parse(arcgisJson)
|
|
12031
|
-
const wkt = WKT.convert(geojson)
|
|
12032
|
-
return wkt
|
|
12033
|
-
} catch (error) {
|
|
12034
|
-
throw new Error(`[arcgisTranformWkt] ArcGIS 解析失败:${error.message}输入:${arcgisJson}`)
|
|
12035
|
-
}
|
|
12036
|
-
}
|
|
12037
|
-
/**
|
|
12038
|
-
* 绘制项目图层
|
|
12039
|
-
* @param {*} data
|
|
12040
|
-
* @returns
|
|
12041
|
-
*/
|
|
12042
|
-
function drawWktAsset(data) {
|
|
12043
|
-
let graphic = null
|
|
12044
|
-
let arcgis = wktTranformArcgis(data.sub_range)
|
|
12045
|
-
graphic = drawLayer({
|
|
12046
|
-
geometry: arcgis,
|
|
12047
|
-
...data
|
|
12048
|
-
})
|
|
12049
|
-
return graphic
|
|
12050
|
-
}
|
|
12025
|
+
;// ./src/mixins/mapMixin.js
|
|
12051
12026
|
|
|
12052
12027
|
|
|
12053
|
-
;// ./src/mixins/mapMixin.js
|
|
12054
12028
|
|
|
12055
12029
|
|
|
12056
12030
|
|
|
@@ -12061,12 +12035,18 @@ let mapMixin_arcgisMap = null,
|
|
|
12061
12035
|
mapMixin_arcgisView = null,
|
|
12062
12036
|
mapMixin_sketch = null,
|
|
12063
12037
|
sketchLayer = null,
|
|
12038
|
+
mapMixin_pointLayer = null,
|
|
12064
12039
|
unselectableLayer = null,
|
|
12065
12040
|
mapMixin_currentAbortController = null,
|
|
12066
12041
|
mapMixin_isClickLocked = false,
|
|
12067
12042
|
graphics = []
|
|
12043
|
+
let mapMixin_markerData = {
|
|
12044
|
+
url: ico_location_namespaceObject,
|
|
12045
|
+
width: 20,
|
|
12046
|
+
height: 18
|
|
12047
|
+
}
|
|
12068
12048
|
const mapMixin = {
|
|
12069
|
-
components: { loadingBox: loading, svgIcon: svgIcon },
|
|
12049
|
+
components: { loadingBox: loading, svgIcon: svgIcon, searchMap: search_map },
|
|
12070
12050
|
props: {
|
|
12071
12051
|
mapParams: {
|
|
12072
12052
|
type: Object,
|
|
@@ -12104,6 +12084,9 @@ const mapMixin = {
|
|
|
12104
12084
|
},
|
|
12105
12085
|
isUseSketch() {
|
|
12106
12086
|
return this.module && this.module.length > 0 && this.module.indexOf('edit') > -1
|
|
12087
|
+
},
|
|
12088
|
+
isSearch() {
|
|
12089
|
+
return this.module && this.module.length > 0 && this.module.indexOf('search') > -1
|
|
12107
12090
|
}
|
|
12108
12091
|
},
|
|
12109
12092
|
data() {
|
|
@@ -12221,44 +12204,63 @@ const mapMixin = {
|
|
|
12221
12204
|
loadEdMap(data) {
|
|
12222
12205
|
mapMixin_arcgisMap = data.map
|
|
12223
12206
|
mapMixin_arcgisView = data.view
|
|
12224
|
-
|
|
12225
|
-
|
|
12226
|
-
|
|
12227
|
-
|
|
12228
|
-
this.
|
|
12229
|
-
|
|
12230
|
-
|
|
12231
|
-
|
|
12232
|
-
|
|
12233
|
-
|
|
12234
|
-
|
|
12235
|
-
|
|
12236
|
-
|
|
12237
|
-
|
|
12238
|
-
|
|
12239
|
-
//
|
|
12240
|
-
|
|
12207
|
+
if (this.isSearch) {
|
|
12208
|
+
mapMixin_pointLayer = new window.jkEsri.GraphicsLayer({ id: 'pointLayer' })
|
|
12209
|
+
mapMixin_arcgisMap.add(mapMixin_pointLayer, 10)
|
|
12210
|
+
}
|
|
12211
|
+
if (this.isUseSketch) {
|
|
12212
|
+
unselectableLayer = new window.jkEsri.GraphicsLayer({ id: 'unselectableLayer' })
|
|
12213
|
+
mapMixin_arcgisMap.add(unselectableLayer, 3)
|
|
12214
|
+
sketchLayer = new window.jkEsri.GraphicsLayer({ id: 'sketchLayer' })
|
|
12215
|
+
mapMixin_arcgisMap.add(sketchLayer, 4)
|
|
12216
|
+
mapMixin_sketch = new mixins_SketchManager({
|
|
12217
|
+
layer: sketchLayer,
|
|
12218
|
+
view: mapMixin_arcgisView,
|
|
12219
|
+
map: mapMixin_arcgisMap,
|
|
12220
|
+
maxGraphics: this.maxGraphics
|
|
12221
|
+
})
|
|
12222
|
+
// 监听事件
|
|
12223
|
+
mapMixin_sketch.on('create', (graphic) => {
|
|
12224
|
+
console.log('创建图形:', graphic)
|
|
12225
|
+
// 可发送到后端保存
|
|
12226
|
+
})
|
|
12241
12227
|
|
|
12242
|
-
|
|
12243
|
-
|
|
12244
|
-
|
|
12228
|
+
mapMixin_sketch.on('update', (graphic) => {
|
|
12229
|
+
console.log('编辑完成:', graphic)
|
|
12230
|
+
})
|
|
12245
12231
|
|
|
12246
|
-
|
|
12247
|
-
|
|
12248
|
-
|
|
12249
|
-
|
|
12250
|
-
|
|
12251
|
-
|
|
12252
|
-
|
|
12253
|
-
|
|
12254
|
-
|
|
12255
|
-
|
|
12256
|
-
|
|
12257
|
-
|
|
12258
|
-
|
|
12259
|
-
|
|
12260
|
-
|
|
12261
|
-
|
|
12232
|
+
mapMixin_sketch.on('delete', (graphic) => {
|
|
12233
|
+
console.log('删除图形')
|
|
12234
|
+
})
|
|
12235
|
+
mapMixin_sketch.on('change', (data) => {
|
|
12236
|
+
this.isActive = data.isActive
|
|
12237
|
+
this.isDel = data.isDel
|
|
12238
|
+
this.isPer = data.isNextList.length > 0 && this.isActive
|
|
12239
|
+
this.drawIngArea = data.drawIngArea
|
|
12240
|
+
? this.formatThousands(Number(data.drawIngArea).toFixed(2))
|
|
12241
|
+
: 0
|
|
12242
|
+
graphics = data.graphics
|
|
12243
|
+
this.isDelAll = graphics.length > 0
|
|
12244
|
+
setTimeout(() => {
|
|
12245
|
+
this.retuanGraphics()
|
|
12246
|
+
}, 500)
|
|
12247
|
+
})
|
|
12248
|
+
}
|
|
12249
|
+
this.setupMapEvents(data.view)
|
|
12250
|
+
this.$emit('loadEdMap', data)
|
|
12251
|
+
},
|
|
12252
|
+
/**
|
|
12253
|
+
* 搜索绘图
|
|
12254
|
+
* @param data
|
|
12255
|
+
*/
|
|
12256
|
+
refreshPoint(data) {
|
|
12257
|
+
mapMixin_pointLayer && mapMixin_pointLayer.removeAll()
|
|
12258
|
+
this.pointData = { ...data, symbol: getPictureMarker(mapMixin_markerData) }
|
|
12259
|
+
mapMixin_pointLayer.add(drawPoint(this.pointData))
|
|
12260
|
+
mapJumpTo(mapMixin_pointLayer)
|
|
12261
|
+
},
|
|
12262
|
+
clearSearchMap() {
|
|
12263
|
+
mapMixin_pointLayer && mapMixin_pointLayer.removeAll()
|
|
12262
12264
|
},
|
|
12263
12265
|
/**
|
|
12264
12266
|
* 绘制图层
|
|
@@ -12419,6 +12421,9 @@ const mapMixin = {
|
|
|
12419
12421
|
} else this.goToCenter()
|
|
12420
12422
|
} else this.goToCenter()
|
|
12421
12423
|
},
|
|
12424
|
+
changeFull() {
|
|
12425
|
+
this.$emit('changeFull')
|
|
12426
|
+
},
|
|
12422
12427
|
/**
|
|
12423
12428
|
* 注销
|
|
12424
12429
|
*/
|
|
@@ -12426,6 +12431,9 @@ const mapMixin = {
|
|
|
12426
12431
|
this.cleanupMapEvents()
|
|
12427
12432
|
if (mapMixin_sketch && mapMixin_sketch.destroy) mapMixin_sketch.destroy()
|
|
12428
12433
|
this.goToCenter()
|
|
12434
|
+
if (this.$refs.searchRef && this.$refs.searchRef.clearSearch) {
|
|
12435
|
+
this.$refs.searchRef.clearSearch()
|
|
12436
|
+
}
|
|
12429
12437
|
}
|
|
12430
12438
|
},
|
|
12431
12439
|
beforeUnmount() {
|
|
@@ -12464,8 +12472,8 @@ const mapMixin = {
|
|
|
12464
12472
|
;
|
|
12465
12473
|
var augustineMap_component = normalizeComponent(
|
|
12466
12474
|
vue2_augustineMapvue_type_script_lang_js,
|
|
12467
|
-
|
|
12468
|
-
|
|
12475
|
+
augustineMapvue_type_template_id_2ff95724_render,
|
|
12476
|
+
augustineMapvue_type_template_id_2ff95724_staticRenderFns,
|
|
12469
12477
|
false,
|
|
12470
12478
|
null,
|
|
12471
12479
|
null,
|
|
@@ -12510,7 +12518,7 @@ const mapListMixin = {
|
|
|
12510
12518
|
mapId: 'map' + Math.round(Math.random() * 10000),
|
|
12511
12519
|
isLoading: true, //地图加载loading
|
|
12512
12520
|
center: [],
|
|
12513
|
-
pointCenter: [113.
|
|
12521
|
+
pointCenter: [113.33799948954312, 23.14565684412003],
|
|
12514
12522
|
pointsList: []
|
|
12515
12523
|
}
|
|
12516
12524
|
},
|
|
@@ -12723,6 +12731,7 @@ var mapList_component = normalizeComponent(
|
|
|
12723
12731
|
|
|
12724
12732
|
|
|
12725
12733
|
|
|
12734
|
+
// export { augustineGjMap, augustineMap, locationMap, mapList };
|
|
12726
12735
|
// 所有组件列表
|
|
12727
12736
|
const components = [augustineGjMap, augustineMap, locationMap, mapList];
|
|
12728
12737
|
// install 方法
|
|
@@ -12737,7 +12746,34 @@ const install = (Vue) => {
|
|
|
12737
12746
|
// 支持 Vue.use(MyLib)
|
|
12738
12747
|
/* harmony default export */ const src_0 = ({
|
|
12739
12748
|
install,
|
|
12740
|
-
|
|
12749
|
+
augustineGjMap: augustineGjMap,
|
|
12750
|
+
augustineMap: augustineMap,
|
|
12751
|
+
locationMap: locationMap,
|
|
12752
|
+
mapList: mapList,
|
|
12753
|
+
arcGISTranformGeoJson: arcGISTranformGeoJson,
|
|
12754
|
+
geoJsonTranformArcgis: geoJsonTranformArcgis,
|
|
12755
|
+
geoJsonTranformWkt: geoJsonTranformWkt,
|
|
12756
|
+
wktTranformGeoJson: wktTranformGeoJson,
|
|
12757
|
+
wktTranformArcgis: wktTranformArcgis,
|
|
12758
|
+
arcgisTranformWkt: arcgisTranformWkt,
|
|
12759
|
+
initMapPack: initMapPack,
|
|
12760
|
+
createBase: createBase,
|
|
12761
|
+
createMapView: createMapView,
|
|
12762
|
+
toArcGISPoint: toArcGISPoint,
|
|
12763
|
+
getSimpleText: getSimpleText,
|
|
12764
|
+
getSimpleMarker: getSimpleMarker,
|
|
12765
|
+
getPictureMarker: getPictureMarker,
|
|
12766
|
+
getSimpleLine: getSimpleLine,
|
|
12767
|
+
getSimpleFill: getSimpleFill,
|
|
12768
|
+
createGrahic: createGrahic,
|
|
12769
|
+
createMaskLayer: createMaskLayer,
|
|
12770
|
+
createGraphicsLayer: createGraphicsLayer,
|
|
12771
|
+
mapJumpTo: mapJumpTo,
|
|
12772
|
+
drawPoint: drawPoint,
|
|
12773
|
+
drawPolyline: drawPolyline,
|
|
12774
|
+
drawPolygon: drawPolygon,
|
|
12775
|
+
drawPolygonArr: drawPolygonArr,
|
|
12776
|
+
getArea: getArea,
|
|
12741
12777
|
});
|
|
12742
12778
|
|
|
12743
12779
|
// 浏览器环境自动安装
|
|
@@ -12745,9 +12781,6 @@ if (typeof window !== "undefined" && window.Vue) {
|
|
|
12745
12781
|
install(window.Vue);
|
|
12746
12782
|
}
|
|
12747
12783
|
|
|
12748
|
-
|
|
12749
|
-
|
|
12750
|
-
|
|
12751
12784
|
;// ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
|
|
12752
12785
|
|
|
12753
12786
|
|