ry-vue-map 0.6.2 → 0.6.3

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.
@@ -1,762 +0,0 @@
1
- <template>
2
- <div class="map-style">
3
-
4
- <ry-map projection="EPSG:4326" :zoom="15" :minZoom="1" :maxZoom="maxZoom" :center="center" @load="load($event)"
5
- :isCrossHair="isRyMapTool" :isRight="true" :isRyMapTool="true" @drawSuccess="drawSuccess"
6
- @drawError="drawError" :isShowRangingTool="true" :isShowDrawTool="isRyMapTool" :bindMapClick="true"
7
- @mapClick="mapClick($event)" @crossHairClick="crossHairClick($event)" :bindMapMoveend="true"
8
- :isSwitchMapRight='true' :switchMapPosTop='60' :switchMapPosLeftOrRight="20" :switchMapHeight="40"  
9
- :switchMapDefaultTypeOrLayer="[1,2]" @mapMoveend="mapMoveend($event)"
10
- @loadDrawPolygonEvent="loadDrawPolygonEvent($event)"
11
- @changeSwitchMap="changeSwitchMap($event)" :isShowSwitchMap="true"
12
- >
13
- <!-- <template slot="maptool">
14
- <button>ry</button>
15
- </template> -->
16
- <!-- :hideAdd="true"
17
- :hidePoint="true"
18
- :hideCancel="true"
19
- :hideDelete="true"
20
- :hideSave="true"
21
- :hideLine="true"
22
- :hideArea="true" -->
23
- <!-- :layerType="2"
24
- :mapType="1" -->
25
- <template #marker="{mapDto}">
26
-
27
- <!-- <ry-lines
28
- :map="mapDto.map"
29
- :model="lineData1"
30
- :linenIsert="lineData2"
31
- :clearLiens="clearLiens"
32
- :startMarkerDto ="startMarkerDto"
33
- :endMarkerDto="endMarkerDto"
34
- :lineAppend="lineAppend"
35
- ></ry-lines> -->
36
- <!-- <ry-polygon :map="mapDto.map" :isShow="true" :polygonColor="colors" :model="polygonModel" :clear="isClear" @onLoad="onLoad($event)"></ry-polygon> -->
37
- <!-- <ry-polygon :isFit="false" :gpsType="gpsType" :map="mapDto.map" :model="polygonModel"></ry-polygon> -->
38
- <!-- <ry-polygon-geo :isFit="true" :gpsType="gpsType" :map="mapDto.map" :model="polygonModel6" > </ry-polygon-geo> -->
39
- <!-- <ry-polygon :isFit="true" :isShowAll="isShowAll" :map="mapDto.map" :isShow="true" :model="polygonModel" @onLoad="onLoad($event)"></ry-polygon> -->
40
- <ry-polygons
41
-
42
- :isFit="true" :map="mapDto.map"
43
- :gpsType="1"
44
- :modelArr="modelArr"></ry-polygons>
45
-
46
- <!-- <ry-polygons
47
- :map="mapDto.map"
48
- :modelArr="modelArr"
49
- @onLoad="onLoad($event)"
50
- :isShowPolygon="showPolygon"
51
- :isCheckPointHide="isCheckPoint"
52
- :inserts="inserts"
53
- :gpsType="gpsType"></ry-polygons>
54
- <ry-clusters-marker
55
- :src="src" text="个"
56
- fontColor="red"
57
- :fontSize="23"
58
- :distance="200"
59
- :gpsType="gpsType"
60
- @callback="clusterCallback($event)"
61
- :map="mapDto.map"
62
- :modelArr="modelArr2"
63
- :offsetY="0"></ry-clusters-marker> -->
64
-
65
- </template>
66
-
67
- </ry-map>
68
-
69
- <!-- <ry-map
70
- projection="EPSG:4326"
71
- :mapType="1"
72
- :zoom="15"
73
- :minZoom="1"
74
- :maxZoom="28"
75
- :bbox="bbox"
76
- :center="center"
77
- @load="load($event)"
78
-
79
- >
80
- <template slot="maptool">
81
- <button>ry</button>
82
- </template>
83
- </ry-map> -->
84
-
85
- <!-- <RyMapTool v-if="lMap" :lMap="lMap"
86
-
87
- :isCrossHair="true"
88
- :isRight="true"
89
- :isRyMapTool="true"
90
- @success="drawSuccess"
91
- @error="drawError"
92
- :isShowRangingTool="true"
93
- :isShowDrawTool="true"
94
- >
95
- <template >
96
- <button>ry</button>
97
- </template>
98
- </RyMapTool> -->
99
- <button @click="onClick()">测试</button>
100
- <button @click="onClick2()">测试2</button>
101
- <button @click="onClick3()">测试3</button>
102
-
103
- <aside class="aside-style">
104
- <el-button
105
- class="ele-text-primary" v-show="isShowPaly" style="padding:10px;" @click.stop="onShowPaly(false)">
106
- 轨迹回放 </el-button>
107
-
108
- <el-button
109
- class="ele-text-primary" v-show="!isShowPaly" style="padding:10px; color: red;" @click.stop="onShowPaly(true)">
110
- 结束轨迹回放 </el-button>
111
- </aside>
112
- </div>
113
- </template>
114
-
115
- <script>
116
- import dayjs from 'dayjs'
117
- import RyMap from '@/components/maps/ryMap/src/index.vue';
118
- import RyMapTool from '@/components/maps/ryMapTool/src/index.vue';
119
- import RyPolygon from '@/components/maps/ryPolygon/src/index.vue';
120
- import RyPolygons from '@/components/maps/ryPolygons/src/index.vue';
121
- import RyClustersMarker from '@/components/maps/ryClustersMarker/src/index.vue';
122
- import RyPolygonGeo from '@/components/maps/ryPolygonGeo/src/index.vue';
123
- import RyLines from '@/components/maps/ryLines/src/index.vue';
124
- import gJson from './3301';
125
- import gJson2 from "./331123";
126
- import gJson10 from "./330681";
127
- import {
128
- createPolygonBoundary,
129
- GPS
130
- } from "ry-map";
131
- import lineDataArr from './lineData.js';
132
- // import lineData2 from './lineData2.js';
133
-
134
- // import { convertWGS84,convertGCJ02 } from "ry-map/src/lzh";
135
-
136
- // import {
137
- // toDateString
138
- // } from 'ele-admin/packages/util';
139
-
140
- const g1 =
141
- "{\"type\":\"Feature\",\"bbox\":[120.15521468766134,30.17913,120.15548537675164,30.179627590685214],\"geometry\":{\"type\":\"Polygon\",\"coordinates\":[[[120.15521468766134,30.17961706012091],[120.155403,30.17913],[120.15548537675164,30.179627590685214],[120.15521468766134,30.17961706012091]]]},\"properties\":{\"perimeter\":139.0,\"squaremeter\":715.18,\"mu\":1.07,\"center\":[120.15535003220648,30.179378795342608],\"areacode\":\"3301\",\"geohash\":\"wtm7wj\",\"extend\":null}}";
142
- const g2 =
143
- "{\"type\":\"Feature\",\"bbox\":[120.16310703603898,30.19646189535682,120.16429249947886,30.19696148364998],\"geometry\":{\"type\":\"Polygon\",\"coordinates\":[[[120.16310703603898,30.196910677880176],[120.16325945237935,30.19646189535682],[120.16429249947886,30.196648182533405],[120.16339493378612,30.19696148364998],[120.16310703603898,30.196910677880176]]]},\"properties\":{\"perimeter\":275.0,\"squaremeter\":3354.54,\"mu\":5.03,\"center\":[120.16369976775891,30.1967116895034],\"areacode\":\"3301\",\"geohash\":\"wtm7y3\",\"extend\":null}}"
144
- const g3 =
145
- "{\"type\":\"Feature\",\"bbox\":[120.156523,30.175227,120.157111,30.17557],\"geometry\":{\"type\":\"Polygon\",\"coordinates\":[[[120.156523,30.175545],[120.156875,30.175227],[120.157111,30.17557],[120.156523,30.175545]]]},\"properties\":{\"perimeter\":150.0,\"squaremeter\":1046.35,\"mu\":1.56,\"center\":[120.156817,30.1753985],\"areacode\":\"330102001051\",\"geohash\":\"wtm7wj\",\"extend\":null}}";
146
- const g4 =
147
- "{\"type\":\"Feature\",\"bbox\":[120.153496,30.182888,120.154153,30.183264],\"geometry\":{\"type\":\"Polygon\",\"coordinates\":[[[120.153496,30.183246],[120.15385760556681,30.183180460251048],[120.154152,30.183264],[120.15400261288897,30.183120670502092],[120.154153,30.182913],[120.15385966728229,30.182965354602516],[120.153513,30.182888],[120.15357927397686,30.18307737447699],[120.153496,30.183246]]]},\"properties\":{\"perimeter\":219.0,\"squaremeter\":1549.5,\"mu\":2.32,\"center\":[120.1538245,30.183076],\"areacode\":\"330102001051\",\"geohash\":\"wtm7wn\",\"extend\":null}}";
148
-
149
- const g5 = { "type" : "Feature", "geometry" : { "type" : "Polygon", "coordinates" : [[[117.38359500000934, 40.225653000185844], [117.37169399977836, 40.216044000430315], [117.37727099975689, 40.187872999939032], [117.38841300005993, 40.178132000391543], [117.35885300026587, 40.176848000534847], [117.3465460001978, 40.167488999717591], [117.35175400024696, 40.158968999819535], [117.33876800034295, 40.140978000234554], [117.31954199956374, 40.140466000005972], [117.30150999988666, 40.135934000553732], [117.29579599988551, 40.124050000207376], [117.28326899956471, 40.121698000562333], [117.26951999954838, 40.112200999676475], [117.25914100025705, 40.110096999776772], [117.24314500004175, 40.116232000306638], [117.21793400025399, 40.097286999895175], [117.20652400018253, 40.095440000155918], [117.17854350038226, 40.084184500014715], [117.17017799951509, 40.07141100001769], [117.15488100005814, 40.074779999797215], [117.14925799975697, 40.067775000515894], [117.12959300031673, 40.062676000097383], [117.10681600035821, 40.070857999696955], [117.08291199968914, 40.068799000073852], [117.07542499976398, 40.063565999771129], [117.05686199988145, 40.060890000473194], [117.03285199972004, 40.0486830005201], [117.01883800007374, 40.031328999733603], [116.99994350019244, 40.031310499779806], [116.96707899999592, 40.040374000459792], [116.9563190002217, 40.05054400000563], [116.94103300037273, 40.040717000089558], [116.92462199990541, 40.05361200029364], [116.9136429999246, 40.045573000093952], [116.90863500010528, 40.051607000462752], [116.8682639999837, 40.039351000048669], [116.84995300003095, 40.052677000343351], [116.81742500006374, 40.046288999837543], [116.81718899997247, 40.027314999887381], [116.80350200011731, 40.031191999711098], [116.79546099982531, 40.028307999814388], [116.77913000034926, 40.033316000533034], [116.76727300034872, 40.014228999868521], [116.76831499983746, 39.989588000286062], [116.75061900036667, 39.960205999707171], [116.76256299988256, 39.954793000096913], [116.77301399979626, 39.954939999681301], [116.77785500000834, 39.936608000558806], [116.77534600031777, 39.929674000055115], [116.77895799961209, 39.894963000142411], [116.7855879995866, 39.883861999931412], [116.79823700013753, 39.887990000538139], [116.81390799975441, 39.888886000488583], [116.84628399990675, 39.869122000080267], [116.85340500004077, 39.857644000470316], [116.88151200027869, 39.843089000157306], [116.88978599962422, 39.832491999805995], [116.90073800015864, 39.829137999818897], [116.89669399982824, 39.847934000553721], [116.91015299996104, 39.846897000396325], [116.92233299956831, 39.829271999703053], [116.92358799988631, 39.810968000073217], [116.94523699998763, 39.786588999982428], [116.94237999953737, 39.780578999821046], [116.91634100023703, 39.779840999962232], [116.904621000259, 39.762353000190842], [116.89356699951747, 39.757995999815591], [116.90319700024145, 39.74887400003513], [116.90591100039239, 39.730673999805276], [116.88389599960078, 39.724514999967312], [116.87705299969628, 39.715385999864054], [116.8830680000882, 39.702412000513448], [116.89976899953979, 39.685790000208385], [116.9007040003894, 39.675565999970956], [116.88672699975132, 39.671842000008326], [116.87775799983194, 39.674465000459463], [116.85809000025336, 39.669399499787119], [116.84589800009269, 39.663244000110581], [116.84515800014162, 39.654012999800159], [116.82664099968247, 39.643225999680169], [116.82472999968979, 39.635278000079666], [116.83523600034118, 39.623008999965407], [116.82952899976362, 39.618317000329341], [116.8064999998752, 39.614707000227952], [116.78623199960714, 39.609629999924607], [116.77425400032189, 39.592807000242942], [116.76915399985728, 39.603968000522855], [116.75795799976197, 39.61358899993246], [116.71974200009333, 39.615578999970921], [116.70013799986884, 39.613477000163471], [116.70023799998376, 39.608843000504123], [116.72273299952838, 39.592419000336633], [116.69779999997013, 39.587856000354179], [116.68887700037328, 39.595725999954993], [116.6412169995649, 39.605572999894093], [116.63739799971802, 39.594882999750666], [116.62399000013841, 39.592719999828205], [116.60610850020714, 39.607249499864565], [116.59725200007983, 39.610777999804895], [116.59655100012867, 39.621031000480343], [116.5852129997802, 39.623208000149134], [116.56590699980825, 39.619136000326193], [116.56298099977334, 39.603153999857284], [116.5487059997821, 39.59745599969466], [116.51852900031315, 39.595600000439731], [116.52125199997988, 39.571947999700456], [116.49995800006172, 39.554078000299512], [116.4716379998938, 39.548292999722207], [116.47092100010411, 39.538417000244408], [116.43628400000671, 39.527893999708397], [116.43356399957895, 39.517308999910483], [116.41959400016299, 39.514917000219441], [116.4126320001667, 39.521354000286919], [116.40081900039661, 39.521937000192452], [116.41466899967463, 39.495365999741125], [116.43472299996654, 39.485021000219035], [116.44212000023788, 39.475140000510692], [116.44378000034681, 39.461323000056439], [116.44957399954046, 39.456140000260859], [116.44490500006577, 39.445557000555198], [116.43592899982355, 39.440266000275756], [116.42162300020141, 39.439301999887448], [116.41238899975258, 39.447252000479466], [116.38696700012702, 39.451314999887416], [116.37071199965908, 39.451700999701416], [116.33808999985365, 39.447437000017601], [116.31963799969401, 39.461522000240166], [116.31396199964661, 39.471844000500255], [116.29802400030746, 39.485875000031285], [116.27318699978025, 39.490329000383099], [116.24862000001303, 39.50164499971703], [116.23962499979393, 39.514977000288411], [116.24070800027403, 39.538164000268466], [116.21527234624182, 39.577570626783029], [116.19470300024329, 39.576789999958578], [116.18768000013199, 39.581046000172819], [116.14843099959103, 39.578754999743524], [116.1411520002647, 39.567832999693223], [116.09910300010347, 39.569775000216111], [116.09747799980994, 39.573769000039363], [116.06061999981318, 39.570354999983294], [116.03052999985971, 39.571214000026146], [116.00959400026295, 39.586577999874862], [116.00207599980763, 39.576821000488849], [115.98735499993336, 39.582319000421592], [115.98558500014769, 39.592623999897739], [115.97089800004278, 39.593344999871874], [115.97060099983628, 39.569428000401956], [115.95747799990988, 39.564518999752067], [115.94432100021402, 39.565253000325754], [115.93841999968333, 39.57503199982699], [115.92425899955322, 39.583667000531705], [115.92285499955869, 39.592481000497855], [115.90746400026342, 39.598467000451762], [115.90136399954895, 39.595334999910392], [115.90239699952201, 39.568145999738135], [115.88789799999279, 39.565727999747423], [115.88140500004079, 39.54987699992364], [115.85963499975549, 39.546750000512191], [115.84699699971179, 39.551744999732023], [115.84011899999189, 39.542259000252727], [115.82233099987582, 39.540334000513781], [115.82105699958095, 39.511497999932828], [115.80450799994435, 39.508401000106119], [115.76231400029098, 39.511631999816984], [115.74532800028703, 39.51181400011609], [115.73764400027051, 39.523362000256157], [115.73206400015351, 39.542379000390611], [115.72117599987257, 39.547166999957142], [115.71161999986316, 39.560213999976156], [115.68609600003049, 39.564934000004143], [115.68810700013796, 39.577119999888112], [115.68516600031069, 39.589663000047494], [115.67496500023458, 39.595443000394198], [115.66456299988261, 39.607235000095216], [115.65168000023186, 39.600248999891505], [115.63778799991633, 39.598150000222404], [115.62750299956383, 39.603056999880664], [115.62077399952057, 39.59841900003687], [115.61224850026815, 39.603204500387449], [115.59348300004046, 39.598621000358946], [115.58014299999957, 39.588672000212682], [115.56553700003258, 39.590947999950288], [115.5543260001449, 39.606983000165371], [115.53944800022509, 39.617797999777906], [115.52660799985938, 39.610432000036838], [115.51315399995724, 39.611965999731183], [115.51603000038426, 39.638930000319306], [115.50055399986729, 39.650881000158108], [115.47220300006848, 39.649176999818735], [115.47229799995284, 39.65450500000577], [115.48521800041044, 39.66768199972455], [115.48248300019031, 39.680143999745837], [115.49337399971034, 39.690272000052801], [115.48593900038463, 39.700375000106249], [115.48183099980088, 39.730974000150013], [115.4761769998687, 39.74110899988051], [115.46252099964443, 39.739534000094068], [115.44074600002796, 39.747894999854395], [115.43006200016123, 39.77468799975145], [115.43823200010684, 39.783634000408824], [115.45363600000144, 39.782014000345896], [115.47713600002646, 39.797385000517409], [115.48585099992374, 39.795188999972424], [115.50040100000626, 39.782090000253334], [115.50663399965947, 39.787228999818524], [115.53813199979197, 39.795076000157337], [115.54606449957703, 39.793915499700631], [115.56059699975185, 39.803830000054518], [115.56314100015709, 39.812388999952418], [115.538555000413, 39.825470999786887], [115.51977899970109, 39.829847000139011], [115.50445199976002, 39.843575000086219], [115.51512199988042, 39.856709000520027], [115.51894800005027, 39.875119999688309], [115.50277799990488, 39.882983999911744], [115.51487099999667, 39.900337999798921], [115.50054600039766, 39.912326000444637], [115.48341399995616, 39.920616000528071], [115.46966599998598, 39.935820000192905], [115.43545899993296, 39.950857000250437], [115.41969299953234, 39.949691000439373], [115.41728199986449, 39.954013000099906], [115.41956800006324, 39.977795999685668], [115.42788799973141, 39.987816000408145], [115.4415559996097, 39.991892000415532], [115.44240600013688, 40.010442999744669], [115.44968100017809, 40.026112000168723], [115.46652199979053, 40.032624000097599], [115.48430699976825, 40.049386000563516], [115.5023390003447, 40.057898000092678], [115.50317100004168, 40.064193999953204], [115.52180899978555, 40.075222000395058], [115.53635899986796, 40.074669000074323], [115.54652800026702, 40.080222999891589], [115.56993899978511, 40.101490000363299], [115.57482200013521, 40.094633999859241], [115.59740500014072, 40.092562000535963], [115.60055199957515, 40.113817000454276], [115.60583899967014, 40.116042999684737], [115.64478299963582, 40.116310000306328], [115.64889599955075, 40.126421999875447], [115.68135099974893, 40.137474000524776], [115.70290800010423, 40.133390000148438], [115.71879599983561, 40.127681000377891], [115.74165399993217, 40.133507000147972], [115.74892499978898, 40.14365100029346], [115.74408699971536, 40.15244200009829], [115.75058800003626, 40.162643000174398], [115.761971999808, 40.165109999726781], [115.76666699958241, 40.174928000127181], [115.78351599956375, 40.177248000095176], [115.78771299975517, 40.1670199996733], [115.80069400032789, 40.151754999893399], [115.81998100032297, 40.148840000365794], [115.84761899961723, 40.1481200004377], [115.83827300029884, 40.167001999742524], [115.85476800014317, 40.183581999909393], [115.86610899973061, 40.186261000244997], [115.88199600031521, 40.208041000092123], [115.87818199979949, 40.213047999865353], [115.89276499960511, 40.234459999829198], [115.90547600031721, 40.234100000314811], [115.91325400017206, 40.24713699987268], [115.92720100032602, 40.254417000144485], [115.95693199991194, 40.256683000320265], [115.96038099978341, 40.264490999759857], [115.94052200039005, 40.287843000154396], [115.9342659996762, 40.302820000142958], [115.93675700033532, 40.312978000034718], [115.92696500023465, 40.317553999717347], [115.91662299995153, 40.33552099999423], [115.91029799965304, 40.365737000362344], [115.89768299977072, 40.358995999765625], [115.88288099975841, 40.360191000014709], [115.87019400015299, 40.357177000418289], [115.85862800008215, 40.361665999686181], [115.84283500023514, 40.375762000416046], [115.82649999967532, 40.377622999901575], [115.81205399989221, 40.385200000379768], [115.80894599955832, 40.398353999937171], [115.79888999987361, 40.418767999743466], [115.79091399988124, 40.429341999933399], [115.77545600019437, 40.437318999971922], [115.76590400036935, 40.448360000113951], [115.76289400005817, 40.461238000433411], [115.77105300039568, 40.484930000319309], [115.73935800017159, 40.49103200022671], [115.7297139997014, 40.503442000547921], [115.73427300039873, 40.511702000147238], [115.74825300027578, 40.538638000343497], [115.75488699953542, 40.537898000392431], [115.78519899983405, 40.56002500005377], [115.80741500000227, 40.555698000162636], [115.81534199953376, 40.56211900039159], [115.82140000010997, 40.586302000437001], [115.88216099983038, 40.595322000010356], [115.90368699965541, 40.617244000110588], [115.92184099956251, 40.611557000455264], [115.9378369997778, 40.610160999930258], [115.9476859998091, 40.600224000337391], [115.96639300003699, 40.600272999899062], [115.97623899992993, 40.577855000308091], [115.9966850003126, 40.574458000136644], [115.99992400039241, 40.586976000042398], [116.01369999985513, 40.597148999726585], [116.02460900020526, 40.595849000031365], [116.05522199999541, 40.607584999847916], [116.08804400003066, 40.611162000226159], [116.10474400033536, 40.614640000535644], [116.11397999997712, 40.623776000062378], [116.10515200026464, 40.642482000244172], [116.10744199974852, 40.647407999879363], [116.12581699995462, 40.65417000054515], [116.13611199986894, 40.665669000224227], [116.15187500013121, 40.66204700046876], [116.15908900005741, 40.66622599983009], [116.17456100038987, 40.711034000418863], [116.1802449999069, 40.717150000072479], [116.19712100023401, 40.714190000268331], [116.21329899984903, 40.731943999715838], [116.20827200005283, 40.743361000110099], [116.2187850001277, 40.753307000118014], [116.2296949996246, 40.774113000015006], [116.22893499965062, 40.781808999685666], [116.24174599957826, 40.790348000459915], [116.26323400034892, 40.773507999994251], [116.26807100037638, 40.76192099985434], [116.28162100020904, 40.762283000360242], [116.30144599983305, 40.750930000219398], [116.30147999960241, 40.762019999923098], [116.3078049999009, 40.769457000240436], [116.33143299953338, 40.771467000301868], [116.34530299973369, 40.768607999759411], [116.37592700003108, 40.771737000162489], [116.38894299951983, 40.776857999796903], [116.40408399987678, 40.777764000208492], [116.40960399992468, 40.760440999952266], [116.43251899995198, 40.765394999979321], [116.44761700012452, 40.764485000282605], [116.45927099975688, 40.770968999819559], [116.45250399975987, 40.795263000487125], [116.43621100023756, 40.805341000287001], [116.4318469995394, 40.816610000151456], [116.4000955003072, 40.831625500116786], [116.39901800008067, 40.839060000318796], [116.38331299979518, 40.860380999683457], [116.3705330003977, 40.867256000164332], [116.32813699952294, 40.904180000506699], [116.32816399986871, 40.918047999715441], [116.33475499984343, 40.929256000364205], [116.35962400004757, 40.941212000433552], [116.37209399953849, 40.934479000205727], [116.38561599987861, 40.912452999806135], [116.3956840001166, 40.903712000508449], [116.40905799992686, 40.898799999720268], [116.42416499961507, 40.901439000009873], [116.43076399995869, 40.897314000440815], [116.47054299975969, 40.898018999677163], [116.46905599953482, 40.910427999952276], [116.46127799967996, 40.929627000385835], [116.44153600028619, 40.952657000320357], [116.44961599967871, 40.976687000504739], [116.45755799990184, 40.98276700029686], [116.46803700020746, 40.976384000021653], [116.47932199991044, 40.980642000328089], [116.48700399983477, 40.976654999928371], [116.51061699967488, 40.973735000170166], [116.51340899982551, 40.979774999916344], [116.53528999983371, 40.988904000019659], [116.56804300028432, 40.986561999936384], [116.57986899975458, 40.977936999692815], [116.59386899965466, 40.973917000469271], [116.60774600017783, 40.982122000230163], [116.60967300000902, 41.002887000035059], [116.61595199998487, 41.014323000406193], [116.61602499975402, 41.025954999923385], [116.60801399994625, 41.035367000486758], [116.6123209998143, 41.047186999680321], [116.62508800041098, 41.058909499773677], [116.64297100041142, 41.056012000153714], [116.65287100009664, 41.049075000410994], [116.67762899967863, 41.03978099989331], [116.68335000000252, 41.042909000250233], [116.69102200036514, 41.019785000477441], [116.67684999972778, 40.993460999725414], [116.6785590002977, 40.980895000304088], [116.67156599977113, 40.970236999837709], [116.68114499994181, 40.960232999853133], [116.68509000020345, 40.948755000243125], [116.70006600014585, 40.932677999889847], [116.71170499998584, 40.93438900055196], [116.71835700007557, 40.927808000139123], [116.70746699970232, 40.908468000397932], [116.74565599992457, 40.889625000193632], [116.75230399982979, 40.882044000430312], [116.76474799992036, 40.879257000510222], [116.7867320001817, 40.862703999789801], [116.79592200040008, 40.849587000139991], [116.81714699983422, 40.841258000056712], [116.83130299973368, 40.839947999900346], [116.8499150000772, 40.833687999901315], [116.85493200031158, 40.824013999846272], [116.86924800039492, 40.820008000369], [116.8803529998911, 40.799658999962958], [116.89012199983051, 40.792468000198085], [116.89212000023792, 40.7756109998478], [116.91757599963273, 40.772347000413788], [116.92217300028381, 40.755182000249192], [116.92045999952938, 40.743404000294447], [116.93492500018863, 40.738389000152267], [116.93889299971227, 40.726748000220084], [116.95002799969245, 40.721448000424914], [116.95872199952078, 40.708084000176541], [116.99815799969201, 40.695221999695605], [117.0244289997986, 40.690629000128297], [117.04317500002628, 40.698750000512177], [117.07748799957153, 40.700459000182775], [117.10545799978695, 40.705345999818064], [117.11025299967628, 40.698221000398917], [117.14603499951568, 40.695505000155663], [117.16028300006042, 40.697547999940298], [117.17229099982978, 40.691999000353633], [117.17661000025134, 40.696039000499525], [117.19972299951689, 40.693174999726523], [117.22505200024966, 40.683227999672511], [117.23570699967831, 40.675075000510901], [117.25506600029576, 40.679694000377879], [117.27194299976964, 40.664929000273219], [117.2854929996023, 40.658511000182557], [117.30436000001407, 40.657672000162734], [117.33012099998427, 40.661833000492607], [117.33962300020141, 40.672229999714773], [117.35536599954128, 40.673091999895917], [117.384078999846, 40.681982999815659], [117.4140479996156, 40.684604000174545], [117.44372300021632, 40.677689999693769], [117.45812699986118, 40.671983000015473], [117.47341899998696, 40.675956999815753], [117.48856399962892, 40.673140000310809], [117.49923699988767, 40.665892999762207], [117.49647900040566, 40.644103000353255], [117.49460600036673, 40.634837000227435], [117.47236599999098, 40.633964000438311], [117.46527100015658, 40.645482000094262], [117.41572999983964, 40.636108000383956], [117.4069179999658, 40.604817999950797], [117.41653099990583, 40.580576999928667], [117.41317399978038, 40.567267000371828], [117.39722800007223, 40.572430000144436], [117.38268700040476, 40.559806999893169], [117.36949600004039, 40.565092999942067], [117.35951300012493, 40.574158999838005], [117.34363600000142, 40.578349999752731], [117.32782800036193, 40.574859999789226], [117.30399000003854, 40.575075999857575], [117.28958500034753, 40.565652000539444], [117.25965199954021, 40.556624999743974], [117.24328700029491, 40.546958000011728], [117.24401499969258, 40.536001000146086], [117.25383100000067, 40.517962000146269], [117.24098300016544, 40.510761999966405], [117.20726800031798, 40.511192000010851], [117.20282799971244, 40.495328000486893], [117.21062899972867, 40.493697999962762], [117.2294129999101, 40.467607000063083], [117.2283359997067, 40.456603999874744], [117.25700799991932, 40.439871999892944], [117.25051099978282, 40.428532000351595], [117.24355400001718, 40.427793000446684], [117.22776600040061, 40.415363500125466], [117.22602500015364, 40.402562999782674], [117.23323099971094, 40.397383000125387], [117.22219499979951, 40.384657999667013], [117.21720199977256, 40.374115000007293], [117.22023400019896, 40.367758000031756], [117.23537799979488, 40.369135999726666], [117.24795999995411, 40.352986000503563], [117.25587199969311, 40.336402000152248], [117.26859700015154, 40.331047000518709], [117.26492699998107, 40.324208999945427], [117.26795999955436, 40.307628999778558], [117.28191800021557, 40.300241999968364], [117.28785799984689, 40.291870999746891], [117.28936400004864, 40.277067999688484], [117.33003699970789, 40.276252999876078], [117.33572500030857, 40.242677000143487], [117.34703500026512, 40.234390000198403], [117.36466300019731, 40.231666000485575], [117.38359500000934, 40.225653000185844]]] }, "properties" : { "code" : "11", "name" : "北京市", "parent_code" : "0", "level" : 1, "lon" : 116.43424180474648, "lat" : 40.201253765664767 }, "bbox" : [115.41728199986449, 39.439301999887448, 117.49923699988767, 41.058909499773677] };
150
- const polygonModel1 = {
151
- fillColor: '#000',
152
- stroke: 'red',
153
- width: 1,
154
- text: '测试1',
155
- geo: g1,
156
- id: 'ceshi1',
157
- };
158
-
159
- const polygonModel2 = {
160
- fillColor: '#000',
161
- stroke: 'red',
162
- width: 1,
163
- text: '测试2',
164
- geo: g2,
165
- id: 'ceshi2',
166
- type: 1
167
- };
168
-
169
- const polygonModel3 = {
170
- fillColor: '#000',
171
- stroke: 'red',
172
- width: 1,
173
- text: '测试3',
174
- geo: g3,
175
- id: 'ceshi3',
176
- };
177
-
178
- const polygonModel4 = {
179
- fillColor: '#000',
180
- stroke: 'red',
181
- width: 1,
182
- text: '测试4',
183
- geo: g4,
184
- id: 'ceshi4',
185
- };
186
-
187
- const polygonModel5 = {
188
- fillColor: 'transparent',
189
- stroke: '#F7B500',
190
- strokeWidth: 4,
191
- lineDash: [1, 2, 3, 4, 5, 6],
192
- geo: g5,
193
- id: 'ceshi5',
194
- };
195
-
196
- const polygonModel6 = {
197
- fillColor: 'transparent',
198
- stroke: '#F7B500',
199
- strokeWidth: 4,
200
- lineDash: [1, 2, 3, 4, 5, 6],
201
- geo: g5,
202
- id: 'ceshi6',
203
- };
204
-
205
-
206
-
207
- const testArr= [
208
- {
209
- "fillColor": "rgba(184, 233, 134, 0.56)",
210
- "stroke": "rgba(23, 168, 162, 0.56)",
211
- "width": 1,
212
- "text": "华隆果菜公司柑橘基地 814.55",
213
- "geo":{"type":"Feature","bbox":[113.65642,23.555516,113.667082,23.564503],"geometry":{"type":"Polygon","coordinates":[[[113.663666,23.562043],[113.664454,23.56103],[113.667082,23.559452],[113.664788,23.555516],[113.659421,23.558964],[113.658476,23.559786],[113.657778,23.5604],[113.656991,23.560022],[113.656425,23.560951],[113.65642,23.561807],[113.657281,23.562909],[113.65885,23.563927],[113.660055,23.564483],[113.661054,23.564503],[113.662136,23.564351],[113.662323,23.562471],[113.663666,23.562043]]]},"properties":{"perimeter":3214.0,"squaremeter":543038.45,"mu":814.55,"center":[113.661751,23.5600095],"areacode":"440117002","geohash":"ws0y42"}},
214
- "id": 1,
215
- "coordinates": [[[113.663666,23.562043],
216
- [
217
- 113.664454,
218
- 23.56103
219
- ],
220
- [
221
- 113.667082,
222
- 23.559452
223
- ],
224
- [
225
- 113.664788,
226
- 23.555516
227
- ],
228
- [
229
- 113.659421,
230
- 23.558964
231
- ],
232
- [
233
- 113.658476,
234
- 23.559786
235
- ],
236
- [
237
- 113.657778,
238
- 23.5604
239
- ],
240
- [
241
- 113.656991,
242
- 23.560022
243
- ],
244
- [
245
- 113.656425,
246
- 23.560951
247
- ],
248
- [
249
- 113.65642,
250
- 23.561807
251
- ],
252
- [
253
- 113.657281,
254
- 23.562909
255
- ],
256
- [
257
- 113.65885,
258
- 23.563927
259
- ],
260
- [
261
- 113.660055,
262
- 23.564483
263
- ],
264
- [
265
- 113.661054,
266
- 23.564503
267
- ],
268
- [
269
- 113.662136,
270
- 23.564351
271
- ],
272
- [
273
- 113.662323,
274
- 23.562471
275
- ],
276
- [
277
- 113.663666,
278
- 23.562043
279
- ]
280
- ]
281
- ]
282
- },
283
- {
284
- "fillColor": "rgba(184, 233, 134, 0.56)",
285
- "stroke": "rgba(23, 168, 162, 0.56)",
286
- "width": 1,
287
- "text": "荔博园基地 351.84",
288
- "geo": {"type":"Feature","bbox":[113.613464,23.582561,113.619043,23.587407],"geometry":{"type":"Polygon","coordinates":[[[113.613828,23.587164],[113.615595,23.587371],[113.617719,23.587407],[113.618428,23.585626],[113.619043,23.584102],[113.617734,23.582901],[113.615234,23.582561],[113.613757,23.584188],[113.613618,23.584188],[113.613464,23.585225],[113.613828,23.587164]]]},"properties":{"perimeter":1822.0,"squaremeter":234564.97,"mu":351.84,"center":[113.6162535,23.584984],"areacode":"440117002","geohash":"ws0y1m"}},
289
- "id": 2,
290
- "coordinates": [
291
- [
292
- [
293
- 113.613828,
294
- 23.587164
295
- ],
296
- [
297
- 113.615595,
298
- 23.587371
299
- ],
300
- [
301
- 113.617719,
302
- 23.587407
303
- ],
304
- [
305
- 113.618428,
306
- 23.585626
307
- ],
308
- [
309
- 113.619043,
310
- 23.584102
311
- ],
312
- [
313
- 113.617734,
314
- 23.582901
315
- ],
316
- [
317
- 113.615234,
318
- 23.582561
319
- ],
320
- [
321
- 113.613757,
322
- 23.584188
323
- ],
324
- [
325
- 113.613618,
326
- 23.584188
327
- ],
328
- [
329
- 113.613464,
330
- 23.585225
331
- ],
332
- [
333
- 113.613828,
334
- 23.587164
335
- ]
336
- ]
337
- ]
338
- }
339
- ]
340
-
341
- export default {
342
- components: {
343
- RyMap,
344
- RyMapTool,
345
- RyPolygon,
346
- RyPolygons,
347
- RyClustersMarker,
348
- RyPolygonGeo,
349
- },
350
- data() {
351
- return {
352
- map: null,
353
- lMap: null,
354
- polygonColorObj: null,
355
- bbox: [],
356
- isClear: false,
357
- geoJson: null,
358
- colors: [],
359
- // modelArr:testArr,
360
- modelArr:[polygonModel1,polygonModel2,polygonModel3,polygonModel4,polygonModel5],
361
- modelArr2: [
362
- {id:'ceshi1', x:120.15535003220648,y:30.179378795342608},
363
- {id:'ceshi2',x:120.16369976775891,y:30.1967116895034},
364
- {id:'ceshi3',x:120.156817,y:30.1753985} ,
365
- {id:'ceshi4',x:120.1538245,y:30.183076} ,
366
- ],
367
- center: [ 120.2687149,29.8142052],
368
- polygonColors: [],
369
- remove: 'ceshi1',
370
- removes: [],
371
- ranges: [],
372
- restFit: true,
373
- range: 'ceshi2',
374
- isFit: false,
375
- insert: null,
376
- showPolygon: null,
377
- showPolygons: [{
378
- id: 'ceshi2',
379
- isShow: false
380
- }],
381
- inserts: [],
382
- isShowAll: false,
383
- // isShow:true,
384
- polygonModel: null,
385
- geo: g1,
386
- mapTool: null,
387
- isCheckPoint: null,
388
- gpsType: 0,
389
- isRyMapTool: true,
390
- maxZoom: 18,
391
- polygonModel5: polygonModel5,
392
- polygonModel6:polygonModel6,
393
- src:require("@/assets/1.png"),
394
- lineData1:null,
395
- lineData2:null,
396
- clearLiens:false,
397
- // startMarkerDto:null,
398
- // endMarkerDto:null,
399
- startMarkerDto: {
400
- url:require('@/assets/startpoint.png'),
401
- height:23,
402
- offset:[8, -11],
403
- width:28
404
- },
405
- endMarkerDto:{
406
- url:require('@/assets/stoppoint.png'),
407
- height:16,
408
- offset:[0, -8],
409
- width:16
410
- },
411
- lineAppend:[],
412
- isShowPaly:true,
413
- layerArr:[2,2],
414
- };
415
- },
416
- created() {
417
- console.log(this.startMarkerDto);
418
- const obj = {
419
- isAppend:false,
420
- color: 'green',
421
- width: 2,
422
- pointArr: [],
423
- creaTime:[],
424
- zIndex: 1,
425
- };
426
-
427
- const obj2 = {
428
- isAppend:false,
429
- color: 'red',
430
- width: 2,
431
- pointArr: [],
432
- creaTime:[],
433
- zIndex: 1,
434
- };
435
-
436
-
437
- const obj3 = {
438
- isAppend:false,
439
- color: 'red',
440
- width: 2,
441
- pointArr: [],
442
- creaTime:[],
443
- zIndex: 1,
444
- };
445
-
446
- const obj4 = {
447
- isAppend:false,
448
- color: 'red',
449
- width: 2,
450
- pointArr: [],
451
- creaTime:[],
452
- zIndex: 1,
453
- };
454
-
455
- const obj5 = {
456
- isAppend:false,
457
- color: 'green',
458
- width: 2,
459
- pointArr: [],
460
- creaTime:[],
461
- zIndex: 1,
462
- };
463
-
464
- const obj6 = {
465
- isAppend:false,
466
- color: 'green',
467
- width: 2,
468
- pointArr: [],
469
- creaTime:[],
470
- zIndex: 1,
471
- };
472
-
473
- console.log(lineDataArr);
474
-
475
- lineDataArr[0].forEach(r=> {
476
- obj.pointArr.push([r.lng,r.lat]);
477
- obj.creaTime.push(r.creaTime);
478
- });
479
-
480
- // this.lineData1=obj;
481
- const len2=obj.pointArr.length;
482
- let i2=0;
483
- let setId = setInterval(r=> {
484
- this.lineAppend=obj.pointArr[i2];
485
- i2+=1;
486
- if(i2 >=len2){
487
- clearInterval(setId);
488
- }
489
- },1000);
490
-
491
-
492
- lineDataArr[1].forEach(r=> {
493
- obj2.pointArr.push([r.lng,r.lat]);
494
- obj2.creaTime.push(r.creaTime);
495
- });
496
- // this.lineData1=obj;
497
- // setTimeout(r=> {
498
- // this.lineData1=obj;
499
-
500
- // },3000);
501
-
502
-
503
-
504
- lineDataArr[2].forEach(r=> {
505
- obj3.pointArr.push([r.lng,r.lat]);
506
- obj3.creaTime.push(r.creaTime);
507
- });
508
-
509
- lineDataArr[3].forEach(r=> {
510
- obj4.pointArr.push([r.lng,r.lat]);
511
- obj4.creaTime.push(r.creaTime);
512
- });
513
-
514
- lineDataArr[4].forEach(r=> {
515
- obj5.pointArr.push([r.lng,r.lat]);
516
- obj5.creaTime.push(r.creaTime);
517
- });
518
-
519
- lineDataArr[5].forEach(r=> {
520
- obj6.pointArr.push([r.lng,r.lat]);
521
- obj6.creaTime.push(r.creaTime);
522
- });
523
-
524
-
525
-
526
-
527
-
528
- // setTimeout(r=> {
529
- // this.lineData2=obj2;
530
-
531
- // },1000);
532
-
533
- // setTimeout(r=> {
534
- // this.lineData2=obj3;
535
- // },2000);
536
-
537
- // setTimeout(r=> {
538
- // this.lineData2=obj4;
539
- // },3000);
540
-
541
- // setTimeout(r=> {
542
- // this.lineData2=obj5;
543
- // },4000);
544
-
545
-
546
-
547
-
548
- // setTimeout(r=> {
549
- // this.lineData2=obj6;
550
- // },5000);
551
- // obj6.forEach(r=> {
552
-
553
- // });
554
- // let i=0;
555
- // setTimeout(r=> {
556
- // let intId = setInterval(r=> {
557
- // this.lineAppend= obj3.pointArr[i];
558
- // console.log(this.lineAppend);
559
- // i+=1;
560
- // if(i==obj3.pointArr.length){
561
- // clearInterval(intId);
562
- // }
563
- // },2000);
564
- // },3000);
565
-
566
-
567
- // setTimeout(r=> {
568
- // this.lineData1=null;
569
- // },10000);
570
-
571
-
572
- // setTimeout(r=> {
573
- // // this.lineData1=null;
574
- // this.clearLiens=true;
575
- // },10000);
576
-
577
- // amworkdatalist.push({
578
- // X,
579
- // Y,
580
- // isNJOpt: isWorking,
581
- // creaTime: toDateString(new Date(item.creaTime))
582
- // });
583
-
584
- // {
585
- // color: 'rgb(0,0,255)',
586
- // width: 2,
587
- // pointArr: [],
588
- // zIndex: 1000,
589
- // }
590
-
591
- // console.log(polygonModel5);
592
- // console.log(lineData1);
593
- // console.log(lineData2);
594
-
595
- this.geoJson = JSON.parse(g1);
596
- // setTimeout(r=> {this.colors=['red','#000']},3000);
597
- // setTimeout(r=> {this.isClear=true;}, 5000);
598
- setTimeout(r => {
599
- // this.modelArr= [polygonModel3,polygonModel4];
600
- // this.polygonColorObj={
601
- // id:'ceshi4',
602
- // colorArr:['red','#000']
603
- // };
604
-
605
- // this.polygonColors.push({
606
- // id:'ceshi1',
607
- // colorArr:['red','#000']
608
- // });
609
-
610
- // this.polygonColors.push({
611
- // id:'ceshi2',
612
- // colorArr:['red','#000']
613
- // });
614
-
615
- // this.polygonColors.push({
616
- // id:'ceshi3',
617
- // colorArr:['red','#000']
618
- // });
619
- // this.insert=polygonModel1;
620
-
621
- // this.isFit=true;
622
-
623
- // this.range='ceshi3';
624
- // this.ranges=['ceshi2','ceshi1'];
625
- // :initModifyPolygon="geo"
626
- // this.inserts=[polygonModel2, polygonModel3];
627
- }, 8000);
628
- setTimeout(r => {
629
- // this.polygonModel={
630
- // fillColor: '#000',
631
- // stroke: 'red',
632
- // width: 1,
633
- // text: '测试',
634
- // coordinates: geometry.coordinates,
635
- // id: 'ceshi',
636
- // };
637
- // this.restFit = true;
638
- // this.modelArr=[];
639
- // this.isShowAll=false;
640
- // this.showPolygons
641
-
642
- // this.showPolygon={
643
- // id:'ceshi2',
644
- // isShow:false
645
- // }
646
- }, 7000);
647
- // setTimeout(r=> {
648
- // this.polygonModel={
649
- // fillColor: '#000',
650
- // stroke: '#fff',
651
- // width: 4,
652
- // text:'测试2',
653
- // coordinates: [
654
- // [
655
- // [121.03623185250073, 29.247091764239528],
656
- // [121.03525048300928, 29.24522364753245],
657
- // [121.03576144393304, 29.244964111834967],
658
- // [121.03598042717134, 29.245156060100488],
659
- // [121.03797020112704, 29.24484786136949],
660
- // [121.03804589913334, 29.244920855919766],
661
- // [121.03816214959882, 29.244964111834967],
662
- // [121.03859908998896, 29.245047209773205],
663
- // [121.03870182296805, 29.245344594473835],
664
- // [121.03883429416969, 29.245955584817516],
665
- // [121.03876670673772, 29.24603128272069],
666
- // [121.0388072591969, 29.246155643657374],
667
- // [121.03868830548166, 29.246174568158953],
668
- // [121.03868830548166, 29.246225934545365],
669
- // [121.03834496140979, 29.24628270805009],
670
- // [121.03827467031554, 29.246350295482053],
671
- // [121.03814760602596, 29.24639895841244],
672
- // [121.03822600728203, 29.246569278720354],
673
- // [121.03623185250073, 29.247091764239528]
674
- // ]
675
- // ],
676
- // id: 'ceshi',
677
- // }
678
- // },6000);
679
- },
680
- methods: {
681
- onShowPaly(b) {
682
- this.isShowPaly = b;
683
-
684
- },
685
- load(obj) {
686
- this.lMap = obj.mapServices;
687
- this.map = obj.map;
688
- // console.log(obj);
689
- // let g10 = GPS.convertGCJ02(gJson2);
690
- // convertWGS84
691
- // convertWGS84,convertGCJ02
692
- // const geo = createPolygonBoundary(g5);
693
- // this.map.addLayer(geo );
694
- },
695
- drawSuccess(obj) {
696
- this.polygonModel = {
697
- fillColor: '#000',
698
- stroke: '#fff',
699
- width: 4,
700
- text: '',
701
- geo: obj.geoJson,
702
- id: 'ceshi',
703
- };
704
- },
705
- drawError(obj) {},
706
- mapClick(e) {
707
- // alert(e);
708
- },
709
- onLoad(e) {},
710
- crossHairClick(e) {
711
- // console.log(e);
712
- },
713
- mapMoveend(e) {
714
- // alert(1);
715
- // console.log(e);
716
- },
717
- loadDrawPolygonEvent(e) {
718
- this.mapTool = e;
719
- },
720
- clusterCallback({
721
- id,
722
- isShow
723
- }) {
724
- setTimeout(r => {
725
- this.showPolygon = {
726
- id,
727
- isShow
728
- };
729
- this.isCheckPoint = {
730
- id,
731
- isShow
732
- };
733
- }, 50);
734
- },
735
- changeSwitchMap(obj) {
736
- if (obj.mapType == 2) {
737
- this.gpsType = 0;
738
- return;
739
- }
740
- this.gpsType = obj.mapType;
741
- },
742
- onClick() {
743
- this.isRyMapTool = !this.isRyMapTool;
744
- },
745
- onClick2() {
746
- this.maxZoom = 28;
747
- },
748
- onClick3() {
749
- this.maxZoom = 10;
750
- },
751
-
752
- }
753
- };
754
- </script>
755
-
756
- <style lang="scss" scoped>
757
- .map-style {
758
- height: 100vh;
759
- position: relative;
760
-
761
- }
762
- </style>