Skip to content

Commit 3c48a9b

Browse files
Merge pull request #37 from ionic-team/fix/RMET-3444/update-docs
fix: add `getMapsBounds()` to `GoogleMapInterface` and `README.md`
2 parents cbedc15 + 2e5d213 commit 3c48a9b

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

plugin/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ export default MyMap;
305305
* [`enableAccessibilityElements(...)`](#enableaccessibilityelements)
306306
* [`enableCurrentLocation(...)`](#enablecurrentlocation)
307307
* [`setPadding(...)`](#setpadding)
308+
* [`getMapBounds()`](#getmapbounds)
308309
* [`fitBounds(...)`](#fitbounds)
309310
* [`setOnBoundsChangedListener(...)`](#setonboundschangedlistener)
310311
* [`setOnCameraIdleListener(...)`](#setoncameraidlelistener)
@@ -640,6 +641,19 @@ setPadding(padding: MapPadding) => Promise<void>
640641
--------------------
641642

642643

644+
### getMapBounds()
645+
646+
```typescript
647+
getMapBounds() => Promise<LatLngBounds>
648+
```
649+
650+
Get the map's current viewport latitude and longitude bounds.
651+
652+
**Returns:** <code>Promise&lt;LatLngBounds&gt;</code>
653+
654+
--------------------
655+
656+
643657
### fitBounds(...)
644658

645659
```typescript

plugin/src/map.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ export interface GoogleMapInterface {
5757
enableAccessibilityElements(enabled: boolean): Promise<void>;
5858
enableCurrentLocation(enabled: boolean): Promise<void>;
5959
setPadding(padding: MapPadding): Promise<void>;
60+
/**
61+
* Get the map's current viewport latitude and longitude bounds.
62+
*
63+
* @returns {LatLngBounds}
64+
*/
65+
getMapBounds(): Promise<LatLngBounds>;
6066
/**
6167
* Sets the map viewport to contain the given bounds.
6268
* @param bounds The bounds to fit in the viewport.

0 commit comments

Comments
 (0)