Skip to content

Commit ae53e17

Browse files
committed
feat: add polygon holes support
1 parent 1b1d80d commit ae53e17

File tree

1 file changed

+6
-18
lines changed

1 file changed

+6
-18
lines changed

ios/GoogleMapViewImpl.swift

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -340,26 +340,16 @@ GMSIndoorDisplayDelegate {
340340
animated: Bool,
341341
durationMs: Double
342342
) {
343-
if coordinates.isEmpty {
343+
guard let firstCoordinates = coordinates.first else {
344344
return
345345
}
346-
/// TODO:
347346
var bounds = GMSCoordinateBounds(
348-
coordinate: CLLocationCoordinate2D(
349-
latitude: coordinates[0].latitude,
350-
longitude: coordinates[0].longitude
351-
),
352-
coordinate: CLLocationCoordinate2D(
353-
latitude: coordinates[0].latitude,
354-
longitude: coordinates[0].longitude
355-
)
347+
coordinate: firstCoordinates.toCLLocationCoordinate2D(),
348+
coordinate: firstCoordinates.toCLLocationCoordinate2D()
356349
)
357350

358351
for coord in coordinates.dropFirst() {
359-
bounds = bounds.includingCoordinate(
360-
coord.toCLLocationCoordinate2D(),
361-
362-
)
352+
bounds = bounds.includingCoordinate(coord.toCLLocationCoordinate2D())
363353
}
364354

365355
let insets = UIEdgeInsets(
@@ -732,8 +722,7 @@ GMSIndoorDisplayDelegate {
732722
longitudeDelta: lngDelta
733723
)
734724
let cam = RNCamera(
735-
center:
736-
cp.target.toRNLatLng(),
725+
center: cp.target.toRNLatLng(),
737726
zoom: Double(cp.zoom),
738727
bearing: cp.bearing,
739728
tilt: cp.viewingAngle
@@ -805,8 +794,7 @@ GMSIndoorDisplayDelegate {
805794
longitudeDelta: lngDelta
806795
)
807796
let cam = RNCamera(
808-
center:
809-
cp.target.toRNLatLng(),
797+
center: cp.target.toRNLatLng(),
810798
zoom: Double(cp.zoom),
811799
bearing: cp.bearing,
812800
tilt: cp.viewingAngle

0 commit comments

Comments
 (0)