yi-map-web 1.0.0

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.
Files changed (464) hide show
  1. package/README.md +184 -0
  2. package/dist/App.vue.d.ts +2 -0
  3. package/dist/assets/mars3d-cesium/Assets/IAU2006_XYS/IAU2006_XYS_0.json +1 -0
  4. package/dist/assets/mars3d-cesium/Assets/IAU2006_XYS/IAU2006_XYS_1.json +1 -0
  5. package/dist/assets/mars3d-cesium/Assets/IAU2006_XYS/IAU2006_XYS_10.json +1 -0
  6. package/dist/assets/mars3d-cesium/Assets/IAU2006_XYS/IAU2006_XYS_11.json +1 -0
  7. package/dist/assets/mars3d-cesium/Assets/IAU2006_XYS/IAU2006_XYS_12.json +1 -0
  8. package/dist/assets/mars3d-cesium/Assets/IAU2006_XYS/IAU2006_XYS_13.json +1 -0
  9. package/dist/assets/mars3d-cesium/Assets/IAU2006_XYS/IAU2006_XYS_14.json +1 -0
  10. package/dist/assets/mars3d-cesium/Assets/IAU2006_XYS/IAU2006_XYS_15.json +1 -0
  11. package/dist/assets/mars3d-cesium/Assets/IAU2006_XYS/IAU2006_XYS_16.json +1 -0
  12. package/dist/assets/mars3d-cesium/Assets/IAU2006_XYS/IAU2006_XYS_17.json +1 -0
  13. package/dist/assets/mars3d-cesium/Assets/IAU2006_XYS/IAU2006_XYS_18.json +1 -0
  14. package/dist/assets/mars3d-cesium/Assets/IAU2006_XYS/IAU2006_XYS_19.json +1 -0
  15. package/dist/assets/mars3d-cesium/Assets/IAU2006_XYS/IAU2006_XYS_2.json +1 -0
  16. package/dist/assets/mars3d-cesium/Assets/IAU2006_XYS/IAU2006_XYS_20.json +1 -0
  17. package/dist/assets/mars3d-cesium/Assets/IAU2006_XYS/IAU2006_XYS_21.json +1 -0
  18. package/dist/assets/mars3d-cesium/Assets/IAU2006_XYS/IAU2006_XYS_22.json +1 -0
  19. package/dist/assets/mars3d-cesium/Assets/IAU2006_XYS/IAU2006_XYS_23.json +1 -0
  20. package/dist/assets/mars3d-cesium/Assets/IAU2006_XYS/IAU2006_XYS_24.json +1 -0
  21. package/dist/assets/mars3d-cesium/Assets/IAU2006_XYS/IAU2006_XYS_25.json +1 -0
  22. package/dist/assets/mars3d-cesium/Assets/IAU2006_XYS/IAU2006_XYS_26.json +1 -0
  23. package/dist/assets/mars3d-cesium/Assets/IAU2006_XYS/IAU2006_XYS_27.json +1 -0
  24. package/dist/assets/mars3d-cesium/Assets/IAU2006_XYS/IAU2006_XYS_3.json +1 -0
  25. package/dist/assets/mars3d-cesium/Assets/IAU2006_XYS/IAU2006_XYS_4.json +1 -0
  26. package/dist/assets/mars3d-cesium/Assets/IAU2006_XYS/IAU2006_XYS_5.json +1 -0
  27. package/dist/assets/mars3d-cesium/Assets/IAU2006_XYS/IAU2006_XYS_6.json +1 -0
  28. package/dist/assets/mars3d-cesium/Assets/IAU2006_XYS/IAU2006_XYS_7.json +1 -0
  29. package/dist/assets/mars3d-cesium/Assets/IAU2006_XYS/IAU2006_XYS_8.json +1 -0
  30. package/dist/assets/mars3d-cesium/Assets/IAU2006_XYS/IAU2006_XYS_9.json +1 -0
  31. package/dist/assets/mars3d-cesium/Assets/Images/bing_maps_credit.png +0 -0
  32. package/dist/assets/mars3d-cesium/Assets/Images/cesium_credit.png +0 -0
  33. package/dist/assets/mars3d-cesium/Assets/Images/google_earth_credit.png +0 -0
  34. package/dist/assets/mars3d-cesium/Assets/Images/ion-credit.png +0 -0
  35. package/dist/assets/mars3d-cesium/Assets/Textures/LensFlare/DirtMask.jpg +0 -0
  36. package/dist/assets/mars3d-cesium/Assets/Textures/LensFlare/StarBurst.jpg +0 -0
  37. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/0/0/0.jpg +0 -0
  38. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/0/1/0.jpg +0 -0
  39. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/1/0/0.jpg +0 -0
  40. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/1/0/1.jpg +0 -0
  41. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/1/1/0.jpg +0 -0
  42. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/1/1/1.jpg +0 -0
  43. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/1/2/0.jpg +0 -0
  44. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/1/2/1.jpg +0 -0
  45. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/1/3/0.jpg +0 -0
  46. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/1/3/1.jpg +0 -0
  47. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/2/0/0.jpg +0 -0
  48. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/2/0/1.jpg +0 -0
  49. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/2/0/2.jpg +0 -0
  50. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/2/0/3.jpg +0 -0
  51. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/2/1/0.jpg +0 -0
  52. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/2/1/1.jpg +0 -0
  53. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/2/1/2.jpg +0 -0
  54. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/2/1/3.jpg +0 -0
  55. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/2/2/0.jpg +0 -0
  56. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/2/2/1.jpg +0 -0
  57. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/2/2/2.jpg +0 -0
  58. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/2/2/3.jpg +0 -0
  59. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/2/3/0.jpg +0 -0
  60. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/2/3/1.jpg +0 -0
  61. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/2/3/2.jpg +0 -0
  62. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/2/3/3.jpg +0 -0
  63. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/2/4/0.jpg +0 -0
  64. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/2/4/1.jpg +0 -0
  65. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/2/4/2.jpg +0 -0
  66. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/2/4/3.jpg +0 -0
  67. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/2/5/0.jpg +0 -0
  68. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/2/5/1.jpg +0 -0
  69. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/2/5/2.jpg +0 -0
  70. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/2/5/3.jpg +0 -0
  71. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/2/6/0.jpg +0 -0
  72. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/2/6/1.jpg +0 -0
  73. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/2/6/2.jpg +0 -0
  74. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/2/6/3.jpg +0 -0
  75. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/2/7/0.jpg +0 -0
  76. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/2/7/1.jpg +0 -0
  77. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/2/7/2.jpg +0 -0
  78. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/2/7/3.jpg +0 -0
  79. package/dist/assets/mars3d-cesium/Assets/Textures/NaturalEarthII/tilemapresource.xml +14 -0
  80. package/dist/assets/mars3d-cesium/Assets/Textures/SkyBox/tycho2t3_80_mx.jpg +0 -0
  81. package/dist/assets/mars3d-cesium/Assets/Textures/SkyBox/tycho2t3_80_my.jpg +0 -0
  82. package/dist/assets/mars3d-cesium/Assets/Textures/SkyBox/tycho2t3_80_mz.jpg +0 -0
  83. package/dist/assets/mars3d-cesium/Assets/Textures/SkyBox/tycho2t3_80_px.jpg +0 -0
  84. package/dist/assets/mars3d-cesium/Assets/Textures/SkyBox/tycho2t3_80_py.jpg +0 -0
  85. package/dist/assets/mars3d-cesium/Assets/Textures/SkyBox/tycho2t3_80_pz.jpg +0 -0
  86. package/dist/assets/mars3d-cesium/Assets/Textures/maki/airfield.png +0 -0
  87. package/dist/assets/mars3d-cesium/Assets/Textures/maki/airport.png +0 -0
  88. package/dist/assets/mars3d-cesium/Assets/Textures/maki/alcohol-shop.png +0 -0
  89. package/dist/assets/mars3d-cesium/Assets/Textures/maki/america-football.png +0 -0
  90. package/dist/assets/mars3d-cesium/Assets/Textures/maki/art-gallery.png +0 -0
  91. package/dist/assets/mars3d-cesium/Assets/Textures/maki/bakery.png +0 -0
  92. package/dist/assets/mars3d-cesium/Assets/Textures/maki/bank.png +0 -0
  93. package/dist/assets/mars3d-cesium/Assets/Textures/maki/bar.png +0 -0
  94. package/dist/assets/mars3d-cesium/Assets/Textures/maki/baseball.png +0 -0
  95. package/dist/assets/mars3d-cesium/Assets/Textures/maki/basketball.png +0 -0
  96. package/dist/assets/mars3d-cesium/Assets/Textures/maki/beer.png +0 -0
  97. package/dist/assets/mars3d-cesium/Assets/Textures/maki/bicycle.png +0 -0
  98. package/dist/assets/mars3d-cesium/Assets/Textures/maki/building.png +0 -0
  99. package/dist/assets/mars3d-cesium/Assets/Textures/maki/bus.png +0 -0
  100. package/dist/assets/mars3d-cesium/Assets/Textures/maki/cafe.png +0 -0
  101. package/dist/assets/mars3d-cesium/Assets/Textures/maki/camera.png +0 -0
  102. package/dist/assets/mars3d-cesium/Assets/Textures/maki/campsite.png +0 -0
  103. package/dist/assets/mars3d-cesium/Assets/Textures/maki/car.png +0 -0
  104. package/dist/assets/mars3d-cesium/Assets/Textures/maki/cemetery.png +0 -0
  105. package/dist/assets/mars3d-cesium/Assets/Textures/maki/cesium.png +0 -0
  106. package/dist/assets/mars3d-cesium/Assets/Textures/maki/chemist.png +0 -0
  107. package/dist/assets/mars3d-cesium/Assets/Textures/maki/cinema.png +0 -0
  108. package/dist/assets/mars3d-cesium/Assets/Textures/maki/circle-stroked.png +0 -0
  109. package/dist/assets/mars3d-cesium/Assets/Textures/maki/circle.png +0 -0
  110. package/dist/assets/mars3d-cesium/Assets/Textures/maki/city.png +0 -0
  111. package/dist/assets/mars3d-cesium/Assets/Textures/maki/clothing-store.png +0 -0
  112. package/dist/assets/mars3d-cesium/Assets/Textures/maki/college.png +0 -0
  113. package/dist/assets/mars3d-cesium/Assets/Textures/maki/commercial.png +0 -0
  114. package/dist/assets/mars3d-cesium/Assets/Textures/maki/cricket.png +0 -0
  115. package/dist/assets/mars3d-cesium/Assets/Textures/maki/cross.png +0 -0
  116. package/dist/assets/mars3d-cesium/Assets/Textures/maki/dam.png +0 -0
  117. package/dist/assets/mars3d-cesium/Assets/Textures/maki/danger.png +0 -0
  118. package/dist/assets/mars3d-cesium/Assets/Textures/maki/disability.png +0 -0
  119. package/dist/assets/mars3d-cesium/Assets/Textures/maki/dog-park.png +0 -0
  120. package/dist/assets/mars3d-cesium/Assets/Textures/maki/embassy.png +0 -0
  121. package/dist/assets/mars3d-cesium/Assets/Textures/maki/emergency-telephone.png +0 -0
  122. package/dist/assets/mars3d-cesium/Assets/Textures/maki/entrance.png +0 -0
  123. package/dist/assets/mars3d-cesium/Assets/Textures/maki/farm.png +0 -0
  124. package/dist/assets/mars3d-cesium/Assets/Textures/maki/fast-food.png +0 -0
  125. package/dist/assets/mars3d-cesium/Assets/Textures/maki/ferry.png +0 -0
  126. package/dist/assets/mars3d-cesium/Assets/Textures/maki/fire-station.png +0 -0
  127. package/dist/assets/mars3d-cesium/Assets/Textures/maki/fuel.png +0 -0
  128. package/dist/assets/mars3d-cesium/Assets/Textures/maki/garden.png +0 -0
  129. package/dist/assets/mars3d-cesium/Assets/Textures/maki/gift.png +0 -0
  130. package/dist/assets/mars3d-cesium/Assets/Textures/maki/golf.png +0 -0
  131. package/dist/assets/mars3d-cesium/Assets/Textures/maki/grocery.png +0 -0
  132. package/dist/assets/mars3d-cesium/Assets/Textures/maki/hairdresser.png +0 -0
  133. package/dist/assets/mars3d-cesium/Assets/Textures/maki/harbor.png +0 -0
  134. package/dist/assets/mars3d-cesium/Assets/Textures/maki/heart.png +0 -0
  135. package/dist/assets/mars3d-cesium/Assets/Textures/maki/heliport.png +0 -0
  136. package/dist/assets/mars3d-cesium/Assets/Textures/maki/hospital.png +0 -0
  137. package/dist/assets/mars3d-cesium/Assets/Textures/maki/ice-cream.png +0 -0
  138. package/dist/assets/mars3d-cesium/Assets/Textures/maki/industrial.png +0 -0
  139. package/dist/assets/mars3d-cesium/Assets/Textures/maki/land-use.png +0 -0
  140. package/dist/assets/mars3d-cesium/Assets/Textures/maki/laundry.png +0 -0
  141. package/dist/assets/mars3d-cesium/Assets/Textures/maki/library.png +0 -0
  142. package/dist/assets/mars3d-cesium/Assets/Textures/maki/lighthouse.png +0 -0
  143. package/dist/assets/mars3d-cesium/Assets/Textures/maki/lodging.png +0 -0
  144. package/dist/assets/mars3d-cesium/Assets/Textures/maki/logging.png +0 -0
  145. package/dist/assets/mars3d-cesium/Assets/Textures/maki/london-underground.png +0 -0
  146. package/dist/assets/mars3d-cesium/Assets/Textures/maki/marker-stroked.png +0 -0
  147. package/dist/assets/mars3d-cesium/Assets/Textures/maki/marker.png +0 -0
  148. package/dist/assets/mars3d-cesium/Assets/Textures/maki/minefield.png +0 -0
  149. package/dist/assets/mars3d-cesium/Assets/Textures/maki/mobilephone.png +0 -0
  150. package/dist/assets/mars3d-cesium/Assets/Textures/maki/monument.png +0 -0
  151. package/dist/assets/mars3d-cesium/Assets/Textures/maki/museum.png +0 -0
  152. package/dist/assets/mars3d-cesium/Assets/Textures/maki/music.png +0 -0
  153. package/dist/assets/mars3d-cesium/Assets/Textures/maki/oil-well.png +0 -0
  154. package/dist/assets/mars3d-cesium/Assets/Textures/maki/park.png +0 -0
  155. package/dist/assets/mars3d-cesium/Assets/Textures/maki/park2.png +0 -0
  156. package/dist/assets/mars3d-cesium/Assets/Textures/maki/parking-garage.png +0 -0
  157. package/dist/assets/mars3d-cesium/Assets/Textures/maki/parking.png +0 -0
  158. package/dist/assets/mars3d-cesium/Assets/Textures/maki/pharmacy.png +0 -0
  159. package/dist/assets/mars3d-cesium/Assets/Textures/maki/pitch.png +0 -0
  160. package/dist/assets/mars3d-cesium/Assets/Textures/maki/place-of-worship.png +0 -0
  161. package/dist/assets/mars3d-cesium/Assets/Textures/maki/playground.png +0 -0
  162. package/dist/assets/mars3d-cesium/Assets/Textures/maki/police.png +0 -0
  163. package/dist/assets/mars3d-cesium/Assets/Textures/maki/polling-place.png +0 -0
  164. package/dist/assets/mars3d-cesium/Assets/Textures/maki/post.png +0 -0
  165. package/dist/assets/mars3d-cesium/Assets/Textures/maki/prison.png +0 -0
  166. package/dist/assets/mars3d-cesium/Assets/Textures/maki/rail-above.png +0 -0
  167. package/dist/assets/mars3d-cesium/Assets/Textures/maki/rail-light.png +0 -0
  168. package/dist/assets/mars3d-cesium/Assets/Textures/maki/rail-metro.png +0 -0
  169. package/dist/assets/mars3d-cesium/Assets/Textures/maki/rail-underground.png +0 -0
  170. package/dist/assets/mars3d-cesium/Assets/Textures/maki/rail.png +0 -0
  171. package/dist/assets/mars3d-cesium/Assets/Textures/maki/religious-christian.png +0 -0
  172. package/dist/assets/mars3d-cesium/Assets/Textures/maki/religious-jewish.png +0 -0
  173. package/dist/assets/mars3d-cesium/Assets/Textures/maki/religious-muslim.png +0 -0
  174. package/dist/assets/mars3d-cesium/Assets/Textures/maki/restaurant.png +0 -0
  175. package/dist/assets/mars3d-cesium/Assets/Textures/maki/roadblock.png +0 -0
  176. package/dist/assets/mars3d-cesium/Assets/Textures/maki/rocket.png +0 -0
  177. package/dist/assets/mars3d-cesium/Assets/Textures/maki/school.png +0 -0
  178. package/dist/assets/mars3d-cesium/Assets/Textures/maki/scooter.png +0 -0
  179. package/dist/assets/mars3d-cesium/Assets/Textures/maki/shop.png +0 -0
  180. package/dist/assets/mars3d-cesium/Assets/Textures/maki/skiing.png +0 -0
  181. package/dist/assets/mars3d-cesium/Assets/Textures/maki/slaughterhouse.png +0 -0
  182. package/dist/assets/mars3d-cesium/Assets/Textures/maki/soccer.png +0 -0
  183. package/dist/assets/mars3d-cesium/Assets/Textures/maki/square-stroked.png +0 -0
  184. package/dist/assets/mars3d-cesium/Assets/Textures/maki/square.png +0 -0
  185. package/dist/assets/mars3d-cesium/Assets/Textures/maki/star-stroked.png +0 -0
  186. package/dist/assets/mars3d-cesium/Assets/Textures/maki/star.png +0 -0
  187. package/dist/assets/mars3d-cesium/Assets/Textures/maki/suitcase.png +0 -0
  188. package/dist/assets/mars3d-cesium/Assets/Textures/maki/swimming.png +0 -0
  189. package/dist/assets/mars3d-cesium/Assets/Textures/maki/telephone.png +0 -0
  190. package/dist/assets/mars3d-cesium/Assets/Textures/maki/tennis.png +0 -0
  191. package/dist/assets/mars3d-cesium/Assets/Textures/maki/theatre.png +0 -0
  192. package/dist/assets/mars3d-cesium/Assets/Textures/maki/toilets.png +0 -0
  193. package/dist/assets/mars3d-cesium/Assets/Textures/maki/town-hall.png +0 -0
  194. package/dist/assets/mars3d-cesium/Assets/Textures/maki/town.png +0 -0
  195. package/dist/assets/mars3d-cesium/Assets/Textures/maki/triangle-stroked.png +0 -0
  196. package/dist/assets/mars3d-cesium/Assets/Textures/maki/triangle.png +0 -0
  197. package/dist/assets/mars3d-cesium/Assets/Textures/maki/village.png +0 -0
  198. package/dist/assets/mars3d-cesium/Assets/Textures/maki/warehouse.png +0 -0
  199. package/dist/assets/mars3d-cesium/Assets/Textures/maki/waste-basket.png +0 -0
  200. package/dist/assets/mars3d-cesium/Assets/Textures/maki/water.png +0 -0
  201. package/dist/assets/mars3d-cesium/Assets/Textures/maki/wetland.png +0 -0
  202. package/dist/assets/mars3d-cesium/Assets/Textures/maki/zoo.png +0 -0
  203. package/dist/assets/mars3d-cesium/Assets/Textures/moonSmall.jpg +0 -0
  204. package/dist/assets/mars3d-cesium/Assets/Textures/pin.svg +1 -0
  205. package/dist/assets/mars3d-cesium/Assets/Textures/waterNormals.jpg +0 -0
  206. package/dist/assets/mars3d-cesium/Assets/Textures/waterNormalsSmall.jpg +0 -0
  207. package/dist/assets/mars3d-cesium/Assets/approximateTerrainHeights.json +1 -0
  208. package/dist/assets/mars3d-cesium/Cesium.js +17126 -0
  209. package/dist/assets/mars3d-cesium/ThirdParty/Workers/package.json +1 -0
  210. package/dist/assets/mars3d-cesium/ThirdParty/Workers/z-worker-pako.js +1 -0
  211. package/dist/assets/mars3d-cesium/ThirdParty/basis_transcoder.wasm +0 -0
  212. package/dist/assets/mars3d-cesium/ThirdParty/draco_decoder.wasm +0 -0
  213. package/dist/assets/mars3d-cesium/ThirdParty/google-earth-dbroot-parser.js +1 -0
  214. package/dist/assets/mars3d-cesium/ThirdParty/wasm_splats_bg.wasm +0 -0
  215. package/dist/assets/mars3d-cesium/Widgets/Animation/Animation.css +127 -0
  216. package/dist/assets/mars3d-cesium/Widgets/Animation/lighter.css +70 -0
  217. package/dist/assets/mars3d-cesium/Widgets/BaseLayerPicker/BaseLayerPicker.css +108 -0
  218. package/dist/assets/mars3d-cesium/Widgets/BaseLayerPicker/lighter.css +22 -0
  219. package/dist/assets/mars3d-cesium/Widgets/Cesium3DTilesInspector/Cesium3DTilesInspector.css +102 -0
  220. package/dist/assets/mars3d-cesium/Widgets/CesiumInspector/CesiumInspector.css +113 -0
  221. package/dist/assets/mars3d-cesium/Widgets/CesiumWidget/CesiumWidget.css +119 -0
  222. package/dist/assets/mars3d-cesium/Widgets/CesiumWidget/lighter.css +14 -0
  223. package/dist/assets/mars3d-cesium/Widgets/FullscreenButton/FullscreenButton.css +8 -0
  224. package/dist/assets/mars3d-cesium/Widgets/Geocoder/Geocoder.css +70 -0
  225. package/dist/assets/mars3d-cesium/Widgets/Geocoder/lighter.css +17 -0
  226. package/dist/assets/mars3d-cesium/Widgets/I3SBuildingSceneLayerExplorer/I3SBuildingSceneLayerExplorer.css +27 -0
  227. package/dist/assets/mars3d-cesium/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldHillshade.png +0 -0
  228. package/dist/assets/mars3d-cesium/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldImagery.png +0 -0
  229. package/dist/assets/mars3d-cesium/Widgets/Images/ImageryProviders/ArcGisMapServiceWorldOcean.png +0 -0
  230. package/dist/assets/mars3d-cesium/Widgets/Images/ImageryProviders/azureAerial.png +0 -0
  231. package/dist/assets/mars3d-cesium/Widgets/Images/ImageryProviders/azureRoads.png +0 -0
  232. package/dist/assets/mars3d-cesium/Widgets/Images/ImageryProviders/bingAerial.png +0 -0
  233. package/dist/assets/mars3d-cesium/Widgets/Images/ImageryProviders/bingAerialLabels.png +0 -0
  234. package/dist/assets/mars3d-cesium/Widgets/Images/ImageryProviders/bingRoads.png +0 -0
  235. package/dist/assets/mars3d-cesium/Widgets/Images/ImageryProviders/blueMarble.png +0 -0
  236. package/dist/assets/mars3d-cesium/Widgets/Images/ImageryProviders/earthAtNight.png +0 -0
  237. package/dist/assets/mars3d-cesium/Widgets/Images/ImageryProviders/googleContour.png +0 -0
  238. package/dist/assets/mars3d-cesium/Widgets/Images/ImageryProviders/googleRoadmap.png +0 -0
  239. package/dist/assets/mars3d-cesium/Widgets/Images/ImageryProviders/googleSatellite.png +0 -0
  240. package/dist/assets/mars3d-cesium/Widgets/Images/ImageryProviders/googleSatelliteLabels.png +0 -0
  241. package/dist/assets/mars3d-cesium/Widgets/Images/ImageryProviders/mapQuestOpenStreetMap.png +0 -0
  242. package/dist/assets/mars3d-cesium/Widgets/Images/ImageryProviders/mapboxSatellite.png +0 -0
  243. package/dist/assets/mars3d-cesium/Widgets/Images/ImageryProviders/mapboxStreets.png +0 -0
  244. package/dist/assets/mars3d-cesium/Widgets/Images/ImageryProviders/mapboxTerrain.png +0 -0
  245. package/dist/assets/mars3d-cesium/Widgets/Images/ImageryProviders/naturalEarthII.png +0 -0
  246. package/dist/assets/mars3d-cesium/Widgets/Images/ImageryProviders/openStreetMap.png +0 -0
  247. package/dist/assets/mars3d-cesium/Widgets/Images/ImageryProviders/sentinel-2.png +0 -0
  248. package/dist/assets/mars3d-cesium/Widgets/Images/ImageryProviders/stadiaAlidadeSmooth.png +0 -0
  249. package/dist/assets/mars3d-cesium/Widgets/Images/ImageryProviders/stadiaAlidadeSmoothDark.png +0 -0
  250. package/dist/assets/mars3d-cesium/Widgets/Images/ImageryProviders/stamenToner.png +0 -0
  251. package/dist/assets/mars3d-cesium/Widgets/Images/ImageryProviders/stamenWatercolor.png +0 -0
  252. package/dist/assets/mars3d-cesium/Widgets/Images/NavigationHelp/Mouse.svg +84 -0
  253. package/dist/assets/mars3d-cesium/Widgets/Images/NavigationHelp/MouseLeft.svg +76 -0
  254. package/dist/assets/mars3d-cesium/Widgets/Images/NavigationHelp/MouseMiddle.svg +76 -0
  255. package/dist/assets/mars3d-cesium/Widgets/Images/NavigationHelp/MouseRight.svg +76 -0
  256. package/dist/assets/mars3d-cesium/Widgets/Images/NavigationHelp/Touch.svg +120 -0
  257. package/dist/assets/mars3d-cesium/Widgets/Images/NavigationHelp/TouchDrag.svg +129 -0
  258. package/dist/assets/mars3d-cesium/Widgets/Images/NavigationHelp/TouchRotate.svg +76 -0
  259. package/dist/assets/mars3d-cesium/Widgets/Images/NavigationHelp/TouchTilt.svg +135 -0
  260. package/dist/assets/mars3d-cesium/Widgets/Images/NavigationHelp/TouchZoom.svg +74 -0
  261. package/dist/assets/mars3d-cesium/Widgets/Images/TerrainProviders/CesiumWorldTerrain.png +0 -0
  262. package/dist/assets/mars3d-cesium/Widgets/Images/TerrainProviders/Ellipsoid.png +0 -0
  263. package/dist/assets/mars3d-cesium/Widgets/Images/TimelineIcons.png +0 -0
  264. package/dist/assets/mars3d-cesium/Widgets/Images/info-loading.gif +0 -0
  265. package/dist/assets/mars3d-cesium/Widgets/InfoBox/InfoBox.css +92 -0
  266. package/dist/assets/mars3d-cesium/Widgets/InfoBox/InfoBoxDescription.css +178 -0
  267. package/dist/assets/mars3d-cesium/Widgets/NavigationHelpButton/NavigationHelpButton.css +93 -0
  268. package/dist/assets/mars3d-cesium/Widgets/NavigationHelpButton/lighter.css +38 -0
  269. package/dist/assets/mars3d-cesium/Widgets/PerformanceWatchdog/PerformanceWatchdog.css +15 -0
  270. package/dist/assets/mars3d-cesium/Widgets/ProjectionPicker/ProjectionPicker.css +38 -0
  271. package/dist/assets/mars3d-cesium/Widgets/SceneModePicker/SceneModePicker.css +56 -0
  272. package/dist/assets/mars3d-cesium/Widgets/SelectionIndicator/SelectionIndicator.css +20 -0
  273. package/dist/assets/mars3d-cesium/Widgets/Timeline/Timeline.css +103 -0
  274. package/dist/assets/mars3d-cesium/Widgets/Timeline/lighter.css +23 -0
  275. package/dist/assets/mars3d-cesium/Widgets/VRButton/VRButton.css +8 -0
  276. package/dist/assets/mars3d-cesium/Widgets/Viewer/Viewer.css +107 -0
  277. package/dist/assets/mars3d-cesium/Widgets/VoxelInspector/VoxelInspector.css +16 -0
  278. package/dist/assets/mars3d-cesium/Widgets/lighter.css +237 -0
  279. package/dist/assets/mars3d-cesium/Widgets/lighterShared.css +46 -0
  280. package/dist/assets/mars3d-cesium/Widgets/shared.css +103 -0
  281. package/dist/assets/mars3d-cesium/Widgets/widgets.css +1342 -0
  282. package/dist/assets/mars3d-cesium/Workers/chunk-336QMGTQ.js +26 -0
  283. package/dist/assets/mars3d-cesium/Workers/chunk-3BFV72N7.js +26 -0
  284. package/dist/assets/mars3d-cesium/Workers/chunk-422SYBQS.js +27 -0
  285. package/dist/assets/mars3d-cesium/Workers/chunk-4FULWVRZ.js +26 -0
  286. package/dist/assets/mars3d-cesium/Workers/chunk-5IQULCCZ.js +26 -0
  287. package/dist/assets/mars3d-cesium/Workers/chunk-5JMVLL6X.js +26 -0
  288. package/dist/assets/mars3d-cesium/Workers/chunk-65MI2E3A.js +26 -0
  289. package/dist/assets/mars3d-cesium/Workers/chunk-7SZRKGJD.js +26 -0
  290. package/dist/assets/mars3d-cesium/Workers/chunk-7U5EVTKW.js +26 -0
  291. package/dist/assets/mars3d-cesium/Workers/chunk-AXIQD4JA.js +26 -0
  292. package/dist/assets/mars3d-cesium/Workers/chunk-AZSS2BNB.js +26 -0
  293. package/dist/assets/mars3d-cesium/Workers/chunk-BYYYB2C7.js +26 -0
  294. package/dist/assets/mars3d-cesium/Workers/chunk-C6HKNYGW.js +26 -0
  295. package/dist/assets/mars3d-cesium/Workers/chunk-DMJB4DHC.js +29 -0
  296. package/dist/assets/mars3d-cesium/Workers/chunk-ECLCX5XZ.js +26 -0
  297. package/dist/assets/mars3d-cesium/Workers/chunk-FHECC5EZ.js +26 -0
  298. package/dist/assets/mars3d-cesium/Workers/chunk-GDJPERBD.js +26 -0
  299. package/dist/assets/mars3d-cesium/Workers/chunk-GLZ7AVHY.js +26 -0
  300. package/dist/assets/mars3d-cesium/Workers/chunk-GVEYCBKG.js +26 -0
  301. package/dist/assets/mars3d-cesium/Workers/chunk-HNKLZQOV.js +26 -0
  302. package/dist/assets/mars3d-cesium/Workers/chunk-II4OPXPA.js +26 -0
  303. package/dist/assets/mars3d-cesium/Workers/chunk-ILTEXGHO.js +26 -0
  304. package/dist/assets/mars3d-cesium/Workers/chunk-JD76ATDQ.js +26 -0
  305. package/dist/assets/mars3d-cesium/Workers/chunk-JQWGTP3K.js +26 -0
  306. package/dist/assets/mars3d-cesium/Workers/chunk-K35RPNUR.js +27 -0
  307. package/dist/assets/mars3d-cesium/Workers/chunk-KIXGV6RH.js +26 -0
  308. package/dist/assets/mars3d-cesium/Workers/chunk-LT7NKOZD.js +26 -0
  309. package/dist/assets/mars3d-cesium/Workers/chunk-LUCUOT65.js +26 -0
  310. package/dist/assets/mars3d-cesium/Workers/chunk-MWY74K7V.js +63 -0
  311. package/dist/assets/mars3d-cesium/Workers/chunk-N6SIW7ZL.js +26 -0
  312. package/dist/assets/mars3d-cesium/Workers/chunk-NL753UYH.js +26 -0
  313. package/dist/assets/mars3d-cesium/Workers/chunk-OVOY7YA7.js +26 -0
  314. package/dist/assets/mars3d-cesium/Workers/chunk-PQWMNK6M.js +26 -0
  315. package/dist/assets/mars3d-cesium/Workers/chunk-PUOAX5MA.js +26 -0
  316. package/dist/assets/mars3d-cesium/Workers/chunk-PUPGLHXG.js +26 -0
  317. package/dist/assets/mars3d-cesium/Workers/chunk-PXZYU6PD.js +26 -0
  318. package/dist/assets/mars3d-cesium/Workers/chunk-Q6MK2R6B.js +26 -0
  319. package/dist/assets/mars3d-cesium/Workers/chunk-Q6YG52WP.js +26 -0
  320. package/dist/assets/mars3d-cesium/Workers/chunk-QQJ4EFK2.js +26 -0
  321. package/dist/assets/mars3d-cesium/Workers/chunk-RPFEAA52.js +26 -0
  322. package/dist/assets/mars3d-cesium/Workers/chunk-RTRJ3LVQ.js +26 -0
  323. package/dist/assets/mars3d-cesium/Workers/chunk-SDQXNLTQ.js +26 -0
  324. package/dist/assets/mars3d-cesium/Workers/chunk-TJ6QLJOT.js +26 -0
  325. package/dist/assets/mars3d-cesium/Workers/chunk-TJUBNZ45.js +26 -0
  326. package/dist/assets/mars3d-cesium/Workers/chunk-TOK3PZ73.js +26 -0
  327. package/dist/assets/mars3d-cesium/Workers/chunk-UKJ254OV.js +26 -0
  328. package/dist/assets/mars3d-cesium/Workers/chunk-VC43NA4S.js +26 -0
  329. package/dist/assets/mars3d-cesium/Workers/chunk-WPXTUJZY.js +26 -0
  330. package/dist/assets/mars3d-cesium/Workers/chunk-WRLXLKCG.js +26 -0
  331. package/dist/assets/mars3d-cesium/Workers/chunk-WYMSHGR6.js +28 -0
  332. package/dist/assets/mars3d-cesium/Workers/chunk-X56SSSS5.js +26 -0
  333. package/dist/assets/mars3d-cesium/Workers/chunk-XXWWJ3QU.js +28 -0
  334. package/dist/assets/mars3d-cesium/Workers/chunk-YBIGLQJN.js +26 -0
  335. package/dist/assets/mars3d-cesium/Workers/chunk-YDQLCOZM.js +26 -0
  336. package/dist/assets/mars3d-cesium/Workers/chunk-YECQFZBX.js +29 -0
  337. package/dist/assets/mars3d-cesium/Workers/chunk-YWNU5ZQD.js +26 -0
  338. package/dist/assets/mars3d-cesium/Workers/chunk-Z4E6T4NK.js +26 -0
  339. package/dist/assets/mars3d-cesium/Workers/combineGeometry.js +26 -0
  340. package/dist/assets/mars3d-cesium/Workers/createBoxGeometry.js +26 -0
  341. package/dist/assets/mars3d-cesium/Workers/createBoxOutlineGeometry.js +26 -0
  342. package/dist/assets/mars3d-cesium/Workers/createCircleGeometry.js +26 -0
  343. package/dist/assets/mars3d-cesium/Workers/createCircleOutlineGeometry.js +26 -0
  344. package/dist/assets/mars3d-cesium/Workers/createCoplanarPolygonGeometry.js +26 -0
  345. package/dist/assets/mars3d-cesium/Workers/createCoplanarPolygonOutlineGeometry.js +26 -0
  346. package/dist/assets/mars3d-cesium/Workers/createCorridorGeometry.js +26 -0
  347. package/dist/assets/mars3d-cesium/Workers/createCorridorOutlineGeometry.js +26 -0
  348. package/dist/assets/mars3d-cesium/Workers/createCylinderGeometry.js +26 -0
  349. package/dist/assets/mars3d-cesium/Workers/createCylinderOutlineGeometry.js +26 -0
  350. package/dist/assets/mars3d-cesium/Workers/createEllipseGeometry.js +26 -0
  351. package/dist/assets/mars3d-cesium/Workers/createEllipseOutlineGeometry.js +26 -0
  352. package/dist/assets/mars3d-cesium/Workers/createEllipsoidGeometry.js +26 -0
  353. package/dist/assets/mars3d-cesium/Workers/createEllipsoidOutlineGeometry.js +26 -0
  354. package/dist/assets/mars3d-cesium/Workers/createFrustumGeometry.js +26 -0
  355. package/dist/assets/mars3d-cesium/Workers/createFrustumOutlineGeometry.js +26 -0
  356. package/dist/assets/mars3d-cesium/Workers/createGeometry.js +26 -0
  357. package/dist/assets/mars3d-cesium/Workers/createGroundPolylineGeometry.js +26 -0
  358. package/dist/assets/mars3d-cesium/Workers/createPlaneGeometry.js +26 -0
  359. package/dist/assets/mars3d-cesium/Workers/createPlaneOutlineGeometry.js +26 -0
  360. package/dist/assets/mars3d-cesium/Workers/createPolygonGeometry.js +26 -0
  361. package/dist/assets/mars3d-cesium/Workers/createPolygonOutlineGeometry.js +26 -0
  362. package/dist/assets/mars3d-cesium/Workers/createPolylineGeometry.js +26 -0
  363. package/dist/assets/mars3d-cesium/Workers/createPolylineVolumeGeometry.js +26 -0
  364. package/dist/assets/mars3d-cesium/Workers/createPolylineVolumeOutlineGeometry.js +26 -0
  365. package/dist/assets/mars3d-cesium/Workers/createRectangleGeometry.js +26 -0
  366. package/dist/assets/mars3d-cesium/Workers/createRectangleOutlineGeometry.js +26 -0
  367. package/dist/assets/mars3d-cesium/Workers/createSimplePolylineGeometry.js +26 -0
  368. package/dist/assets/mars3d-cesium/Workers/createSphereGeometry.js +26 -0
  369. package/dist/assets/mars3d-cesium/Workers/createSphereOutlineGeometry.js +26 -0
  370. package/dist/assets/mars3d-cesium/Workers/createTaskProcessorWorker.js +26 -0
  371. package/dist/assets/mars3d-cesium/Workers/createVectorTileClampedPolylines.js +26 -0
  372. package/dist/assets/mars3d-cesium/Workers/createVectorTileGeometries.js +26 -0
  373. package/dist/assets/mars3d-cesium/Workers/createVectorTilePoints.js +26 -0
  374. package/dist/assets/mars3d-cesium/Workers/createVectorTilePolygons.js +26 -0
  375. package/dist/assets/mars3d-cesium/Workers/createVectorTilePolylines.js +26 -0
  376. package/dist/assets/mars3d-cesium/Workers/createVerticesFromCesium3DTilesTerrain.js +26 -0
  377. package/dist/assets/mars3d-cesium/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +26 -0
  378. package/dist/assets/mars3d-cesium/Workers/createVerticesFromHeightmap.js +26 -0
  379. package/dist/assets/mars3d-cesium/Workers/createVerticesFromQuantizedTerrainMesh.js +26 -0
  380. package/dist/assets/mars3d-cesium/Workers/createWallGeometry.js +26 -0
  381. package/dist/assets/mars3d-cesium/Workers/createWallOutlineGeometry.js +26 -0
  382. package/dist/assets/mars3d-cesium/Workers/decodeDraco.js +26 -0
  383. package/dist/assets/mars3d-cesium/Workers/decodeGoogleEarthEnterprisePacket.js +26 -0
  384. package/dist/assets/mars3d-cesium/Workers/decodeI3S.js +26 -0
  385. package/dist/assets/mars3d-cesium/Workers/gaussianSplatSorter.js +26 -0
  386. package/dist/assets/mars3d-cesium/Workers/gaussianSplatTextureGenerator.js +26 -0
  387. package/dist/assets/mars3d-cesium/Workers/incrementallyBuildTerrainPicker.js +26 -0
  388. package/dist/assets/mars3d-cesium/Workers/transcodeKTX2.js +56 -0
  389. package/dist/assets/mars3d-cesium/Workers/transferTypedArrayTest.js +26 -0
  390. package/dist/assets/mars3d-cesium/Workers/upsampleQuantizedTerrainMesh.js +26 -0
  391. package/dist/assets/mars3d-cesium/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +26 -0
  392. package/dist/components/business/index.d.ts +13 -0
  393. package/dist/components/business/poi-marker/PoiMarkerPanel.vue.d.ts +2 -0
  394. package/dist/components/business/poi-marker/usePoiMarker.d.ts +46 -0
  395. package/dist/components/business/track/TrackPanel.vue.d.ts +2 -0
  396. package/dist/components/business/track/useTrack.d.ts +84 -0
  397. package/dist/components/mars-map/composables/useDraw.d.ts +15 -0
  398. package/dist/components/mars-map/composables/useMap.d.ts +29 -0
  399. package/dist/components/mars-map/composables/useMeasure.d.ts +11 -0
  400. package/dist/components/mars-map/composables/useVision.d.ts +11 -0
  401. package/dist/components/mars-map/index.d.ts +15 -0
  402. package/dist/components/mars-map/panels/ToolbarPanel.vue.d.ts +21 -0
  403. package/dist/components/mars-map/panels/VisionPanel.vue.d.ts +25 -0
  404. package/dist/components/mars-work/mars-map.vue.d.ts +44 -0
  405. package/dist/config/config copy.json +1488 -0
  406. package/dist/config/config.json +1298 -0
  407. package/dist/favicon.ico +0 -0
  408. package/dist/img/basemaps/TerrainEllipsoid.png +0 -0
  409. package/dist/img/basemaps/TerrainSTK.png +0 -0
  410. package/dist/img/basemaps/arcgis.png +0 -0
  411. package/dist/img/basemaps/bd-c-bluish.png +0 -0
  412. package/dist/img/basemaps/bd-c-dark.png +0 -0
  413. package/dist/img/basemaps/bd-c-darkgreen.png +0 -0
  414. package/dist/img/basemaps/bd-c-googlelite.png +0 -0
  415. package/dist/img/basemaps/bd-c-grassgreen.png +0 -0
  416. package/dist/img/basemaps/bd-c-grayscale.png +0 -0
  417. package/dist/img/basemaps/bd-c-hardedge.png +0 -0
  418. package/dist/img/basemaps/bd-c-light.png +0 -0
  419. package/dist/img/basemaps/bd-c-midnight.png +0 -0
  420. package/dist/img/basemaps/bd-c-pink.png +0 -0
  421. package/dist/img/basemaps/bd-c-redalert.png +0 -0
  422. package/dist/img/basemaps/bd-img.png +0 -0
  423. package/dist/img/basemaps/bd-vec.png +0 -0
  424. package/dist/img/basemaps/bingAerial.png +0 -0
  425. package/dist/img/basemaps/bingAerialLabels.png +0 -0
  426. package/dist/img/basemaps/bingRoads.png +0 -0
  427. package/dist/img/basemaps/bingimage.png +0 -0
  428. package/dist/img/basemaps/bingmap.png +0 -0
  429. package/dist/img/basemaps/blackMarble.png +0 -0
  430. package/dist/img/basemaps/esriNationalGeographic.png +0 -0
  431. package/dist/img/basemaps/esriWorldImagery.png +0 -0
  432. package/dist/img/basemaps/esriWorldStreetMap.png +0 -0
  433. package/dist/img/basemaps/gaode_img.png +0 -0
  434. package/dist/img/basemaps/gaode_vec.png +0 -0
  435. package/dist/img/basemaps/google_img.png +0 -0
  436. package/dist/img/basemaps/google_ter.png +0 -0
  437. package/dist/img/basemaps/google_vec.png +0 -0
  438. package/dist/img/basemaps/mapQuestOpenStreetMap.png +0 -0
  439. package/dist/img/basemaps/mapboxSatellite.png +0 -0
  440. package/dist/img/basemaps/mapboxStreets.png +0 -0
  441. package/dist/img/basemaps/mapboxTerrain.png +0 -0
  442. package/dist/img/basemaps/naturalEarthII.png +0 -0
  443. package/dist/img/basemaps/offline.png +0 -0
  444. package/dist/img/basemaps/osm.png +0 -0
  445. package/dist/img/basemaps/sea.png +0 -0
  446. package/dist/img/basemaps/stamenToner.png +0 -0
  447. package/dist/img/basemaps/stamenWatercolor.png +0 -0
  448. package/dist/img/basemaps/tdt_img.png +0 -0
  449. package/dist/img/basemaps/tdt_ter.png +0 -0
  450. package/dist/img/basemaps/tdt_vec.png +0 -0
  451. package/dist/img/basemaps/tencent_img.png +0 -0
  452. package/dist/img/basemaps/tencent_vec.png +0 -0
  453. package/dist/img/marker/mark-blue.png +0 -0
  454. package/dist/img/textures/fence.png +0 -0
  455. package/dist/img/textures/poly-rivers.png +0 -0
  456. package/dist/img/textures/waterNormals.jpg +0 -0
  457. package/dist/index.d.ts +41 -0
  458. package/dist/main.d.ts +4 -0
  459. package/dist/style.css +4295 -0
  460. package/dist/yi-map-web.mjs +2107 -0
  461. package/dist/yi-map-web.mjs.map +1 -0
  462. package/dist/yi-map-web.umd.cjs +2128 -0
  463. package/dist/yi-map-web.umd.cjs.map +1 -0
  464. package/package.json +64 -0
@@ -0,0 +1,2128 @@
1
+ const vue_1 = require('vue');
2
+ const vue = vue_1.default || vue_1;
3
+ (function(global, factory) {
4
+ typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("vue"), require("mars3d")) : typeof define === "function" && define.amd ? define(["exports", "vue", "mars3d"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.YiMap = {}, global.Vue, global.mars3d));
5
+ })(this, function(exports2, vue, mars3d) {
6
+ "use strict";
7
+ function _interopNamespaceDefault(e) {
8
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
9
+ if (e) {
10
+ for (const k in e) {
11
+ if (k !== "default") {
12
+ const d = Object.getOwnPropertyDescriptor(e, k);
13
+ Object.defineProperty(n, k, d.get ? d : {
14
+ enumerable: true,
15
+ get: () => e[k]
16
+ });
17
+ }
18
+ }
19
+ }
20
+ n.default = e;
21
+ return Object.freeze(n);
22
+ }
23
+ const mars3d__namespace = /* @__PURE__ */ _interopNamespaceDefault(mars3d);
24
+ class CameraList extends mars3d__namespace.TaskItem {
25
+ // 进入,激活开始处理事务
26
+ _activateWork() {
27
+ this._map.setCameraViewList(this.options.list);
28
+ }
29
+ // 暂停(非必须)
30
+ _pauseWork() {
31
+ this._disableWork();
32
+ }
33
+ }
34
+ mars3d__namespace.thing.Task.register("cameraList", CameraList);
35
+ class CameraView extends mars3d__namespace.TaskItem {
36
+ // 进入,激活开始处理事务
37
+ _activateWork() {
38
+ this._map.setCameraView(this.options.center, { duration: this._duration });
39
+ }
40
+ // 离开,释放相关对象
41
+ _disableWork() {
42
+ this._map.cancelFlyTo();
43
+ }
44
+ }
45
+ mars3d__namespace.thing.Task.register("camera", CameraView);
46
+ class MapRotate extends mars3d__namespace.TaskItem {
47
+ constructor(options = {}) {
48
+ super(options);
49
+ this._speed = this.options.speed || 0.01;
50
+ this._center = this.options.center || { lat: 29.093038, lng: 108.804459, alt: 233212327e-1, heading: 0, pitch: -90 };
51
+ }
52
+ // 进入,激活开始处理事务
53
+ _activateWork() {
54
+ this._map.setCameraView(this._center, {
55
+ duration: 1,
56
+ complete: () => {
57
+ this._map.on(mars3d__namespace.EventType.clockTick, this._map_onClockTick, this);
58
+ }
59
+ });
60
+ }
61
+ // 离开,释放相关对象
62
+ _disableWork() {
63
+ this._map.off(mars3d__namespace.EventType.clockTick, this._map_onClockTick, this);
64
+ }
65
+ _map_onClockTick() {
66
+ if (this.isPause) {
67
+ return;
68
+ }
69
+ this._map.scene.camera.rotate(mars3d__namespace.Cesium.Cartesian3.UNIT_Z, this._speed);
70
+ }
71
+ }
72
+ mars3d__namespace.thing.Task.register("mapRotate", MapRotate);
73
+ class PointRotate extends mars3d__namespace.TaskItem {
74
+ // 进入,激活开始处理事务
75
+ _activateWork() {
76
+ if (this.options.center) {
77
+ this._map.setCameraView(this.options.center, { duration: 0 });
78
+ }
79
+ if (this.options.autoStop) {
80
+ delete this.options.autoStopAngle;
81
+ }
82
+ if (this.options.isRotateOut) {
83
+ this._rotateOut = new mars3d__namespace.thing.RotateOut(this.options);
84
+ this._map.addThing(this._rotateOut);
85
+ } else {
86
+ this._rotatePoint = new mars3d__namespace.thing.RotatePoint(this.options);
87
+ this._map.addThing(this._rotatePoint);
88
+ }
89
+ if (this.options.isRotateOut) {
90
+ this._rotateOut.start();
91
+ } else {
92
+ this._rotatePoint.start(this.options.point);
93
+ }
94
+ }
95
+ // 离开,释放相关对象
96
+ _disableWork() {
97
+ if (this._rotatePoint) {
98
+ this._rotatePoint.stop();
99
+ this._rotatePoint.destroy();
100
+ delete this._rotatePoint;
101
+ }
102
+ if (this._rotateOut) {
103
+ this._rotateOut.stop();
104
+ this._rotateOut.destroy();
105
+ delete this._rotateOut;
106
+ }
107
+ }
108
+ }
109
+ mars3d__namespace.thing.Task.register("pointRotate", PointRotate);
110
+ class RouteLine extends mars3d__namespace.TaskItem {
111
+ // constructor(options) {
112
+ // super(options)
113
+ // }
114
+ // 进入,激活开始处理事务
115
+ _activateWork() {
116
+ this._graphicLayer = new mars3d__namespace.layer.GraphicLayer();
117
+ this._map.addLayer(this._graphicLayer);
118
+ const fixedRoute = new mars3d__namespace.graphic.FixedRoute(this.options.route);
119
+ this._graphicLayer.addGraphic(fixedRoute);
120
+ this._fixedRoute = fixedRoute;
121
+ fixedRoute.start();
122
+ }
123
+ // 暂停(非必须)
124
+ _pauseWork(options) {
125
+ if (this._fixedRoute) {
126
+ this._fixedRoute.pause();
127
+ }
128
+ }
129
+ // 继续(非必须)
130
+ _proceedWork() {
131
+ if (this._fixedRoute) {
132
+ this._fixedRoute.proceed();
133
+ }
134
+ }
135
+ // 离开,释放相关对象
136
+ _disableWork() {
137
+ if (this._fixedRoute) {
138
+ this._fixedRoute.stop();
139
+ delete this._fixedRoute;
140
+ }
141
+ if (this._graphicLayer) {
142
+ this._graphicLayer.destroy();
143
+ delete this._graphicLayer;
144
+ }
145
+ }
146
+ }
147
+ mars3d__namespace.thing.Task.register("routeLine", RouteLine);
148
+ class ZoomIn extends mars3d__namespace.TaskItem {
149
+ // 进入,激活开始处理事务
150
+ _activateWork() {
151
+ this._map.zoomIn(this.options.relativeAmount);
152
+ }
153
+ }
154
+ mars3d__namespace.thing.Task.register("zoomIn", ZoomIn);
155
+ class ZoomOut extends mars3d__namespace.TaskItem {
156
+ // 进入,激活开始处理事务
157
+ _activateWork() {
158
+ this._map.zoomOut(this.options.relativeAmount);
159
+ }
160
+ }
161
+ mars3d__namespace.thing.Task.register("zoomOut", ZoomOut);
162
+ class FlickerEntity extends mars3d__namespace.TaskItem {
163
+ // 进入,激活开始处理事务
164
+ _activateWork() {
165
+ const layer = this._map.getLayerById(this.options.layerId);
166
+ if (layer) {
167
+ layer.show = true;
168
+ layer.readyPromise.then(() => {
169
+ this._graphic = layer.getGraphicById(this.options.graphicId);
170
+ if (this._graphic) {
171
+ this._graphic.show = true;
172
+ this._graphic.startFlicker({
173
+ time: this._duration,
174
+ step: this.options.step,
175
+ maxAlpha: this.options.maxAlpha,
176
+ color: this.options.color
177
+ });
178
+ }
179
+ });
180
+ }
181
+ }
182
+ // 离开,释放相关对象
183
+ _disableWork() {
184
+ if (this._graphic) {
185
+ this._graphic.stopFlicker();
186
+ }
187
+ }
188
+ }
189
+ mars3d__namespace.thing.Task.register("flickerEntity", FlickerEntity);
190
+ class CanvasBillboard extends mars3d__namespace.graphic.BillboardPrimitive {
191
+ /**
192
+ * 文字
193
+ * @type {string}
194
+ */
195
+ get text() {
196
+ return this.style.text;
197
+ }
198
+ set text(val) {
199
+ this.style.text = val;
200
+ this.label.text = val;
201
+ }
202
+ /**
203
+ * 对象添加到图层前创建一些对象的钩子方法,
204
+ * 只会调用一次
205
+ * @return {Promise<object>} 无
206
+ * @private
207
+ */
208
+ _addedHook(style) {
209
+ style.image = "//data.mars3d.cn/img/marker/bg/textPnl.png";
210
+ style.label = {
211
+ ...style,
212
+ text: this.style.text,
213
+ font_size: 55,
214
+ color: style.textColor ?? "#ffffff",
215
+ hasPixelOffset: true,
216
+ pixelOffsetX: 0,
217
+ pixelOffsetY: -36 * (style.scale ?? 1)
218
+ };
219
+ if (style.scaleByDistance) {
220
+ style.label.pixelOffsetScaleByDistance = style.scaleByDistance;
221
+ }
222
+ super._addedHook(style);
223
+ }
224
+ }
225
+ mars3d__namespace.GraphicUtil.register("canvasBillboard", CanvasBillboard);
226
+ const _hoisted_1$5 = ["id"];
227
+ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
228
+ __name: "mars-map",
229
+ props: {
230
+ mapKey: { default: "default" },
231
+ url: { default: void 0 },
232
+ options: { default: void 0 }
233
+ },
234
+ emits: ["onload"],
235
+ setup(__props, { emit: __emit }) {
236
+ const props = __props;
237
+ let map;
238
+ const withKeyId = vue.computed(() => `mars3d-container-${props.mapKey}`);
239
+ const emit = __emit;
240
+ const initMars3d = async () => {
241
+ let mapOptions;
242
+ if (props.url) {
243
+ mapOptions = await mars3d__namespace.Util.fetchJson({ url: props.url });
244
+ if (props.options) {
245
+ mapOptions = mars3d__namespace.Util.merge(mapOptions, vue.toRaw(props.options));
246
+ }
247
+ } else if (props.options) {
248
+ mapOptions = vue.toRaw(props.options);
249
+ }
250
+ mars3d__namespace.Util.showCopyright = false;
251
+ map = new mars3d__namespace.Map(withKeyId.value, mapOptions);
252
+ if (mars3d__namespace.Util.isPCBroswer()) {
253
+ map.zoomFactor = 2;
254
+ if (window.navigator.userAgent.toLowerCase().indexOf("msie") >= 0) {
255
+ map.viewer.targetFrameRate = 20;
256
+ map.scene.requestRenderMode = false;
257
+ }
258
+ } else {
259
+ map.zoomFactor = 5;
260
+ map.scene.requestRenderMode = false;
261
+ map.scene.fog.enabled = false;
262
+ map.scene.skyAtmosphere.show = false;
263
+ map.scene.globe.showGroundAtmosphere = false;
264
+ }
265
+ if (map.viewer.sceneModePicker) {
266
+ map.viewer.sceneModePicker.viewModel.duration = 0;
267
+ }
268
+ if (map.mars3dLogo) {
269
+ map.mars3dLogo.show = false;
270
+ }
271
+ setTimeout(() => {
272
+ const logoElements = document.getElementsByClassName("mars3d-logo");
273
+ for (let i = 0; i < logoElements.length; i++) {
274
+ logoElements[i].remove();
275
+ }
276
+ }, 100);
277
+ emit("onload", map);
278
+ };
279
+ vue.onMounted(() => {
280
+ initMars3d();
281
+ });
282
+ vue.onUnmounted(() => {
283
+ if (map) {
284
+ map.destroy();
285
+ map = null;
286
+ }
287
+ });
288
+ return (_ctx, _cache) => {
289
+ return vue.openBlock(), vue.createElementBlock("div", {
290
+ id: withKeyId.value,
291
+ class: "mars3d-container"
292
+ }, null, 8, _hoisted_1$5);
293
+ };
294
+ }
295
+ });
296
+ const _hoisted_1$4 = { class: "panel-content" };
297
+ const _hoisted_2$3 = { class: "menu-group" };
298
+ const _hoisted_3$3 = ["title", "onClick"];
299
+ const _hoisted_4$3 = { class: "menu-group" };
300
+ const _hoisted_5$2 = ["title", "onClick"];
301
+ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
302
+ __name: "ToolbarPanel",
303
+ props: {
304
+ activeDrawType: {}
305
+ },
306
+ emits: ["toolActivate", "clear"],
307
+ setup(__props, { emit: __emit }) {
308
+ const emit = __emit;
309
+ const isCollapsed = vue.ref(false);
310
+ const toggleCollapse = () => {
311
+ isCollapsed.value = !isCollapsed.value;
312
+ };
313
+ const activateTool = (tool) => {
314
+ emit("toolActivate", tool);
315
+ };
316
+ const emitClear = () => {
317
+ emit("clear");
318
+ };
319
+ const measureTools = [
320
+ {
321
+ tool: "measureDistance",
322
+ title: "测量距离",
323
+ iconClasses: ["fa", "fa-arrows-alt-h"]
324
+ // 水平双向箭头,更准确表达距离
325
+ },
326
+ {
327
+ tool: "measureArea",
328
+ title: "测量面积",
329
+ iconClasses: ["fa", "fa-vector-square"]
330
+ // 矢量方块,更几何感、专业感
331
+ },
332
+ {
333
+ tool: "measureHeight",
334
+ title: "测量高度差",
335
+ iconClasses: ["fa", "fa-arrows-alt-v"]
336
+ // 垂直双向箭头,清晰表达高度
337
+ },
338
+ {
339
+ tool: "measureAngle",
340
+ title: "测量角度",
341
+ iconClasses: ["fa-solid", "fa-compass-drafting"]
342
+ // 绘图圆规图标,专业表达角度测量
343
+ }
344
+ ];
345
+ const drawTools = [
346
+ {
347
+ tool: "drawPoint",
348
+ title: "点标记",
349
+ iconClasses: ["fa", "fa-map-marker"],
350
+ // 地图标记点,比空心圆更直观
351
+ drawType: "point"
352
+ },
353
+ {
354
+ tool: "drawLine",
355
+ title: "线标记",
356
+ iconClasses: ["fa", "fa-slash"],
357
+ // 斜线比短横线更像"线"的概念
358
+ drawType: "polyline"
359
+ },
360
+ {
361
+ tool: "drawPolygon",
362
+ title: "面标记",
363
+ iconClasses: ["fa-solid", "fa-draw-polygon"],
364
+ // 多边形绘制图标,语义明确
365
+ drawType: "polygon"
366
+ },
367
+ {
368
+ tool: "drawCircle",
369
+ title: "圆标记",
370
+ iconClasses: ["fa", "fa-circle"],
371
+ // 实心圆表示圆
372
+ drawType: "circle"
373
+ },
374
+ {
375
+ tool: "drawRectangle",
376
+ title: "矩形标记",
377
+ iconClasses: ["fa-regular", "fa-square"],
378
+ // 空心方块,与圆标记风格统一
379
+ drawType: "rectangle"
380
+ },
381
+ {
382
+ tool: "drawFreePolygon",
383
+ title: "自由多边形",
384
+ iconClasses: ["fa", "fa-pencil"],
385
+ // 铅笔表示自由绘制
386
+ drawType: "freePolygon"
387
+ }
388
+ ];
389
+ return (_ctx, _cache) => {
390
+ return vue.openBlock(), vue.createElementBlock("div", {
391
+ class: vue.normalizeClass(["toolbar-panel", { collapsed: isCollapsed.value }])
392
+ }, [
393
+ vue.createElementVNode("div", {
394
+ class: "panel-header",
395
+ onClick: toggleCollapse
396
+ }, [
397
+ vue.createElementVNode("i", {
398
+ class: vue.normalizeClass([
399
+ "toggle-icon",
400
+ "fa",
401
+ isCollapsed.value ? "fa-chevron-down" : "fa-chevron-up"
402
+ ])
403
+ }, null, 2)
404
+ ]),
405
+ vue.withDirectives(vue.createElementVNode("div", _hoisted_1$4, [
406
+ vue.createElementVNode("div", _hoisted_2$3, [
407
+ (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, vue.renderList(measureTools, (item) => {
408
+ return vue.createElementVNode("div", {
409
+ key: item.tool,
410
+ class: "menu-item",
411
+ title: item.title,
412
+ onClick: ($event) => activateTool(item.tool)
413
+ }, [
414
+ vue.createElementVNode("i", {
415
+ class: vue.normalizeClass(item.iconClasses)
416
+ }, null, 2)
417
+ ], 8, _hoisted_3$3);
418
+ }), 64))
419
+ ]),
420
+ _cache[2] || (_cache[2] = vue.createElementVNode("div", { class: "divider" }, null, -1)),
421
+ vue.createElementVNode("div", _hoisted_4$3, [
422
+ (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, vue.renderList(drawTools, (item) => {
423
+ return vue.createElementVNode("div", {
424
+ key: item.tool,
425
+ class: vue.normalizeClass(["menu-item", { active: __props.activeDrawType === item.drawType }]),
426
+ title: item.title,
427
+ onClick: ($event) => activateTool(item.tool)
428
+ }, [
429
+ vue.createElementVNode("i", {
430
+ class: vue.normalizeClass(item.iconClasses)
431
+ }, null, 2)
432
+ ], 10, _hoisted_5$2);
433
+ }), 64)),
434
+ _cache[1] || (_cache[1] = vue.createElementVNode("div", { class: "divider" }, null, -1)),
435
+ vue.createElementVNode("div", {
436
+ class: "menu-item",
437
+ title: "清除全部",
438
+ onClick: emitClear
439
+ }, [..._cache[0] || (_cache[0] = [
440
+ vue.createElementVNode("i", { class: "fa-solid fa-trash-can" }, null, -1)
441
+ ])])
442
+ ])
443
+ ], 512), [
444
+ [vue.vShow, !isCollapsed.value]
445
+ ])
446
+ ], 2);
447
+ };
448
+ }
449
+ });
450
+ const _export_sfc = (sfc, props) => {
451
+ const target = sfc.__vccOpts || sfc;
452
+ for (const [key, val] of props) {
453
+ target[key] = val;
454
+ }
455
+ return target;
456
+ };
457
+ const ToolbarPanel = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-f9e69b7a"]]);
458
+ const _hoisted_1$3 = {
459
+ key: 0,
460
+ class: "vision-popup"
461
+ };
462
+ const _hoisted_2$2 = { class: "popup-header" };
463
+ const _hoisted_3$2 = { class: "popup-content" };
464
+ const _hoisted_4$2 = ["onClick"];
465
+ const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent({
466
+ __name: "VisionPanel",
467
+ props: {
468
+ circleFlyActive: { type: Boolean },
469
+ flyToActive: { type: Boolean },
470
+ firstPersonActive: { type: Boolean },
471
+ keyboardNavigateActive: { type: Boolean }
472
+ },
473
+ emits: ["visionExecute"],
474
+ setup(__props, { emit: __emit }) {
475
+ const props = __props;
476
+ const emit = __emit;
477
+ const popupVisible = vue.ref(false);
478
+ const togglePopup = () => {
479
+ popupVisible.value = !popupVisible.value;
480
+ };
481
+ const execute = (action) => {
482
+ emit("visionExecute", action);
483
+ };
484
+ const visionItems = [
485
+ {
486
+ action: "circleFly",
487
+ icon: "fa-refresh",
488
+ label: "环绕飞行",
489
+ activeLabel: "关闭环绕飞行",
490
+ activeProp: "circleFlyActive"
491
+ },
492
+ {
493
+ action: "flyTo",
494
+ icon: "fa-location-arrow",
495
+ label: "移动到此处",
496
+ activeProp: "flyToActive"
497
+ },
498
+ {
499
+ action: "firstPerson",
500
+ icon: "fa-user",
501
+ label: "开启第一视角",
502
+ activeLabel: "关闭第一视角",
503
+ activeProp: "firstPersonActive"
504
+ },
505
+ {
506
+ action: "keyboardNavigate",
507
+ icon: "fa-keyboard-o",
508
+ label: "开启键盘漫游",
509
+ activeLabel: "关闭键盘漫游",
510
+ activeProp: "keyboardNavigateActive"
511
+ }
512
+ ];
513
+ const isActive = (item) => item.activeProp ? !!props[item.activeProp] : false;
514
+ const getLabel = (item) => isActive(item) && item.activeLabel ? item.activeLabel : item.label;
515
+ return (_ctx, _cache) => {
516
+ return vue.openBlock(), vue.createElementBlock(vue.Fragment, null, [
517
+ vue.createElementVNode("div", {
518
+ class: "vision-button",
519
+ title: "视觉功能",
520
+ onClick: togglePopup
521
+ }, [..._cache[1] || (_cache[1] = [
522
+ vue.createElementVNode("i", { class: "fa fa-eye" }, null, -1)
523
+ ])]),
524
+ vue.createVNode(vue.Transition, { name: "vision-fade" }, {
525
+ default: vue.withCtx(() => [
526
+ popupVisible.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$3, [
527
+ vue.createElementVNode("div", _hoisted_2$2, [
528
+ _cache[2] || (_cache[2] = vue.createElementVNode("span", null, "视觉功能", -1)),
529
+ vue.createElementVNode("i", {
530
+ class: "fa fa-times close-icon",
531
+ onClick: _cache[0] || (_cache[0] = ($event) => popupVisible.value = false)
532
+ })
533
+ ]),
534
+ vue.createElementVNode("div", _hoisted_3$2, [
535
+ (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, vue.renderList(visionItems, (item) => {
536
+ return vue.createElementVNode("div", {
537
+ key: item.action,
538
+ class: vue.normalizeClass(["popup-item", { active: isActive(item) }]),
539
+ onClick: ($event) => execute(item.action)
540
+ }, [
541
+ vue.createElementVNode("i", {
542
+ class: vue.normalizeClass(["fa", item.icon])
543
+ }, null, 2),
544
+ vue.createElementVNode("span", null, vue.toDisplayString(getLabel(item)), 1)
545
+ ], 10, _hoisted_4$2);
546
+ }), 64))
547
+ ])
548
+ ])) : vue.createCommentVNode("", true)
549
+ ]),
550
+ _: 1
551
+ })
552
+ ], 64);
553
+ };
554
+ }
555
+ });
556
+ const VisionPanel = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-4fc03fe1"]]);
557
+ function useMap() {
558
+ const Cesium = mars3d__namespace.Cesium;
559
+ const mapRef = vue.shallowRef(null);
560
+ const graphicLayer = vue.shallowRef(null);
561
+ const measureLayer = vue.shallowRef(null);
562
+ const selectedGraphic = vue.ref(null);
563
+ const lastClickPosition = vue.ref(null);
564
+ function initMap(map) {
565
+ mapRef.value = map;
566
+ const gLayer = new mars3d__namespace.layer.GraphicLayer();
567
+ map.addLayer(gLayer);
568
+ graphicLayer.value = gLayer;
569
+ const mLayer = new mars3d__namespace.layer.GraphicLayer();
570
+ map.addLayer(mLayer);
571
+ measureLayer.value = mLayer;
572
+ map.on(mars3d__namespace.EventType.click, (event) => {
573
+ if (event.lnglat) {
574
+ lastClickPosition.value = event.lnglat;
575
+ } else if (event.cartesian) {
576
+ const carto = Cesium.Ellipsoid.WGS84.cartesianToCartographic(event.cartesian);
577
+ lastClickPosition.value = {
578
+ lng: Cesium.Math.toDegrees(carto.longitude),
579
+ lat: Cesium.Math.toDegrees(carto.latitude),
580
+ alt: carto.height > 0 ? carto.height : 5e3
581
+ };
582
+ }
583
+ });
584
+ gLayer.on(mars3d__namespace.EventType.click, (event) => {
585
+ selectedGraphic.value = event.graphic;
586
+ });
587
+ gLayer.on(mars3d__namespace.EventType.mouseOver, (event) => {
588
+ if (!selectedGraphic.value) {
589
+ selectedGraphic.value = event.graphic;
590
+ }
591
+ });
592
+ gLayer.on(mars3d__namespace.EventType.mouseOut, (event) => {
593
+ if (selectedGraphic.value === event.graphic) {
594
+ selectedGraphic.value = null;
595
+ }
596
+ });
597
+ }
598
+ function destroyMap() {
599
+ if (mapRef.value) {
600
+ mapRef.value.destroy();
601
+ mapRef.value = null;
602
+ }
603
+ }
604
+ function addGraphic(graphic) {
605
+ var _a;
606
+ (_a = graphicLayer.value) == null ? void 0 : _a.addGraphic(graphic);
607
+ }
608
+ function addThing(thing) {
609
+ var _a;
610
+ (_a = mapRef.value) == null ? void 0 : _a.addThing(thing);
611
+ }
612
+ return {
613
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
614
+ map: mapRef,
615
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
616
+ graphicLayer,
617
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
618
+ measureLayer,
619
+ selectedGraphic,
620
+ lastClickPosition,
621
+ initMap,
622
+ destroyMap,
623
+ addGraphic,
624
+ addThing
625
+ };
626
+ }
627
+ function useMeasure(mapContext) {
628
+ const measureThing = vue.shallowRef(null);
629
+ function initMeasure() {
630
+ const map = mapContext.map.value;
631
+ const layer = mapContext.measureLayer.value;
632
+ if (!map || !layer) return;
633
+ const m = new mars3d__namespace.thing.Measure({ graphicLayer: layer });
634
+ map.addThing(m);
635
+ measureThing.value = m;
636
+ }
637
+ function measureDistance(style) {
638
+ var _a;
639
+ (_a = measureThing.value) == null ? void 0 : _a.distance({
640
+ style: { color: "#3388ff", width: 3, ...style }
641
+ });
642
+ }
643
+ function measureArea(style) {
644
+ var _a;
645
+ (_a = measureThing.value) == null ? void 0 : _a.area({
646
+ style: { color: "#3388ff", opacity: 0.5, ...style }
647
+ });
648
+ }
649
+ function measureHeight(style) {
650
+ var _a;
651
+ (_a = measureThing.value) == null ? void 0 : _a.height({
652
+ style: { color: "#3388ff", width: 3, ...style }
653
+ });
654
+ }
655
+ function measureAngle(style) {
656
+ var _a;
657
+ (_a = measureThing.value) == null ? void 0 : _a.angle({
658
+ style: { color: "#3388ff", width: 3, ...style }
659
+ });
660
+ }
661
+ function clearMeasure() {
662
+ var _a, _b;
663
+ (_a = measureThing.value) == null ? void 0 : _a.clear();
664
+ (_b = mapContext.measureLayer.value) == null ? void 0 : _b.clear();
665
+ }
666
+ return {
667
+ measureThing,
668
+ initMeasure,
669
+ measureDistance,
670
+ measureArea,
671
+ measureHeight,
672
+ measureAngle,
673
+ clearMeasure
674
+ };
675
+ }
676
+ function useDraw(mapContext) {
677
+ const currentDraw = vue.shallowRef(null);
678
+ const activeDrawType = vue.ref(null);
679
+ function getLayer() {
680
+ return mapContext.measureLayer.value;
681
+ }
682
+ function startDraw(type, style, drawType) {
683
+ const layer = getLayer();
684
+ if (!layer) return;
685
+ stopDraw();
686
+ currentDraw.value = layer.startDraw({ type, style });
687
+ activeDrawType.value = drawType;
688
+ }
689
+ function drawPoint(style) {
690
+ startDraw("point", { pixelSize: 10, color: "#ff0000", ...style }, "point");
691
+ }
692
+ function drawLine(style) {
693
+ startDraw("polyline", { width: 3, color: "#3388ff", ...style }, "polyline");
694
+ }
695
+ function drawPolygon(style) {
696
+ startDraw("polygon", { color: "#3388ff", opacity: 0.5, ...style }, "polygon");
697
+ }
698
+ function drawCircle(style) {
699
+ startDraw("circle", { radius: 1e3, color: "#00ff00", opacity: 0.3, ...style }, "circle");
700
+ }
701
+ function drawRectangle(style) {
702
+ startDraw("rectangle", { color: "#3388ff", opacity: 0.5, ...style }, "rectangle");
703
+ }
704
+ function drawFreePolygon(style) {
705
+ startDraw(
706
+ "polygon",
707
+ { color: "#3388ff", opacity: 0.5, clampToGround: true, ...style },
708
+ "freePolygon"
709
+ );
710
+ }
711
+ function stopDraw() {
712
+ var _a;
713
+ if (currentDraw.value) {
714
+ (_a = getLayer()) == null ? void 0 : _a.stopDraw();
715
+ currentDraw.value = null;
716
+ }
717
+ activeDrawType.value = null;
718
+ }
719
+ function clearDraw() {
720
+ var _a;
721
+ stopDraw();
722
+ (_a = getLayer()) == null ? void 0 : _a.clear();
723
+ }
724
+ return {
725
+ currentDraw,
726
+ activeDrawType,
727
+ drawPoint,
728
+ drawLine,
729
+ drawPolygon,
730
+ drawCircle,
731
+ drawRectangle,
732
+ drawFreePolygon,
733
+ stopDraw,
734
+ clearDraw
735
+ };
736
+ }
737
+ function useVision(mapContext) {
738
+ const circleFlyActive = vue.ref(false);
739
+ const firstPersonActive = vue.ref(false);
740
+ const keyboardActive = vue.ref(false);
741
+ const flyToActive = vue.ref(false);
742
+ const rotatePoint = vue.shallowRef(null);
743
+ const firstPersonRoam = vue.shallowRef(null);
744
+ const keyboardRoam = vue.shallowRef(null);
745
+ let initialCameraView = null;
746
+ function getMap() {
747
+ return mapContext.map.value;
748
+ }
749
+ function toggleCircleFly() {
750
+ const map = getMap();
751
+ if (!map) return;
752
+ if (rotatePoint.value) {
753
+ if (rotatePoint.value.isStart) {
754
+ rotatePoint.value.stop();
755
+ }
756
+ map.removeThing(rotatePoint.value);
757
+ rotatePoint.value = null;
758
+ circleFlyActive.value = false;
759
+ return;
760
+ }
761
+ const center = map.getCenter();
762
+ const rp = new mars3d__namespace.thing.RotatePoint({ distance: 5e3, time: 30 });
763
+ map.addThing(rp);
764
+ rp.start(center);
765
+ rotatePoint.value = rp;
766
+ circleFlyActive.value = true;
767
+ }
768
+ function flyTo() {
769
+ const map = getMap();
770
+ if (!map) return;
771
+ flyToActive.value = true;
772
+ const done = () => setTimeout(() => {
773
+ flyToActive.value = false;
774
+ }, 2e3);
775
+ const pos = mapContext.lastClickPosition.value;
776
+ if (pos) {
777
+ const target = { ...pos, alt: pos.alt > 0 ? pos.alt : 5e3 };
778
+ map.setCameraView(target, { duration: 2, complete: done });
779
+ } else {
780
+ map.flyHome({ duration: 2 });
781
+ done();
782
+ }
783
+ }
784
+ function toggleFirstPerson() {
785
+ const map = getMap();
786
+ if (!map) return;
787
+ if (!firstPersonRoam.value) {
788
+ const roam = new mars3d__namespace.thing.FirstPersonRoam({});
789
+ map.addThing(roam);
790
+ initialCameraView = map.getCameraView();
791
+ roam.enabled = true;
792
+ firstPersonRoam.value = roam;
793
+ firstPersonActive.value = true;
794
+ } else {
795
+ const roam = firstPersonRoam.value;
796
+ roam.enabled = !roam.enabled;
797
+ firstPersonActive.value = roam.enabled;
798
+ if (!roam.enabled && initialCameraView) {
799
+ map.setCameraView(initialCameraView, { duration: 1 });
800
+ } else if (roam.enabled) {
801
+ initialCameraView = map.getCameraView();
802
+ }
803
+ }
804
+ }
805
+ function toggleKeyboardNavigate() {
806
+ const map = getMap();
807
+ if (!map) return;
808
+ if (!keyboardRoam.value) {
809
+ const roam = new mars3d__namespace.thing.KeyboardRoam({});
810
+ map.addThing(roam);
811
+ roam.enabled = true;
812
+ keyboardRoam.value = roam;
813
+ keyboardActive.value = true;
814
+ } else {
815
+ const roam = keyboardRoam.value;
816
+ roam.enabled = !roam.enabled;
817
+ keyboardActive.value = roam.enabled;
818
+ }
819
+ }
820
+ return {
821
+ // 状态
822
+ circleFlyActive,
823
+ firstPersonActive,
824
+ keyboardActive,
825
+ flyToActive,
826
+ // 方法
827
+ toggleCircleFly,
828
+ flyTo,
829
+ toggleFirstPerson,
830
+ toggleKeyboardNavigate
831
+ };
832
+ }
833
+ const _hoisted_1$2 = { class: "mars-map-container" };
834
+ const _sfc_main$4 = /* @__PURE__ */ vue.defineComponent({
835
+ __name: "MarsMapContainer",
836
+ props: {
837
+ configUrl: { default: "config/config.json" },
838
+ mapKey: { default: "default" },
839
+ hideToolbar: { type: Boolean, default: false },
840
+ hideVision: { type: Boolean, default: false }
841
+ },
842
+ emits: ["onload"],
843
+ setup(__props, { expose: __expose, emit: __emit }) {
844
+ const emit = __emit;
845
+ const mapCtx = useMap();
846
+ const measure = useMeasure(mapCtx);
847
+ const draw = useDraw(mapCtx);
848
+ const vision = useVision(mapCtx);
849
+ vue.provide("mapContext", mapCtx);
850
+ vue.provide("measureContext", measure);
851
+ vue.provide("drawContext", draw);
852
+ vue.provide("visionContext", vision);
853
+ function onMapLoad(map) {
854
+ mapCtx.initMap(map);
855
+ measure.initMeasure();
856
+ emit("onload", map);
857
+ }
858
+ function handleToolActivate(tool) {
859
+ switch (tool) {
860
+ case "measureDistance":
861
+ measure.measureDistance();
862
+ break;
863
+ case "measureArea":
864
+ measure.measureArea();
865
+ break;
866
+ case "measureHeight":
867
+ measure.measureHeight();
868
+ break;
869
+ case "measureAngle":
870
+ measure.measureAngle();
871
+ break;
872
+ case "drawPoint":
873
+ draw.drawPoint();
874
+ break;
875
+ case "drawLine":
876
+ draw.drawLine();
877
+ break;
878
+ case "drawPolygon":
879
+ draw.drawPolygon();
880
+ break;
881
+ case "drawCircle":
882
+ draw.drawCircle();
883
+ break;
884
+ case "drawRectangle":
885
+ draw.drawRectangle();
886
+ break;
887
+ case "drawFreePolygon":
888
+ draw.drawFreePolygon();
889
+ break;
890
+ }
891
+ }
892
+ function handleClear() {
893
+ measure.clearMeasure();
894
+ draw.clearDraw();
895
+ }
896
+ function handleVisionExecute(action) {
897
+ switch (action) {
898
+ case "circleFly":
899
+ vision.toggleCircleFly();
900
+ break;
901
+ case "flyTo":
902
+ vision.flyTo();
903
+ break;
904
+ case "firstPerson":
905
+ vision.toggleFirstPerson();
906
+ break;
907
+ case "keyboardNavigate":
908
+ vision.toggleKeyboardNavigate();
909
+ break;
910
+ }
911
+ }
912
+ __expose({
913
+ map: mapCtx.map,
914
+ graphicLayer: mapCtx.graphicLayer,
915
+ measureLayer: mapCtx.measureLayer,
916
+ selectedGraphic: mapCtx.selectedGraphic,
917
+ lastClickPosition: mapCtx.lastClickPosition,
918
+ addGraphic: mapCtx.addGraphic,
919
+ addThing: mapCtx.addThing,
920
+ measure,
921
+ draw,
922
+ vision
923
+ });
924
+ return (_ctx, _cache) => {
925
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2, [
926
+ vue.createVNode(_sfc_main$7, {
927
+ url: __props.configUrl,
928
+ "map-key": __props.mapKey,
929
+ onOnload: onMapLoad
930
+ }, null, 8, ["url", "map-key"]),
931
+ !__props.hideToolbar ? (vue.openBlock(), vue.createBlock(ToolbarPanel, {
932
+ key: 0,
933
+ "active-draw-type": vue.unref(draw).activeDrawType.value,
934
+ onToolActivate: handleToolActivate,
935
+ onClear: handleClear
936
+ }, null, 8, ["active-draw-type"])) : vue.createCommentVNode("", true),
937
+ !__props.hideVision ? (vue.openBlock(), vue.createBlock(VisionPanel, {
938
+ key: 1,
939
+ "circle-fly-active": vue.unref(vision).circleFlyActive.value,
940
+ "fly-to-active": vue.unref(vision).flyToActive.value,
941
+ "first-person-active": vue.unref(vision).firstPersonActive.value,
942
+ "keyboard-navigate-active": vue.unref(vision).keyboardActive.value,
943
+ onVisionExecute: handleVisionExecute
944
+ }, null, 8, ["circle-fly-active", "fly-to-active", "first-person-active", "keyboard-navigate-active"])) : vue.createCommentVNode("", true),
945
+ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
946
+ ]);
947
+ };
948
+ }
949
+ });
950
+ const MarsMapContainer = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-9c769713"]]);
951
+ const CATEGORY_ICON = {
952
+ default: "//data.mars3d.cn/img/marker/mark-blue.png",
953
+ warning: "//data.mars3d.cn/img/marker/mark-red.png",
954
+ info: "//data.mars3d.cn/img/marker/mark-green.png"
955
+ };
956
+ let _idCounter$1 = 1;
957
+ function usePoiMarker(mapCtx) {
958
+ const poiLayer = vue.shallowRef(null);
959
+ const poiList = vue.ref([]);
960
+ const activePoiId = vue.ref(null);
961
+ function initPoiLayer() {
962
+ const map = mapCtx.map.value;
963
+ if (!map) return;
964
+ const layer = new mars3d__namespace.layer.GraphicLayer();
965
+ map.addLayer(layer);
966
+ poiLayer.value = layer;
967
+ layer.on(mars3d__namespace.EventType.click, (e) => {
968
+ var _a, _b;
969
+ const poiId = (_b = (_a = e.graphic) == null ? void 0 : _a.attr) == null ? void 0 : _b.poiId;
970
+ if (poiId) selectPoi(poiId);
971
+ });
972
+ }
973
+ function addPoi(params) {
974
+ const layer = poiLayer.value;
975
+ if (!layer) return null;
976
+ const id = `poi-${_idCounter$1++}`;
977
+ const graphic = new mars3d__namespace.graphic.BillboardEntity({
978
+ position: [params.lng, params.lat, params.alt],
979
+ style: {
980
+ image: CATEGORY_ICON[params.category],
981
+ scale: 1,
982
+ horizontalOrigin: mars3d__namespace.Cesium.HorizontalOrigin.CENTER,
983
+ verticalOrigin: mars3d__namespace.Cesium.VerticalOrigin.BOTTOM,
984
+ clampToGround: false,
985
+ // 标注文字
986
+ label: {
987
+ text: params.name,
988
+ font_size: 14,
989
+ color: "#ffffff",
990
+ outline: true,
991
+ outlineColor: "#333333",
992
+ outlineWidth: 2,
993
+ pixelOffset: new mars3d__namespace.Cesium.Cartesian2(0, -40),
994
+ visibleDepth: false
995
+ }
996
+ },
997
+ // popup 弹窗(点击标注时自动展示)
998
+ popup: buildPopupHtml(params),
999
+ attr: { poiId: id, name: params.name }
1000
+ });
1001
+ layer.addGraphic(graphic);
1002
+ const poi = { ...params, id, graphic };
1003
+ poiList.value.push(poi);
1004
+ return poi;
1005
+ }
1006
+ function removePoi(id) {
1007
+ var _a;
1008
+ const idx = poiList.value.findIndex((p) => p.id === id);
1009
+ if (idx === -1) return;
1010
+ const poi = poiList.value[idx];
1011
+ poi.graphic && ((_a = poiLayer.value) == null ? void 0 : _a.removeGraphic(poi.graphic));
1012
+ poiList.value.splice(idx, 1);
1013
+ if (activePoiId.value === id) activePoiId.value = null;
1014
+ }
1015
+ function selectPoi(id, flyTo = false) {
1016
+ activePoiId.value = id;
1017
+ const poi = poiList.value.find((p) => p.id === id);
1018
+ if (!poi) return;
1019
+ poiList.value.forEach((p) => {
1020
+ if (p.graphic) {
1021
+ p.graphic.style.scale = p.id === id ? 1.4 : 1;
1022
+ }
1023
+ });
1024
+ if (flyTo) flyToPoi(id);
1025
+ }
1026
+ function updatePoiName(id, newName) {
1027
+ var _a, _b, _c;
1028
+ const poi = poiList.value.find((p) => p.id === id);
1029
+ if (!poi) return;
1030
+ poi.name = newName;
1031
+ if (poi.graphic) {
1032
+ poi.graphic.attr = { ...poi.graphic.attr, name: newName };
1033
+ poi.graphic.popup = buildPopupHtml(poi);
1034
+ if ((_a = poi.graphic.style) == null ? void 0 : _a.label) {
1035
+ poi.graphic.style.label.text = newName;
1036
+ }
1037
+ (_c = (_b = poi.graphic).closePopup) == null ? void 0 : _c.call(_b);
1038
+ }
1039
+ }
1040
+ function flyToPoi(id) {
1041
+ const poi = poiList.value.find((p) => p.id === id);
1042
+ if (!poi || !mapCtx.map.value) return;
1043
+ const map = mapCtx.map.value;
1044
+ const baseAlt = poi.alt > 1 ? poi.alt : 50;
1045
+ const flyAlt = baseAlt + 1500;
1046
+ map.setCameraView({ lng: poi.lng, lat: poi.lat, alt: flyAlt }, { duration: 1.5 });
1047
+ }
1048
+ function clearAll() {
1049
+ var _a;
1050
+ (_a = poiLayer.value) == null ? void 0 : _a.clear();
1051
+ poiList.value = [];
1052
+ activePoiId.value = null;
1053
+ }
1054
+ const isAddMode = vue.ref(false);
1055
+ let _clickHandler = null;
1056
+ function toggleAddMode(onAdded, defaultName = "新标注", category = "default") {
1057
+ const map = mapCtx.map.value;
1058
+ if (!map) return;
1059
+ if (isAddMode.value) {
1060
+ if (_clickHandler) {
1061
+ map.off(mars3d__namespace.EventType.click, _clickHandler);
1062
+ _clickHandler = null;
1063
+ }
1064
+ isAddMode.value = false;
1065
+ } else {
1066
+ isAddMode.value = true;
1067
+ _clickHandler = (e) => {
1068
+ let lng, lat, alt;
1069
+ if (e.lnglat) {
1070
+ lng = e.lnglat.lng;
1071
+ lat = e.lnglat.lat;
1072
+ alt = e.lnglat.alt ?? 0;
1073
+ } else if (e.cartesian) {
1074
+ const carto = mars3d__namespace.Cesium.Cartographic.fromCartesian(e.cartesian);
1075
+ lng = mars3d__namespace.Cesium.Math.toDegrees(carto.longitude);
1076
+ lat = mars3d__namespace.Cesium.Math.toDegrees(carto.latitude);
1077
+ alt = carto.height > 0 ? carto.height : 50;
1078
+ } else {
1079
+ return;
1080
+ }
1081
+ const finalAlt = alt > 1 ? alt : 50;
1082
+ const poi = addPoi({
1083
+ name: `${defaultName} ${_idCounter$1}`,
1084
+ lng,
1085
+ lat,
1086
+ alt: finalAlt,
1087
+ category
1088
+ });
1089
+ if (poi) onAdded == null ? void 0 : onAdded(poi);
1090
+ toggleAddMode();
1091
+ };
1092
+ map.on(mars3d__namespace.EventType.click, _clickHandler);
1093
+ }
1094
+ }
1095
+ return {
1096
+ poiLayer,
1097
+ poiList,
1098
+ activePoiId,
1099
+ isAddMode,
1100
+ initPoiLayer,
1101
+ addPoi,
1102
+ removePoi,
1103
+ selectPoi,
1104
+ flyToPoi,
1105
+ updatePoiName,
1106
+ clearAll,
1107
+ toggleAddMode
1108
+ };
1109
+ }
1110
+ function buildPopupHtml(poi) {
1111
+ return `
1112
+ <div style="padding:8px 12px;min-width:160px;">
1113
+ <div style="font-size:15px;font-weight:bold;margin-bottom:6px;color:#fff;">${poi.name}</div>
1114
+ <div style="font-size:12px;color:#adc6e5;line-height:1.8;">
1115
+ <div>经度:${poi.lng.toFixed(6)}</div>
1116
+ <div>纬度:${poi.lat.toFixed(6)}</div>
1117
+ <div>高度:${poi.alt.toFixed(1)} m</div>
1118
+ ${poi.description ? `<div style="margin-top:4px;">${poi.description}</div>` : ""}
1119
+ </div>
1120
+ </div>
1121
+ `;
1122
+ }
1123
+ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
1124
+ __name: "PoiMarkerLayer",
1125
+ setup(__props, { expose: __expose }) {
1126
+ const mapCtx = vue.inject("mapContext");
1127
+ if (!mapCtx) throw new Error("[PoiMarkerLayer] 必须放置在 MarsMapContainer 内部");
1128
+ const poi = usePoiMarker(mapCtx);
1129
+ const stopWatch = vue.watch(
1130
+ () => mapCtx.map.value,
1131
+ (map) => {
1132
+ if (map) {
1133
+ poi.initPoiLayer();
1134
+ stopWatch();
1135
+ }
1136
+ },
1137
+ { immediate: true }
1138
+ );
1139
+ vue.onUnmounted(() => {
1140
+ poi.clearAll();
1141
+ });
1142
+ vue.provide("poiContext", poi);
1143
+ __expose(poi);
1144
+ return (_ctx, _cache) => {
1145
+ return vue.renderSlot(_ctx.$slots, "default");
1146
+ };
1147
+ }
1148
+ });
1149
+ const _hoisted_1$1 = {
1150
+ key: 0,
1151
+ class: "collapsed-icon-wrap"
1152
+ };
1153
+ const _hoisted_2$1 = { class: "poi-count poi-count--collapsed" };
1154
+ const _hoisted_3$1 = { class: "poi-panel__title" };
1155
+ const _hoisted_4$1 = { class: "poi-count" };
1156
+ const _hoisted_5$1 = { class: "poi-panel__body" };
1157
+ const _hoisted_6$1 = { class: "poi-panel__toolbar" };
1158
+ const _hoisted_7$1 = ["disabled"];
1159
+ const _hoisted_8$1 = { class: "poi-panel__filter" };
1160
+ const _hoisted_9$1 = ["onClick"];
1161
+ const _hoisted_10$1 = { class: "poi-panel__list" };
1162
+ const _hoisted_11$1 = ["onClick"];
1163
+ const _hoisted_12$1 = { class: "poi-item__info" };
1164
+ const _hoisted_13$1 = ["onDblclick"];
1165
+ const _hoisted_14$1 = { class: "poi-item__coord" };
1166
+ const _hoisted_15$1 = { class: "poi-item__actions" };
1167
+ const _hoisted_16$1 = ["onClick"];
1168
+ const _hoisted_17$1 = ["onClick"];
1169
+ const _hoisted_18$1 = ["onClick"];
1170
+ const _hoisted_19$1 = {
1171
+ key: 0,
1172
+ class: "poi-panel__empty"
1173
+ };
1174
+ const _sfc_main$2 = /* @__PURE__ */ vue.defineComponent({
1175
+ __name: "PoiMarkerPanel",
1176
+ setup(__props) {
1177
+ const poi = vue.inject("poiContext");
1178
+ if (!poi) throw new Error("[PoiMarkerPanel] 必须与 PoiMarkerLayer 同级使用");
1179
+ const isCollapsed = vue.ref(true);
1180
+ const toggleCollapse = () => {
1181
+ isCollapsed.value = !isCollapsed.value;
1182
+ };
1183
+ const panelEl = vue.ref(null);
1184
+ const isDragging = vue.ref(false);
1185
+ const pos = vue.reactive({ x: 10, y: 10 });
1186
+ let dragStartX = 0;
1187
+ let dragStartY = 0;
1188
+ let origX = 0;
1189
+ let origY = 0;
1190
+ function startDrag(e) {
1191
+ isDragging.value = true;
1192
+ dragStartX = e.clientX;
1193
+ dragStartY = e.clientY;
1194
+ origX = pos.x;
1195
+ origY = pos.y;
1196
+ document.addEventListener("mousemove", onDrag);
1197
+ document.addEventListener("mouseup", stopDrag);
1198
+ }
1199
+ function onDrag(e) {
1200
+ if (!isDragging.value) return;
1201
+ pos.x = origX + (e.clientX - dragStartX);
1202
+ pos.y = origY + (e.clientY - dragStartY);
1203
+ }
1204
+ function stopDrag() {
1205
+ isDragging.value = false;
1206
+ document.removeEventListener("mousemove", onDrag);
1207
+ document.removeEventListener("mouseup", stopDrag);
1208
+ }
1209
+ const categories = [
1210
+ { value: "all", label: "全部", icon: "fa-list", color: "#aaa" },
1211
+ { value: "default", label: "普通", icon: "fa-map-marker", color: "#3ea6ff" },
1212
+ {
1213
+ value: "warning",
1214
+ label: "警告",
1215
+ icon: "fa-exclamation-triangle",
1216
+ color: "#ff6b6b"
1217
+ },
1218
+ { value: "info", label: "信息", icon: "fa-info-circle", color: "#52c41a" }
1219
+ ];
1220
+ const activeCategory = vue.ref("all");
1221
+ const filteredList = vue.computed(() => {
1222
+ if (activeCategory.value === "all") return poi.poiList.value;
1223
+ return poi.poiList.value.filter((p) => p.category === activeCategory.value);
1224
+ });
1225
+ const getCategoryColor = (cat) => {
1226
+ const map = {
1227
+ default: "#3ea6ff",
1228
+ warning: "#ff6b6b",
1229
+ info: "#52c41a"
1230
+ };
1231
+ return map[cat] ?? "#aaa";
1232
+ };
1233
+ const addCategory = vue.ref("default");
1234
+ function toggleAdd() {
1235
+ poi.toggleAddMode(
1236
+ void 0,
1237
+ // onAdded 回调(可按需传)
1238
+ "标注点",
1239
+ addCategory.value
1240
+ );
1241
+ }
1242
+ function onSelect(id) {
1243
+ poi.selectPoi(id, true);
1244
+ }
1245
+ function onFlyTo(id) {
1246
+ poi.flyToPoi(id);
1247
+ }
1248
+ function onRemove(id) {
1249
+ poi.removePoi(id);
1250
+ }
1251
+ const editingId = vue.ref(null);
1252
+ const editName = vue.ref("");
1253
+ const editInputEl = vue.ref(null);
1254
+ function startEdit(item) {
1255
+ editingId.value = item.id;
1256
+ editName.value = item.name;
1257
+ setTimeout(() => {
1258
+ var _a;
1259
+ return (_a = editInputEl.value) == null ? void 0 : _a.select();
1260
+ }, 30);
1261
+ }
1262
+ function saveEdit() {
1263
+ if (editingId.value && editName.value.trim()) {
1264
+ poi.updatePoiName(editingId.value, editName.value.trim());
1265
+ }
1266
+ cancelEdit();
1267
+ }
1268
+ function cancelEdit() {
1269
+ editingId.value = null;
1270
+ editName.value = "";
1271
+ }
1272
+ function confirmClear() {
1273
+ if (window.confirm(`确认清空全部 ${poi.poiList.value.length} 个标注?`)) {
1274
+ poi.clearAll();
1275
+ }
1276
+ }
1277
+ return (_ctx, _cache) => {
1278
+ return vue.openBlock(), vue.createElementBlock("div", {
1279
+ ref_key: "panelEl",
1280
+ ref: panelEl,
1281
+ class: vue.normalizeClass(["poi-panel", { collapsed: isCollapsed.value }]),
1282
+ style: vue.normalizeStyle(
1283
+ !isCollapsed.value ? { left: pos.x + "px", top: pos.y + "px" } : { left: pos.x + "px", top: pos.y + "px" }
1284
+ )
1285
+ }, [
1286
+ vue.createElementVNode("div", {
1287
+ class: vue.normalizeClass(["poi-panel__header", { "is-dragging": isDragging.value }]),
1288
+ onMousedown: vue.withModifiers(startDrag, ["prevent"]),
1289
+ onClick: _cache[0] || (_cache[0] = ($event) => isDragging.value ? null : toggleCollapse())
1290
+ }, [
1291
+ isCollapsed.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1, [
1292
+ _cache[3] || (_cache[3] = vue.createElementVNode("i", { class: "fa fa-map-marker collapsed-icon" }, null, -1)),
1293
+ vue.createElementVNode("span", _hoisted_2$1, vue.toDisplayString(filteredList.value.length), 1)
1294
+ ])) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
1295
+ vue.createElementVNode("span", _hoisted_3$1, [
1296
+ _cache[4] || (_cache[4] = vue.createElementVNode("i", { class: "fa fa-map-marker" }, null, -1)),
1297
+ _cache[5] || (_cache[5] = vue.createTextVNode(" POI 标注管理 ", -1)),
1298
+ vue.createElementVNode("span", _hoisted_4$1, vue.toDisplayString(filteredList.value.length), 1)
1299
+ ]),
1300
+ _cache[6] || (_cache[6] = vue.createElementVNode("i", { class: "fa fa-chevron-left collapse-icon" }, null, -1))
1301
+ ], 64))
1302
+ ], 34),
1303
+ vue.withDirectives(vue.createElementVNode("div", _hoisted_5$1, [
1304
+ vue.createElementVNode("div", _hoisted_6$1, [
1305
+ vue.createElementVNode("button", {
1306
+ class: vue.normalizeClass(["btn", { "btn--active": vue.unref(poi).isAddMode.value }]),
1307
+ onClick: toggleAdd
1308
+ }, [
1309
+ vue.createElementVNode("i", {
1310
+ class: vue.normalizeClass(["fa", vue.unref(poi).isAddMode.value ? "fa-times" : "fa-plus"])
1311
+ }, null, 2),
1312
+ vue.createTextVNode(" " + vue.toDisplayString(vue.unref(poi).isAddMode.value ? "取消添加" : "点击地图添加"), 1)
1313
+ ], 2),
1314
+ vue.createElementVNode("button", {
1315
+ class: "btn btn--danger",
1316
+ onClick: confirmClear,
1317
+ disabled: vue.unref(poi).poiList.value.length === 0
1318
+ }, [..._cache[7] || (_cache[7] = [
1319
+ vue.createElementVNode("i", { class: "fa fa-trash-o" }, null, -1),
1320
+ vue.createTextVNode(" 清空 ", -1)
1321
+ ])], 8, _hoisted_7$1)
1322
+ ]),
1323
+ vue.createElementVNode("div", _hoisted_8$1, [
1324
+ (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, vue.renderList(categories, (cat) => {
1325
+ return vue.createElementVNode("span", {
1326
+ key: cat.value,
1327
+ class: vue.normalizeClass(["filter-tag", { active: activeCategory.value === cat.value }]),
1328
+ onClick: ($event) => activeCategory.value = cat.value
1329
+ }, [
1330
+ vue.createElementVNode("i", {
1331
+ class: vue.normalizeClass(["fa", cat.icon]),
1332
+ style: vue.normalizeStyle({ color: cat.color })
1333
+ }, null, 6),
1334
+ vue.createTextVNode(" " + vue.toDisplayString(cat.label), 1)
1335
+ ], 10, _hoisted_9$1);
1336
+ }), 64))
1337
+ ]),
1338
+ vue.createElementVNode("div", _hoisted_10$1, [
1339
+ vue.createVNode(vue.TransitionGroup, { name: "poi-list" }, {
1340
+ default: vue.withCtx(() => [
1341
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(filteredList.value, (item) => {
1342
+ return vue.openBlock(), vue.createElementBlock("div", {
1343
+ key: item.id,
1344
+ class: vue.normalizeClass(["poi-item", { "poi-item--active": vue.unref(poi).activePoiId.value === item.id }]),
1345
+ onClick: ($event) => onSelect(item.id)
1346
+ }, [
1347
+ vue.createElementVNode("span", {
1348
+ class: "poi-item__dot",
1349
+ style: vue.normalizeStyle({ background: getCategoryColor(item.category) })
1350
+ }, null, 4),
1351
+ vue.createElementVNode("div", _hoisted_12$1, [
1352
+ editingId.value === item.id ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
1353
+ key: 0,
1354
+ class: "poi-item__name-input",
1355
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => editName.value = $event),
1356
+ onKeydown: [
1357
+ vue.withKeys(saveEdit, ["enter"]),
1358
+ vue.withKeys(cancelEdit, ["escape"])
1359
+ ],
1360
+ onClick: _cache[2] || (_cache[2] = vue.withModifiers(() => {
1361
+ }, ["stop"])),
1362
+ ref_for: true,
1363
+ ref_key: "editInputEl",
1364
+ ref: editInputEl
1365
+ }, null, 544)), [
1366
+ [vue.vModelText, editName.value]
1367
+ ]) : (vue.openBlock(), vue.createElementBlock("div", {
1368
+ key: 1,
1369
+ class: "poi-item__name",
1370
+ onDblclick: vue.withModifiers(($event) => startEdit(item), ["stop"])
1371
+ }, vue.toDisplayString(item.name), 41, _hoisted_13$1)),
1372
+ vue.createElementVNode("div", _hoisted_14$1, vue.toDisplayString(item.lng.toFixed(4)) + ", " + vue.toDisplayString(item.lat.toFixed(4)), 1)
1373
+ ]),
1374
+ vue.createElementVNode("div", _hoisted_15$1, [
1375
+ vue.createElementVNode("button", {
1376
+ class: "icon-btn",
1377
+ title: "编辑名称",
1378
+ onClick: vue.withModifiers(($event) => startEdit(item), ["stop"])
1379
+ }, [..._cache[8] || (_cache[8] = [
1380
+ vue.createElementVNode("i", { class: "fa fa-pencil" }, null, -1)
1381
+ ])], 8, _hoisted_16$1),
1382
+ vue.createElementVNode("button", {
1383
+ class: "icon-btn",
1384
+ title: "飞行定位",
1385
+ onClick: vue.withModifiers(($event) => onFlyTo(item.id), ["stop"])
1386
+ }, [..._cache[9] || (_cache[9] = [
1387
+ vue.createElementVNode("i", { class: "fa fa-crosshairs" }, null, -1)
1388
+ ])], 8, _hoisted_17$1),
1389
+ vue.createElementVNode("button", {
1390
+ class: "icon-btn icon-btn--danger",
1391
+ title: "删除",
1392
+ onClick: vue.withModifiers(($event) => onRemove(item.id), ["stop"])
1393
+ }, [..._cache[10] || (_cache[10] = [
1394
+ vue.createElementVNode("i", { class: "fa fa-times" }, null, -1)
1395
+ ])], 8, _hoisted_18$1)
1396
+ ])
1397
+ ], 10, _hoisted_11$1);
1398
+ }), 128))
1399
+ ]),
1400
+ _: 1
1401
+ }),
1402
+ filteredList.value.length === 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_19$1, [
1403
+ _cache[11] || (_cache[11] = vue.createElementVNode("i", { class: "fa fa-map-o" }, null, -1)),
1404
+ vue.createElementVNode("p", null, vue.toDisplayString(vue.unref(poi).isAddMode.value ? "请在地图上点击添加标注" : "暂无标注数据"), 1)
1405
+ ])) : vue.createCommentVNode("", true)
1406
+ ])
1407
+ ], 512), [
1408
+ [vue.vShow, !isCollapsed.value]
1409
+ ])
1410
+ ], 6);
1411
+ };
1412
+ }
1413
+ });
1414
+ const PoiMarkerPanel = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-b2f25973"]]);
1415
+ let _idCounter = 1;
1416
+ function useTrack(mapCtx) {
1417
+ const trackLayer = vue.shallowRef(null);
1418
+ const trackList = vue.ref([]);
1419
+ const activeTrackId = vue.ref(null);
1420
+ const isPlaying = vue.ref(false);
1421
+ const currentTime = vue.ref(0);
1422
+ const playbackSpeed = vue.ref(1);
1423
+ const playbackProgress = vue.ref(0);
1424
+ const isRealtimeMode = vue.ref(false);
1425
+ const activeRealtimeId = vue.ref(null);
1426
+ let _playInterval = null;
1427
+ function initTrackLayer() {
1428
+ const map = mapCtx.map.value;
1429
+ if (!map) return;
1430
+ const layer = new mars3d__namespace.layer.GraphicLayer();
1431
+ map.addLayer(layer);
1432
+ trackLayer.value = layer;
1433
+ }
1434
+ function _buildLineGraphic(track) {
1435
+ const layer = trackLayer.value;
1436
+ if (!layer) return null;
1437
+ const positions = track.points.map((p) => [p.lng, p.lat, p.alt]);
1438
+ const line = new mars3d__namespace.graphic.PolylinePrimitive({
1439
+ positions,
1440
+ style: {
1441
+ color: mars3d__namespace.Cesium.Color.fromCssColorString("#3ea6ff"),
1442
+ width: 3,
1443
+ opacity: 0.9,
1444
+ clampToGround: false
1445
+ },
1446
+ attr: { trackId: track.id }
1447
+ });
1448
+ layer.addGraphic(line);
1449
+ return line;
1450
+ }
1451
+ function _appendRealtimeLine(track, fromIdx, toIdx) {
1452
+ const layer = trackLayer.value;
1453
+ if (!layer || toIdx <= fromIdx) return;
1454
+ const positions = track.points.slice(fromIdx, toIdx + 1).map((p) => [p.lng, p.lat, p.alt]);
1455
+ const segment = new mars3d__namespace.graphic.PolylinePrimitive({
1456
+ positions,
1457
+ style: {
1458
+ color: mars3d__namespace.Cesium.Color.fromCssColorString("#ff6b35"),
1459
+ width: 4,
1460
+ opacity: 1,
1461
+ clampToGround: false
1462
+ }
1463
+ });
1464
+ layer.addGraphic(segment);
1465
+ if (!track.realtimeLineSegments) {
1466
+ track.realtimeLineSegments = [];
1467
+ }
1468
+ track.realtimeLineSegments.push(segment);
1469
+ }
1470
+ function _updateRealtimeMarker(track) {
1471
+ const layer = trackLayer.value;
1472
+ if (!layer) return;
1473
+ const lastPoint = track.points[track.realtimeDrawnIdx];
1474
+ if (!lastPoint) return;
1475
+ if (track.realtimePoint) {
1476
+ track.realtimePoint.position = [lastPoint.lng, lastPoint.lat, lastPoint.alt];
1477
+ } else {
1478
+ const marker = new mars3d__namespace.graphic.BillboardEntity({
1479
+ position: [lastPoint.lng, lastPoint.lat, lastPoint.alt],
1480
+ style: {
1481
+ image: "//data.mars3d.cn/img/marker/mark-blue.png",
1482
+ scale: 1.2,
1483
+ horizontalOrigin: mars3d__namespace.Cesium.HorizontalOrigin.CENTER,
1484
+ verticalOrigin: mars3d__namespace.Cesium.VerticalOrigin.BOTTOM
1485
+ }
1486
+ });
1487
+ layer.addGraphic(marker);
1488
+ track.realtimePoint = marker;
1489
+ }
1490
+ }
1491
+ function addTrack(points, name = "轨迹") {
1492
+ const layer = trackLayer.value;
1493
+ if (!layer) return null;
1494
+ const id = `track-${_idCounter++}`;
1495
+ const track = { id, name, points };
1496
+ track.lineGraphic = _buildLineGraphic(track);
1497
+ trackList.value.push(track);
1498
+ return track;
1499
+ }
1500
+ function startRealtime(name = "实时轨迹") {
1501
+ if (activeRealtimeId.value) stopRealtime();
1502
+ const layer = trackLayer.value;
1503
+ if (!layer) return null;
1504
+ const id = `realtime-${_idCounter++}`;
1505
+ const track = {
1506
+ id,
1507
+ name,
1508
+ points: [],
1509
+ realtimeDrawnIdx: -1
1510
+ };
1511
+ trackLayer.value = layer;
1512
+ trackList.value.push(track);
1513
+ activeRealtimeId.value = id;
1514
+ isRealtimeMode.value = true;
1515
+ return track;
1516
+ }
1517
+ function pushRealtimePoint(id, lng, lat, alt = 0) {
1518
+ const track = trackList.value.find((t) => t.id === id);
1519
+ if (!track) return;
1520
+ const point = {
1521
+ time: Date.now(),
1522
+ lng,
1523
+ lat,
1524
+ alt
1525
+ };
1526
+ track.points.push(point);
1527
+ track.realtimeDrawnIdx = track.points.length - 1;
1528
+ if (track.points.length === 1) {
1529
+ track.lineGraphic = _buildLineGraphic(track);
1530
+ _updateRealtimeMarker(track);
1531
+ } else {
1532
+ _appendRealtimeLine(track, track.points.length - 2, track.points.length - 1);
1533
+ _updateRealtimeMarker(track);
1534
+ }
1535
+ if (mapCtx.map.value) {
1536
+ mapCtx.map.value.flyToPoint(
1537
+ [lng, lat, alt + 50],
1538
+ { radius: 500, duration: 0.5 }
1539
+ );
1540
+ }
1541
+ }
1542
+ function stopRealtime(id) {
1543
+ var _a;
1544
+ const targetId = id ?? activeRealtimeId.value;
1545
+ if (!targetId) return;
1546
+ const track = trackList.value.find((t) => t.id === targetId);
1547
+ if (track) {
1548
+ track.realtimeDrawnIdx = void 0;
1549
+ if (track.realtimePoint) {
1550
+ (_a = trackLayer.value) == null ? void 0 : _a.removeGraphic(track.realtimePoint);
1551
+ track.realtimePoint = void 0;
1552
+ }
1553
+ }
1554
+ if (activeRealtimeId.value === targetId) {
1555
+ activeRealtimeId.value = null;
1556
+ isRealtimeMode.value = false;
1557
+ }
1558
+ }
1559
+ function play(trackId) {
1560
+ const id = trackId ?? activeTrackId.value;
1561
+ if (!id) return;
1562
+ const track = trackList.value.find((t) => t.id === id);
1563
+ if (!track || track.points.length < 2) return;
1564
+ if (activeTrackId.value !== id) {
1565
+ selectTrack(id);
1566
+ }
1567
+ isPlaying.value = true;
1568
+ _clearPlayInterval();
1569
+ const start = track.points[0].time;
1570
+ const end = track.points[track.points.length - 1].time;
1571
+ _playInterval = setInterval(() => {
1572
+ const track2 = trackList.value.find((t) => t.id === activeTrackId.value);
1573
+ if (!track2 || !isPlaying.value) return;
1574
+ const elapsed = Date.now() - (track2._playStartTime ?? Date.now());
1575
+ const total = end - start;
1576
+ const progress = Math.min(elapsed / total, 1);
1577
+ currentTime.value = start + progress * total;
1578
+ playbackProgress.value = progress * 100;
1579
+ const targetIdx = Math.floor(progress * (track2.points.length - 1));
1580
+ _updatePlaybackLine(track2, targetIdx);
1581
+ }, 60);
1582
+ }
1583
+ function _updatePlaybackLine(track, toIdx) {
1584
+ var _a;
1585
+ const layer = trackLayer.value;
1586
+ if (!layer) return;
1587
+ if (track.lineGraphic) {
1588
+ layer.removeGraphic(track.lineGraphic);
1589
+ }
1590
+ const positions = track.points.slice(0, toIdx + 1).map((p) => [p.lng, p.lat, p.alt]);
1591
+ track.lineGraphic = new mars3d__namespace.graphic.PolylinePrimitive({
1592
+ positions,
1593
+ style: {
1594
+ color: mars3d__namespace.Cesium.Color.fromCssColorString("#00ff88"),
1595
+ width: 4,
1596
+ opacity: 1,
1597
+ clampToGround: false
1598
+ }
1599
+ });
1600
+ layer.addGraphic(track.lineGraphic);
1601
+ const pt = track.points[toIdx];
1602
+ (_a = mapCtx.map.value) == null ? void 0 : _a.flyToPoint(
1603
+ [pt.lng, pt.lat, pt.alt + 200],
1604
+ { radius: 300, duration: 0 }
1605
+ );
1606
+ }
1607
+ function pause() {
1608
+ isPlaying.value = false;
1609
+ _clearPlayInterval();
1610
+ }
1611
+ function stop() {
1612
+ isPlaying.value = false;
1613
+ playbackProgress.value = 0;
1614
+ currentTime.value = 0;
1615
+ _clearPlayInterval();
1616
+ const track = trackList.value.find((t) => t.id === activeTrackId.value);
1617
+ if (track && trackLayer.value) {
1618
+ if (track.lineGraphic) trackLayer.value.removeGraphic(track.lineGraphic);
1619
+ track.lineGraphic = _buildLineGraphic(track);
1620
+ }
1621
+ }
1622
+ function setSpeed(speed) {
1623
+ playbackSpeed.value = speed;
1624
+ if (isPlaying.value) {
1625
+ pause();
1626
+ play();
1627
+ }
1628
+ }
1629
+ function seek(progress) {
1630
+ const track = trackList.value.find((t) => t.id === activeTrackId.value);
1631
+ if (!track) return;
1632
+ const targetIdx = Math.floor(progress / 100 * (track.points.length - 1));
1633
+ currentTime.value = track.points[targetIdx].time;
1634
+ playbackProgress.value = progress;
1635
+ _updatePlaybackLine(track, targetIdx);
1636
+ }
1637
+ function selectTrack(id) {
1638
+ activeTrackId.value = id;
1639
+ stop();
1640
+ }
1641
+ function flyToTrack(id) {
1642
+ const track = trackList.value.find((t) => t.id === id);
1643
+ if (!track || !mapCtx.map.value) return;
1644
+ const first = track.points[0];
1645
+ mapCtx.map.value.flyToPoint(
1646
+ [first.lng, first.lat, first.alt + 2e3],
1647
+ { radius: 3e3, duration: 1.5 }
1648
+ );
1649
+ }
1650
+ function removeTrack(id) {
1651
+ var _a, _b;
1652
+ const idx = trackList.value.findIndex((t) => t.id === id);
1653
+ if (idx === -1) return;
1654
+ const track = trackList.value[idx];
1655
+ if (track.lineGraphic) (_a = trackLayer.value) == null ? void 0 : _a.removeGraphic(track.lineGraphic);
1656
+ if (track.realtimePoint) (_b = trackLayer.value) == null ? void 0 : _b.removeGraphic(track.realtimePoint);
1657
+ if (track.realtimeLineSegments) {
1658
+ track.realtimeLineSegments.forEach((seg) => {
1659
+ var _a2;
1660
+ (_a2 = trackLayer.value) == null ? void 0 : _a2.removeGraphic(seg);
1661
+ });
1662
+ }
1663
+ trackList.value.splice(idx, 1);
1664
+ if (activeTrackId.value === id) {
1665
+ activeTrackId.value = null;
1666
+ stop();
1667
+ }
1668
+ if (activeRealtimeId.value === id) {
1669
+ activeRealtimeId.value = null;
1670
+ isRealtimeMode.value = false;
1671
+ }
1672
+ }
1673
+ function clearAll() {
1674
+ var _a;
1675
+ stop();
1676
+ stopRealtime();
1677
+ (_a = trackLayer.value) == null ? void 0 : _a.clear();
1678
+ trackList.value = [];
1679
+ activeTrackId.value = null;
1680
+ }
1681
+ function _clearPlayInterval() {
1682
+ if (_playInterval) {
1683
+ clearInterval(_playInterval);
1684
+ _playInterval = null;
1685
+ }
1686
+ }
1687
+ return {
1688
+ trackLayer,
1689
+ trackList,
1690
+ activeTrackId,
1691
+ isPlaying,
1692
+ currentTime,
1693
+ playbackSpeed,
1694
+ playbackProgress,
1695
+ isRealtimeMode,
1696
+ activeRealtimeId,
1697
+ initTrackLayer,
1698
+ addTrack,
1699
+ startRealtime,
1700
+ pushRealtimePoint,
1701
+ stopRealtime,
1702
+ play,
1703
+ pause,
1704
+ stop,
1705
+ setSpeed,
1706
+ seek,
1707
+ selectTrack,
1708
+ flyToTrack,
1709
+ removeTrack,
1710
+ clearAll
1711
+ };
1712
+ }
1713
+ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
1714
+ __name: "TrackLayer",
1715
+ setup(__props, { expose: __expose }) {
1716
+ const mapCtx = vue.inject("mapContext");
1717
+ if (!mapCtx) throw new Error("[TrackLayer] 必须放置在 MarsMapContainer 内部");
1718
+ const track = useTrack(mapCtx);
1719
+ const stopWatch = vue.watch(
1720
+ () => mapCtx.map.value,
1721
+ (map) => {
1722
+ if (map) {
1723
+ track.initTrackLayer();
1724
+ stopWatch();
1725
+ }
1726
+ },
1727
+ { immediate: true }
1728
+ );
1729
+ vue.onUnmounted(() => {
1730
+ track.clearAll();
1731
+ });
1732
+ vue.provide("trackContext", track);
1733
+ __expose(track);
1734
+ return (_ctx, _cache) => {
1735
+ return vue.renderSlot(_ctx.$slots, "default");
1736
+ };
1737
+ }
1738
+ });
1739
+ const _hoisted_1 = {
1740
+ key: 0,
1741
+ class: "collapsed-icon-wrap"
1742
+ };
1743
+ const _hoisted_2 = { class: "track-badge" };
1744
+ const _hoisted_3 = { class: "track-panel__title" };
1745
+ const _hoisted_4 = { class: "track-count" };
1746
+ const _hoisted_5 = { class: "track-panel__body" };
1747
+ const _hoisted_6 = { class: "track-panel__toolbar" };
1748
+ const _hoisted_7 = ["disabled"];
1749
+ const _hoisted_8 = {
1750
+ key: 0,
1751
+ class: "track-panel__playback"
1752
+ };
1753
+ const _hoisted_9 = { class: "playback__track-name" };
1754
+ const _hoisted_10 = { class: "playback__controls" };
1755
+ const _hoisted_11 = { class: "playback__speed" };
1756
+ const _hoisted_12 = { class: "speed-btns" };
1757
+ const _hoisted_13 = ["onClick"];
1758
+ const _hoisted_14 = { class: "playback__timeline" };
1759
+ const _hoisted_15 = { class: "time-label" };
1760
+ const _hoisted_16 = ["value"];
1761
+ const _hoisted_17 = { class: "time-label" };
1762
+ const _hoisted_18 = {
1763
+ key: 1,
1764
+ class: "track-panel__realtime-hint"
1765
+ };
1766
+ const _hoisted_19 = { class: "realtime-count" };
1767
+ const _hoisted_20 = { class: "track-panel__list" };
1768
+ const _hoisted_21 = ["onClick"];
1769
+ const _hoisted_22 = { class: "track-item__info" };
1770
+ const _hoisted_23 = { class: "track-item__name" };
1771
+ const _hoisted_24 = { class: "track-item__meta" };
1772
+ const _hoisted_25 = {
1773
+ key: 0,
1774
+ class: "realtime-tag"
1775
+ };
1776
+ const _hoisted_26 = { class: "track-item__actions" };
1777
+ const _hoisted_27 = ["onClick"];
1778
+ const _hoisted_28 = ["onClick"];
1779
+ const _hoisted_29 = {
1780
+ key: 0,
1781
+ class: "track-panel__empty"
1782
+ };
1783
+ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
1784
+ __name: "TrackPanel",
1785
+ setup(__props) {
1786
+ const track = vue.inject("trackContext");
1787
+ if (!track) throw new Error("[TrackPanel] 必须与 TrackLayer 同级使用");
1788
+ const isCollapsed = vue.ref(true);
1789
+ const isDragging = vue.ref(false);
1790
+ const pos = vue.reactive({ x: 10, y: 80 });
1791
+ let dragStartX = 0, dragStartY = 0, origX = 0, origY = 0;
1792
+ function toggleCollapse() {
1793
+ isCollapsed.value = !isCollapsed.value;
1794
+ }
1795
+ function startDrag(e) {
1796
+ isDragging.value = true;
1797
+ dragStartX = e.clientX;
1798
+ dragStartY = e.clientY;
1799
+ origX = pos.x;
1800
+ origY = pos.y;
1801
+ document.addEventListener("mousemove", onDrag);
1802
+ document.addEventListener("mouseup", stopDrag);
1803
+ }
1804
+ function onDrag(e) {
1805
+ if (!isDragging.value) return;
1806
+ pos.x = origX + (e.clientX - dragStartX);
1807
+ pos.y = origY + (e.clientY - dragStartY);
1808
+ }
1809
+ function stopDrag() {
1810
+ isDragging.value = false;
1811
+ document.removeEventListener("mousemove", onDrag);
1812
+ document.removeEventListener("mouseup", stopDrag);
1813
+ }
1814
+ function onSelectTrack(id) {
1815
+ if (track.activeTrackId.value === id) return;
1816
+ track.selectTrack(id);
1817
+ track.stop();
1818
+ }
1819
+ const activeTrackName = vue.computed(() => {
1820
+ const t = track.trackList.value.find(
1821
+ (x) => x.id === track.activeTrackId.value
1822
+ );
1823
+ return (t == null ? void 0 : t.name) ?? "";
1824
+ });
1825
+ const trackMaxTime = vue.computed(() => {
1826
+ const t = track.trackList.value.find(
1827
+ (x) => x.id === track.activeTrackId.value
1828
+ );
1829
+ if (!t || t.points.length < 2) return 0;
1830
+ return t.points[t.points.length - 1].time;
1831
+ });
1832
+ const speedOptions = [1, 2, 4, 8];
1833
+ function onSeek(e) {
1834
+ const val = parseFloat(e.target.value);
1835
+ track.seek(val);
1836
+ }
1837
+ function formatTime(ts) {
1838
+ if (!ts) return "00:00";
1839
+ const d = new Date(ts);
1840
+ return `${String(d.getMinutes()).padStart(2, "0")}:${String(d.getSeconds()).padStart(2, "0")}`;
1841
+ }
1842
+ function addDemoTrack() {
1843
+ const baseLng = 116.3974;
1844
+ const baseLat = 39.909;
1845
+ const points = [];
1846
+ let t = Date.now();
1847
+ let heading = Math.random() * Math.PI * 2;
1848
+ const STEP = 20;
1849
+ for (let i = 0; i < STEP; i++) {
1850
+ t += 5e3 + Math.random() * 5e3;
1851
+ heading += (Math.random() - 0.5) * (Math.PI / 6);
1852
+ const stepLng = baseLng + Math.cos(heading) * 4e-3;
1853
+ const stepLat = baseLat + Math.sin(heading) * 2e-3;
1854
+ const alt = 30 + Math.sin(i / STEP * Math.PI) * 80;
1855
+ points.push({ time: t, lng: stepLng, lat: stepLat, alt });
1856
+ }
1857
+ track.addTrack(points, `轨迹 ${_counter++}`);
1858
+ }
1859
+ let _counter = 1;
1860
+ let _realtimeTimer = null;
1861
+ let _currentRealtimeId = null;
1862
+ function toggleRealtime() {
1863
+ if (track.isRealtimeMode.value) {
1864
+ stopRealtime();
1865
+ } else {
1866
+ startRealtime();
1867
+ }
1868
+ }
1869
+ function startRealtime() {
1870
+ var _a;
1871
+ const id = (_a = track.startRealtime(`实时轨迹 ${_counter++}`)) == null ? void 0 : _a.id;
1872
+ if (!id) return;
1873
+ _currentRealtimeId = id;
1874
+ const CENTER_LNG = 116.397;
1875
+ const CENTER_LAT = 39.908;
1876
+ const RADIUS_LNG = 4e-3;
1877
+ const RADIUS_LAT = 3e-3;
1878
+ const TOTAL_POINTS = 36;
1879
+ const ANGLE_STEP = 2 * Math.PI / TOTAL_POINTS;
1880
+ let angle = Math.random() * 2 * Math.PI;
1881
+ let pushCount = 0;
1882
+ _realtimeTimer = setInterval(() => {
1883
+ pushCount++;
1884
+ const lng = CENTER_LNG + Math.cos(angle) * RADIUS_LNG;
1885
+ const lat = CENTER_LAT + Math.sin(angle) * RADIUS_LAT;
1886
+ const alt = 40 + Math.sin(angle * 3) * 20;
1887
+ track.pushRealtimePoint(id, lng, lat, alt);
1888
+ angle += ANGLE_STEP;
1889
+ if (pushCount >= TOTAL_POINTS) {
1890
+ stopRealtime();
1891
+ }
1892
+ }, 800);
1893
+ }
1894
+ function stopRealtime() {
1895
+ if (_realtimeTimer) {
1896
+ clearInterval(_realtimeTimer);
1897
+ _realtimeTimer = null;
1898
+ }
1899
+ if (_currentRealtimeId) {
1900
+ track.stopRealtime(_currentRealtimeId);
1901
+ _currentRealtimeId = null;
1902
+ }
1903
+ }
1904
+ const realtimePointCount = vue.computed(() => {
1905
+ const t = track.trackList.value.find((x) => x.id === _currentRealtimeId);
1906
+ return (t == null ? void 0 : t.points.length) ?? 0;
1907
+ });
1908
+ function confirmClear() {
1909
+ if (window.confirm(`确认清空全部 ${track.trackList.value.length} 条轨迹?`)) {
1910
+ stopRealtime();
1911
+ track.clearAll();
1912
+ }
1913
+ }
1914
+ return (_ctx, _cache) => {
1915
+ return vue.openBlock(), vue.createElementBlock("div", {
1916
+ class: vue.normalizeClass(["track-panel", { collapsed: isCollapsed.value }]),
1917
+ style: vue.normalizeStyle({ left: pos.x + "px", top: pos.y + "px" })
1918
+ }, [
1919
+ vue.createElementVNode("div", {
1920
+ class: vue.normalizeClass(["track-panel__header", { "is-dragging": isDragging.value }]),
1921
+ onMousedown: vue.withModifiers(startDrag, ["prevent"]),
1922
+ onClick: _cache[0] || (_cache[0] = ($event) => isDragging.value ? null : toggleCollapse())
1923
+ }, [
1924
+ isCollapsed.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
1925
+ _cache[4] || (_cache[4] = vue.createElementVNode("i", { class: "fa fa-share-alt collapsed-icon" }, null, -1)),
1926
+ vue.createElementVNode("span", _hoisted_2, vue.toDisplayString(vue.unref(track).trackList.value.length), 1)
1927
+ ])) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
1928
+ vue.createElementVNode("span", _hoisted_3, [
1929
+ _cache[5] || (_cache[5] = vue.createElementVNode("i", { class: "fa fa-share-alt" }, null, -1)),
1930
+ _cache[6] || (_cache[6] = vue.createTextVNode(" 轨迹管理 ", -1)),
1931
+ vue.createElementVNode("span", _hoisted_4, vue.toDisplayString(vue.unref(track).trackList.value.length), 1)
1932
+ ]),
1933
+ _cache[7] || (_cache[7] = vue.createElementVNode("i", { class: "fa fa-chevron-left collapse-icon" }, null, -1))
1934
+ ], 64))
1935
+ ], 34),
1936
+ vue.withDirectives(vue.createElementVNode("div", _hoisted_5, [
1937
+ vue.createElementVNode("div", _hoisted_6, [
1938
+ vue.createElementVNode("button", {
1939
+ class: "btn btn--primary",
1940
+ onClick: addDemoTrack
1941
+ }, [..._cache[8] || (_cache[8] = [
1942
+ vue.createElementVNode("i", { class: "fa fa-plus" }, null, -1),
1943
+ vue.createTextVNode(" 历史轨迹 ", -1)
1944
+ ])]),
1945
+ vue.createElementVNode("button", {
1946
+ class: vue.normalizeClass(["btn", vue.unref(track).isRealtimeMode.value ? "btn--active" : "btn--info"]),
1947
+ onClick: toggleRealtime
1948
+ }, [
1949
+ vue.createElementVNode("i", {
1950
+ class: vue.normalizeClass(["fa", vue.unref(track).isRealtimeMode.value ? "fa-stop" : "fa-bolt"])
1951
+ }, null, 2),
1952
+ vue.createTextVNode(" " + vue.toDisplayString(vue.unref(track).isRealtimeMode.value ? "停止推送" : "实时轨迹"), 1)
1953
+ ], 2),
1954
+ vue.createElementVNode("button", {
1955
+ class: "btn btn--danger",
1956
+ onClick: confirmClear,
1957
+ disabled: vue.unref(track).trackList.value.length === 0
1958
+ }, [..._cache[9] || (_cache[9] = [
1959
+ vue.createElementVNode("i", { class: "fa fa-trash-o" }, null, -1)
1960
+ ])], 8, _hoisted_7)
1961
+ ]),
1962
+ vue.unref(track).activeTrackId.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8, [
1963
+ vue.createElementVNode("div", _hoisted_9, [
1964
+ _cache[10] || (_cache[10] = vue.createElementVNode("i", { class: "fa fa-road" }, null, -1)),
1965
+ vue.createTextVNode(" " + vue.toDisplayString(activeTrackName.value) + " ", 1),
1966
+ _cache[11] || (_cache[11] = vue.createElementVNode("span", { class: "playback__mode-badge" }, "历史回放", -1))
1967
+ ]),
1968
+ vue.createElementVNode("div", _hoisted_10, [
1969
+ vue.createElementVNode("button", {
1970
+ class: "ctrl-btn",
1971
+ onClick: _cache[1] || (_cache[1] = ($event) => vue.unref(track).stop())
1972
+ }, [..._cache[12] || (_cache[12] = [
1973
+ vue.createElementVNode("i", { class: "fa fa-stop" }, null, -1)
1974
+ ])]),
1975
+ vue.createElementVNode("button", {
1976
+ class: "ctrl-btn ctrl-btn--play",
1977
+ onClick: _cache[2] || (_cache[2] = ($event) => vue.unref(track).isPlaying.value ? vue.unref(track).pause() : vue.unref(track).play())
1978
+ }, [
1979
+ vue.createElementVNode("i", {
1980
+ class: vue.normalizeClass(["fa", vue.unref(track).isPlaying.value ? "fa-pause" : "fa-play"])
1981
+ }, null, 2)
1982
+ ]),
1983
+ vue.createElementVNode("button", {
1984
+ class: "ctrl-btn",
1985
+ onClick: _cache[3] || (_cache[3] = ($event) => vue.unref(track).play())
1986
+ }, [..._cache[13] || (_cache[13] = [
1987
+ vue.createElementVNode("i", { class: "fa fa-refresh" }, null, -1)
1988
+ ])])
1989
+ ]),
1990
+ vue.createElementVNode("div", _hoisted_11, [
1991
+ _cache[14] || (_cache[14] = vue.createElementVNode("span", { class: "speed-label" }, "倍速", -1)),
1992
+ vue.createElementVNode("div", _hoisted_12, [
1993
+ (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, vue.renderList(speedOptions, (s) => {
1994
+ return vue.createElementVNode("button", {
1995
+ key: s,
1996
+ class: vue.normalizeClass(["speed-btn", { active: vue.unref(track).playbackSpeed.value === s }]),
1997
+ onClick: ($event) => vue.unref(track).setSpeed(s)
1998
+ }, vue.toDisplayString(s) + "x ", 11, _hoisted_13);
1999
+ }), 64))
2000
+ ])
2001
+ ]),
2002
+ vue.createElementVNode("div", _hoisted_14, [
2003
+ vue.createElementVNode("span", _hoisted_15, vue.toDisplayString(formatTime(vue.unref(track).currentTime.value)), 1),
2004
+ vue.createElementVNode("input", {
2005
+ type: "range",
2006
+ class: "progress-slider",
2007
+ min: "0",
2008
+ max: "100",
2009
+ step: "0.1",
2010
+ value: vue.unref(track).playbackProgress.value,
2011
+ onInput: onSeek
2012
+ }, null, 40, _hoisted_16),
2013
+ vue.createElementVNode("span", _hoisted_17, vue.toDisplayString(formatTime(trackMaxTime.value)), 1)
2014
+ ])
2015
+ ])) : vue.createCommentVNode("", true),
2016
+ vue.unref(track).isRealtimeMode.value && !vue.unref(track).activeTrackId.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_18, [
2017
+ _cache[17] || (_cache[17] = vue.createElementVNode("div", { class: "realtime-pulse" }, [
2018
+ vue.createElementVNode("i", { class: "fa fa-bolt" }),
2019
+ vue.createTextVNode(" 实时推送中 "),
2020
+ vue.createElementVNode("span", { class: "blink-dot" })
2021
+ ], -1)),
2022
+ vue.createElementVNode("div", _hoisted_19, [
2023
+ _cache[15] || (_cache[15] = vue.createTextVNode(" 已推送 ", -1)),
2024
+ vue.createElementVNode("strong", null, vue.toDisplayString(realtimePointCount.value), 1),
2025
+ _cache[16] || (_cache[16] = vue.createTextVNode(" 个坐标点 ", -1))
2026
+ ])
2027
+ ])) : vue.createCommentVNode("", true),
2028
+ vue.createElementVNode("div", _hoisted_20, [
2029
+ vue.createVNode(vue.TransitionGroup, { name: "track-list" }, {
2030
+ default: vue.withCtx(() => [
2031
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(track).trackList.value, (item) => {
2032
+ return vue.openBlock(), vue.createElementBlock("div", {
2033
+ key: item.id,
2034
+ class: vue.normalizeClass(["track-item", {
2035
+ "track-item--active": vue.unref(track).activeTrackId.value === item.id,
2036
+ "track-item--realtime": item.id.startsWith("realtime")
2037
+ }]),
2038
+ onClick: ($event) => onSelectTrack(item.id)
2039
+ }, [
2040
+ vue.createElementVNode("span", {
2041
+ class: "track-item__bar",
2042
+ style: vue.normalizeStyle({
2043
+ background: item.id.startsWith("realtime") ? "#ff6b35" : "#3ea6ff"
2044
+ })
2045
+ }, null, 4),
2046
+ vue.createElementVNode("div", _hoisted_22, [
2047
+ vue.createElementVNode("div", _hoisted_23, [
2048
+ vue.createElementVNode("i", {
2049
+ class: vue.normalizeClass([
2050
+ "fa",
2051
+ item.id.startsWith("realtime") ? "fa-bolt" : "fa-road"
2052
+ ])
2053
+ }, null, 2),
2054
+ vue.createTextVNode(" " + vue.toDisplayString(item.name), 1)
2055
+ ]),
2056
+ vue.createElementVNode("div", _hoisted_24, [
2057
+ vue.createTextVNode(vue.toDisplayString(item.points.length) + " 个点 ", 1),
2058
+ item.id.startsWith("realtime") ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_25, "实时")) : vue.createCommentVNode("", true)
2059
+ ])
2060
+ ]),
2061
+ vue.createElementVNode("div", _hoisted_26, [
2062
+ vue.createElementVNode("button", {
2063
+ class: "icon-btn",
2064
+ title: "飞行",
2065
+ onClick: vue.withModifiers(($event) => vue.unref(track).flyToTrack(item.id), ["stop"])
2066
+ }, [..._cache[18] || (_cache[18] = [
2067
+ vue.createElementVNode("i", { class: "fa fa-crosshairs" }, null, -1)
2068
+ ])], 8, _hoisted_27),
2069
+ vue.createElementVNode("button", {
2070
+ class: "icon-btn icon-btn--danger",
2071
+ title: "删除",
2072
+ onClick: vue.withModifiers(($event) => vue.unref(track).removeTrack(item.id), ["stop"])
2073
+ }, [..._cache[19] || (_cache[19] = [
2074
+ vue.createElementVNode("i", { class: "fa fa-times" }, null, -1)
2075
+ ])], 8, _hoisted_28)
2076
+ ])
2077
+ ], 10, _hoisted_21);
2078
+ }), 128))
2079
+ ]),
2080
+ _: 1
2081
+ }),
2082
+ vue.unref(track).trackList.value.length === 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_29, [..._cache[20] || (_cache[20] = [
2083
+ vue.createElementVNode("i", { class: "fa fa-map-o" }, null, -1),
2084
+ vue.createElementVNode("p", null, "暂无轨迹数据", -1)
2085
+ ])])) : vue.createCommentVNode("", true)
2086
+ ])
2087
+ ], 512), [
2088
+ [vue.vShow, !isCollapsed.value]
2089
+ ])
2090
+ ], 6);
2091
+ };
2092
+ }
2093
+ });
2094
+ const TrackPanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3e019b92"]]);
2095
+ const components = {
2096
+ MarsMapContainer,
2097
+ ToolbarPanel,
2098
+ VisionPanel,
2099
+ PoiMarkerLayer: _sfc_main$3,
2100
+ PoiMarkerPanel,
2101
+ TrackLayer: _sfc_main$1,
2102
+ TrackPanel
2103
+ };
2104
+ const YiMap = {
2105
+ install(app, options) {
2106
+ const prefix = (options == null ? void 0 : options.prefix) ?? "";
2107
+ for (const [name, component] of Object.entries(components)) {
2108
+ app.component(prefix ? `${prefix}${name}` : name, component);
2109
+ }
2110
+ }
2111
+ };
2112
+ exports2.MarsMapContainer = MarsMapContainer;
2113
+ exports2.PoiMarkerLayer = _sfc_main$3;
2114
+ exports2.PoiMarkerPanel = PoiMarkerPanel;
2115
+ exports2.ToolbarPanel = ToolbarPanel;
2116
+ exports2.TrackLayer = _sfc_main$1;
2117
+ exports2.TrackPanel = TrackPanel;
2118
+ exports2.VisionPanel = VisionPanel;
2119
+ exports2.default = YiMap;
2120
+ exports2.useDraw = useDraw;
2121
+ exports2.useMap = useMap;
2122
+ exports2.useMeasure = useMeasure;
2123
+ exports2.usePoiMarker = usePoiMarker;
2124
+ exports2.useTrack = useTrack;
2125
+ exports2.useVision = useVision;
2126
+ Object.defineProperties(exports2, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
2127
+ });
2128
+ //# sourceMappingURL=yi-map-web.umd.cjs.map