Prevent map search when zoomed out too much
It's usually an accidental click, and if not, the search radius/pulse wouldn't be clearly visible.
This commit is contained in:
parent
53300b92f5
commit
d30375707a
@ -744,6 +744,13 @@ export default class MapComponent extends Component {
|
||||
return;
|
||||
}
|
||||
|
||||
// Require Zoom >= 17 for generic map searches
|
||||
// This prevents accidental searches when interacting with the map at a high level
|
||||
const currentZoom = this.mapInstance.getView().getZoom();
|
||||
if (currentZoom < 16) {
|
||||
return;
|
||||
}
|
||||
|
||||
const coords = toLonLat(event.coordinate);
|
||||
const [lon, lat] = coords;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user