Set zoom param for search

This commit is contained in:
2026-05-25 18:22:27 +02:00
parent ac817c3453
commit bdf8418f0c
2 changed files with 7 additions and 4 deletions

View File

@@ -19,19 +19,21 @@ export default class extends Controller {
END_ZOOM = 19;
go() {
/**
* @param {Event} event
* @returns {L.Marker}
*/
go(event) {
let map = GisState.map;
const coords = this.coordsValue.split(' ');
map.setView(
coords,
this.END_ZOOM,
event.params?.zoom ? event.params.zoom : this.END_ZOOM,
{animate: false}
);
let marker = this.getMarker(map, coords);
// DEBUG for sites
//if (this.groupValue) marker = getMarkerByCoords(coords, this.groupValue);
marker?.openTooltip();
return marker;