Fix zoom to location
This commit is contained in:
parent
c7699a4b42
commit
d253517959
1 changed files with 2 additions and 5 deletions
|
@ -5,6 +5,7 @@ import {VariableUiElement} from "../../UI/Base/VariableUIElement";
|
||||||
import LayoutConfig from "../../Models/ThemeConfig/LayoutConfig";
|
import LayoutConfig from "../../Models/ThemeConfig/LayoutConfig";
|
||||||
import {QueryParameters} from "../Web/QueryParameters";
|
import {QueryParameters} from "../Web/QueryParameters";
|
||||||
import FeatureSource from "../FeatureSource/FeatureSource";
|
import FeatureSource from "../FeatureSource/FeatureSource";
|
||||||
|
import {BBox} from "../BBox";
|
||||||
|
|
||||||
export interface GeoLocationPointProperties {
|
export interface GeoLocationPointProperties {
|
||||||
id: "gps",
|
id: "gps",
|
||||||
|
@ -282,11 +283,7 @@ export default class GeoLocationHandler extends VariableUiElement {
|
||||||
if (b) {
|
if (b) {
|
||||||
if (b !== true) {
|
if (b !== true) {
|
||||||
// B is an array with our locklocation
|
// B is an array with our locklocation
|
||||||
inRange =
|
inRange = new BBox(b).contains([location.longitude, location.latitude])
|
||||||
b[0][0] <= location.latitude &&
|
|
||||||
location.latitude <= b[1][0] &&
|
|
||||||
b[0][1] <= location.longitude &&
|
|
||||||
location.longitude <= b[1][1];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!inRange) {
|
if (!inRange) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue