Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ export default MyMap;
* [`enableAccessibilityElements(...)`](#enableaccessibilityelements)
* [`enableCurrentLocation(...)`](#enablecurrentlocation)
* [`setPadding(...)`](#setpadding)
* [`getMapBounds()`](#getmapbounds)
* [`fitBounds(...)`](#fitbounds)
* [`setOnBoundsChangedListener(...)`](#setonboundschangedlistener)
* [`setOnCameraIdleListener(...)`](#setoncameraidlelistener)
Expand Down Expand Up @@ -654,6 +655,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 Expand Up @@ -1169,6 +1183,13 @@ but the current specification only allows X, Y, and (optionally) Z to be defined
<code>number[]</code>


#### Marker

Supports markers of either either "legacy" or "advanced" types.

<code>google.maps.<a href="#marker">Marker</a> | google.maps.marker.AdvancedMarkerElement</code>


### Enums


Expand Down
7 changes: 4 additions & 3 deletions plugin/ios/Plugin/Map.swift
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,11 @@ public class Map {

let height = Double((item as? UIScrollView)?.contentSize.height ?? 0)
let width = Double((item as? UIScrollView)?.contentSize.width ?? 0)
let actualHeight = round(height / 2)
let actualHeightFloor = floor(height / 2)
let actualHeightCeil = ceil(height / 2)

let isWidthEqual = width == self.config.width
let isHeightEqual = actualHeight == self.config.height
let isWidthEqual = width == refWidth
let isHeightEqual = actualHeightFloor == refHeight || actualHeightCeil == refHeight

if isWidthEqual && isHeightEqual && item.tag < self.targetViewController?.tag ?? Map.MAP_TAG {
return item
Expand Down