tml hai 6 meses
pai
achega
f69e7dd4bc
Modificáronse 1 ficheiros con 16 adicións e 1 borrados
  1. 16 1
      nngkxxdp/src/main/resources/static/naxsb/ztcrdetail.html

+ 16 - 1
nngkxxdp/src/main/resources/static/naxsb/ztcrdetail.html

@@ -616,7 +616,22 @@
                     })
                     .catch(error => console.error('Error fetching JSON:', error));
                 map.setMapType(BMAP_NORMAL_MAP);
-
+                // var startPoint = new BMap.Point(106.656815, 29.512621);
+                // var endPoint = new BMap.Point(106.659483, 29.48807);
+                // var driving = new BMap.DrivingRoute(map, {
+                //     renderOptions: { map: map, autoViewport: true }
+                // });
+                // driving.search(startPoint, endPoint);
+                // var transit = new BMap.TransitRoute(map, {
+                //     renderOptions: { map: map, autoViewport: true }
+                // });
+                // transit.search(startPoint, endPoint);
+                // driving.addEventListener('onPolylinesSet', function (e) {
+                //     var polyline = e.getPolyline();
+                //     polyline.setStrokeColor("#38CA69"); // 设置路线颜色
+                //     polyline.setStrokeWeight(5); // 设置路线宽度
+                //     polyline.setStrokeOpacity(1); // 设置路线透明度
+                // });
                 // 添加选择地址
                 if (!currPoints) return;
                 let pList = currPoints.split('@');