mirror of
https://github.com/farmOS/farmOS.git
synced 2024-02-23 11:37:38 +01:00
Zoom to all vector layers when auto-updating the map.
This commit is contained in:
parent
6f231744f1
commit
1bb243b576
|
@ -41,7 +41,7 @@
|
|||
wkt: wkt,
|
||||
};
|
||||
this.currentLocationLayer = this.instance.addLayer('wkt', opts);
|
||||
this.instance.zoomToLayer(this.currentLocationLayer);
|
||||
this.instance.zoomToVectors();
|
||||
},
|
||||
|
||||
// Recreate the Movement map layer.
|
||||
|
@ -66,8 +66,8 @@
|
|||
// Make the layer editable.
|
||||
this.instance.addBehavior('edit', { layer: this.movementLayer });
|
||||
|
||||
// Zoom to the new layer.
|
||||
this.instance.zoomToLayer(this.movementLayer);
|
||||
// Zoom to all vector layers.
|
||||
this.instance.zoomToVectors();
|
||||
|
||||
// Save the map instance ID.
|
||||
const target = this.instance.target;
|
||||
|
|
Loading…
Reference in a new issue