Skip to content
This repository was archived by the owner on Jun 23, 2025. It is now read-only.

Commit 1afb152

Browse files
jeffleeismyherosebholstein
authored andcommitted
feat(GoogleMapsAPIWrapper): add panBy method
1 parent 68d5291 commit 1afb152

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

src/core/services/google-maps-api-wrapper.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ export class GoogleMapsAPIWrapper {
114114
return this._map.then((map) => map.panTo(latLng));
115115
}
116116

117+
panBy(x: number, y: number): Promise<void> {
118+
return this._map.then((map) => map.panBy(x, y));
119+
}
120+
117121
fitBounds(latLng: mapTypes.LatLngBounds|mapTypes.LatLngBoundsLiteral): Promise<void> {
118122
return this._map.then((map) => map.fitBounds(latLng));
119123
}

src/core/services/google-maps-types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ export interface GoogleMap extends MVCObject {
44
data?: Data;
55
constructor(el: HTMLElement, opts?: MapOptions): void;
66
panTo(latLng: LatLng|LatLngLiteral): void;
7+
panBy(x: number, y: number): void;
78
setZoom(zoom: number): void;
89
getCenter(): LatLng;
910
setCenter(latLng: LatLng|LatLngLiteral): void;

0 commit comments

Comments
 (0)