@maptiler/geocoding-control 0.0.91-git.535bd0 → 0.0.91-git.896be4

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.
@@ -71,7 +71,6 @@ let cachedFeatures = [];
71
71
  let abortController;
72
72
  let searchTimeoutRef;
73
73
  let focusedDelayed;
74
- let prevIdToFly;
75
74
  const dispatch = createEventDispatcher();
76
75
  $: if (!trackProximity) {
77
76
  proximity = undefined;
@@ -82,22 +81,19 @@ $: if (showFullGeometry &&
82
81
  picked.geometry.type === "Point") {
83
82
  search(picked.id, { byId: true }).catch((err) => (error = err));
84
83
  }
85
- $: {
86
- if (mapController && picked && picked.id !== prevIdToFly && flyTo) {
87
- if (!picked.bbox ||
88
- (picked.bbox[0] === picked.bbox[2] && picked.bbox[1] === picked.bbox[3])) {
89
- mapController.flyTo(picked.center, picked.id.startsWith("poi.") || picked.id.startsWith("address.")
90
- ? maxZoom
91
- : zoom);
92
- }
93
- else {
94
- mapController.fitBounds(unwrapBbox(picked.bbox), 50, maxZoom);
95
- }
96
- listFeatures = undefined;
97
- markedFeatures = undefined;
98
- selectedItemIndex = -1;
84
+ $: if (mapController && picked && flyTo) {
85
+ if (!picked.bbox ||
86
+ (picked.bbox[0] === picked.bbox[2] && picked.bbox[1] === picked.bbox[3])) {
87
+ mapController.flyTo(picked.center, picked.id.startsWith("poi.") || picked.id.startsWith("address.")
88
+ ? maxZoom
89
+ : zoom);
90
+ }
91
+ else {
92
+ mapController.fitBounds(unwrapBbox(picked.bbox), 50, maxZoom);
99
93
  }
100
- prevIdToFly = picked?.id;
94
+ listFeatures = undefined;
95
+ markedFeatures = undefined;
96
+ selectedItemIndex = -1;
101
97
  }
102
98
  $: if (markedFeatures !== listFeatures) {
103
99
  markedFeatures = undefined;