Skip to content

Commit

Permalink
feat(GoogleMapsAPIWrapper): add panBy method
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffleeismyhero authored and sebholstein committed Jun 9, 2017
1 parent 68d5291 commit 1afb152
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/services/google-maps-api-wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ export class GoogleMapsAPIWrapper {
return this._map.then((map) => map.panTo(latLng));
}

panBy(x: number, y: number): Promise<void> {
return this._map.then((map) => map.panBy(x, y));
}

fitBounds(latLng: mapTypes.LatLngBounds|mapTypes.LatLngBoundsLiteral): Promise<void> {
return this._map.then((map) => map.fitBounds(latLng));
}
Expand Down
1 change: 1 addition & 0 deletions src/core/services/google-maps-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export interface GoogleMap extends MVCObject {
data?: Data;
constructor(el: HTMLElement, opts?: MapOptions): void;
panTo(latLng: LatLng|LatLngLiteral): void;
panBy(x: number, y: number): void;
setZoom(zoom: number): void;
getCenter(): LatLng;
setCenter(latLng: LatLng|LatLngLiteral): void;
Expand Down

0 comments on commit 1afb152

Please sign in to comment.