@ohuoy/easymap 1.0.19 → 1.0.21

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 (57) hide show
  1. package/dist/bundle.js +318 -290
  2. package/dist/example - /345/211/257/346/234/254/bundle.js" +318 -290
  3. package/dist/example - /345/211/257/346/234/254/index.html" +11 -11
  4. package/index.js +4 -0
  5. package/lib/threebox-plugin/CHANGELOG.md +665 -0
  6. package/lib/threebox-plugin/LICENSE.txt +97 -0
  7. package/lib/threebox-plugin/README.md +199 -0
  8. package/lib/threebox-plugin/exports.js +2 -0
  9. package/lib/threebox-plugin/main.js +8 -0
  10. package/lib/threebox-plugin/package.json +44 -0
  11. package/lib/threebox-plugin/server.stop.js +13 -0
  12. package/lib/threebox-plugin/src/Threebox.js +1216 -0
  13. package/lib/threebox-plugin/src/animation/AnimationManager.js +483 -0
  14. package/lib/threebox-plugin/src/camera/CameraSync.js +302 -0
  15. package/lib/threebox-plugin/src/objects/CSS2DRenderer.js +245 -0
  16. package/lib/threebox-plugin/src/objects/LabelRenderer.js +71 -0
  17. package/lib/threebox-plugin/src/objects/Object3D.js +34 -0
  18. package/lib/threebox-plugin/src/objects/effects/BuildingShadows.js +115 -0
  19. package/lib/threebox-plugin/src/objects/extrusion.js +61 -0
  20. package/lib/threebox-plugin/src/objects/fflate.min.js +15 -0
  21. package/lib/threebox-plugin/src/objects/label.js +29 -0
  22. package/lib/threebox-plugin/src/objects/line.js +1386 -0
  23. package/lib/threebox-plugin/src/objects/loadObj.js +142 -0
  24. package/lib/threebox-plugin/src/objects/loaders/ColladaLoader.js +3751 -0
  25. package/lib/threebox-plugin/src/objects/loaders/FBXLoader.js +3864 -0
  26. package/lib/threebox-plugin/src/objects/loaders/GLTFLoader.js +3857 -0
  27. package/lib/threebox-plugin/src/objects/loaders/MTLLoader.js +498 -0
  28. package/lib/threebox-plugin/src/objects/loaders/OBJLoader.js +818 -0
  29. package/lib/threebox-plugin/src/objects/objects.js +1113 -0
  30. package/lib/threebox-plugin/src/objects/sphere.js +28 -0
  31. package/lib/threebox-plugin/src/objects/tooltip.js +27 -0
  32. package/lib/threebox-plugin/src/objects/tube.js +35 -0
  33. package/lib/threebox-plugin/src/three.js +6 -0
  34. package/lib/threebox-plugin/src/three.module.js +54571 -0
  35. package/lib/threebox-plugin/src/utils/ValueGenerator.js +11 -0
  36. package/lib/threebox-plugin/src/utils/constants.js +21 -0
  37. package/lib/threebox-plugin/src/utils/material.js +52 -0
  38. package/lib/threebox-plugin/src/utils/suncalc.js +322 -0
  39. package/lib/threebox-plugin/src/utils/utils.js +424 -0
  40. package/lib/threebox-plugin/src/utils/validate.js +115 -0
  41. package/package.json +18 -18
  42. package/src/components/EasyMapMarker.js +8 -0
  43. package/src/components/control/DrawBar.js +5 -0
  44. package/src/components/control/TilesBar.js +116 -27
  45. package/src/components/control/Toobars.js +20 -1
  46. package/src/components/layer/AlarmLayer.js +4 -1
  47. package/src/components/layer/AnimationBarbsLayer.js +1 -1
  48. package/src/components/layer/AnimationLayer copy.js +1 -1
  49. package/src/components/layer/AnimationLayer.js +11 -3
  50. package/src/components/layer/CustomIconLayer.js +1 -1
  51. package/src/components/layer/ExtrusionLayer.js +1 -1
  52. package/src/components/layer/ExtrusionLayerold.js +2 -1
  53. package/src/components/layer/MarkerAreaLayer.js +1 -1
  54. package/src/components/layer/PathLineLayer.js +1 -1
  55. package/src/components/layer/ThreeScanLayer.js +51 -14
  56. package/src/components/layer/ThreeWallLayer.js +1 -1
  57. package/webpack.config.js +2 -1
@@ -127,14 +127,14 @@
127
127
  });
128
128
  }
129
129
 
130
- function drawListToMap(opacity = 0.8){
130
+ function drawListToMap(opacity = 1){
131
131
  //可同时在多个地点画图
132
132
  //类比高德自定义 AMap.CanvasLayer AMap.ImageLayer
133
133
  //list 为图片数组 可以同时在多位置画图 单一站点传入一个数据即可 list内容实时更新
134
134
  let list =
135
135
  [
136
136
  {
137
- "url": "http://192.168.11.93:3395/scan/image/20250104/JYANG_370102_G2_01_20250104000336_2@517_90_500_10_0@.png",
137
+ "url": "http://124.133.246.59:5923/PMLSData_Image/TEST_370000_01_01/20250312/SPS/20250312081812_10_117.129321_36.677321_108_6_10_500_36.617872966918846_117.05528315158892_36.736723130719646_117.20347331632647.png",
138
138
  "siteId": "testid",
139
139
  "center": [
140
140
  "117.185366",
@@ -282,7 +282,7 @@ const playAction = (status)=>{
282
282
  return {
283
283
  image:a,
284
284
  center:[108.7198975,35.0446],
285
- width:517/500 * 600, //图片实际公里数
285
+ width:517/500 * 600 * Math.random() * 10, //图片实际公里数
286
286
  distance:6, //设置字体位置
287
287
  text:''//同播放图片
288
288
  }
@@ -551,11 +551,11 @@ function drawWallToMap(dataList,colorFun,opacity=0.8){
551
551
  function intervalMap(){
552
552
  setInterval(() => {
553
553
  let list = [{
554
- url:'http://127.0.0.1:8007/0.png',
554
+ url:'http://124.133.246.59:13395/scan/image/20250122/ANHUI_341100_G2_01_20250122152914_182_2@517_90.2_500_6_0@.png',
555
555
  siteId:'testid',
556
556
  // text:'2024-01-01', //展示图片时上方显示文本 一般是时间
557
557
  center:[108.7198975,35.0446],
558
- width:517/500 * 600, //图片实际公里数
558
+ width:517/500 * 600 * Math.random(), //图片实际公里数
559
559
  distance:6 //设置字体位置
560
560
  }]
561
561
  let scanLayer = emap.map.getLayer('threescan-layer');
@@ -575,11 +575,11 @@ function intervalMap(){
575
575
 
576
576
  function resetToolBar(){
577
577
  emap.addToorbars({
578
- location:{
579
- show:true, //是否显示
580
- center:[118.7198975,32.0446] //定位工具中心点为止
581
- }
582
- });
578
+ location:{
579
+ show:true, //是否显示
580
+ center:[118.7198975,32.0446] //定位工具中心点为止
581
+ }
582
+ });
583
583
  }
584
584
 
585
585
  //加载初始化地图
@@ -613,7 +613,7 @@ function resetToolBar(){
613
613
  },"bottom-left");
614
614
  //添加图层
615
615
  //类比高德 AMap.TileLayer.Satellite
616
- emap.addTilesLayer({},"bottom-left")
616
+ emap.addTilesLayer({},"bottom-right")
617
617
  //添加绘图工具
618
618
  //类比高德 AMap.Polygon RectangleEditor 集合 目前仅保留四边形选点 操作
619
619
  emap.addDrawBar({},"bottom-left")
package/index.js CHANGED
@@ -735,6 +735,10 @@ export class EasyMap {
735
735
  });
736
736
  };
737
737
 
738
+ removeLayer(layerId)
739
+ {
740
+ if (this.map.getLayer(layerId)) this.map.removeLayer(layerId)
741
+ }
738
742
 
739
743
 
740
744
  }