qy-vue-plugins 1.0.9-beta → 1.0.10-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{MapTools.vue_vue_type_style_index_0_lang-CImDBL4e.js → MapTools.vue_vue_type_style_index_0_lang-CZqEnhLx.js} +1 -1
- package/dist/chunks/{MapTools.vue_vue_type_style_index_0_lang-DRlx4gQj.js → MapTools.vue_vue_type_style_index_0_lang-ybCmUWC6.js} +1 -1
- package/dist/chunks/{constant-Bm7_cQCV.js → constant-BMZ0sl-4.js} +13 -29
- package/dist/chunks/{constant-CMqVPn7l.js → constant-D5rOYGSP.js} +1 -1
- package/dist/chunks/utils-DD-obz1R.js +1 -0
- package/dist/chunks/{utils-xXl9a14X.js → utils-OPfLDCco.js} +37 -33
- package/dist/mapboxV2/MapView.cjs +1 -1
- package/dist/mapboxV2/MapView.mjs +1854 -1870
- package/dist/mapboxV2/components/MapTools.cjs +1 -1
- package/dist/mapboxV2/components/MapTools.mjs +1 -1
- package/dist/mapboxV2/useTif.cjs +1 -1
- package/dist/mapboxV2/useTif.mjs +1 -1
- package/dist/mapboxV2/utils.cjs +1 -1
- package/dist/mapboxV2/utils.mjs +32 -28
- package/dist/mapboxV2/widgets/CustomShapeDialog.cjs +1 -1
- package/dist/mapboxV2/widgets/CustomShapeDialog.mjs +2 -2
- package/dist/mapboxV2/widgets/IconPicker.cjs +1 -1
- package/dist/mapboxV2/widgets/IconPicker.mjs +52 -44
- package/dist/mapboxV2/widgets/LayerDialog.cjs +1 -1
- package/dist/mapboxV2/widgets/LayerDialog.mjs +1 -1
- package/dist/mapboxV2/widgets/LegendDialogLine.cjs +1 -1
- package/dist/mapboxV2/widgets/LegendDialogLine.mjs +2 -2
- package/dist/mapboxV2/widgets/LegendDialogPoint.cjs +1 -1
- package/dist/mapboxV2/widgets/LegendDialogPoint.mjs +60 -63
- package/dist/mapboxV2/widgets/LegendLine.cjs +1 -1
- package/dist/mapboxV2/widgets/LegendLine.mjs +2 -2
- package/dist/mapboxV2/widgets/LegendPoint.cjs +1 -1
- package/dist/mapboxV2/widgets/LegendPoint.mjs +51 -65
- package/dist/mapboxV2/widgets/LegendPopLine.cjs +1 -1
- package/dist/mapboxV2/widgets/LegendPopLine.mjs +1 -1
- package/dist/mapboxV2/widgets/LegendPopPoint.cjs +1 -1
- package/dist/mapboxV2/widgets/LegendPopPoint.mjs +119 -117
- package/dist/mapboxV2/widgets/LegendShape.cjs +1 -1
- package/dist/mapboxV2/widgets/LegendShape.mjs +2 -2
- package/dist/mapboxV2/widgets/LegendSymbol.cjs +1 -1
- package/dist/mapboxV2/widgets/LegendSymbol.mjs +1 -1
- package/dist/mapboxV2/widgets/ShapeDialog.cjs +1 -1
- package/dist/mapboxV2/widgets/ShapeDialog.mjs +1217 -1218
- package/dist/mapboxV2.cjs +1 -1
- package/dist/mapboxV2.mjs +1 -1
- package/dist/qy-vue-plugins.css +1 -1
- package/dist/types/mapboxV2/MapView.vue.d.ts +7 -0
- package/dist/types/mapboxV2/types/map-layer.d.ts +21 -3
- package/dist/types/mapboxV2/utils/geojsonRenderer.d.ts +11 -4
- package/dist/types/mapboxV2/utils.d.ts +5 -0
- package/dist/types/mapboxV2/widgets/IconPicker.vue.d.ts +8 -10
- package/package/mapboxV2/constant.ts +3 -6
- package/package/mapboxV2/utils.ts +22 -13
- package/package/types/map.ts +2 -18
- package/package.json +1 -1
- package/dist/chunks/utils-Xq2KWcMy.js +0 -1
- package/dist/chunks//346/255/243/344/270/211/350/247/222/345/275/242-BRUTHTNe.js +0 -12
- package/dist/chunks//346/255/243/344/270/211/350/247/222/345/275/242-CksusXxb.js +0 -28
- package/dist/chunks//346/255/243/344/270/211/350/247/222/345/275/242-DchJeGnp.js +0 -1
- package/dist/chunks//346/255/243/344/270/211/350/247/222/345/275/242-yXKDlNvO.js +0 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const a=require("vue"),h=require("./mapbox-gl-draw-Dg_Inye3.js"),P=require("./ProvideKeys-91lTuLnq.js"),N=require("./EventKeys-BvyQ87Zy.js"),q=require("./constant-
|
|
1
|
+
"use strict";const a=require("vue"),h=require("./mapbox-gl-draw-Dg_Inye3.js"),P=require("./ProvideKeys-91lTuLnq.js"),N=require("./EventKeys-BvyQ87Zy.js"),q=require("./constant-D5rOYGSP.js"),B=require("@turf/turf"),I=require("@element-plus/icons-vue"),j=require("element-plus");function $(i){const m=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const n in i)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(i,n);Object.defineProperty(m,n,r.get?r:{enumerable:!0,get:()=>i[n]})}}return m.default=i,Object.freeze(m)}const p=$(B),O={key:0,class:"measure-info-panel"},A={class:"measure-info-content"},R={class:"measure-label"},z={class:"measure-value"},K={class:"qy-flex-row hiper-map-tools-bar"},J=a.defineComponent({__name:"MapTools",props:{tools:{default:()=>["point","line","polygon","measure_distance","measure_area","clear_all"]}},setup(i){const m=a.inject("mapRootId"),n=a.ref(),r=a.ref([]),L=a.ref(null),M=a.ref(null),v=a.ref(!1),c=a.ref("distance"),y=t=>{switch(v.value&&t!=="measure_distance"&&t!=="clear_all"&&D(),n.value=t,t){case"point":s.changeMode("draw_point");break;case"line":s.changeMode("draw_line_string");break;case"polygon":s.changeMode("draw_polygon");break;case"measure_distance":s.changeMode("simple_select"),c.value="distance",x();break;case"measure_area":s.changeMode("simple_select"),c.value="area",x();break;case"clear_all":s.deleteAll(),D();break}},e=a.inject(P.mapInstanceKey),s=new h.MapboxDraw({userProperties:!0,displayControlsDefault:!1,modes:{...h.MapboxDraw.modes,draw_rectangle:h.DrawRectangle,static:h.StaticMode}});let _=null;_=N.mapLoadedBus.on(({mapRootId:t})=>{m!==t||!e?.value||(console.log("hiper-map-tools-bar mounted",e),e.value.addControl(s,"top-left"),e.value.on("draw.create",w))});function w(t){const l=s.getAll();if(!l.features.length)return;l.features=[l.features[0]];const o={point:{layerType:"symbol",config:{textColor:"rgba(0,0,0,1)",iconName:q.DefaultIcon}},line:{layerType:"line",config:{lineWidth:1,lineColor:"rgba(255, 0, 0, 1)",lineStyle:"solid"}},polygon:{layerType:"shape",config:{fillColor:"rgba(241, 131, 127, 1)",lineWidth:1}}}[n.value];o&&N.showLayerEditKeyBus.emit({mapRootId:m,e:new MouseEvent("click"),layer:{layerType:o.layerType,customLayerConfig:JSON.stringify(o.config),geoJSON:JSON.stringify(l),...n.value==="polygon"?{pid:""}:{}}}),s.deleteAll()}function x(){e?.value&&(v.value=!0,r.value=[],e.value.getCanvas().style.cursor="crosshair",e.value.on("click",b),e.value.on("dblclick",g))}function g(t){if(v.value){if(t.preventDefault(),c.value==="distance")r.value.length>=2&&C();else if(r.value.length>=3){const l=r.value[0],u=r.value[r.value.length-1];(l[0]!==u[0]||l[1]!==u[1])&&r.value.push(l),C()}e?.value?.off("click",b),e?.value?.off("dblclick",g),e?.value&&(e.value.getCanvas().style.cursor=""),v.value=!1}}function b(t){if(!v.value||!e?.value)return;t.originalEvent.stopPropagation();const l=[t.lngLat.lng,t.lngLat.lat];r.value.push(l),r.value.length===1?(c.value==="distance"?d.value=0:f.value=0,e.value.getSource("measure-point-source")?e.value.getSource("measure-point-source").setData({type:"Feature",properties:{},geometry:{type:"Point",coordinates:l}}):(e.value.addSource("measure-point-source",{type:"geojson",data:{type:"Feature",properties:{},geometry:{type:"Point",coordinates:l}}}),e.value.addLayer({id:"measure-point-layer",type:"circle",source:"measure-point-source",paint:{"circle-radius":5,"circle-color":"#16aaff"}}))):(e.value.getSource("measure-point-source")&&e.value.getSource("measure-point-source").setData({type:"FeatureCollection",features:r.value.map(u=>({type:"Feature",properties:{},geometry:{type:"Point",coordinates:u}}))}),C(),c.value==="area"&&r.value.length>=3&&(e.value.getCanvas().style.cursor="pointer"))}function C(){if(!e?.value||r.value.length<2)return;const t=p.lineString(r.value);if(c.value==="distance"){const l=p.length(t,{units:"kilometers"});d.value=l,l<1?`${(l*1e3).toFixed(2)}`:`${l.toFixed(3)}`;const u=Math.floor(r.value.length/2)-1;u<0?r.value[0]:r.value[u],S(t)}else if(r.value.length>=3){const l=[...r.value];l[0]!==l[l.length-1]&&l.push(l[0]);const u=p.polygon([l]),o=p.area(u)/1e6;f.value=o,o<1?`${(o*1e6).toFixed(2)}`:`${o.toFixed(3)}`;const k=p.centroid(u);S(t,k.geometry.coordinates)}else S(t,t.geometry.coordinates[0])}function S(t,l,u){if(e?.value){if(e.value.getSource("measure-line-source")?e.value.getSource("measure-line-source").setData(t):(e.value.addSource("measure-line-source",{type:"geojson",data:t}),e.value.addLayer({id:"measure-line-layer",type:"line",source:"measure-line-source",layout:{"line-join":"round","line-cap":"round"},paint:{"line-color":"#16aaff","line-width":2,"line-dasharray":[2,1]}}),L.value="measure-line-layer"),c.value==="area"&&r.value.length>=3){const o=[...r.value];o[0]!==o[o.length-1]&&o.push(o[0]);const k=p.polygon([o]);e.value.getSource("measure-fill-source")?e.value.getSource("measure-fill-source").setData(k):(e.value.addSource("measure-fill-source",{type:"geojson",data:k}),e.value.addLayer({id:"measure-fill-layer",type:"fill",source:"measure-fill-source",paint:{"fill-color":"#16aaff","fill-opacity":.2,"fill-outline-color":"#16aaff"}},"measure-line-layer"))}e.value.getSource("measure-label-source")&&e.value.getLayer("measure-label-layer")&&(e.value.removeLayer("measure-label-layer"),e.value.removeSource("measure-label-source"),M.value=null)}}function D(){e?.value&&(e.value?.off("click",b),e.value?.off("dblclick",g),e.value.getCanvas().style.cursor="",e.value.getLayer("measure-point-layer")&&(e.value.removeLayer("measure-point-layer"),e.value.removeSource("measure-point-source")),e.value.getLayer("measure-line-layer")&&(e.value.removeLayer("measure-line-layer"),e.value.removeSource("measure-line-source")),e.value.getLayer("measure-fill-layer")&&(e.value.removeLayer("measure-fill-layer"),e.value.removeSource("measure-fill-source")),e.value.getLayer("measure-label-layer")&&(e.value.removeLayer("measure-label-layer"),e.value.removeSource("measure-label-source")),r.value=[],L.value=null,M.value=null,v.value=!1,d.value=0,f.value=0,e.value.getLayer("measure-label-layer")&&e.value.removeLayer("measure-label-layer"),e.value.getSource("measure-label-source")&&e.value.removeSource("measure-label-source"))}a.onUnmounted(()=>{D(),_&&_(),e?.value&&(e.value?.removeControl(s),e.value?.off("draw.create",w),e.value?.off("click",b),e.value?.off("dblclick",g))});const d=a.ref(0),E=a.computed(()=>d.value<1?`${(d.value*1e3).toFixed(2)} 米`:`${d.value.toFixed(3)} 公里`),f=a.ref(0),T=a.computed(()=>f.value<1?`${(f.value*1e6).toFixed(2)} 平方米`:`${f.value.toFixed(3)} 平方公里`),V=a.computed(()=>c.value==="distance"?E.value:T.value),F=a.computed(()=>c.value==="distance"?"总长度: ":"总面积: ");return(t,l)=>(a.openBlock(),a.createElementBlock(a.Fragment,null,[v.value||r.value.length>0&&(n.value=="measure_distance"||n.value=="measure_area")?(a.openBlock(),a.createElementBlock("div",O,[a.createElementVNode("div",A,[a.createElementVNode("span",R,a.toDisplayString(F.value),1),a.createElementVNode("span",z,a.toDisplayString(V.value),1),a.createVNode(a.unref(j.ElIcon),{style:{display:"block","margin-left":"10px",cursor:"pointer"},onClick:l[0]||(l[0]=u=>y("clear_all")),size:"20px"},{default:a.withCtx(()=>[a.createVNode(a.unref(I.Close))]),_:1})])])):a.createCommentVNode("",!0),a.createElementVNode("div",K,[l[7]||(l[7]=a.createElementVNode("div",{class:"tools-label"},"测绘工具",-1)),i.tools.includes("measure_distance")?(a.openBlock(),a.createElementBlock("div",{key:0,title:"测距",class:a.normalizeClass(["hiper-map-tools-btn",n.value=="measure_distance"?"active":null]),onClick:l[1]||(l[1]=()=>y("measure_distance"))},[...l[4]||(l[4]=[a.createElementVNode("span",{class:"qyuan icon-ruler"},null,-1)])],2)):a.createCommentVNode("",!0),i.tools.includes("measure_area")?(a.openBlock(),a.createElementBlock("div",{key:1,title:"测面",class:a.normalizeClass(["hiper-map-tools-btn",n.value=="measure_area"?"active":null]),onClick:l[2]||(l[2]=()=>y("measure_area"))},[...l[5]||(l[5]=[a.createElementVNode("span",{class:"qyuan icon-multi-triangular"},null,-1)])],2)):a.createCommentVNode("",!0),i.tools.includes("clear_all")?(a.openBlock(),a.createElementBlock("div",{key:2,title:"清除所有临时绘制图形",class:"hiper-map-tools-btn",style:{border:"none"},onClick:l[3]||(l[3]=()=>y("clear_all"))},[...l[6]||(l[6]=[a.createElementVNode("span",{class:"qyuan icon-clear"},null,-1)])])):a.createCommentVNode("",!0)])],64))}});exports._sfc_main=J;
|
|
@@ -2,7 +2,7 @@ import { defineComponent as V, inject as $, ref as n, onUnmounted as z, computed
|
|
|
2
2
|
import { M as R, S as W, D as H } from "./mapbox-gl-draw-CKTcXDzM.js";
|
|
3
3
|
import { m as G } from "./ProvideKeys-CBXsWszp.js";
|
|
4
4
|
import { m as Q, s as X } from "./EventKeys-DZ_Hahro.js";
|
|
5
|
-
import { D as Y } from "./constant-
|
|
5
|
+
import { D as Y } from "./constant-BMZ0sl-4.js";
|
|
6
6
|
import * as d from "@turf/turf";
|
|
7
7
|
import { Close as Z } from "@element-plus/icons-vue";
|
|
8
8
|
import { ElIcon as ee } from "element-plus";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e = "rgba(103, 194, 58, 0.6)",
|
|
1
|
+
const e = "rgba(103, 194, 58, 0.6)", m = "hiper-map-icon-1.png", a = [
|
|
2
2
|
{
|
|
3
3
|
type: "default",
|
|
4
4
|
key: "",
|
|
@@ -29,7 +29,7 @@ const e = "rgba(103, 194, 58, 0.6)", p = "hiper-map-icon-1.png", a = [
|
|
|
29
29
|
circleRadius: 2,
|
|
30
30
|
circleStrokeWidth: 0
|
|
31
31
|
}
|
|
32
|
-
],
|
|
32
|
+
], p = {
|
|
33
33
|
circleType: "icon",
|
|
34
34
|
circleStrokeColor: "rgba(0,0,0,1)",
|
|
35
35
|
circleColor: e,
|
|
@@ -37,19 +37,19 @@ const e = "rgba(103, 194, 58, 0.6)", p = "hiper-map-icon-1.png", a = [
|
|
|
37
37
|
}, o = {
|
|
38
38
|
pointTintColor: "rgba(2, 210, 224, 1)",
|
|
39
39
|
pointRenderType: "color"
|
|
40
|
-
},
|
|
40
|
+
}, r = {
|
|
41
41
|
fillColorList: a,
|
|
42
42
|
fillOpacityConfig: {
|
|
43
43
|
value: 1
|
|
44
44
|
},
|
|
45
45
|
outlineConfigList: i,
|
|
46
46
|
symbolConfigList: [],
|
|
47
|
-
circleBaseConfig:
|
|
47
|
+
circleBaseConfig: p,
|
|
48
48
|
circleConfigList: n,
|
|
49
49
|
antiAliasingConfig: {
|
|
50
50
|
value: !0
|
|
51
51
|
}
|
|
52
|
-
},
|
|
52
|
+
}, l = "https://shpfile-data-1314977817.cos.ap-guangzhou.myqcloud.com/geojson/beijihua-map-icon/", c = [
|
|
53
53
|
{
|
|
54
54
|
fileName: "hiper-map-icon-1.png",
|
|
55
55
|
name: "标记"
|
|
@@ -306,7 +306,7 @@ const e = "rgba(103, 194, 58, 0.6)", p = "hiper-map-icon-1.png", a = [
|
|
|
306
306
|
fileName: "hiper-map-icon-65.png",
|
|
307
307
|
name: ""
|
|
308
308
|
}
|
|
309
|
-
],
|
|
309
|
+
], g = [
|
|
310
310
|
"rgba(255, 69, 0, 1)",
|
|
311
311
|
"rgba(255, 140, 0, 1)",
|
|
312
312
|
"rgba(255, 215, 0, 1)",
|
|
@@ -324,32 +324,16 @@ const e = "rgba(103, 194, 58, 0.6)", p = "hiper-map-icon-1.png", a = [
|
|
|
324
324
|
"rgba(236, 97, 93, 1)",
|
|
325
325
|
"rgba(203, 99, 39, 1)",
|
|
326
326
|
"rgba(244, 182, 63, 1)"
|
|
327
|
-
], f = [
|
|
328
|
-
{ fileName: "实五角星.svg", name: "五角星" },
|
|
329
|
-
{ fileName: "正三角形.svg", name: "三角形" },
|
|
330
|
-
{ fileName: "地图点.svg", name: "地图点" },
|
|
331
|
-
{ fileName: "标记地图点位.svg", name: "标记点位" },
|
|
332
|
-
{ fileName: "24gf-square.svg", name: "方形" },
|
|
333
|
-
{ fileName: "地图点 (1).svg", name: "地图点1" },
|
|
334
|
-
{ fileName: "地图点-红.svg", name: "红地图点" },
|
|
335
|
-
{ fileName: "地图点位.svg", name: "点位" },
|
|
336
|
-
{ fileName: "地图点 (2).svg", name: "地图点2" },
|
|
337
|
-
{ fileName: "地图点 (3).svg", name: "地图点3" },
|
|
338
|
-
{ fileName: "地图点位 (1).svg", name: "点位1" },
|
|
339
|
-
{ fileName: "地图点 (4).svg", name: "地图点4" },
|
|
340
|
-
{ fileName: "hexagon-fill.svg", name: "六边形" },
|
|
341
|
-
{ fileName: "人-地图点位2x.svg", name: "人地图点位" }
|
|
342
327
|
];
|
|
343
328
|
export {
|
|
344
|
-
|
|
329
|
+
m as D,
|
|
345
330
|
o as a,
|
|
346
331
|
e as b,
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
r as m,
|
|
332
|
+
n as c,
|
|
333
|
+
r as d,
|
|
334
|
+
l as e,
|
|
335
|
+
a as f,
|
|
336
|
+
c as g,
|
|
337
|
+
g as m,
|
|
354
338
|
i as o
|
|
355
339
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e="rgba(103, 194, 58, 0.6)",
|
|
1
|
+
"use strict";const e="rgba(103, 194, 58, 0.6)",p="hiper-map-icon-1.png",i=[{type:"default",key:"",value:"",color:e}],a=[{type:"default",outlineColor:"rgba(103, 194, 58, 1)",outlineWidth:2,zoom:0,lineStyle:"solid"}],n=[{key:"",value:"",circleType:"circle",circleStrokeColor:"rgba(0,0,0,1)",circleColor:e,iconImageUrl:"hiper-map-icon-1.png",type:"default",zoom:0,circleRadius:2,circleStrokeWidth:0}],m={circleType:"icon",circleStrokeColor:"rgba(0,0,0,1)",circleColor:e,iconImageUrl:""},o={pointTintColor:"rgba(2, 210, 224, 1)",pointRenderType:"color"},l={fillColorList:i,fillOpacityConfig:{value:1},outlineConfigList:a,symbolConfigList:[],circleBaseConfig:m,circleConfigList:n,antiAliasingConfig:{value:!0}},r="https://shpfile-data-1314977817.cos.ap-guangzhou.myqcloud.com/geojson/beijihua-map-icon/",c=[{fileName:"hiper-map-icon-1.png",name:"标记"},{fileName:"hiper-map-icon-2.png",name:""},{fileName:"hiper-map-icon-3.png",name:""},{fileName:"hiper-map-icon-4.png",name:""},{fileName:"hiper-map-icon-5.png",name:""},{fileName:"hiper-map-icon-6.png",name:""},{fileName:"hiper-map-icon-7.png",name:""},{fileName:"hiper-map-icon-8.png",name:""},{fileName:"hiper-map-icon-9.png",name:""},{fileName:"hiper-map-icon-10.png",name:""},{fileName:"hiper-map-icon-11.png",name:""},{fileName:"hiper-map-icon-12.png",name:""},{fileName:"hiper-map-icon-13.png",name:""},{fileName:"hiper-map-icon-14.png",name:""},{fileName:"hiper-map-icon-15.png",name:""},{fileName:"hiper-map-icon-16.png",name:""},{fileName:"hiper-map-icon-17.png",name:""},{fileName:"hiper-map-icon-18.png",name:""},{fileName:"hiper-map-icon-19.png",name:""},{fileName:"hiper-map-icon-20.png",name:""},{fileName:"hiper-map-icon-21.png",name:""},{fileName:"hiper-map-icon-22.png",name:""},{fileName:"hiper-map-icon-23.png",name:""},{fileName:"hiper-map-icon-24.png",name:""},{fileName:"hiper-map-icon-25.png",name:""},{fileName:"hiper-map-icon-26.png",name:""},{fileName:"hiper-map-icon-27.png",name:""},{fileName:"hiper-map-icon-28.png",name:""},{fileName:"hiper-map-icon-29.png",name:""},{fileName:"hiper-map-icon-30.png",name:""},{fileName:"hiper-map-icon-31.png",name:""},{fileName:"hiper-map-icon-32.png",name:""},{fileName:"hiper-map-icon-33.png",name:""},{fileName:"hiper-map-icon-34.png",name:""},{fileName:"hiper-map-icon-35.png",name:""},{fileName:"hiper-map-icon-36.png",name:""},{fileName:"hiper-map-icon-37.png",name:""},{fileName:"hiper-map-icon-38.png",name:""},{fileName:"hiper-map-icon-39.png",name:""},{fileName:"hiper-map-icon-40.png",name:""},{fileName:"hiper-map-icon-41.png",name:""},{fileName:"hiper-map-icon-42.png",name:""},{fileName:"hiper-map-icon-43.png",name:""},{fileName:"hiper-map-icon-45.png",name:""},{fileName:"hiper-map-icon-46.png",name:""},{fileName:"hiper-map-icon-47.png",name:""},{fileName:"hiper-map-icon-48.png",name:""},{fileName:"hiper-map-icon-49.png",name:""},{fileName:"hiper-map-icon-50.png",name:""},{fileName:"hiper-map-icon-51.png",name:""},{fileName:"hiper-map-icon-52.png",name:""},{fileName:"hiper-map-icon-53.png",name:""},{fileName:"hiper-map-icon-54.png",name:""},{fileName:"hiper-map-icon-55.png",name:""},{fileName:"hiper-map-icon-56.png",name:""},{fileName:"hiper-map-icon-57.png",name:""},{fileName:"hiper-map-icon-58.png",name:""},{fileName:"hiper-map-icon-59.png",name:""},{fileName:"hiper-map-icon-60.png",name:""},{fileName:"hiper-map-icon-61.png",name:""},{fileName:"hiper-map-icon-62.png",name:""},{fileName:"hiper-map-icon-63.png",name:""},{fileName:"hiper-map-icon-64.png",name:""},{fileName:"hiper-map-icon-65.png",name:""}],g=["rgba(255, 69, 0, 1)","rgba(255, 140, 0, 1)","rgba(255, 215, 0, 1)","rgba(144, 238, 144, 1)","rgba(0, 206, 209, 1)","rgba(30, 144, 255, 1)","rgba(199, 21, 133, 1)","rgba(199, 21, 133, 0.46)","rgba(87, 178, 55, 1)","rgba(2, 210, 224, 1)","rgba(38, 24, 171, 1)","rgba(106, 226, 191, 1)","rgba(145, 125, 238, 1)","rgba(236, 97, 93, 1)","rgba(203, 99, 39, 1)","rgba(244, 182, 63, 1)"];exports.DefaultColor=e;exports.DefaultIcon=p;exports.circleConfigList=n;exports.defaultPointLayerPaintConfig=o;exports.defaultStyleConfig=l;exports.fillColorList=i;exports.mapIconBaseUrl=r;exports.mapIconNameList=c;exports.mapPointsColors=g;exports.outlineConfigList=a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const L=require("vue"),p=require("./constant-D5rOYGSP.js");function x(i,e){let t={marginTop:"-2px"};switch(i){case"solid":case"solid-line":t.borderBottom=`4px solid ${e}`;break;case"dash":case"dotted":case"simple-dash":t.borderBottom=`4px dashed ${e}`;break;case"dot-dash":t.backgroundImage=`linear-gradient(to right, ${e} 25%, rgba(255, 255, 255, 0) 25%, rgba(255, 255, 255, 0) 50%, ${e} 50%, ${e} 75%, rgba(255, 255, 255, 0) 75%)`;break;case"long-dash":t.backgroundImage=`linear-gradient(to right, ${e} 50%, rgba(255, 255, 255, 0) 50%)`;break;case"dot-line":t.backgroundImage=`linear-gradient(to right, ${e} 25%, rgba(255, 255, 255, 0) 10%)`;break;case"complex-pattern":t.backgroundImage=`linear-gradient(to right, ${e} 20%, rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0) 40%, ${e} 40%, ${e} 60%, rgba(255, 255, 255, 0) 60%)`;break;default:t.borderBottom=`4px solid ${e}`;break}return t}function $(i,e){if(i&&typeof i!="string")return i;switch(e){case"symbol":case"geojson":case"species-group":case"sample-group":case"track":case"interest-point":return i?JSON.parse(i||"{}"):p.defaultPointLayerPaintConfig;case"point":return JSON.parse(i||"{}");case"line":return JSON.parse(i||"{}");case"shape":case"shp":case"kml":case"kmz":case"tif":return i?JSON.parse(i||"{}"):p.defaultStyleConfig;default:throw new Error(`Unsupported layer type: ${e}`)}}function F(i){try{return`layer-id-${i.id}`}catch(e){return console.error("Error getting layer ID:",e),`layer-id-${L.useId()}`}}function J(i){try{return`source-id-${i.id}`}catch(e){return console.error("Error getting source ID:",e),`source-id-${L.useId()}`}}function C(i){try{const e=i.layerPaintConfig?JSON.parse(i.layerPaintConfig):p.defaultStyleConfig;if(e&&typeof e=="object"){const t=e,s=Array.isArray(t.symbolConfigList)?t.symbolConfigList:[],f=Array.isArray(t.circleConfigList)?t.circleConfigList:[];!s.length&&f.length&&(t.symbolConfigList=JSON.parse(JSON.stringify(f))),!f.length&&s.length&&(t.circleConfigList=JSON.parse(JSON.stringify(s)))}return e}catch{return p.defaultStyleConfig}}const w=i=>{const e=i.symbolConfigList,t=i.circleConfigList;return Array.isArray(e)&&e.length>0?JSON.parse(JSON.stringify(e)):Array.isArray(t)&&t.length>0?JSON.parse(JSON.stringify(t)):JSON.parse(JSON.stringify(p.defaultStyleConfig.circleConfigList||[]))};function I(i){let e="fill";switch(i.layerType){case"shp":case"kml":case"kmz":if(i.layerShapes){const t=i.layerShapes.split(",").map(s=>s.trim().toLowerCase());t.length===1?t[0]==="point"?e="circle":t[0]==="line"?e="line":e="fill":e="fill"}else e="fill";break;case"line":e="line";break;case"symbol":if(e="circle",i.layerPaintConfig){const t=JSON.parse(i.layerPaintConfig),s=t.symbolConfigList||t.circleConfigList;s&&s?.length>0&&s[0].circleType=="symbol"&&(e="symbol")}break;default:e="fill"}return e}function E(i){try{let e={},t=JSON.parse(JSON.stringify(i.fillColorList));const s=t.find(o=>o.type==="default"),f=t.filter(o=>o.type==="custom");s&&(t=[...f,s]),console.log("[getFillStyle] 排序后的 fillColorList:",t);let n=t.filter(o=>o.type==="custom"?o.key&&o.value:!0);const u=n[n.length-1];if(!u||u.type!=="default")return console.warn("[getFillStyle] 未找到默认配置,使用系统默认颜色"),e["fill-color"]="rgba(103, 194, 58, 0.6)",e["fill-outline-color"]="rgba(103, 194, 58, 1)",e;console.log("[getFillStyle] 默认颜色配置:",u);let r=[];if(n.forEach(o=>{if(o.type=="custom"){let a=-1;r.forEach((l,c)=>{l.key==o.key&&(a=c)}),a>-1?r[a].list.push(o):r.push({key:o.key,list:[o]})}}),console.log("[getFillStyle] fillColorGroupList:",r),r.length>0){let o=u.color;[...r].reverse().forEach(a=>{const l=["match",["to-string",["get",a.key]]];a.list.forEach(c=>{l.push(String(c.value)),l.push(c.color)}),l.push(o),o=l}),e["fill-color"]=o,console.log("[getFillStyle] 使用条件渲染,colorExpression:",o)}else e["fill-color"]=u.color,console.log("[getFillStyle] 使用单一颜色:",u.color);return e["fill-outline-color"]=u.color,console.log("[getFillStyle] 生成 fillStyle 成功:",e),e}catch(e){console.log("[getFillStyle] 生成 fillStyle 失败:",e)}}function T(i){if(!i||!i.showLabel)return null;const e={"text-field":["get",i.labelField||"FID"],"text-size":i.fontSize||14,"text-color":i.fontColor||"#000000","text-font":["Open Sans Regular"],"text-anchor":"center","text-offset":[0,0],"text-allow-overlap":!1,"text-avoid-edges":!0};return console.log("生成labelStyle成功---->",e),e}function N(i){try{let{outlineConfigList:e}=i;if(!e||e.length===0)return console.warn("[getOutLineStyle] outlineConfigList 为空,使用默认样式"),{"line-color":"rgba(103, 194, 58, 1)","line-width":2,"line-dasharray":["literal",[]]};let t=JSON.parse(JSON.stringify(e));const s=t.find(o=>o.type==="default"),f=t.filter(o=>o.type==="custom");s&&(t=[...f,s]);const n=t[t.length-1];if(!n||n.type!=="default")return console.warn("[getOutLineStyle] 未找到默认配置,使用系统默认值"),{"line-color":"rgba(103, 194, 58, 1)","line-width":1};let u={"line-color":n.outlineColor||"rgba(103, 194, 58, 1)","line-width":n.outlineWidth??1};n.lineStyle==="dash"?u["line-dasharray"]=[2,2]:u["line-dasharray"]=["literal",[]];let r=[];if(t.forEach(o=>{if(o.type==="custom"&&o.key&&o.value){let a=-1;r.forEach((l,c)=>{l.key===o.key&&(a=c)}),a>-1?r[a].list.push(o):r.push({key:o.key,list:[o]})}}),r.length>0&&(["line-color","line-width"].forEach(a=>{const l=a==="line-color"?"outlineColor":"outlineWidth";if(r.some(g=>g.list.some(d=>d[l]!==void 0))){const g=["match",["to-string",["get",r[0].key]]];r.forEach(d=>{d.list.forEach(h=>{h.value!==void 0&&h[l]!==void 0&&(g.push(String(h.value)),g.push(h[l]))})}),g.push(s[l]??u[a]),u[a]=g}}),r.some(a=>a.list.some(l=>l.lineStyle!==void 0)))){const a=["match",["to-string",["get",r[0].key]]];r.forEach(l=>{l.list.forEach(c=>{c.value!==void 0&&c.lineStyle&&(a.push(String(c.value)),a.push(c.lineStyle==="dash"?[2,2]:["literal",[]]))})}),a.push(s.lineStyle==="dash"?[2,2]:["literal",[]]),u["line-dasharray"]=a}return u}catch(e){return console.log("生成outlineStyle失败",e),{"line-color":"rgba(103, 194, 58, 1)","line-width":2,"line-dasharray":[]}}}function O(i){let e=w(i),t=JSON.parse(JSON.stringify(e));const s=t.find(l=>l.type==="default"),f=t.filter(l=>l.type==="custom");s&&(t=[...f,s]),console.log("[getCircleStyle] 排序后的 circleConfigList:",t);const n=t[t.length-1],u=n&&(n.renderMode==="color"||n.renderMode==="icon");if(!n||n.type!=="default")return console.warn("[getCircleStyle] 未找到默认配置,使用系统默认值"),{_useNewFormat:!0,_circleConfigList:[{type:"default",renderMode:"color",pointStyle:"",pointTintColor:"rgba(103, 194, 58, 1)",pointSize:10}],"icon-image":"custom-icon-default--67c23a","icon-size":1};if(console.log("[getCircleStyle] 默认配置:",n),u){const l={_useNewFormat:!0,_circleConfigList:t};l["icon-image"]=[],l["icon-size"]=[];const c=t.filter(g=>g.type==="custom"&&g.value!==""&&g.value!=null);if(c.length>0){const g=c[0].key;let d="string";for(const y of c)if(typeof y.value=="number"){d="number";break}const h=y=>d==="number"?typeof y=="number"?y:Number(y):String(y),m=["match",["get",g]];c.forEach(y=>{let k;if(y.renderMode==="color"){const A=(y.pointTintColor||"rgba(103, 194, 58, 1)").replace(/[^a-zA-Z0-9]/g,"");k=`custom-icon-${y.key}-${y.pointStyle||""}-${A}`}else k=y.iconImageName||"";m.push(h(y.value)),m.push(k)});let b;if(n.renderMode==="color"){const y=(n.pointTintColor||"#67c23a").replace(/[^a-zA-Z0-9]/g,"");b=`custom-icon-default-${n.pointStyle||""}-${y}`}else b=n.iconImageName||"";m.push(b),l["icon-image"]=m;const S=["match",["get",g]];c.forEach(y=>{S.push(h(y.value)),S.push((y.pointSize||10)/20)}),S.push((n.pointSize||10)/20),l["icon-size"]=S}else{let g;if(n.renderMode==="color"){const d=(n.pointTintColor||"#67c23a").replace(/[^a-zA-Z0-9]/g,"");g=`custom-icon-default-${n.pointStyle||""}-${d}`}else g=n.iconImageName||"";l["icon-image"]=g,l["icon-size"]=(n.pointSize||10)/20}return l}const r={"circle-radius":[],"circle-stroke-width":[],"circle-color":[],"circle-stroke-color":[],"icon-image":[]};e=[...e];const o=e[e.length-1];e.splice(e.length-1,1),r["circle-radius"]=[o.circleRadius],r["circle-stroke-width"]=[o.circleStrokeWidth],r["circle-color"]=[o.circleColor],r["circle-stroke-color"]=[o.circleStrokeColor],r["icon-image"]=[o.iconImageUrl||""];let a=[];return e.forEach(l=>{if(l.type=="custom"){let c=-1;a.forEach((g,d)=>{g.key==l.key&&(c=d)}),c>-1?a[c].list.push(l):a.push({key:l.key,list:[l]})}}),a.forEach(l=>{o.circleType!="symbol"&&(l.list.forEach(c=>{r["circle-radius"].unshift(c.circleRadius),r["circle-radius"].unshift(c.value)}),r["circle-radius"].unshift(["get",l.key]),r["circle-radius"].unshift("match"),l.list.forEach(c=>{r["circle-stroke-width"].unshift(c.circleStrokeWidth),r["circle-stroke-width"].unshift(c.value)}),r["circle-stroke-width"].unshift(["get",l.key]),r["circle-stroke-width"].unshift("match"),l.list.forEach(c=>{r["circle-color"].unshift(c.circleColor),r["circle-color"].unshift(c.value)}),r["circle-color"].unshift(["get",l.key]),r["circle-color"].unshift("match"),l.list.forEach(c=>{r["circle-stroke-color"].unshift(c.circleStrokeColor),r["circle-stroke-color"].unshift(c.value)}),r["circle-stroke-color"].unshift(["get",l.key]),r["circle-stroke-color"].unshift("match")),o.circleType=="symbol"&&(l.list.forEach(c=>{r["icon-image"].unshift(c.iconImageUrl||""),r["icon-image"].unshift(c.value)}),r["icon-image"].unshift(["get",l.key]),r["icon-image"].unshift("match"))}),e.length==0&&(r["circle-radius"]=r["circle-radius"][0],r["circle-stroke-width"]=r["circle-stroke-width"][0],r["circle-color"]=r["circle-color"][0],r["circle-stroke-color"]=r["circle-stroke-color"][0],r["icon-image"]=r["icon-image"][0]),r}function v(i){let e=w(i);const t={"icon-image":[]},s=e[e.length-1];e=e.slice(0,-1),t["icon-image"]=[s.iconImageUrl||""];let f=[];return e.forEach(n=>{if(n.type=="custom"){let u=-1;f.forEach((r,o)=>{r.key==n.key&&(u=o)}),u>-1?f[u].list.push(n):f.push({key:n.key,list:[n]})}}),f.forEach(n=>{s.circleType=="symbol"&&(n.list.forEach(u=>{t["icon-image"].unshift(u.iconImageUrl||""),t["icon-image"].unshift(u.value)}),t["icon-image"].unshift(["get",n.key]),t["icon-image"].unshift("match"))}),e.length==0&&(t["icon-image"]=t["icon-image"][0]),t}function z(i){const e=C(i),t=I(i),s={"fill-color":"rgba(103, 194, 58, 0.6)","fill-opacity":1,"fill-outline-color":"rgba(103, 194, 58, 1)"},f={"line-width":2,"line-color":"rgba(103, 194, 58, 1)"},n={"circle-radius":["interpolate",["linear"],["zoom"],1,6,10,8,22,12],"circle-stroke-width":["interpolate",["linear"],["zoom"],1,2,10,5,22,10],"circle-stroke-color":["interpolate",["linear"],["zoom"],0,"rgba(103, 194, 58, 0.6)",22,"rgba(103, 194, 58, 0.6)"],"circle-stroke-opacity":["interpolate",["linear"],["zoom"],0,1,22,1],"circle-color":"rgba(103, 194, 58, 0.6)"};if(!e)switch(console.warn("当前图层样式配置不存在,使用默认样式,还有执行到这里的情况?"),t){case"fill":return s;case"line":return f;case"circle":return n}switch(t){case"fill":const u=E(e);return u||s;case"line":const r=N(e);return r||f;case"circle":const o=O(e);return o||n;case"symbol":const a=v(e);return a||{"icon-image":""}}}function M(i){return new Promise((e,t)=>{const s=new FileReader;s.onload=()=>{s.result instanceof ArrayBuffer?e(s.result):t(new Error("Failed to read file as ArrayBuffer"))},s.onerror=t,s.readAsArrayBuffer(i)})}function B(i){const e=i.fileDirectory||{},t=e.ModelTiepoint||[],s=e.ModelPixelScale||[];if(t.length>=6&&s.length>=3){console.log("情况1:使用ModelTiepoint和ModelPixelScale计算边界",t,s);const f=t[3],n=t[4],u=s[0],r=s[1],o=i.getWidth(),a=i.getHeight(),l=f,c=n,g=f+o*u,d=n-a*Math.abs(r);return[l,d,g,c]}else if(e.ModelTransformation){console.log("情况2:使用ModelTransformation矩阵计算边界");const f=e.ModelTransformation;if(f&&f.length>=16){const n=i.getWidth(),u=i.getHeight(),r=f[3],o=f[7],a=r+n*f[0],l=o+u*f[5];return[r,o,a,l]}}else if(e.GeographicTypeGeoKey)return console.warn("Limited geographic information. Using approximated bounds."),[-180,-90,180,90];return console.warn("No geographic reference found. Using default bounds."),[-180,-90,180,90]}function U(i){i=i.replace(/^#/,"");let e=0,t=0,s=0;return i.length===3?(e=parseInt(i.charAt(0)+i.charAt(0),16),t=parseInt(i.charAt(1)+i.charAt(1),16),s=parseInt(i.charAt(2)+i.charAt(2),16)):i.length===6&&(e=parseInt(i.substring(0,2),16),t=parseInt(i.substring(2,4),16),s=parseInt(i.substring(4,6),16)),[e,t,s]}function R(i,e,t){return Math.max(e,Math.min(t,i))}function W(i,e){if(i)return e.find(t=>t.id===i)}exports.calculateBounds=B;exports.clamp=R;exports.getCircleStyle=O;exports.getFillStyle=E;exports.getLabelStyle=T;exports.getLayerId=F;exports.getLayerStyle=z;exports.getLayerType=I;exports.getLineLegendStyle=x;exports.getOutLineStyle=N;exports.getSourceId=J;exports.hexToRgb=U;exports.parseLayerPaintConfig=$;exports.parseStyleConfig=C;exports.readFileAsArrayBuffer=M;exports.resolveAssetById=W;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useId as L } from "vue";
|
|
2
|
-
import { d as S, a as E } from "./constant-
|
|
3
|
-
function
|
|
2
|
+
import { d as S, a as E } from "./constant-BMZ0sl-4.js";
|
|
3
|
+
function F(i, e) {
|
|
4
4
|
let t = {
|
|
5
5
|
marginTop: "-2px"
|
|
6
6
|
};
|
|
@@ -32,7 +32,7 @@ function z(i, e) {
|
|
|
32
32
|
}
|
|
33
33
|
return t;
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function T(i, e) {
|
|
36
36
|
if (i && typeof i != "string")
|
|
37
37
|
return i;
|
|
38
38
|
switch (e) {
|
|
@@ -65,7 +65,7 @@ function F(i, e) {
|
|
|
65
65
|
throw new Error(`Unsupported layer type: ${e}`);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function v(i) {
|
|
69
69
|
try {
|
|
70
70
|
return `layer-id-${i.id}`;
|
|
71
71
|
} catch (e) {
|
|
@@ -250,7 +250,7 @@ function x(i) {
|
|
|
250
250
|
};
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
|
-
function
|
|
253
|
+
function A(i) {
|
|
254
254
|
let e = C(i), t = JSON.parse(JSON.stringify(e));
|
|
255
255
|
const s = t.find((l) => l.type === "default"), f = t.filter((l) => l.type === "custom");
|
|
256
256
|
s && (t = [...f, s]), console.log("[getCircleStyle] 排序后的 circleConfigList:", t);
|
|
@@ -262,12 +262,12 @@ function v(i) {
|
|
|
262
262
|
{
|
|
263
263
|
type: "default",
|
|
264
264
|
renderMode: "color",
|
|
265
|
-
pointStyle: "
|
|
265
|
+
pointStyle: "",
|
|
266
266
|
pointTintColor: "rgba(103, 194, 58, 1)",
|
|
267
267
|
pointSize: 10
|
|
268
268
|
}
|
|
269
269
|
],
|
|
270
|
-
"icon-image": "custom-icon-default
|
|
270
|
+
"icon-image": "custom-icon-default--67c23a",
|
|
271
271
|
"icon-size": 1
|
|
272
272
|
};
|
|
273
273
|
if (console.log("[getCircleStyle] 默认配置:", n), u) {
|
|
@@ -292,17 +292,17 @@ function v(i) {
|
|
|
292
292
|
let k;
|
|
293
293
|
if (h.renderMode === "color") {
|
|
294
294
|
const w = (h.pointTintColor || "rgba(103, 194, 58, 1)").replace(/[^a-zA-Z0-9]/g, "");
|
|
295
|
-
k = `custom-icon-${h.key}-${
|
|
295
|
+
k = `custom-icon-${h.key}-${h.pointStyle || ""}-${w}`;
|
|
296
296
|
} else
|
|
297
|
-
k = h.iconImageName || "
|
|
297
|
+
k = h.iconImageName || "";
|
|
298
298
|
p.push(y(h.value)), p.push(k);
|
|
299
299
|
});
|
|
300
300
|
let b;
|
|
301
301
|
if (n.renderMode === "color") {
|
|
302
302
|
const h = (n.pointTintColor || "#67c23a").replace(/[^a-zA-Z0-9]/g, "");
|
|
303
|
-
b = `custom-icon-default-${
|
|
303
|
+
b = `custom-icon-default-${n.pointStyle || ""}-${h}`;
|
|
304
304
|
} else
|
|
305
|
-
b = n.iconImageName || "
|
|
305
|
+
b = n.iconImageName || "";
|
|
306
306
|
p.push(b), l["icon-image"] = p;
|
|
307
307
|
const m = ["match", ["get", g]];
|
|
308
308
|
c.forEach((h) => {
|
|
@@ -312,9 +312,9 @@ function v(i) {
|
|
|
312
312
|
let g;
|
|
313
313
|
if (n.renderMode === "color") {
|
|
314
314
|
const d = (n.pointTintColor || "#67c23a").replace(/[^a-zA-Z0-9]/g, "");
|
|
315
|
-
g = `custom-icon-default-${
|
|
315
|
+
g = `custom-icon-default-${n.pointStyle || ""}-${d}`;
|
|
316
316
|
} else
|
|
317
|
-
g = n.iconImageName || "
|
|
317
|
+
g = n.iconImageName || "";
|
|
318
318
|
l["icon-image"] = g, l["icon-size"] = (n.pointSize || 10) / 20;
|
|
319
319
|
}
|
|
320
320
|
return l;
|
|
@@ -329,7 +329,7 @@ function v(i) {
|
|
|
329
329
|
e = [...e];
|
|
330
330
|
const o = e[e.length - 1];
|
|
331
331
|
e.splice(e.length - 1, 1), r["circle-radius"] = [o.circleRadius], r["circle-stroke-width"] = [o.circleStrokeWidth], r["circle-color"] = [o.circleColor], r["circle-stroke-color"] = [o.circleStrokeColor], r["icon-image"] = [
|
|
332
|
-
o.iconImageUrl || "
|
|
332
|
+
o.iconImageUrl || ""
|
|
333
333
|
];
|
|
334
334
|
let a = [];
|
|
335
335
|
return e.forEach((l) => {
|
|
@@ -358,17 +358,17 @@ function v(i) {
|
|
|
358
358
|
"get",
|
|
359
359
|
l.key
|
|
360
360
|
]), r["circle-stroke-color"].unshift("match")), o.circleType == "symbol" && (l.list.forEach((c) => {
|
|
361
|
-
r["icon-image"].unshift(c.iconImageUrl || "
|
|
361
|
+
r["icon-image"].unshift(c.iconImageUrl || ""), r["icon-image"].unshift(c.value);
|
|
362
362
|
}), r["icon-image"].unshift(["get", l.key]), r["icon-image"].unshift("match"));
|
|
363
363
|
}), e.length == 0 && (r["circle-radius"] = r["circle-radius"][0], r["circle-stroke-width"] = r["circle-stroke-width"][0], r["circle-color"] = r["circle-color"][0], r["circle-stroke-color"] = r["circle-stroke-color"][0], r["icon-image"] = r["icon-image"][0]), r;
|
|
364
364
|
}
|
|
365
|
-
function
|
|
365
|
+
function $(i) {
|
|
366
366
|
let e = C(i);
|
|
367
367
|
const t = {
|
|
368
368
|
"icon-image": []
|
|
369
369
|
}, s = e[e.length - 1];
|
|
370
370
|
e = e.slice(0, -1), t["icon-image"] = [
|
|
371
|
-
s.iconImageUrl || "
|
|
371
|
+
s.iconImageUrl || ""
|
|
372
372
|
];
|
|
373
373
|
let f = [];
|
|
374
374
|
return e.forEach((n) => {
|
|
@@ -383,7 +383,7 @@ function A(i) {
|
|
|
383
383
|
}
|
|
384
384
|
}), f.forEach((n) => {
|
|
385
385
|
s.circleType == "symbol" && (n.list.forEach((u) => {
|
|
386
|
-
t["icon-image"].unshift(u.iconImageUrl || "
|
|
386
|
+
t["icon-image"].unshift(u.iconImageUrl || ""), t["icon-image"].unshift(u.value);
|
|
387
387
|
}), t["icon-image"].unshift(["get", n.key]), t["icon-image"].unshift("match"));
|
|
388
388
|
}), e.length == 0 && (t["icon-image"] = t["icon-image"][0]), t;
|
|
389
389
|
}
|
|
@@ -447,13 +447,12 @@ function U(i) {
|
|
|
447
447
|
const r = x(e);
|
|
448
448
|
return r || f;
|
|
449
449
|
case "circle":
|
|
450
|
-
const o =
|
|
450
|
+
const o = A(e);
|
|
451
451
|
return o || n;
|
|
452
452
|
case "symbol":
|
|
453
|
-
const a =
|
|
453
|
+
const a = $(e);
|
|
454
454
|
return a || {
|
|
455
|
-
"icon-image": "
|
|
456
|
-
// 默认图标图片
|
|
455
|
+
"icon-image": ""
|
|
457
456
|
};
|
|
458
457
|
}
|
|
459
458
|
}
|
|
@@ -490,20 +489,25 @@ function R(i) {
|
|
|
490
489
|
function P(i, e, t) {
|
|
491
490
|
return Math.max(e, Math.min(t, i));
|
|
492
491
|
}
|
|
492
|
+
function X(i, e) {
|
|
493
|
+
if (i)
|
|
494
|
+
return e.find((t) => t.id === i);
|
|
495
|
+
}
|
|
493
496
|
export {
|
|
494
497
|
P as a,
|
|
495
|
-
|
|
498
|
+
X as b,
|
|
496
499
|
D as c,
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
500
|
+
v as d,
|
|
501
|
+
I as e,
|
|
502
|
+
O as f,
|
|
503
|
+
F as g,
|
|
501
504
|
R as h,
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
505
|
+
x as i,
|
|
506
|
+
U as j,
|
|
507
|
+
B as k,
|
|
508
|
+
M as l,
|
|
509
|
+
N as m,
|
|
510
|
+
A as n,
|
|
511
|
+
T as p,
|
|
508
512
|
W as r
|
|
509
513
|
};
|