Fix geolocation
This commit is contained in:
parent
0326668e62
commit
8cbb693c98
1 changed files with 3 additions and 3 deletions
|
@ -60,12 +60,12 @@ export default class GeoLocationHandler extends VariableUiElement {
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
private readonly _previousLocationGrant: UIEventSource<string>;
|
private readonly _previousLocationGrant: UIEventSource<string>;
|
||||||
private readonly _layoutToUse: UIEventSource<LayoutConfig>;
|
private readonly _layoutToUse: LayoutConfig;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
currentGPSLocation: UIEventSource<{ latlng: any; accuracy: number }>,
|
currentGPSLocation: UIEventSource<{ latlng: any; accuracy: number }>,
|
||||||
leafletMap: UIEventSource<L.Map>,
|
leafletMap: UIEventSource<L.Map>,
|
||||||
layoutToUse: UIEventSource<LayoutConfig>
|
layoutToUse: LayoutConfig
|
||||||
) {
|
) {
|
||||||
const hasLocation = currentGPSLocation.map(
|
const hasLocation = currentGPSLocation.map(
|
||||||
(location) => location !== undefined
|
(location) => location !== undefined
|
||||||
|
@ -264,7 +264,7 @@ export default class GeoLocationHandler extends VariableUiElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
// We check that the GPS location is not out of bounds
|
// We check that the GPS location is not out of bounds
|
||||||
const b = this._layoutToUse.data.lockLocation;
|
const b = this._layoutToUse.lockLocation;
|
||||||
let inRange = true;
|
let inRange = true;
|
||||||
if (b) {
|
if (b) {
|
||||||
if (b !== true) {
|
if (b !== true) {
|
||||||
|
|
Loading…
Reference in a new issue