Skip to content

Commit

Permalink
fixup: fix save center and zoom (#2371)
Browse files Browse the repository at this point in the history
Broken since map split.
  • Loading branch information
yohanboniface authored Dec 16, 2024
2 parents b92490e + ecdc589 commit 06c2438
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions umap/static/umap/js/modules/umap.js
Original file line number Diff line number Diff line change
Expand Up @@ -1192,7 +1192,7 @@ export default class Umap extends ServerStored {
geometry() {
/* Return a GeoJSON geometry Object */
const latlng = this._leafletMap.latLng(
this._leafletMap.options.center || this._leafletMap.getCenter()
this.properties.center || this._leafletMap.getCenter()
)
return {
type: 'Point',
Expand Down Expand Up @@ -1670,8 +1670,8 @@ export default class Umap extends ServerStored {
}

_setCenterAndZoom() {
this._leafletMap.options.center = this._leafletMap.getCenter()
this._leafletMap.options.zoom = this._leafletMap.getZoom()
this.properties.center = this._leafletMap.getCenter()
this.properties.zoom = this._leafletMap.getZoom()
this.isDirty = true
this._defaultExtent = false
}
Expand Down

0 comments on commit 06c2438

Please sign in to comment.