Skip to content

Commit

Permalink
fix: include getMapsBounds() in GoogleMapInterface and README.md …
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgerardojacinto committed Aug 28, 2024
1 parent cbedc15 commit 2e5d213
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
14 changes: 14 additions & 0 deletions plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ export default MyMap;
* [`enableAccessibilityElements(...)`](#enableaccessibilityelements)
* [`enableCurrentLocation(...)`](#enablecurrentlocation)
* [`setPadding(...)`](#setpadding)
* [`getMapBounds()`](#getmapbounds)
* [`fitBounds(...)`](#fitbounds)
* [`setOnBoundsChangedListener(...)`](#setonboundschangedlistener)
* [`setOnCameraIdleListener(...)`](#setoncameraidlelistener)
Expand Down Expand Up @@ -640,6 +641,19 @@ setPadding(padding: MapPadding) => Promise<void>
--------------------


### getMapBounds()

```typescript
getMapBounds() => Promise<LatLngBounds>
```

Get the map's current viewport latitude and longitude bounds.

**Returns:** <code>Promise&lt;LatLngBounds&gt;</code>

--------------------


### fitBounds(...)

```typescript
Expand Down
6 changes: 6 additions & 0 deletions plugin/src/map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ export interface GoogleMapInterface {
enableAccessibilityElements(enabled: boolean): Promise<void>;
enableCurrentLocation(enabled: boolean): Promise<void>;
setPadding(padding: MapPadding): Promise<void>;
/**
* Get the map's current viewport latitude and longitude bounds.
*
* @returns {LatLngBounds}
*/
getMapBounds(): Promise<LatLngBounds>;
/**
* Sets the map viewport to contain the given bounds.
* @param bounds The bounds to fit in the viewport.
Expand Down

0 comments on commit 2e5d213

Please sign in to comment.