Skip to content

Commit

Permalink
Merge pull request ionic-team#37 from ionic-team/fix/RMET-3444/update…
Browse files Browse the repository at this point in the history
…-docs

fix: add `getMapsBounds()` to `GoogleMapInterface` and `README.md`
  • Loading branch information
alexgerardojacinto authored Aug 28, 2024
2 parents cbedc15 + 2e5d213 commit 3c48a9b
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 3c48a9b

Please sign in to comment.