Set zoom param for search
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user