Skip to content

Commit

Permalink
feat: map setZoom()
Browse files Browse the repository at this point in the history
  • Loading branch information
NiclasNorin committed Mar 6, 2025
1 parent 397e58d commit 2a8b3ab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions js/map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ class Map implements MapInterface {
return this.getMap().getZoom();
}

public setZoom(zoom: number) {
this.getMap().setZoom(zoom);
}

public getCenter(): LatLngObject {
return this.getMap().getCenter();
}
Expand Down
1 change: 1 addition & 0 deletions js/mapInterface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export interface MapInterface extends Addable, EventListenerInterface {
getMap(): LeafletMap;
flyTo(latlng: any, zoom?: number|null): void;
getZoom(): number;
setZoom(zoom: number): void;
getCenter(): LatLngObject;
getOptions(): ConfigOptions;
}

0 comments on commit 2a8b3ab

Please sign in to comment.