mirage2d 1.1.25 → 1.1.26

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.
@@ -176580,6 +176580,8 @@ class PathLayer extends baseGraphicLayer {
176580
176580
  tracking: true,
176581
176581
  trackingDirection: true,
176582
176582
  showNode: true,
176583
+ showStartEndNode: true,
176584
+ showPathLine: true,
176583
176585
  scale: 1,
176584
176586
  pointDistance: 0.5
176585
176587
  }
@@ -176648,6 +176650,7 @@ class PathLayer extends baseGraphicLayer {
176648
176650
  console.log(e2);
176649
176651
  if (!e2.route.length) {
176650
176652
  console.log("\u6CA1\u627E\u5230");
176653
+ this.trigger(featureType.onPathComputerComplete, { pathLine: null, distance: 0 });
176651
176654
  return;
176652
176655
  }
176653
176656
  this.routeFeatures = e2.route;
@@ -176711,11 +176714,13 @@ class PathLayer extends baseGraphicLayer {
176711
176714
  }),
176712
176715
  fill: new Fill$1({ color: "rgba(255, 255, 255, 0.1)" })
176713
176716
  }));
176714
- this.resultSource.addFeature(this.geoMarker);
176715
- this.resultSource.addFeature(this.oldPathLineFeature);
176716
- this.resultSource.addFeature(this.pathLineFeature);
176717
+ if (this.option.navigationOption.showPathLine) {
176718
+ this.resultSource.addFeature(this.geoMarker);
176719
+ this.resultSource.addFeature(this.oldPathLineFeature);
176720
+ this.resultSource.addFeature(this.pathLineFeature);
176721
+ }
176717
176722
  let mDistance = getLength(this.pathLineFeature.getGeometry());
176718
- this.trigger(featureType.onPathComputerComplete, { distance: mDistance });
176723
+ this.trigger(featureType.onPathComputerComplete, { pathLine: this.pathLineFeature, distance: mDistance });
176719
176724
  });
176720
176725
  this.dijkstra.on("pause", (e2) => {
176721
176726
  if (e2.overflow) {
@@ -176775,46 +176780,48 @@ class PathLayer extends baseGraphicLayer {
176775
176780
  })
176776
176781
  }));
176777
176782
  }
176778
- styles.push(new Style$5({
176779
- geometry: new Point$4(coords[0]),
176780
- image: new CircleStyle$1({
176781
- radius: 12,
176782
- fill: new Fill$1({
176783
- color: "green"
176784
- })
176785
- }),
176786
- text: new Text$7({
176787
- offsetX: 0,
176788
- offsetY: 0,
176789
- textAlign: "center",
176790
- textBaseline: "middle",
176791
- text: "\u8D77",
176792
- font: "12px sans-serif",
176793
- fill: new Fill$1({
176794
- color: "white"
176795
- })
176796
- })
176797
- }));
176798
- styles.push(new Style$5({
176799
- geometry: new Point$4(coords[coords.length - 1]),
176800
- image: new CircleStyle$1({
176801
- radius: 12,
176802
- fill: new Fill$1({
176803
- color: "#bb1422"
176783
+ if (this.option.navigationOption.showStartEndNode) {
176784
+ styles.push(new Style$5({
176785
+ geometry: new Point$4(coords[0]),
176786
+ image: new CircleStyle$1({
176787
+ radius: 12,
176788
+ fill: new Fill$1({
176789
+ color: "green"
176790
+ })
176791
+ }),
176792
+ text: new Text$7({
176793
+ offsetX: 0,
176794
+ offsetY: 0,
176795
+ textAlign: "center",
176796
+ textBaseline: "middle",
176797
+ text: "\u8D77",
176798
+ font: "12px sans-serif",
176799
+ fill: new Fill$1({
176800
+ color: "white"
176801
+ })
176804
176802
  })
176805
- }),
176806
- text: new Text$7({
176807
- offsetX: 0,
176808
- offsetY: 0,
176809
- textAlign: "center",
176810
- textBaseline: "middle",
176811
- text: "\u7EC8",
176812
- font: "12px sans-serif",
176813
- fill: new Fill$1({
176814
- color: "white"
176803
+ }));
176804
+ styles.push(new Style$5({
176805
+ geometry: new Point$4(coords[coords.length - 1]),
176806
+ image: new CircleStyle$1({
176807
+ radius: 12,
176808
+ fill: new Fill$1({
176809
+ color: "#bb1422"
176810
+ })
176811
+ }),
176812
+ text: new Text$7({
176813
+ offsetX: 0,
176814
+ offsetY: 0,
176815
+ textAlign: "center",
176816
+ textBaseline: "middle",
176817
+ text: "\u7EC8",
176818
+ font: "12px sans-serif",
176819
+ fill: new Fill$1({
176820
+ color: "white"
176821
+ })
176815
176822
  })
176816
- })
176817
- }));
176823
+ }));
176824
+ }
176818
176825
  }
176819
176826
  return styles;
176820
176827
  }