Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Fixed bug map not centering on asset location. #562

Michael Rademakera03b80d2049d
diff --git a/ui/component/or-map/src/mapwidget.ts b/ui/component/or-map/src/mapwidget.ts
index 13cfa2435..72d666066 100644
--- a/ui/component/or-map/src/mapwidget.ts
+++ b/ui/component/or-map/src/mapwidget.ts
@@ -180,7 +180,9 @@ export class MapWidget {
this._mapGl.setMaxZoom(this._viewSettings.maxZoom);
this._mapGl.setMaxBounds(this._viewSettings.bounds);
}
- this.setCenter(this._viewSettings.center);
+ if (!this._center) {
+ this.setCenter(this._viewSettings.center);
+ }
}
return settings;