[google_maps_flutter] Convert remaining code to Swift (#12768)
Converts remaining code to Swift:
- Converts the protocols defined for testability to Swift
- Where possible, replaces manual passthrough classes with extensions that add protocol conformance to the actual class, reducing the amount of untestable code we need.
- Switches Pigeon generation to Swift (which causes a lot of mechanical changes due to classes no longer having a prefix, and the constructors being standard Swift construction instead of bridging to Obj-C convenience constructors)
- Uses Pigeon's Swift generator support for subclassing to replace the somewhat hacky nested classes in the interface definition with the actual subclassing that we wanted to express, simplifying some code and adding more type safety.
- Scrubs `NSObject` conformance from cases where it's no longer necessary. (Class that implement Flutter plugin API protocols still need it, as those are Obj-C protocols.)
Unlike the other PRs, this does not contain any Gemini Obj-C -> Swift conversions (other than some simple protocols); this is mostly just a Pigeon generation change and a lot of mostly mechanical cleanup.
Fixes https://github.com/flutter/flutter/issues/119108
## Pre-Review Checklist
[^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/CHANGELOG.md
index da4a2a3..9c30d78 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/CHANGELOG.md
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 2.18.12
+
+* Converts remaining Objective-C code to Swift.
+
## 2.18.11
* Converts heatmap controller and data conversion to Swift.
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/CircleControllerTests.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/CircleControllerTests.swift
index 8276502..9308378 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/CircleControllerTests.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/CircleControllerTests.swift
@@ -4,7 +4,6 @@
import GoogleMaps
import Testing
-import google_maps_flutter_ios_sdk10_objc
@testable import google_maps_flutter_ios_sdk10
@@ -14,14 +13,14 @@
let circle = PropertyOrderValidatingCircle()
CircleController.update(
circle,
- from: FGMPlatformCircle.make(
- withConsumeTapEvents: false,
- fill: FGMPlatformColor.make(withRed: 0, green: 0, blue: 0, alpha: 0),
- stroke: FGMPlatformColor.make(withRed: 0, green: 0, blue: 0, alpha: 0),
+ from: PlatformCircle(
+ consumeTapEvents: false,
+ fillColor: PlatformColor(red: 0, green: 0, blue: 0, alpha: 0),
+ strokeColor: PlatformColor(red: 0, green: 0, blue: 0, alpha: 0),
visible: true,
strokeWidth: 0,
zIndex: 0,
- center: FGMPlatformLatLng.make(withLatitude: 0, longitude: 0),
+ center: PlatformLatLng(latitude: 0, longitude: 0),
radius: 10,
circleId: "circle"
),
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/ClusterManagersControllerTests.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/ClusterManagersControllerTests.swift
index 797e788..9a7710f 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/ClusterManagersControllerTests.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/ClusterManagersControllerTests.swift
@@ -5,7 +5,6 @@
import Flutter
import GoogleMaps
import Testing
-import google_maps_flutter_ios_sdk10_objc
@testable import google_maps_flutter_ios_sdk10
@@ -36,7 +35,7 @@
// Add cluster managers.
let clusterManagerId = "cm"
- let clusterManagerToAdd = FGMPlatformClusterManager.make(withIdentifier: clusterManagerId)
+ let clusterManagerToAdd = PlatformClusterManager(identifier: clusterManagerId)
clusterManagersController.add([clusterManagerToAdd])
// Verify that cluster managers are available
@@ -47,18 +46,16 @@
let markerId1 = "m1"
let markerId2 = "m2"
- let zeroPoint = FGMPlatformPoint.makeWith(x: 0, y: 0)
- let zeroLatLng = FGMPlatformLatLng.make(withLatitude: 0, longitude: 0)
- let bitmap = FGMPlatformBitmap.make(
- withBitmap: FGMPlatformBitmapDefaultMarker.make(withHue: 0)
- )
- let infoWindow = FGMPlatformInfoWindow.make(
- withTitle: "Info",
+ let zeroPoint = PlatformPoint(x: 0, y: 0)
+ let zeroLatLng = PlatformLatLng(latitude: 0, longitude: 0)
+ let bitmap = PlatformBitmapDefaultMarker(hue: 0)
+ let infoWindow = PlatformInfoWindow(
+ title: "Info",
snippet: nil,
anchor: zeroPoint
)
- let marker1 = FGMPlatformMarker.make(
- withAlpha: 1,
+ let marker1 = PlatformMarker(
+ alpha: 1,
anchor: zeroPoint,
consumeTapEvents: false,
draggable: false,
@@ -73,8 +70,8 @@
clusterManagerId: clusterManagerId,
collisionBehavior: nil
)
- let marker2 = FGMPlatformMarker.make(
- withAlpha: 1,
+ let marker2 = PlatformMarker(
+ alpha: 1,
anchor: zeroPoint,
consumeTapEvents: false,
draggable: false,
@@ -96,11 +93,7 @@
clusterManagersController.invokeClusteringForEachClusterManager()
// Verify that the markers were added to the cluster manager
- var error: FlutterError? = nil
- let clusters1 = try #require(
- clusterManagersController.clusters(withIdentifier: clusterManagerId, error: &error)
- )
- #expect(error == nil)
+ let clusters1 = try clusterManagersController.clusters(withIdentifier: clusterManagerId)
let targetCluster = try #require(
clusters1.first(where: { $0.clusterManagerId == clusterManagerId })
)
@@ -111,11 +104,7 @@
markersController.removeMarkers(withIdentifiers: [markerId2])
// Verify that the marker2 is removed from the clusterManager
- error = nil
- let clusters2 = try #require(
- clusterManagersController.clusters(withIdentifier: clusterManagerId, error: &error)
- )
- #expect(error == nil)
+ let clusters2 = try clusterManagersController.clusters(withIdentifier: clusterManagerId)
let targetCluster2 = try #require(
clusters2.first(where: { $0.clusterManagerId == clusterManagerId })
)
@@ -125,11 +114,7 @@
markersController.removeMarkers(withIdentifiers: [markerId1])
// Verify that all markers are removed from clusterManager
- error = nil
- let clusters3 = try #require(
- clusterManagersController.clusters(withIdentifier: clusterManagerId, error: &error)
- )
- #expect(error == nil)
+ let clusters3 = try clusterManagersController.clusters(withIdentifier: clusterManagerId)
#expect(clusters3.count == 0)
// Remove cluster manager
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/ConversionsUtilsTests.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/ConversionsUtilsTests.swift
index c4e8cb3..af42eef 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/ConversionsUtilsTests.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/ConversionsUtilsTests.swift
@@ -4,7 +4,6 @@
import GoogleMaps
import Testing
-import google_maps_flutter_ios_sdk10_objc
@testable import google_maps_flutter_ios_sdk10
@@ -15,8 +14,8 @@
let platformGreen: CGFloat = 2 / 255.0
let platformBlue: CGFloat = 3 / 255.0
let platformAlpha: CGFloat = 4 / 255.0
- let color = FGMPlatformColor.make(
- withRed: platformRed,
+ let color = PlatformColor(
+ red: platformRed,
green: platformGreen,
blue: platformBlue,
alpha: platformAlpha
@@ -39,7 +38,7 @@
let blue: CGFloat = 3 / 255.0
let alpha: CGFloat = 4 / 255.0
let color = UIColor(red: red, green: green, blue: blue, alpha: alpha)
- let platformColor = FGMPlatformColor.make(from: color)
+ let platformColor = PlatformColor.make(from: color)
#expect(abs(red - platformColor.red) <= CGFloat.ulpOfOne)
#expect(abs(green - platformColor.green) <= CGFloat.ulpOfOne)
#expect(abs(blue - platformColor.blue) <= CGFloat.ulpOfOne)
@@ -47,7 +46,7 @@
}
@Test func pointFromLatLong() {
- let latlong = FGMPlatformLatLng.make(withLatitude: 1, longitude: 2)
+ let latlong = PlatformLatLng(latitude: 1, longitude: 2)
let location = latlong.toCLLocationCoordinate2D()
#expect(location.latitude == 1)
#expect(location.longitude == 2)
@@ -60,7 +59,7 @@
bearing: 3.0,
viewingAngle: 75.0
)
- let pigeonPosition = FGMPlatformCameraPosition.make(from: position)
+ let pigeonPosition = PlatformCameraPosition.make(from: position)
#expect(abs(pigeonPosition.target.latitude - position.target.latitude) <= Double.ulpOfOne)
#expect(abs(pigeonPosition.target.longitude - position.target.longitude) <= Double.ulpOfOne)
#expect(abs(Float(pigeonPosition.zoom) - position.zoom) <= Float.ulpOfOne)
@@ -70,7 +69,7 @@
@Test func pigeonPointForGCPoint() {
let point = CGPoint(x: 10, y: 20)
- let pigeonPoint = FGMPlatformPoint.make(from: point)
+ let pigeonPoint = PlatformPoint.make(from: point)
#expect(abs(pigeonPoint.x - Double(point.x)) <= Double.ulpOfOne)
#expect(abs(pigeonPoint.y - Double(point.y)) <= Double.ulpOfOne)
}
@@ -80,7 +79,7 @@
coordinate: CLLocationCoordinate2D(latitude: 10, longitude: 20),
coordinate: CLLocationCoordinate2D(latitude: 30, longitude: 40)
)
- let pigeonBounds = FGMPlatformLatLngBounds.make(from: bounds)
+ let pigeonBounds = PlatformLatLngBounds.make(from: bounds)
#expect(abs(pigeonBounds.southwest.latitude - bounds.southWest.latitude) <= Double.ulpOfOne)
#expect(abs(pigeonBounds.southwest.longitude - bounds.southWest.longitude) <= Double.ulpOfOne)
#expect(abs(pigeonBounds.northeast.latitude - bounds.northEast.latitude) <= Double.ulpOfOne)
@@ -88,9 +87,9 @@
}
@Test func getCameraPostionForPigeonCameraPosition() {
- let pigeonCameraPosition = FGMPlatformCameraPosition.make(
- withBearing: 1.0,
- target: FGMPlatformLatLng.make(withLatitude: 2.0, longitude: 3.0),
+ let pigeonCameraPosition = PlatformCameraPosition(
+ bearing: 1.0,
+ target: PlatformLatLng(latitude: 2.0, longitude: 3.0),
tilt: 4.0,
zoom: 5.0
)
@@ -108,7 +107,7 @@
}
@Test func cgPointForPigeonPoint() {
- let pigeonPoint = FGMPlatformPoint.makeWith(x: 1.0, y: 2.0)
+ let pigeonPoint = PlatformPoint(x: 1.0, y: 2.0)
let point = pigeonPoint.toCGPoint()
@@ -117,9 +116,9 @@
}
@Test func coordinateBoundsFromLatLongs() {
- let pigeonBounds = FGMPlatformLatLngBounds.make(
- withNortheast: FGMPlatformLatLng.make(withLatitude: 3, longitude: 4),
- southwest: FGMPlatformLatLng.make(withLatitude: 1, longitude: 2)
+ let pigeonBounds = PlatformLatLngBounds(
+ northeast: PlatformLatLng(latitude: 3, longitude: 4),
+ southwest: PlatformLatLng(latitude: 1, longitude: 2)
)
let bounds = pigeonBounds.toGMSCoordinateBounds()
@@ -132,25 +131,25 @@
}
@Test func mapViewTypeFromPigeonType() {
- #expect(GMSMapViewType.normal == FGMPlatformMapType.normal.gmsMapViewType)
- #expect(GMSMapViewType.satellite == FGMPlatformMapType.satellite.gmsMapViewType)
- #expect(GMSMapViewType.terrain == FGMPlatformMapType.terrain.gmsMapViewType)
- #expect(GMSMapViewType.hybrid == FGMPlatformMapType.hybrid.gmsMapViewType)
- #expect(GMSMapViewType.none == FGMPlatformMapType.none.gmsMapViewType)
+ #expect(GMSMapViewType.normal == PlatformMapType.normal.gmsMapViewType)
+ #expect(GMSMapViewType.satellite == PlatformMapType.satellite.gmsMapViewType)
+ #expect(GMSMapViewType.terrain == PlatformMapType.terrain.gmsMapViewType)
+ #expect(GMSMapViewType.hybrid == PlatformMapType.hybrid.gmsMapViewType)
+ #expect(GMSMapViewType.none == PlatformMapType.none.gmsMapViewType)
}
@Test func cameraUpdateFromNewCameraPosition() {
- let newPositionUpdate = FGMPlatformCameraUpdateNewCameraPosition.make(
- with: FGMPlatformCameraPosition.make(
- withBearing: 4,
- target: FGMPlatformLatLng.make(withLatitude: 1, longitude: 2),
+ let platformUpdate = PlatformCameraUpdateNewCameraPosition(
+ cameraPosition: PlatformCameraPosition(
+ bearing: 4,
+ target: PlatformLatLng(latitude: 1, longitude: 2),
tilt: 5,
zoom: 3
)
)
- _ = FGMPlatformCameraUpdate.make(withCameraUpdate: newPositionUpdate).toGMSCameraUpdate()
+ _ = platformUpdate.toGMSCameraUpdate()
// GMSCameraUpdate is not inspectable, so this test just ensures that the codepath
- // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that
+ // doesn't throw. toGMSCameraUpdate is simple enough that
// injecting a wrapper would not meaningfully improve test coverage, since the non-test
// implementation would be about as complex as the conversion function itself.
}
@@ -158,32 +157,32 @@
@Test func cameraUpdateFromNewLatLong() {
let lat: Double = 1
let lng: Double = 2
- let platformUpdate = FGMPlatformCameraUpdateNewLatLng.make(
- with: FGMPlatformLatLng.make(withLatitude: lat, longitude: lng)
+ let platformUpdate = PlatformCameraUpdateNewLatLng(
+ latLng: PlatformLatLng(latitude: lat, longitude: lng)
)
- _ = FGMPlatformCameraUpdate.make(withCameraUpdate: platformUpdate).toGMSCameraUpdate()
+ _ = platformUpdate.toGMSCameraUpdate()
// GMSCameraUpdate is not inspectable, so this test just ensures that the codepath
- // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that
+ // doesn't throw. toGMSCameraUpdate is simple enough that
// injecting a wrapper would not meaningfully improve test coverage, since the non-test
// implementation would be about as complex as the conversion function itself.
}
@Test func cameraUpdateFromNewLatLngBounds() {
- let pigeonBounds = FGMPlatformLatLngBounds.make(
- withNortheast: FGMPlatformLatLng.make(withLatitude: 1, longitude: 2),
- southwest: FGMPlatformLatLng.make(withLatitude: 3, longitude: 4)
+ let pigeonBounds = PlatformLatLngBounds(
+ northeast: PlatformLatLng(latitude: 1, longitude: 2),
+ southwest: PlatformLatLng(latitude: 3, longitude: 4)
)
let bounds = pigeonBounds.toGMSCoordinateBounds()
let padding: Double = 20
- let platformUpdate = FGMPlatformCameraUpdateNewLatLngBounds.make(
- with: FGMPlatformLatLngBounds.make(from: bounds),
+ let platformUpdate = PlatformCameraUpdateNewLatLngBounds(
+ bounds: PlatformLatLngBounds.make(from: bounds),
padding: padding
)
- _ = FGMPlatformCameraUpdate.make(withCameraUpdate: platformUpdate).toGMSCameraUpdate()
+ _ = platformUpdate.toGMSCameraUpdate()
// GMSCameraUpdate is not inspectable, so this test just ensures that the codepath
- // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that
+ // doesn't throw. toGMSCameraUpdate is simple enough that
// injecting a wrapper would not meaningfully improve test coverage, since the non-test
// implementation would be about as complex as the conversion function itself.
}
@@ -192,14 +191,14 @@
let lat: Double = 1
let lng: Double = 2
let zoom: Double = 3
- let platformUpdate = FGMPlatformCameraUpdateNewLatLngZoom.make(
- with: FGMPlatformLatLng.make(withLatitude: lat, longitude: lng),
+ let platformUpdate = PlatformCameraUpdateNewLatLngZoom(
+ latLng: PlatformLatLng(latitude: lat, longitude: lng),
zoom: zoom
)
- _ = FGMPlatformCameraUpdate.make(withCameraUpdate: platformUpdate).toGMSCameraUpdate()
+ _ = platformUpdate.toGMSCameraUpdate()
// GMSCameraUpdate is not inspectable, so this test just ensures that the codepath
- // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that
+ // doesn't throw. toGMSCameraUpdate is simple enough that
// injecting a wrapper would not meaningfully improve test coverage, since the non-test
// implementation would be about as complex as the conversion function itself.
}
@@ -207,22 +206,22 @@
@Test func cameraUpdateFromScrollBy() {
let x: Double = 1
let y: Double = 2
- let platformUpdate = FGMPlatformCameraUpdateScrollBy.make(withDx: x, dy: y)
+ let platformUpdate = PlatformCameraUpdateScrollBy(dx: x, dy: y)
- _ = FGMPlatformCameraUpdate.make(withCameraUpdate: platformUpdate).toGMSCameraUpdate()
+ _ = platformUpdate.toGMSCameraUpdate()
// GMSCameraUpdate is not inspectable, so this test just ensures that the codepath
- // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that
+ // doesn't throw. toGMSCameraUpdate is simple enough that
// injecting a wrapper would not meaningfully improve test coverage, since the non-test
// implementation would be about as complex as the conversion function itself.
}
@Test func cameraUpdateFromZoomBy() {
let zoom: Double = 1
- let platformUpdateNoPoint = FGMPlatformCameraUpdateZoomBy.make(withAmount: zoom, focus: nil)
+ let platformUpdateNoPoint = PlatformCameraUpdateZoomBy(amount: zoom, focus: nil)
- _ = FGMPlatformCameraUpdate.make(withCameraUpdate: platformUpdateNoPoint).toGMSCameraUpdate()
+ _ = platformUpdateNoPoint.toGMSCameraUpdate()
// GMSCameraUpdate is not inspectable, so this test just ensures that the codepath
- // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that
+ // doesn't throw. toGMSCameraUpdate is simple enough that
// injecting a wrapper would not meaningfully improve test coverage, since the non-test
// implementation would be about as complex as the conversion function itself.
}
@@ -231,51 +230,48 @@
let zoom: Double = 1
let x: Double = 2
let y: Double = 3
- let platformUpdate = FGMPlatformCameraUpdateZoomBy.make(
- withAmount: zoom,
- focus: FGMPlatformPoint.makeWith(x: x, y: y)
- )
+ let platformUpdate = PlatformCameraUpdateZoomBy(amount: zoom, focus: PlatformPoint(x: x, y: y))
- _ = FGMPlatformCameraUpdate.make(withCameraUpdate: platformUpdate).toGMSCameraUpdate()
+ _ = platformUpdate.toGMSCameraUpdate()
// GMSCameraUpdate is not inspectable, so this test just ensures that the codepath
- // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that
+ // doesn't throw. toGMSCameraUpdate is simple enough that
// injecting a wrapper would not meaningfully improve test coverage, since the non-test
// implementation would be about as complex as the conversion function itself.
}
@Test func cameraUpdateFromZoomIn() {
- let platformUpdate = FGMPlatformCameraUpdateZoom.make(withOut: false)
+ let platformUpdate = PlatformCameraUpdateZoom(out: false)
- _ = FGMPlatformCameraUpdate.make(withCameraUpdate: platformUpdate).toGMSCameraUpdate()
+ _ = platformUpdate.toGMSCameraUpdate()
// GMSCameraUpdate is not inspectable, so this test just ensures that the codepath
- // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that
+ // doesn't throw. toGMSCameraUpdate is simple enough that
// injecting a wrapper would not meaningfully improve test coverage, since the non-test
// implementation would be about as complex as the conversion function itself.
}
@Test func cameraUpdateFromZoomOut() {
- let platformUpdate = FGMPlatformCameraUpdateZoom.make(withOut: true)
+ let platformUpdate = PlatformCameraUpdateZoom(out: true)
- _ = FGMPlatformCameraUpdate.make(withCameraUpdate: platformUpdate).toGMSCameraUpdate()
+ _ = platformUpdate.toGMSCameraUpdate()
// GMSCameraUpdate is not inspectable, so this test just ensures that the codepath
- // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that
+ // doesn't throw. toGMSCameraUpdate is simple enough that
// injecting a wrapper would not meaningfully improve test coverage, since the non-test
// implementation would be about as complex as the conversion function itself.
}
@Test func cameraUpdateFromZoomTo() {
let zoom: Double = 1
- let platformUpdate = FGMPlatformCameraUpdateZoomTo.make(withZoom: zoom)
+ let platformUpdate = PlatformCameraUpdateZoomTo(zoom: zoom)
- _ = FGMPlatformCameraUpdate.make(withCameraUpdate: platformUpdate).toGMSCameraUpdate()
+ _ = platformUpdate.toGMSCameraUpdate()
// GMSCameraUpdate is not inspectable, so this test just ensures that the codepath
- // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that
+ // doesn't throw. toGMSCameraUpdate is simple enough that
// injecting a wrapper would not meaningfully improve test coverage, since the non-test
// implementation would be about as complex as the conversion function itself.
}
@Test func strokeStyleFromPattern() {
- let pattern = FGMPlatformPatternItem.make(with: .dash, length: 1)
+ let pattern = PlatformPatternItem(type: .dash, length: 1)
let strokeColor = UIColor.red
_ = pattern.gmsStrokeStyle(strokeColor: strokeColor)
@@ -285,7 +281,7 @@
@Test func nonNullLengthFromPatternItem() {
let length: Double = 6.4
- let pattern = FGMPlatformPatternItem.make(with: .gap, length: length as NSNumber)
+ let pattern = PlatformPatternItem(type: .gap, length: length)
let spanLength = pattern.gmsStyleSpanLength()
@@ -293,7 +289,7 @@
}
@Test func nullLengthFromPatternItem() {
- let pattern = FGMPlatformPatternItem.make(with: .dot, length: nil)
+ let pattern = PlatformPatternItem(type: .dot, length: nil)
let spanLength = pattern.gmsStyleSpanLength()
@@ -302,8 +298,8 @@
@Test func weightedLatLngFromPlatformWeightedLatLng() {
let intensity: Double = 3.0
- let data = FGMPlatformWeightedLatLng.make(
- withPoint: FGMPlatformLatLng.make(withLatitude: 10, longitude: 20),
+ let data = PlatformWeightedLatLng(
+ point: PlatformLatLng(latitude: 10, longitude: 20),
weight: intensity
)
@@ -318,17 +314,17 @@
let platformBlue: Double = 0.3
let platformAlpha: Double = 0.4
let colorMapSize: Int = 200
- let platformGradient = FGMPlatformHeatmapGradient.make(
- with: [
- FGMPlatformColor.make(
- withRed: platformRed,
+ let platformGradient = PlatformHeatmapGradient(
+ colors: [
+ PlatformColor(
+ red: platformRed,
green: platformGreen,
blue: platformBlue,
alpha: platformAlpha
)
],
- startPoints: [startPoint as NSNumber],
- colorMapSize: colorMapSize
+ startPoints: [startPoint],
+ colorMapSize: Int64(colorMapSize)
)
let gradient = platformGradient.toGMUGradient()
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/ExtractIconFromDataTests.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/ExtractIconFromDataTests.swift
index 7dd8c7d..f13a6b7 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/ExtractIconFromDataTests.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/ExtractIconFromDataTests.swift
@@ -4,7 +4,6 @@
import Flutter
import Testing
-import google_maps_flutter_ios_sdk10_objc
@testable import google_maps_flutter_ios_sdk10
@@ -15,8 +14,8 @@
let assetName = "fakeImageName"
let assetProvider = TestAssetProvider(image: testImage, forAssetName: assetName, package: nil)
- let bitmap = FGMPlatformBitmapAssetMap.make(
- withAssetName: assetName,
+ let bitmap = PlatformBitmapAssetMap(
+ assetName: assetName,
bitmapScaling: .auto,
imagePixelRatio: 1,
width: nil,
@@ -25,10 +24,7 @@
let screenScale: CGFloat = 3.0
- let resultImage = FGMPlatformBitmap.make(withBitmap: bitmap).createIcon(
- assetProvider: assetProvider,
- screenScale: screenScale
- )
+ let resultImage = bitmap.createIcon(assetProvider: assetProvider, screenScale: screenScale)
#expect(resultImage != nil)
#expect(resultImage?.scale == 1.0)
@@ -42,8 +38,8 @@
let assetName = "fakeImageName"
let assetProvider = TestAssetProvider(image: testImage, forAssetName: assetName, package: nil)
- let bitmap = FGMPlatformBitmapAssetMap.make(
- withAssetName: assetName,
+ let bitmap = PlatformBitmapAssetMap(
+ assetName: assetName,
bitmapScaling: .auto,
imagePixelRatio: 10,
width: nil,
@@ -52,10 +48,7 @@
let screenScale: CGFloat = 3.0
- let resultImage = FGMPlatformBitmap.make(withBitmap: bitmap).createIcon(
- assetProvider: assetProvider,
- screenScale: screenScale
- )
+ let resultImage = bitmap.createIcon(assetProvider: assetProvider, screenScale: screenScale)
#expect(resultImage != nil)
#expect(resultImage?.scale == 10)
@@ -71,20 +64,17 @@
let assetProvider = TestAssetProvider(image: testImage, forAssetName: assetName, package: nil)
let width: CGFloat = 15.0
- let bitmap = FGMPlatformBitmapAssetMap.make(
- withAssetName: assetName,
+ let bitmap = PlatformBitmapAssetMap(
+ assetName: assetName,
bitmapScaling: .auto,
imagePixelRatio: 1,
- width: width as NSNumber,
+ width: width,
height: nil
)
let screenScale: CGFloat = 3.0
- let resultImage = FGMPlatformBitmap.make(withBitmap: bitmap).createIcon(
- assetProvider: assetProvider,
- screenScale: screenScale
- )
+ let resultImage = bitmap.createIcon(assetProvider: assetProvider, screenScale: screenScale)
#expect(resultImage != nil)
#expect(testImage.scale == 1.0)
@@ -105,20 +95,17 @@
let width: CGFloat = 15.0
let height: CGFloat = 45.0
- let bitmap = FGMPlatformBitmapAssetMap.make(
- withAssetName: assetName,
+ let bitmap = PlatformBitmapAssetMap(
+ assetName: assetName,
bitmapScaling: .auto,
imagePixelRatio: 1,
- width: width as NSNumber,
- height: height as NSNumber
+ width: width,
+ height: height
)
let screenScale: CGFloat = 3.0
- let resultImage = FGMPlatformBitmap.make(withBitmap: bitmap).createIcon(
- assetProvider: assetProvider,
- screenScale: screenScale
- )
+ let resultImage = bitmap.createIcon(assetProvider: assetProvider, screenScale: screenScale)
#expect(resultImage != nil)
#expect(resultImage?.scale == screenScale)
#expect(resultImage?.size.width == width)
@@ -131,8 +118,8 @@
let assetName = "fakeImageName"
let assetProvider = TestAssetProvider(image: testImage, forAssetName: assetName, package: nil)
- let bitmap = FGMPlatformBitmapAssetMap.make(
- withAssetName: assetName,
+ let bitmap = PlatformBitmapAssetMap(
+ assetName: assetName,
bitmapScaling: .none,
imagePixelRatio: 1,
width: nil,
@@ -141,10 +128,7 @@
let screenScale: CGFloat = 3.0
- let resultImage = FGMPlatformBitmap.make(withBitmap: bitmap).createIcon(
- assetProvider: assetProvider,
- screenScale: screenScale
- )
+ let resultImage = bitmap.createIcon(assetProvider: assetProvider, screenScale: screenScale)
#expect(resultImage != nil)
#expect(resultImage?.scale == 1.0)
@@ -157,8 +141,8 @@
let pngData = try #require(testImage.pngData())
let typedData = FlutterStandardTypedData(bytes: pngData)
- let bitmap = FGMPlatformBitmapBytesMap.make(
- withByteData: typedData,
+ let bitmap = PlatformBitmapBytesMap(
+ byteData: typedData,
bitmapScaling: .auto,
imagePixelRatio: 1,
width: nil,
@@ -167,7 +151,7 @@
let screenScale: CGFloat = 3.0
- let resultImage = FGMPlatformBitmap.make(withBitmap: bitmap).createIcon(
+ let resultImage = bitmap.createIcon(
assetProvider: TestAssetProvider(),
screenScale: screenScale
)
@@ -183,8 +167,8 @@
let pngData = try #require(testImage.pngData())
let typedData = FlutterStandardTypedData(bytes: pngData)
- let bitmap = FGMPlatformBitmapBytesMap.make(
- withByteData: typedData,
+ let bitmap = PlatformBitmapBytesMap(
+ byteData: typedData,
bitmapScaling: .auto,
imagePixelRatio: 10,
width: nil,
@@ -193,7 +177,7 @@
let screenScale: CGFloat = 3.0
- let resultImage = FGMPlatformBitmap.make(withBitmap: bitmap).createIcon(
+ let resultImage = bitmap.createIcon(
assetProvider: TestAssetProvider(),
screenScale: screenScale
)
@@ -210,17 +194,17 @@
let width: CGFloat = 15.0
let height: CGFloat = 15.0
let typedData = FlutterStandardTypedData(bytes: pngData)
- let bitmap = FGMPlatformBitmapBytesMap.make(
- withByteData: typedData,
+ let bitmap = PlatformBitmapBytesMap(
+ byteData: typedData,
bitmapScaling: .auto,
imagePixelRatio: 1,
- width: width as NSNumber,
- height: height as NSNumber
+ width: width,
+ height: height
)
let screenScale: CGFloat = 3.0
- let resultImage = FGMPlatformBitmap.make(withBitmap: bitmap).createIcon(
+ let resultImage = bitmap.createIcon(
assetProvider: TestAssetProvider(),
screenScale: screenScale
)
@@ -244,17 +228,17 @@
let width: CGFloat = 15.0
let height: CGFloat = 45.0
let typedData = FlutterStandardTypedData(bytes: pngData)
- let bitmap = FGMPlatformBitmapBytesMap.make(
- withByteData: typedData,
+ let bitmap = PlatformBitmapBytesMap(
+ byteData: typedData,
bitmapScaling: .auto,
imagePixelRatio: 1,
- width: width as NSNumber,
- height: height as NSNumber
+ width: width,
+ height: height
)
let screenScale: CGFloat = 3.0
- let resultImage = FGMPlatformBitmap.make(withBitmap: bitmap).createIcon(
+ let resultImage = bitmap.createIcon(
assetProvider: TestAssetProvider(),
screenScale: screenScale
)
@@ -269,8 +253,8 @@
let pngData = try #require(testImage.pngData())
let typedData = FlutterStandardTypedData(bytes: pngData)
- let bitmap = FGMPlatformBitmapBytesMap.make(
- withByteData: typedData,
+ let bitmap = PlatformBitmapBytesMap(
+ byteData: typedData,
bitmapScaling: .none,
imagePixelRatio: 1,
width: nil,
@@ -279,7 +263,7 @@
let screenScale: CGFloat = 3.0
- let resultImage = FGMPlatformBitmap.make(withBitmap: bitmap).createIcon(
+ let resultImage = bitmap.createIcon(
assetProvider: TestAssetProvider(),
screenScale: screenScale
)
@@ -294,12 +278,12 @@
@Test func extractIconFromPinConfigWithGlyphColor() {
let assetProvider = TestAssetProvider()
- let backgroundColor = FGMPlatformColor.make(withRed: 0.0, green: 1.0, blue: 1.0, alpha: 1.0)
- let borderColor = FGMPlatformColor.make(withRed: 1.0, green: 0.0, blue: 1.0, alpha: 1.0)
- let glyphColor = FGMPlatformColor.make(withRed: 0.1, green: 0.2, blue: 0.3, alpha: 1.0)
+ let backgroundColor = PlatformColor(red: 0.0, green: 1.0, blue: 1.0, alpha: 1.0)
+ let borderColor = PlatformColor(red: 1.0, green: 0.0, blue: 1.0, alpha: 1.0)
+ let glyphColor = PlatformColor(red: 0.1, green: 0.2, blue: 0.3, alpha: 1.0)
- let pinConfig = FGMPlatformBitmapPinConfig.make(
- withBackgroundColor: backgroundColor,
+ let pinConfig = PlatformBitmapPinConfig(
+ backgroundColor: backgroundColor,
borderColor: borderColor,
glyphColor: glyphColor,
glyphTextColor: nil,
@@ -309,10 +293,7 @@
let screenScale: CGFloat = 3.0
- let resultImage = FGMPlatformBitmap.make(withBitmap: pinConfig).createIcon(
- assetProvider: assetProvider,
- screenScale: screenScale
- )
+ let resultImage = pinConfig.createIcon(assetProvider: assetProvider, screenScale: screenScale)
// PinConfig may return nil on old Google Maps SDK versions (<=8.4.0).
// Also, due to a Google Maps SDK issue (https://issuetracker.google.com/issues/370536110),
@@ -324,10 +305,10 @@
@Test func extractIconFromPinConfigWithGlyphText() {
let assetProvider = TestAssetProvider()
- let glyphTextColor = FGMPlatformColor.make(withRed: 1.0, green: 1.0, blue: 1.0, alpha: 1.0)
+ let glyphTextColor = PlatformColor(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0)
- let pinConfig = FGMPlatformBitmapPinConfig.make(
- withBackgroundColor: nil,
+ let pinConfig = PlatformBitmapPinConfig(
+ backgroundColor: nil,
borderColor: nil,
glyphColor: nil,
glyphTextColor: glyphTextColor,
@@ -337,10 +318,7 @@
let screenScale: CGFloat = 3.0
- let resultImage = FGMPlatformBitmap.make(withBitmap: pinConfig).createIcon(
- assetProvider: assetProvider,
- screenScale: screenScale
- )
+ let resultImage = pinConfig.createIcon(assetProvider: assetProvider, screenScale: screenScale)
// PinConfig returns nil on iOS versions without GMSPinImageOptions support (< iOS 16.0).
// On simulators, GMSPinImage may also return a zero-dimension image. Both cases are acceptable
@@ -355,33 +333,29 @@
let assetName = "fakeImageNameKey"
let assetProvider = TestAssetProvider(image: testImage, forAssetName: assetName, package: nil)
- let assetBitmap = FGMPlatformBitmapAssetMap.make(
- withAssetName: assetName,
+ let assetBitmap = PlatformBitmapAssetMap(
+ assetName: assetName,
bitmapScaling: .auto,
imagePixelRatio: 1,
width: nil,
height: nil
)
- let glyphBitmap = FGMPlatformBitmap.make(withBitmap: assetBitmap)
- let backgroundColor = FGMPlatformColor.make(withRed: 1.0, green: 1.0, blue: 1.0, alpha: 1.0)
- let borderColor = FGMPlatformColor.make(withRed: 0.0, green: 0.0, blue: 0.0, alpha: 1.0)
+ let backgroundColor = PlatformColor(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0)
+ let borderColor = PlatformColor(red: 0.0, green: 0.0, blue: 0.0, alpha: 1.0)
- let pinConfig = FGMPlatformBitmapPinConfig.make(
- withBackgroundColor: backgroundColor,
+ let pinConfig = PlatformBitmapPinConfig(
+ backgroundColor: backgroundColor,
borderColor: borderColor,
glyphColor: nil,
glyphTextColor: nil,
glyphText: nil,
- glyphBitmap: glyphBitmap
+ glyphBitmap: assetBitmap
)
let screenScale: CGFloat = 3.0
- let resultImage = FGMPlatformBitmap.make(withBitmap: pinConfig).createIcon(
- assetProvider: assetProvider,
- screenScale: screenScale
- )
+ let resultImage = pinConfig.createIcon(assetProvider: assetProvider, screenScale: screenScale)
// PinConfig returns nil on iOS versions without GMSPinImageOptions support (< iOS 16.0).
// On simulators, GMSPinImage may also return a zero-dimension image. Both cases are acceptable
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/GoogleMapsTests.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/GoogleMapsTests.swift
index c0d68c6..2a0b6ce 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/GoogleMapsTests.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/GoogleMapsTests.swift
@@ -5,11 +5,10 @@
import Flutter
import GoogleMaps
import Testing
-import google_maps_flutter_ios_sdk10_objc
@testable import google_maps_flutter_ios_sdk10
-class MockCATransaction: NSObject, FGMCATransactionProtocol {
+class MockCATransaction: MapAnimationCATransactionProtocol {
var beginCalled = false
var commitCalled = false
var animationDuration: CFTimeInterval = 0.0
@@ -129,12 +128,9 @@
let mockTransactionWrapper = MockCATransaction()
controller.callHandler.transactionWrapper = mockTransactionWrapper
- let zoomTo = FGMPlatformCameraUpdateZoomTo.make(withZoom: 10.0)
- let cameraUpdate = FGMPlatformCameraUpdate.make(withCameraUpdate: zoomTo)
- var error: FlutterError? = nil
+ let zoomTo = PlatformCameraUpdateZoomTo(zoom: 10.0)
- controller.callHandler.animateCamera(with: cameraUpdate, duration: nil, error: &error)
- #expect(error == nil)
+ try controller.callHandler.animateCamera(zoomTo, duration: nil)
#expect(mapView.didAnimateCamera)
#expect(!mockTransactionWrapper.beginCalled)
#expect(!mockTransactionWrapper.commitCalled)
@@ -161,21 +157,14 @@
let mockTransactionWrapper = MockCATransaction()
controller.callHandler.transactionWrapper = mockTransactionWrapper
- let zoomTo = FGMPlatformCameraUpdateZoomTo.make(withZoom: 10.0)
- let cameraUpdate = FGMPlatformCameraUpdate.make(withCameraUpdate: zoomTo)
- var error: FlutterError? = nil
+ let zoomTo = PlatformCameraUpdateZoomTo(zoom: 10.0)
- let durationMilliseconds: NSNumber = 100
- controller.callHandler.animateCamera(
- with: cameraUpdate,
- duration: durationMilliseconds,
- error: &error
- )
- #expect(error == nil)
+ let durationMilliseconds: Int64 = 100
+ try controller.callHandler.animateCamera(zoomTo, duration: durationMilliseconds)
#expect(mapView.didAnimateCamera)
#expect(mockTransactionWrapper.beginCalled)
#expect(mockTransactionWrapper.commitCalled)
- #expect(mockTransactionWrapper.animationDuration == durationMilliseconds.doubleValue / 1000)
+ #expect(mockTransactionWrapper.animationDuration == Double(durationMilliseconds) / 1000)
}
@Test func inspectorAPICameraPosition() throws {
@@ -201,9 +190,7 @@
let inspector = MapInspector(messenger: binaryMessenger, pigeonSuffix: "0")
inspector.controller = controller
- var error: FlutterError? = nil
- let cameraPosition = try #require(inspector.cameraPosition(&error))
- #expect(error == nil)
+ let cameraPosition = try inspector.cameraPosition()
#expect(cameraPosition.target.latitude == initialCameraPosition.target.latitude)
#expect(cameraPosition.target.longitude == initialCameraPosition.target.longitude)
@@ -212,16 +199,16 @@
/// Creates an empty creation parameters object for tests where the values don't matter, just that
/// there's a valid object to pass in.
- private func emptyCreationParameters() -> FGMPlatformMapViewCreationParams {
- return FGMPlatformMapViewCreationParams.make(
- withInitialCameraPosition: FGMPlatformCameraPosition.make(
- withBearing: 0.0,
- target: FGMPlatformLatLng.make(withLatitude: 0.0, longitude: 0.0),
+ private func emptyCreationParameters() -> PlatformMapViewCreationParams {
+ return PlatformMapViewCreationParams(
+ initialCameraPosition: PlatformCameraPosition(
+ bearing: 0.0,
+ target: PlatformLatLng(latitude: 0.0, longitude: 0.0),
tilt: 0.0,
zoom: 0.0
),
- mapConfiguration: FGMPlatformMapConfiguration.make(
- withCompassEnabled: nil,
+ mapConfiguration: PlatformMapConfiguration(
+ compassEnabled: nil,
cameraTargetBounds: nil,
mapType: nil,
minMaxZoomPreference: nil,
@@ -267,6 +254,7 @@
#expect(mapView.frameObserverCount == 1)
+ withExtendedLifetime(controller) {}
// Deallocate the controller
controller = nil
@@ -288,8 +276,8 @@
#expect(controller.styleError != nil)
// Update config without style
- let config = FGMPlatformMapConfiguration.make(
- withCompassEnabled: true,
+ let config = PlatformMapConfiguration(
+ compassEnabled: true,
cameraTargetBounds: nil,
mapType: nil,
minMaxZoomPreference: nil,
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/GroundOverlayControllerTests.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/GroundOverlayControllerTests.swift
index 22180d0..adf868e 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/GroundOverlayControllerTests.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/GroundOverlayControllerTests.swift
@@ -4,7 +4,6 @@
import GoogleMaps
import Testing
-import google_maps_flutter_ios_sdk10_objc
@testable import google_maps_flutter_ios_sdk10
@@ -76,18 +75,16 @@
let (groundOverlayController, mapView) =
try GroundOverlayControllerTests.groundOverlayControllerWithPositionWithMockedMap()
- let position = FGMPlatformLatLng.make(withLatitude: 52.4816, longitude: 3.1791)
+ let position = PlatformLatLng(latitude: 52.4816, longitude: 3.1791)
- let bitmap = FGMPlatformBitmap.make(
- withBitmap: FGMPlatformBitmapDefaultMarker.make(withHue: 0)
- )
+ let bitmap = PlatformBitmapDefaultMarker(hue: 0)
- let platformGroundOverlay = FGMPlatformGroundOverlay.make(
- withGroundOverlayId: "id_1",
+ let platformGroundOverlay = PlatformGroundOverlay(
+ groundOverlayId: "id_1",
image: bitmap,
position: position,
bounds: nil,
- anchor: FGMPlatformPoint.makeWith(x: 0.5, y: 0.5),
+ anchor: PlatformPoint(x: 0.5, y: 0.5),
transparency: 0.5,
bearing: 65.0,
zIndex: 2,
@@ -116,7 +113,7 @@
#expect(abs(groundOverlayController.groundOverlay.anchor.y - 0.5) <= Double.ulpOfOne)
#expect(groundOverlayController.groundOverlay.zIndex == Int32(platformGroundOverlay.zIndex))
- let convertedPlatformGroundOverlay = FGMPlatformGroundOverlay.make(
+ let convertedPlatformGroundOverlay = PlatformGroundOverlay.make(
from: groundOverlayController.groundOverlay,
overlayId: "id_1",
isCreatedWithBounds: false,
@@ -128,7 +125,7 @@
#expect(
abs(convertedPlatformGroundOverlay.position!.longitude - position.longitude)
<= Double.ulpOfOne)
- #expect(convertedPlatformGroundOverlay.zoomLevel!.doubleValue == 14.0)
+ #expect(convertedPlatformGroundOverlay.zoomLevel == 14.0)
#expect(convertedPlatformGroundOverlay.transparency == platformGroundOverlay.transparency)
#expect(convertedPlatformGroundOverlay.bearing == platformGroundOverlay.bearing)
#expect(abs(convertedPlatformGroundOverlay.anchor!.x - 0.5) <= Double.ulpOfOne)
@@ -141,21 +138,19 @@
let (groundOverlayController, mapView) =
try GroundOverlayControllerTests.groundOverlayControllerWithBoundsWithMockedMap()
- let bounds = FGMPlatformLatLngBounds.make(
- withNortheast: FGMPlatformLatLng.make(withLatitude: 54.4816, longitude: 5.1791),
- southwest: FGMPlatformLatLng.make(withLatitude: 52.4816, longitude: 3.1791)
+ let bounds = PlatformLatLngBounds(
+ northeast: PlatformLatLng(latitude: 54.4816, longitude: 5.1791),
+ southwest: PlatformLatLng(latitude: 52.4816, longitude: 3.1791)
)
- let bitmap = FGMPlatformBitmap.make(
- withBitmap: FGMPlatformBitmapDefaultMarker.make(withHue: 0)
- )
+ let bitmap = PlatformBitmapDefaultMarker(hue: 0)
- let platformGroundOverlay = FGMPlatformGroundOverlay.make(
- withGroundOverlayId: "id_1",
+ let platformGroundOverlay = PlatformGroundOverlay(
+ groundOverlayId: "id_1",
image: bitmap,
position: nil,
bounds: bounds,
- anchor: FGMPlatformPoint.makeWith(x: 0.5, y: 0.5),
+ anchor: PlatformPoint(x: 0.5, y: 0.5),
transparency: 0.5,
bearing: 65.0,
zIndex: 2,
@@ -183,7 +178,7 @@
#expect(abs(groundOverlayController.groundOverlay.anchor.y - 0.5) <= Double.ulpOfOne)
#expect(groundOverlayController.groundOverlay.zIndex == Int32(platformGroundOverlay.zIndex))
- let convertedPlatformGroundOverlay = FGMPlatformGroundOverlay.make(
+ let convertedPlatformGroundOverlay = PlatformGroundOverlay.make(
from: groundOverlayController.groundOverlay,
overlayId: "id_1",
isCreatedWithBounds: true,
@@ -214,17 +209,15 @@
let groundOverlay = PropertyOrderValidatingGroundOverlay()
GroundOverlayController.update(
groundOverlay,
- from: FGMPlatformGroundOverlay.make(
- withGroundOverlayId: "groundOverlay",
- image: FGMPlatformBitmap.make(
- withBitmap: FGMPlatformBitmapDefaultMarker.make(withHue: 0)
+ from: PlatformGroundOverlay(
+ groundOverlayId: "groundOverlay",
+ image: PlatformBitmapDefaultMarker(hue: 0),
+ position: PlatformLatLng(latitude: 0, longitude: 0),
+ bounds: PlatformLatLngBounds(
+ northeast: PlatformLatLng(latitude: 54.4816, longitude: 5.1791),
+ southwest: PlatformLatLng(latitude: 52.4816, longitude: 3.1791)
),
- position: FGMPlatformLatLng.make(withLatitude: 0, longitude: 0),
- bounds: FGMPlatformLatLngBounds.make(
- withNortheast: FGMPlatformLatLng.make(withLatitude: 54.4816, longitude: 5.1791),
- southwest: FGMPlatformLatLng.make(withLatitude: 52.4816, longitude: 3.1791)
- ),
- anchor: FGMPlatformPoint.makeWith(x: 0.5, y: 0.5),
+ anchor: PlatformPoint(x: 0.5, y: 0.5),
transparency: 0.5,
bearing: 65.0,
zIndex: 2,
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/HeatmapControllerTests.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/HeatmapControllerTests.swift
index cd37fc8..c716de3 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/HeatmapControllerTests.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/HeatmapControllerTests.swift
@@ -5,7 +5,6 @@
import GoogleMaps
import GoogleMapsUtils
import Testing
-import google_maps_flutter_ios_sdk10_objc
@testable import google_maps_flutter_ios_sdk10
@@ -13,25 +12,25 @@
@Test func updateHeatmapSetsVisibilityLast() {
let heatmap = PropertyOrderValidatingHeatmap()
- let gradient = FGMPlatformHeatmapGradient.make(
- with: [
- FGMPlatformColor.make(withRed: 0, green: 0, blue: 0, alpha: 0),
- FGMPlatformColor.make(withRed: 1.0, green: 1.0, blue: 1.0, alpha: 1.0),
+ let gradient = PlatformHeatmapGradient(
+ colors: [
+ PlatformColor(red: 0, green: 0, blue: 0, alpha: 0),
+ PlatformColor(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0),
],
- startPoints: [0 as NSNumber, 1 as NSNumber],
+ startPoints: [0, 1],
colorMapSize: 256
)
HeatmapController.update(
heatmap,
- from: FGMPlatformHeatmap.make(
- withHeatmapId: "heatmap",
+ from: PlatformHeatmap(
+ heatmapId: "heatmap",
data: [
- FGMPlatformWeightedLatLng.make(
- withPoint: FGMPlatformLatLng.make(withLatitude: 5.0, longitude: 5.0),
+ PlatformWeightedLatLng(
+ point: PlatformLatLng(latitude: 5.0, longitude: 5.0),
weight: 0.5
),
- FGMPlatformWeightedLatLng.make(
- withPoint: FGMPlatformLatLng.make(withLatitude: 10.0, longitude: 10.0),
+ PlatformWeightedLatLng(
+ point: PlatformLatLng(latitude: 10.0, longitude: 10.0),
weight: 0.75
),
],
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/MarkerControllerTests.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/MarkerControllerTests.swift
index 5cc8c4f..f38e92e 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/MarkerControllerTests.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/MarkerControllerTests.swift
@@ -4,7 +4,6 @@
import GoogleMaps
import Testing
-import google_maps_flutter_ios_sdk10_objc
@testable import google_maps_flutter_ios_sdk10
@@ -18,12 +17,12 @@
return PartiallyMockedMapView(options: mapViewOptions)
}
- /// Returns a FGMMarkersController instance instantiated with the given map view.
+ /// Returns a MarkersController instance instantiated with the given map view.
///
/// The mapView should outlive the controller, as the controller keeps a weak reference to it.
func markersController(
withMapView mapView: GMSMapView,
- eventDelegate: NSObject & FGMMapEventDelegate
+ eventDelegate: MapEventDelegate
) -> MarkersController {
return MarkersController(
mapView: mapView,
@@ -34,8 +33,8 @@
)
}
- func placeholderBitmap() -> FGMPlatformBitmap {
- return FGMPlatformBitmap.make(withBitmap: FGMPlatformBitmapDefaultMarker.make(withHue: 0))
+ func placeholderBitmap() -> PlatformBitmap {
+ return PlatformBitmapDefaultMarker(hue: 0)
}
@Test func setsMarkerNumericProperties() throws {
@@ -48,23 +47,23 @@
let anchorY = 2.718
let alpha = 0.4
let rotation = 90.0
- let zIndex = 3
+ let zIndex: Int64 = 3
let latitude = 10.0
let longitude = 20.0
controller.add([
- FGMPlatformMarker.make(
- withAlpha: alpha,
- anchor: FGMPlatformPoint.makeWith(x: anchorX, y: anchorY),
+ PlatformMarker(
+ alpha: alpha,
+ anchor: PlatformPoint(x: anchorX, y: anchorY),
consumeTapEvents: true,
draggable: true,
flat: true,
icon: placeholderBitmap(),
- infoWindow: FGMPlatformInfoWindow.make(
- withTitle: "info title",
+ infoWindow: PlatformInfoWindow(
+ title: "info title",
snippet: "info snippet",
- anchor: FGMPlatformPoint.makeWith(x: 0, y: 0)
+ anchor: PlatformPoint(x: 0, y: 0)
),
- position: FGMPlatformLatLng.make(withLatitude: latitude, longitude: longitude),
+ position: PlatformLatLng(latitude: latitude, longitude: longitude),
rotation: rotation,
visible: true,
zIndex: zIndex,
@@ -94,19 +93,19 @@
let markerIdentifier = "marker"
controller.add([
- FGMPlatformMarker.make(
- withAlpha: 1.0,
- anchor: FGMPlatformPoint.makeWith(x: 0, y: 0),
+ PlatformMarker(
+ alpha: 1.0,
+ anchor: PlatformPoint(x: 0, y: 0),
consumeTapEvents: false,
draggable: true,
flat: false,
icon: placeholderBitmap(),
- infoWindow: FGMPlatformInfoWindow.make(
- withTitle: "info title",
+ infoWindow: PlatformInfoWindow(
+ title: "info title",
snippet: "info snippet",
- anchor: FGMPlatformPoint.makeWith(x: 0, y: 0)
+ anchor: PlatformPoint(x: 0, y: 0)
),
- position: FGMPlatformLatLng.make(withLatitude: 0.0, longitude: 0.0),
+ position: PlatformLatLng(latitude: 0.0, longitude: 0.0),
rotation: 0,
visible: false,
zIndex: 0,
@@ -131,19 +130,19 @@
let markerIdentifier = "marker"
controller.add([
- FGMPlatformMarker.make(
- withAlpha: 1.0,
- anchor: FGMPlatformPoint.makeWith(x: 0, y: 0),
+ PlatformMarker(
+ alpha: 1.0,
+ anchor: PlatformPoint(x: 0, y: 0),
consumeTapEvents: false,
draggable: false,
flat: true,
icon: placeholderBitmap(),
- infoWindow: FGMPlatformInfoWindow.make(
- withTitle: "info title",
+ infoWindow: PlatformInfoWindow(
+ title: "info title",
snippet: "info snippet",
- anchor: FGMPlatformPoint.makeWith(x: 0, y: 0)
+ anchor: PlatformPoint(x: 0, y: 0)
),
- position: FGMPlatformLatLng.make(withLatitude: 0.0, longitude: 0.0),
+ position: PlatformLatLng(latitude: 0.0, longitude: 0.0),
rotation: 0,
visible: false,
zIndex: 0,
@@ -168,19 +167,19 @@
let markerIdentifier = "marker"
controller.add([
- FGMPlatformMarker.make(
- withAlpha: 1.0,
- anchor: FGMPlatformPoint.makeWith(x: 0, y: 0),
+ PlatformMarker(
+ alpha: 1.0,
+ anchor: PlatformPoint(x: 0, y: 0),
consumeTapEvents: false,
draggable: false,
flat: false,
icon: placeholderBitmap(),
- infoWindow: FGMPlatformInfoWindow.make(
- withTitle: "info title",
+ infoWindow: PlatformInfoWindow(
+ title: "info title",
snippet: "info snippet",
- anchor: FGMPlatformPoint.makeWith(x: 0, y: 0)
+ anchor: PlatformPoint(x: 0, y: 0)
),
- position: FGMPlatformLatLng.make(withLatitude: 0.0, longitude: 0.0),
+ position: PlatformLatLng(latitude: 0.0, longitude: 0.0),
rotation: 0,
visible: true,
zIndex: 0,
@@ -208,19 +207,19 @@
let anchorX = 3.14
let anchorY = 2.718
controller.add([
- FGMPlatformMarker.make(
- withAlpha: 1.0,
- anchor: FGMPlatformPoint.makeWith(x: 0, y: 0),
+ PlatformMarker(
+ alpha: 1.0,
+ anchor: PlatformPoint(x: 0, y: 0),
consumeTapEvents: true,
draggable: true,
flat: true,
icon: placeholderBitmap(),
- infoWindow: FGMPlatformInfoWindow.make(
- withTitle: title,
+ infoWindow: PlatformInfoWindow(
+ title: title,
snippet: snippet,
- anchor: FGMPlatformPoint.makeWith(x: anchorX, y: anchorY)
+ anchor: PlatformPoint(x: anchorX, y: anchorY)
),
- position: FGMPlatformLatLng.make(withLatitude: 0, longitude: 0),
+ position: PlatformLatLng(latitude: 0, longitude: 0),
rotation: 0,
visible: true,
zIndex: 0,
@@ -242,24 +241,22 @@
@Test func updateMarkerSetsVisibilityLast() {
let marker = PropertyOrderValidatingAdvancedMarker()
- let collisionBehavior = FGMPlatformMarkerCollisionBehaviorBox(
- value: .requiredAndHidesOptional
- )
+ let collisionBehavior = PlatformMarkerCollisionBehavior.requiredAndHidesOptional
MarkerController.update(
marker,
- from: FGMPlatformMarker.make(
- withAlpha: 1.0,
- anchor: FGMPlatformPoint.makeWith(x: 0, y: 0),
+ from: PlatformMarker(
+ alpha: 1.0,
+ anchor: PlatformPoint(x: 0, y: 0),
consumeTapEvents: true,
draggable: true,
flat: true,
icon: placeholderBitmap(),
- infoWindow: FGMPlatformInfoWindow.make(
- withTitle: "info title",
+ infoWindow: PlatformInfoWindow(
+ title: "info title",
snippet: "info snippet",
- anchor: FGMPlatformPoint.makeWith(x: 0, y: 0)
+ anchor: PlatformPoint(x: 0, y: 0)
),
- position: FGMPlatformLatLng.make(withLatitude: 0, longitude: 0),
+ position: PlatformLatLng(latitude: 0, longitude: 0),
rotation: 0,
visible: true,
zIndex: 0,
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/PolygonControllerTests.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/PolygonControllerTests.swift
index 0eef55e..d4dc3df 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/PolygonControllerTests.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/PolygonControllerTests.swift
@@ -4,7 +4,6 @@
import GoogleMaps
import Testing
-import google_maps_flutter_ios_sdk10_objc
@testable import google_maps_flutter_ios_sdk10
@@ -14,15 +13,15 @@
let polygon = PropertyOrderValidatingPolygon()
PolygonController.update(
polygon,
- from: FGMPlatformPolygon.make(
- withPolygonId: "polygon",
+ from: PlatformPolygon(
+ polygonId: "polygon",
consumesTapEvents: false,
- fill: FGMPlatformColor.make(withRed: 0, green: 0, blue: 0, alpha: 0),
+ fillColor: PlatformColor(red: 0, green: 0, blue: 0, alpha: 0),
geodesic: false,
points: [],
holes: [],
visible: true,
- stroke: FGMPlatformColor.make(withRed: 0, green: 0, blue: 0, alpha: 0),
+ strokeColor: PlatformColor(red: 0, green: 0, blue: 0, alpha: 0),
strokeWidth: 0,
zIndex: 0
),
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/PolylineControllerTests.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/PolylineControllerTests.swift
index c346ca4..4495d17 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/PolylineControllerTests.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/PolylineControllerTests.swift
@@ -4,7 +4,6 @@
import GoogleMaps
import Testing
-import google_maps_flutter_ios_sdk10_objc
@testable import google_maps_flutter_ios_sdk10
@@ -13,15 +12,15 @@
@Test func patternsSetSpans() {
let mapView = PolylineControllerTests.mapView()
- let polyline = FGMPlatformPolyline.make(
- withPolylineId: "polyline_id_0",
+ let polyline = PlatformPolyline(
+ polylineId: "polyline_id_0",
consumesTapEvents: false,
- color: FGMPlatformColor.make(withRed: 0, green: 0, blue: 0, alpha: 0),
+ color: PlatformColor(red: 0, green: 0, blue: 0, alpha: 0),
geodesic: false,
jointType: .round,
patterns: [
- FGMPlatformPatternItem.make(with: .dot, length: 10),
- FGMPlatformPatternItem.make(with: .dash, length: 10),
+ PlatformPatternItem(type: .dot, length: 10),
+ PlatformPatternItem(type: .dash, length: 10),
],
points: PolylineControllerTests.polylinePoints(),
visible: true,
@@ -46,10 +45,10 @@
let polyline = PropertyOrderValidatingPolyline()
PolylineController.update(
polyline,
- from: FGMPlatformPolyline.make(
- withPolylineId: "polyline",
+ from: PlatformPolyline(
+ polylineId: "polyline",
consumesTapEvents: false,
- color: FGMPlatformColor.make(withRed: 0, green: 0, blue: 0, alpha: 0),
+ color: PlatformColor(red: 0, green: 0, blue: 0, alpha: 0),
geodesic: false,
jointType: .round,
patterns: [],
@@ -72,12 +71,12 @@
}
/// Returns a set of points to use for tests that need a valid but arbitrary line.
- static func polylinePoints() -> [FGMPlatformLatLng] {
+ static func polylinePoints() -> [PlatformLatLng] {
return [
- FGMPlatformLatLng.make(withLatitude: 52.4816, longitude: -3.1791),
- FGMPlatformLatLng.make(withLatitude: 54.043, longitude: -2.9925),
- FGMPlatformLatLng.make(withLatitude: 54.1396, longitude: -4.2739),
- FGMPlatformLatLng.make(withLatitude: 53.4153, longitude: -4.0829),
+ PlatformLatLng(latitude: 52.4816, longitude: -3.1791),
+ PlatformLatLng(latitude: 54.043, longitude: -2.9925),
+ PlatformLatLng(latitude: 54.1396, longitude: -4.2739),
+ PlatformLatLng(latitude: 53.4153, longitude: -4.0829),
]
}
}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/TestUtils/TestAssetProvider.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/TestUtils/TestAssetProvider.swift
index 7450755..8903cd4 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/TestUtils/TestAssetProvider.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/TestUtils/TestAssetProvider.swift
@@ -3,11 +3,11 @@
// found in the LICENSE file.
import UIKit
-import google_maps_flutter_ios_sdk10
-import google_maps_flutter_ios_sdk10_objc
-/// Fake implementation of FGMAssetProvider for unit tests.
-class TestAssetProvider: NSObject, FGMAssetProvider {
+@testable import google_maps_flutter_ios_sdk10
+
+/// Fake implementation of AssetProvider for unit tests.
+class TestAssetProvider: AssetProvider {
private let image: UIImage?
private let assetName: String?
private let package: String?
@@ -25,14 +25,12 @@
self.image = image
self.assetName = assetName
self.package = package
- super.init()
}
- override init() {
+ init() {
self.image = nil
self.assetName = nil
self.package = nil
- super.init()
}
func lookupKey(forAsset asset: String) -> String? {
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/TestUtils/TestMapEventHandler.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/TestUtils/TestMapEventHandler.swift
index f1ea77a..e85abf9 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/TestUtils/TestMapEventHandler.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/TestUtils/TestMapEventHandler.swift
@@ -3,41 +3,114 @@
// found in the LICENSE file.
import Foundation
-import google_maps_flutter_ios_sdk10
-import google_maps_flutter_ios_sdk10_objc
-/// Fake implementation of FGMMapEventDelegate for unit tests.
-class TestMapEventHandler: NSObject, FGMMapEventDelegate {
- func didStartCameraMove() {}
+@testable import google_maps_flutter_ios_sdk10
- func didMoveCamera(to cameraPosition: FGMPlatformCameraPosition) {}
+/// Fake implementation of MapEventDelegate for unit tests.
+class TestMapEventHandler: MapEventDelegate {
+ func didStartCameraMove(completion: @escaping (Result<Void, PigeonError>) -> Void) {}
- func didIdleCamera() {}
-
- func didTap(atPosition position: FGMPlatformLatLng) {}
-
- func didLongPress(atPosition position: FGMPlatformLatLng) {}
-
- func didTapMarker(withIdentifier markerId: String) {}
-
- func didStartDragForMarker(
- withIdentifier markerId: String, atPosition position: FGMPlatformLatLng
+ func didMoveCamera(
+ to cameraPositionArg: PlatformCameraPosition,
+ completion:
+ @escaping (
+ Result<Void, PigeonError>
+ ) -> Void
) {}
- func didDragMarker(withIdentifier markerId: String, atPosition position: FGMPlatformLatLng) {}
+ func didIdleCamera(completion: @escaping (Result<Void, PigeonError>) -> Void) {}
- func didEndDragForMarker(withIdentifier markerId: String, atPosition position: FGMPlatformLatLng)
- {}
+ func didTap(
+ at positionArg: PlatformLatLng,
+ completion:
+ @escaping (
+ Result<Void, PigeonError>
+ ) -> Void
+ ) {}
- func didTapInfoWindowOfMarker(withIdentifier markerId: String) {}
+ func didLongPress(
+ at positionArg: PlatformLatLng,
+ completion:
+ @escaping (
+ Result<Void, PigeonError>
+ ) -> Void
+ ) {}
- func didTapCircle(withIdentifier circleId: String) {}
+ func didTapMarker(
+ withIdentifier markerIdArg: String,
+ completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {}
- func didTap(_ cluster: FGMPlatformCluster) {}
+ func didStartDragForMarker(
+ withIdentifier markerIdArg: String,
+ at positionArg: PlatformLatLng,
+ completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {}
- func didTapPolygon(withIdentifier polygonId: String) {}
+ func didDragMarker(
+ withIdentifier markerIdArg: String,
+ at positionArg: PlatformLatLng,
+ completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {}
- func didTapPolyline(withIdentifier polylineId: String) {}
+ func didEndDragForMarker(
+ withIdentifier markerIdArg: String,
+ at positionArg: PlatformLatLng,
+ completion:
+ @escaping (
+ Result<Void, PigeonError>
+ ) -> Void
+ ) {}
- func didTapGroundOverlay(withIdentifier groundOverlayId: String) {}
+ func didTapInfoWindowOfMarker(
+ withIdentifier markerIdArg: String,
+ completion:
+ @escaping (
+ Result<Void, PigeonError>
+ ) -> Void
+ ) {}
+
+ func didTapCircle(
+ withIdentifier circleIdArg: String,
+ completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {}
+
+ func didTapCluster(
+ _ clusterArg: PlatformCluster,
+ completion:
+ @escaping (
+ Result<Void, PigeonError>
+ ) -> Void
+ ) {}
+
+ func didTapPolygon(
+ withIdentifier polygonIdArg: String,
+ completion:
+ @escaping (
+ Result<Void, PigeonError>
+ ) -> Void
+ ) {}
+
+ func didTapPolyline(
+ withIdentifier polylineIdArg: String,
+ completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {}
+
+ func didTapGroundOverlay(
+ withIdentifier groundOverlayIdArg: String,
+ completion:
+ @escaping (
+ Result<Void, PigeonError>
+ ) -> Void
+ ) {}
+
+ func tile(
+ withOverlayIdentifier tileOverlayIdArg: String,
+ location locationArg: PlatformPoint,
+ zoom zoomArg: Int64,
+ completion:
+ @escaping (
+ Result<PlatformTile, PigeonError>
+ ) -> Void
+ ) {}
}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/TileOverlayControllerTests.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/TileOverlayControllerTests.swift
index 065ef5a..45e984e 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/TileOverlayControllerTests.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/TileOverlayControllerTests.swift
@@ -4,7 +4,6 @@
import GoogleMaps
import Testing
-import google_maps_flutter_ios_sdk10_objc
@testable import google_maps_flutter_ios_sdk10
@@ -14,8 +13,8 @@
let tileLayer = PropertyOrderValidatingTileLayer()
TileOverlayController.update(
tileLayer,
- from: FGMPlatformTileOverlay.make(
- withTileOverlayId: "overlay",
+ from: PlatformTileOverlay(
+ tileOverlayId: "overlay",
fadeIn: false,
transparency: 0.5,
zIndex: 0,
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/TileProviderControllerTests.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/TileProviderControllerTests.swift
index 95d93c9..438eaa6 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/TileProviderControllerTests.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/example/ios/RunnerTests/TileProviderControllerTests.swift
@@ -5,7 +5,6 @@
import Flutter
import GoogleMaps
import Testing
-import google_maps_flutter_ios_sdk10_objc
@testable import google_maps_flutter_ios_sdk10
@@ -18,19 +17,18 @@
// A tile provider that expects a single call to
// tileWithOverlayIdentifier:location:zoom:completion: on the main thread,
// and then confirms it.
-class TestTileProvider: NSObject, TileProviderDelegate {
+class TestTileProvider: TileProviderDelegate {
var onTileCalled: () -> Void
init(onTileCalled: @escaping () -> Void) {
self.onTileCalled = onTileCalled
- super.init()
}
func tile(
withOverlayIdentifier tileOverlayId: String,
- location: FGMPlatformPoint,
- zoom: Int,
- completion: @escaping (FGMPlatformTile?, FlutterError?) -> Void
+ location: PlatformPoint,
+ zoom: Int64,
+ completion: @escaping (Result<PlatformTile, PigeonError>) -> Void
) {
#expect(Thread.isMainThread)
onTileCalled()
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10.podspec b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10.podspec
index f34887e..7e42218 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10.podspec
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10.podspec
@@ -14,8 +14,7 @@
s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' }
s.source = { :http => 'https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter_ios_sdk10' }
s.documentation_url = 'https://pub.dev/packages/google_maps_flutter_ios_sdk10'
- s.source_files = 'google_maps_flutter_ios_sdk10/Sources/**/*.{h,m,swift}'
- s.public_header_files = 'google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10_objc/include/**/*.h'
+ s.source_files = 'google_maps_flutter_ios_sdk10/Sources/**/*.swift'
s.dependency 'Flutter'
s.dependency 'GoogleMaps', '~> 10.0'
# 6.1.3 was the first version to support GoogleMaps 10.x.
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Package.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Package.swift
index a4c1427..9cb086f 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Package.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Package.swift
@@ -26,7 +26,6 @@
.target(
name: "google_maps_flutter_ios_sdk10",
dependencies: [
- "google_maps_flutter_ios_sdk10_objc",
.product(
name: "GoogleMapsUtils",
package: "google-maps-ios-utils"
@@ -38,26 +37,7 @@
],
resources: [
.process("Resources")
- ],
- cSettings: [
- .headerSearchPath("include/google_maps_flutter_ios_sdk10")
]
- ),
- .target(
- name: "google_maps_flutter_ios_sdk10_objc",
- dependencies: [
- .product(
- name: "GoogleMapsUtils",
- package: "google-maps-ios-utils"
- ),
- .product(
- name: "GoogleMaps",
- package: "ios-maps-sdk"
- ),
- ],
- cSettings: [
- .headerSearchPath("include/google_maps_flutter_ios_sdk10_objc")
- ]
- ),
+ )
]
)
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/AssetProvider.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/AssetProvider.swift
new file mode 100644
index 0000000..cf4a2a9
--- /dev/null
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/AssetProvider.swift
@@ -0,0 +1,36 @@
+// Copyright 2013 The Flutter Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+import UIKit
+
+/// Protocol for looking up Flutter assets and resolving them to images.
+///
+/// This is used to allow testing with mock assets without mocking the entire
+/// Flutter plugin registrar and UIImage class.
+protocol AssetProvider {
+ /// Returns the key for the given asset.
+ ///
+ /// Wraps the FlutterPluginRegistrar method of the same name.
+ ///
+ /// @param asset The name of the asset.
+ /// @return The key for the asset, or nil if not found.
+ func lookupKey(forAsset asset: String) -> String?
+
+ /// Returns the key for the given asset from the given package.
+ ///
+ /// Wraps the FlutterPluginRegistrar method of the same name.
+ ///
+ /// @param asset The name of the asset.
+ /// @param package The name of the package to load the asset from.
+ /// @return The key for the asset, or nil if not found.
+ func lookupKey(forAsset asset: String, fromPackage package: String) -> String?
+
+ /// Returns the image for the given named asset.
+ ///
+ /// Wraps the UIImage method of the same name.
+ ///
+ /// @param name The name of the image asset or file.
+ /// @return The image, or nil if not found.
+ func imageNamed(_ name: String) -> UIImage?
+}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/CircleController.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/CircleController.swift
index 1268508..f9870af 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/CircleController.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/CircleController.swift
@@ -4,20 +4,15 @@
import GoogleMaps
-#if canImport(google_maps_flutter_ios_sdk10_objc)
- import google_maps_flutter_ios_sdk10_objc
-#endif
-
/// Defines circle controllable by Flutter.
-class CircleController: NSObject {
+class CircleController {
let circle: GMSCircle
private weak var mapView: GMSMapView?
- init(circle: FGMPlatformCircle, mapView: GMSMapView) {
+ init(circle: PlatformCircle, mapView: GMSMapView) {
self.circle = GMSCircle()
self.mapView = mapView
self.circle.userData = [circle.circleId]
- super.init()
CircleController.update(self.circle, from: circle, with: mapView)
}
@@ -25,20 +20,20 @@
circle.map = nil
}
- /// Updates the controller's circle with the properties from a FGMPlatformCircle.
+ /// Updates the controller's circle with the properties from a PlatformCircle.
///
/// Setting the circle to visible will set its map to the given mapView.
- func update(from platformCircle: FGMPlatformCircle) {
+ func update(from platformCircle: PlatformCircle) {
if let mapView = mapView {
CircleController.update(circle, from: platformCircle, with: mapView)
}
}
- /// Updates the given GMSCircle with the properties from a FGMPlatformCircle.
+ /// Updates the given GMSCircle with the properties from a PlatformCircle.
///
/// Setting the circle to visible will set its map to the given mapView.
static func update(
- _ circle: GMSCircle, from platformCircle: FGMPlatformCircle, with mapView: GMSMapView
+ _ circle: GMSCircle, from platformCircle: PlatformCircle, with mapView: GMSMapView
) {
circle.isTappable = platformCircle.consumeTapEvents
circle.zIndex = Int32(platformCircle.zIndex)
@@ -53,25 +48,24 @@
}
}
-class CirclesController: NSObject {
- private weak var eventDelegate: FGMMapEventDelegate?
+class CirclesController {
+ private weak var eventDelegate: MapEventDelegate?
private weak var mapView: GMSMapView?
private var circleIdToController: [String: CircleController] = [:]
- init(mapView: GMSMapView, eventDelegate: FGMMapEventDelegate) {
+ init(mapView: GMSMapView, eventDelegate: MapEventDelegate) {
self.mapView = mapView
self.eventDelegate = eventDelegate
- super.init()
}
- func add(_ circles: [FGMPlatformCircle]) {
+ func add(_ circles: [PlatformCircle]) {
guard let mapView = mapView else { return }
for circle in circles {
circleIdToController[circle.circleId] = CircleController(circle: circle, mapView: mapView)
}
}
- func change(_ circles: [FGMPlatformCircle]) {
+ func change(_ circles: [PlatformCircle]) {
for circle in circles {
circleIdToController[circle.circleId]?.update(from: circle)
}
@@ -92,7 +86,7 @@
func didTapCircle(withIdentifier identifier: String) {
if hasCircle(withIdentifier: identifier) {
- eventDelegate?.didTapCircle(withIdentifier: identifier)
+ eventDelegate?.didTapCircle(withIdentifier: identifier) { _ in }
}
}
}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/ClusterManagersController.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/ClusterManagersController.swift
index c1ed35f..6c8bc4a 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/ClusterManagersController.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/ClusterManagersController.swift
@@ -4,24 +4,20 @@
import Flutter
import GoogleMaps
-
-#if canImport(google_maps_flutter_ios_sdk10_objc)
- import google_maps_flutter_ios_sdk10_objc
-#endif
+import GoogleMapsUtils
/// A controller that manages all of the cluster managers on a map.
-class ClusterManagersController: NSObject {
+class ClusterManagersController {
private var clusterManagerIdentifierToManagers: [String: GMUClusterManager] = [:]
- private weak var eventDelegate: FGMMapEventDelegate?
+ private weak var eventDelegate: MapEventDelegate?
private weak var mapView: GMSMapView?
- init(mapView: GMSMapView, eventDelegate: FGMMapEventDelegate) {
+ init(mapView: GMSMapView, eventDelegate: MapEventDelegate) {
self.mapView = mapView
self.eventDelegate = eventDelegate
- super.init()
}
- func add(_ clusterManagersToAdd: [FGMPlatformClusterManager]) {
+ func add(_ clusterManagersToAdd: [PlatformClusterManager]) {
for clusterManager in clusterManagersToAdd {
addClusterManager(clusterManager.identifier)
}
@@ -56,17 +52,13 @@
clusterManagerIdentifierToManagers.values.forEach({ $0.cluster() })
}
- func clusters(
- withIdentifier identifier: String,
- error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) -> [FGMPlatformCluster]? {
+ func clusters(withIdentifier identifier: String) throws -> [PlatformCluster] {
guard let clusterManager = clusterManagerIdentifierToManagers[identifier] else {
- error.pointee = FlutterError(
+ throw PigeonError(
code: "Invalid clusterManagerId",
message: "getClusters called with invalid clusterManagerId",
details: "clusterManagerId was: '\(identifier)'"
)
- return nil
}
guard let mapView = mapView else { return [] }
@@ -74,14 +66,14 @@
// https://github.com/googlemaps/google-maps-ios-utils/blob/0e7ed81f1bbd9d29e4529c40ae39b0791b0a0eb8/src/Clustering/GMUClusterManager.m#L94.
let integralZoom = floorf(Float(mapView.camera.zoom) + 0.5)
let clusters = clusterManager.algorithm.clusters(atZoom: integralZoom)
- return clusters.map { FGMPlatformCluster.make(from: $0, clusterManagerIdentifier: identifier) }
+ return clusters.map { PlatformCluster.make(from: $0, clusterManagerIdentifier: identifier) }
}
func didTap(_ cluster: GMUStaticCluster) {
guard let clusterManagerId = clusterManagerIdentifier(for: cluster) else { return }
- let platformCluster = FGMPlatformCluster.make(
+ let platformCluster = PlatformCluster.make(
from: cluster, clusterManagerIdentifier: clusterManagerId)
- eventDelegate?.didTap(platformCluster)
+ eventDelegate?.didTapCluster(platformCluster) { _ in }
}
/// Returns the cluster manager identifier for given cluster.
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/ConversionUtils.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/ConversionUtils.swift
index 90eff0a..0fcd1be 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/ConversionUtils.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/ConversionUtils.swift
@@ -6,14 +6,10 @@
import GoogleMaps
import GoogleMapsUtils
-#if canImport(google_maps_flutter_ios_sdk10_objc)
- import google_maps_flutter_ios_sdk10_objc
-#endif
-
-extension FGMPlatformPoint {
+extension PlatformPoint {
/// Converts a CGPoint to its Pigeon equivalent.
- static func make(from point: CGPoint) -> FGMPlatformPoint {
- return FGMPlatformPoint.makeWith(x: point.x, y: point.y)
+ static func make(from point: CGPoint) -> PlatformPoint {
+ return PlatformPoint(x: point.x, y: point.y)
}
/// Returns the equivalent CGPoint.
@@ -22,11 +18,10 @@
}
}
-extension FGMPlatformLatLng {
+extension PlatformLatLng {
/// Converts a CLLocationCoordinate2D to its Pigeon representation.
- static func make(from coordinate: CLLocationCoordinate2D) -> FGMPlatformLatLng {
- return FGMPlatformLatLng.make(
- withLatitude: coordinate.latitude, longitude: coordinate.longitude)
+ static func make(from coordinate: CLLocationCoordinate2D) -> PlatformLatLng {
+ return PlatformLatLng(latitude: coordinate.latitude, longitude: coordinate.longitude)
}
/// Returns the equivalent CLLocationCoordinate2D.
@@ -35,12 +30,12 @@
}
}
-extension FGMPlatformLatLngBounds {
+extension PlatformLatLngBounds {
/// Converts a GMSCoordinateBounds to its Pigeon representation.
- static func make(from bounds: GMSCoordinateBounds) -> FGMPlatformLatLngBounds {
- return FGMPlatformLatLngBounds.make(
- withNortheast: FGMPlatformLatLng.make(from: bounds.northEast),
- southwest: FGMPlatformLatLng.make(from: bounds.southWest)
+ static func make(from bounds: GMSCoordinateBounds) -> PlatformLatLngBounds {
+ return PlatformLatLngBounds(
+ northeast: PlatformLatLng.make(from: bounds.northEast),
+ southwest: PlatformLatLng.make(from: bounds.southWest)
)
}
@@ -53,12 +48,12 @@
}
}
-extension FGMPlatformCameraPosition {
+extension PlatformCameraPosition {
/// Converts a GMSCameraPosition to its Pigeon representation.
- static func make(from position: GMSCameraPosition) -> FGMPlatformCameraPosition {
- return FGMPlatformCameraPosition.make(
- withBearing: position.bearing,
- target: FGMPlatformLatLng.make(from: position.target),
+ static func make(from position: GMSCameraPosition) -> PlatformCameraPosition {
+ return PlatformCameraPosition(
+ bearing: position.bearing,
+ target: PlatformLatLng.make(from: position.target),
tilt: position.viewingAngle,
zoom: Double(position.zoom)
)
@@ -84,7 +79,7 @@
return path
}
-extension FGMPlatformMapType {
+extension PlatformMapType {
/// The corresponding GMSMapViewType.
var gmsMapViewType: GMSMapViewType {
switch self {
@@ -98,7 +93,7 @@
}
}
-extension FGMPlatformMarkerCollisionBehavior {
+extension PlatformMarkerCollisionBehavior {
/// The corresponding GMSCollisionBehavior.
var gmsCollisionBehavior: GMSCollisionBehavior {
switch self {
@@ -114,40 +109,39 @@
}
}
-extension FGMPlatformGroundOverlay {
+extension PlatformGroundOverlay {
/// Converts a GMSGroundOverlay to its Pigeon representation.
static func make(
from groundOverlay: GMSGroundOverlay,
overlayId: String,
isCreatedWithBounds: Bool,
- zoomLevel: NSNumber?
- ) -> FGMPlatformGroundOverlay {
- let placeholderImage = FGMPlatformBitmap.make(
- withBitmap: FGMPlatformBitmapDefaultMarker.make(withHue: nil))
+ zoomLevel: Double?
+ ) -> PlatformGroundOverlay {
+ let placeholderImage = PlatformBitmapDefaultMarker(hue: nil)
if isCreatedWithBounds, let bounds = groundOverlay.bounds {
- return FGMPlatformGroundOverlay.make(
- withGroundOverlayId: overlayId,
+ return PlatformGroundOverlay(
+ groundOverlayId: overlayId,
image: placeholderImage,
position: nil,
- bounds: FGMPlatformLatLngBounds.make(from: bounds),
- anchor: FGMPlatformPoint.make(from: groundOverlay.anchor),
+ bounds: PlatformLatLngBounds.make(from: bounds),
+ anchor: PlatformPoint.make(from: groundOverlay.anchor),
transparency: 1.0 - Double(groundOverlay.opacity),
bearing: groundOverlay.bearing,
- zIndex: Int(groundOverlay.zIndex),
+ zIndex: Int64(groundOverlay.zIndex),
visible: groundOverlay.map != nil,
clickable: groundOverlay.isTappable,
zoomLevel: zoomLevel
)
} else {
- return FGMPlatformGroundOverlay.make(
- withGroundOverlayId: overlayId,
+ return PlatformGroundOverlay(
+ groundOverlayId: overlayId,
image: placeholderImage,
- position: FGMPlatformLatLng.make(from: groundOverlay.position),
+ position: PlatformLatLng.make(from: groundOverlay.position),
bounds: nil,
- anchor: FGMPlatformPoint.make(from: groundOverlay.anchor),
+ anchor: PlatformPoint.make(from: groundOverlay.anchor),
transparency: 1.0 - Double(groundOverlay.opacity),
bearing: groundOverlay.bearing,
- zIndex: Int(groundOverlay.zIndex),
+ zIndex: Int64(groundOverlay.zIndex),
visible: groundOverlay.map != nil,
clickable: groundOverlay.isTappable,
zoomLevel: zoomLevel
@@ -156,14 +150,14 @@
}
}
-extension FGMPlatformHeatmapGradient {
+extension PlatformHeatmapGradient {
/// Converts a GMUGradient to its Pigeon representation.
- static func make(from gradient: GMUGradient) -> FGMPlatformHeatmapGradient {
- let colors = gradient.colors.map { FGMPlatformColor.make(from: $0) }
- return FGMPlatformHeatmapGradient.make(
- with: colors,
- startPoints: gradient.startPoints,
- colorMapSize: Int(gradient.mapSize)
+ static func make(from gradient: GMUGradient) -> PlatformHeatmapGradient {
+ let colors = gradient.colors.map { PlatformColor.make(from: $0) }
+ return PlatformHeatmapGradient(
+ colors: colors,
+ startPoints: gradient.startPoints.map { $0.doubleValue },
+ colorMapSize: Int64(gradient.mapSize)
)
}
@@ -172,18 +166,18 @@
let colors = colors.map { $0.toUIColor() }
return GMUGradient(
colors: colors,
- startPoints: startPoints,
+ startPoints: startPoints.map { $0 as NSNumber },
colorMapSize: UInt(colorMapSize)
)
}
}
-extension FGMPlatformWeightedLatLng {
+extension PlatformWeightedLatLng {
/// Converts a GMUWeightedLatLng to its Pigeon representation.
- static func make(from weightedLatLng: GMUWeightedLatLng) -> FGMPlatformWeightedLatLng {
+ static func make(from weightedLatLng: GMUWeightedLatLng) -> PlatformWeightedLatLng {
let point = GMSMapPoint(x: weightedLatLng.point().x, y: weightedLatLng.point().y)
- return FGMPlatformWeightedLatLng.make(
- withPoint: FGMPlatformLatLng.make(from: GMSUnproject(point)),
+ return PlatformWeightedLatLng(
+ point: PlatformLatLng.make(from: GMSUnproject(point)),
weight: Double(weightedLatLng.intensity)
)
}
@@ -194,36 +188,35 @@
}
}
-extension FGMPlatformCameraUpdate {
+extension PlatformCameraUpdate {
/// Creates a GMSCameraUpdate from its Pigeon equivalent.
func toGMSCameraUpdate() -> GMSCameraUpdate? {
- // See note in messages.dart for why this is so loosely typed.
- switch cameraUpdate {
- case let newCameraPosition as FGMPlatformCameraUpdateNewCameraPosition:
+ switch self {
+ case let newCameraPosition as PlatformCameraUpdateNewCameraPosition:
return GMSCameraUpdate.setCamera(newCameraPosition.cameraPosition.toGMSCameraPosition())
- case let newLatLng as FGMPlatformCameraUpdateNewLatLng:
+ case let newLatLng as PlatformCameraUpdateNewLatLng:
return GMSCameraUpdate.setTarget(newLatLng.latLng.toCLLocationCoordinate2D())
- case let newLatLngBounds as FGMPlatformCameraUpdateNewLatLngBounds:
+ case let newLatLngBounds as PlatformCameraUpdateNewLatLngBounds:
return GMSCameraUpdate.fit(
newLatLngBounds.bounds.toGMSCoordinateBounds(),
withPadding: CGFloat(newLatLngBounds.padding)
)
- case let newLatLngZoom as FGMPlatformCameraUpdateNewLatLngZoom:
+ case let newLatLngZoom as PlatformCameraUpdateNewLatLngZoom:
return GMSCameraUpdate.setTarget(
newLatLngZoom.latLng.toCLLocationCoordinate2D(),
zoom: Float(newLatLngZoom.zoom)
)
- case let scrollBy as FGMPlatformCameraUpdateScrollBy:
+ case let scrollBy as PlatformCameraUpdateScrollBy:
return GMSCameraUpdate.scrollBy(x: scrollBy.dx, y: scrollBy.dy)
- case let zoomBy as FGMPlatformCameraUpdateZoomBy:
+ case let zoomBy as PlatformCameraUpdateZoomBy:
if let focus = zoomBy.focus {
return GMSCameraUpdate.zoom(by: Float(zoomBy.amount), at: focus.toCGPoint())
} else {
return GMSCameraUpdate.zoom(by: Float(zoomBy.amount))
}
- case let zoom as FGMPlatformCameraUpdateZoom:
+ case let zoom as PlatformCameraUpdateZoom:
return zoom.out ? GMSCameraUpdate.zoomOut() : GMSCameraUpdate.zoomIn()
- case let zoomTo as FGMPlatformCameraUpdateZoomTo:
+ case let zoomTo as PlatformCameraUpdateZoomTo:
return GMSCameraUpdate.zoom(to: Float(zoomTo.zoom))
default:
return nil
@@ -231,16 +224,16 @@
}
}
-extension FGMPlatformColor {
+extension PlatformColor {
/// Converts a UIColor to its Pigeon representation.
- static func make(from color: UIColor) -> FGMPlatformColor {
+ static func make(from color: UIColor) -> PlatformColor {
var red: CGFloat = 0
var green: CGFloat = 0
var blue: CGFloat = 0
var alpha: CGFloat = 0
color.getRed(&red, green: &green, blue: &blue, alpha: &alpha)
- return FGMPlatformColor.make(
- withRed: Double(red), green: Double(green), blue: Double(blue), alpha: Double(alpha))
+ return PlatformColor(
+ red: Double(red), green: Double(green), blue: Double(blue), alpha: Double(alpha))
}
/// Returns the equivalent UIColor.
@@ -249,7 +242,7 @@
}
}
-extension FGMPlatformPatternItem {
+extension PlatformPatternItem {
/// The GMSStrokeStyle expression of this pattern, using the given stroke color.
func gmsStrokeStyle(strokeColor: UIColor) -> GMSStrokeStyle {
let color = type == .gap ? UIColor.clear : strokeColor
@@ -258,16 +251,16 @@
/// The span length for this pattern, in the form expected by GMSStyleSpans.
func gmsStyleSpanLength() -> NSNumber {
- return length ?? 0
+ return (length ?? 0) as NSNumber
}
}
-extension FGMPlatformCluster {
+extension PlatformCluster {
/// Converts a GMUCluster to its Pigeon representation.
static func make(
from cluster: GMUCluster,
clusterManagerIdentifier: String
- ) -> FGMPlatformCluster {
+ ) -> PlatformCluster {
var bounds = GMSCoordinateBounds()
for item in cluster.items {
bounds = bounds.includingCoordinate(item.position)
@@ -277,10 +270,10 @@
markerIdentifierFromMarker($0)
}
- return FGMPlatformCluster.make(
- withClusterManagerId: clusterManagerIdentifier,
- position: FGMPlatformLatLng.make(from: cluster.position),
- bounds: FGMPlatformLatLngBounds.make(from: bounds),
+ return PlatformCluster(
+ clusterManagerId: clusterManagerIdentifier,
+ position: PlatformLatLng.make(from: cluster.position),
+ bounds: PlatformLatLngBounds.make(from: bounds),
markerIds: markerIds
)
}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/GoogleMapController.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/GoogleMapController.swift
index 1407ca7..9bb1c8a 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/GoogleMapController.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/GoogleMapController.swift
@@ -6,17 +6,40 @@
import GoogleMaps
import GoogleMapsUtils
-#if canImport(google_maps_flutter_ios_sdk10_objc)
- import google_maps_flutter_ios_sdk10_objc
-#endif
+/// Protocol for CATransaction to allow mocking in tests.
+protocol MapAnimationCATransactionProtocol {
+ func begin()
+ func commit()
+ func setAnimationDuration(_ duration: CFTimeInterval)
+}
-/// Non-test implementation of FGMAssetProvider, wrapping a Flutter plugin registrar.
-class DefaultAssetProvider: NSObject, FGMAssetProvider {
+/// Add the AnyObject-required protocol to MapsCallbackApi to allow it to be passed to sub-controllers.
+extension MapsCallbackApi: MapEventDelegate {}
+
+/// Add TileProviderDelegate to avoid needing to pass the entire API surface to TileOverlayController.
+extension MapsCallbackApi: TileProviderDelegate {}
+
+/// Non-test implementation of MapAnimationCATransactionProtocol.
+class DefaultMapAnimationCATransaction: MapAnimationCATransactionProtocol {
+ func begin() {
+ CATransaction.begin()
+ }
+
+ func commit() {
+ CATransaction.commit()
+ }
+
+ func setAnimationDuration(_ duration: CFTimeInterval) {
+ CATransaction.setAnimationDuration(duration)
+ }
+}
+
+/// Non-test implementation of AssetProvider, wrapping a Flutter plugin registrar.
+class DefaultAssetProvider: AssetProvider {
weak var registrar: FlutterPluginRegistrar?
init(registrar: FlutterPluginRegistrar) {
self.registrar = registrar
- super.init()
}
func lookupKey(forAsset asset: String) -> String? {
@@ -32,92 +55,15 @@
}
}
-/// Non-test implementation of FGMMapEventDelegate, wrapping a FGMMapsCallbackApi instance.
-class DefaultMapEventHandler: NSObject, FGMMapEventDelegate {
- let callbackHandler: FGMMapsCallbackApi
-
- init(callbackHandler: FGMMapsCallbackApi) {
- self.callbackHandler = callbackHandler
- super.init()
- }
-
- func didStartCameraMove() {
- callbackHandler.didStartCameraMove { _ in }
- }
-
- func didMoveCamera(to cameraPosition: FGMPlatformCameraPosition) {
- callbackHandler.didMoveCamera(to: cameraPosition) { _ in }
- }
-
- func didIdleCamera() {
- callbackHandler.didIdleCamera { _ in }
- }
-
- func didTap(atPosition position: FGMPlatformLatLng) {
- callbackHandler.didTap(atPosition: position) { _ in }
- }
-
- func didLongPress(atPosition position: FGMPlatformLatLng) {
- callbackHandler.didLongPress(atPosition: position) { _ in }
- }
-
- func didTapMarker(withIdentifier markerId: String) {
- callbackHandler.didTapMarker(withIdentifier: markerId) { _ in }
- }
-
- func didStartDragForMarker(
- withIdentifier markerId: String, atPosition position: FGMPlatformLatLng
- ) {
- callbackHandler.didStartDragForMarker(withIdentifier: markerId, atPosition: position) { _ in }
- }
-
- func didDragMarker(withIdentifier markerId: String, atPosition position: FGMPlatformLatLng) {
- callbackHandler.didDragMarker(withIdentifier: markerId, atPosition: position) { _ in }
- }
-
- func didEndDragForMarker(withIdentifier markerId: String, atPosition position: FGMPlatformLatLng)
- {
- callbackHandler.didEndDragForMarker(withIdentifier: markerId, atPosition: position) { _ in }
- }
-
- func didTapInfoWindowOfMarker(withIdentifier markerId: String) {
- callbackHandler.didTapInfoWindowOfMarker(withIdentifier: markerId) { _ in }
- }
-
- func didTapCircle(withIdentifier circleId: String) {
- callbackHandler.didTapCircle(withIdentifier: circleId) { _ in }
- }
-
- func didTap(_ cluster: FGMPlatformCluster) {
- callbackHandler.didTap(cluster) { _ in }
- }
-
- func didTapPolygon(withIdentifier polygonId: String) {
- callbackHandler.didTapPolygon(withIdentifier: polygonId) { _ in }
- }
-
- func didTapPolyline(withIdentifier polylineId: String) {
- callbackHandler.didTapPolyline(withIdentifier: polylineId) { _ in }
- }
-
- func didTapGroundOverlay(withIdentifier groundOverlayId: String) {
- callbackHandler.didTapGroundOverlay(withIdentifier: groundOverlayId) { _ in }
- }
-}
-
public class GoogleMapController: NSObject, GMSMapViewDelegate, FlutterPlatformView {
/// The Google Maps SDK map view managed by this controller.
let mapView: GMSMapView
/// The Pigeon callback API implementation, used to send events to the Dart side.
- let dartCallbackHandler: FGMMapsCallbackApi
- /// The map SDK event handler, which routes events to the Dart callback handler.
- let mapEventHandler: DefaultMapEventHandler
+ let dartCallbackHandler: MapsCallbackApi
/// The main Pigeon API implementation, separate to avoid lifetime extension.
let callHandler: MapCallHandler
/// The inspector API implementation, separate to avoid lifetime extension.
let inspector: MapInspector
- /// A shim to pass tile requests to `dartCallbackHandler`. This is a separate object to avoid init ordering issues.
- private let tileProvider: ConcreteTileProvider
/// Whether to send notifications about camera position changes to Dart.
var trackCameraPosition = false
@@ -140,10 +86,10 @@
/// that the observer is removed before the controller is deallocated.
private var isObservingFrame = false
- public convenience init(
+ convenience init(
frame: CGRect,
viewIdentifier viewId: Int64,
- creationParameters: FGMPlatformMapViewCreationParams,
+ creationParameters: PlatformMapViewCreationParams,
registrar: FlutterPluginRegistrar
) {
let camera = creationParameters.initialCameraPosition.toGMSCameraPosition()
@@ -167,8 +113,8 @@
init(
mapView: GMSMapView,
viewIdentifier viewId: Int64,
- creationParameters: FGMPlatformMapViewCreationParams,
- assetProvider: FGMAssetProvider,
+ creationParameters: PlatformMapViewCreationParams,
+ assetProvider: AssetProvider,
binaryMessenger: FlutterBinaryMessenger
) {
self.mapView = mapView
@@ -183,52 +129,49 @@
styleError = errorString
}
if let trackCameraPosition = creationParameters.mapConfiguration.trackCameraPosition {
- self.trackCameraPosition = trackCameraPosition.boolValue
+ self.trackCameraPosition = trackCameraPosition
}
// End duplicate code.
let pigeonSuffix = String(format: "%lld", viewId)
- dartCallbackHandler = FGMMapsCallbackApi(
+ dartCallbackHandler = MapsCallbackApi(
binaryMessenger: binaryMessenger,
messageChannelSuffix: pigeonSuffix
)
- mapEventHandler = DefaultMapEventHandler(callbackHandler: dartCallbackHandler)
-
let markerType = creationParameters.mapConfiguration.markerType
clusterManagersController = ClusterManagersController(
mapView: mapView,
- eventDelegate: mapEventHandler
+ eventDelegate: dartCallbackHandler
)
markersController = MarkersController(
mapView: mapView,
- eventDelegate: mapEventHandler,
+ eventDelegate: dartCallbackHandler,
clusterManagersController: clusterManagersController,
assetProvider: assetProvider,
markerType: markerType
)
polygonsController = PolygonsController(
mapView: mapView,
- eventDelegate: mapEventHandler
+ eventDelegate: dartCallbackHandler
)
polylinesController = PolylinesController(
mapView: mapView,
- eventDelegate: mapEventHandler
+ eventDelegate: dartCallbackHandler
)
circlesController = CirclesController(
mapView: mapView,
- eventDelegate: mapEventHandler
+ eventDelegate: dartCallbackHandler
)
heatmapsController = HeatmapsController(mapView: mapView)
- tileProvider = ConcreteTileProvider(dartCallbackHandler: dartCallbackHandler)
tileOverlaysController = TileOverlaysController(
mapView: mapView,
- tileProvider: tileProvider
+ tileProvider: dartCallbackHandler
)
groundOverlaysController = GroundOverlaysController(
mapView: mapView,
- eventDelegate: mapEventHandler,
+ eventDelegate: dartCallbackHandler,
assetProvider: assetProvider
)
@@ -253,9 +196,17 @@
super.init()
callHandler.controller = self
- SetUpFGMMapsApiWithSuffix(binaryMessenger, callHandler, pigeonSuffix)
+ MapsApiSetup.setUp(
+ binaryMessenger: binaryMessenger,
+ api: callHandler,
+ messageChannelSuffix: pigeonSuffix
+ )
inspector.controller = self
- SetUpFGMMapsInspectorApiWithSuffix(binaryMessenger, inspector, pigeonSuffix)
+ MapsInspectorApiSetup.setUp(
+ binaryMessenger: binaryMessenger,
+ api: inspector,
+ messageChannelSuffix: pigeonSuffix
+ )
mapView.delegate = self
isObservingFrame = true
@@ -269,8 +220,15 @@
if isObservingFrame {
mapView.removeObserver(self, forKeyPath: "frame")
}
- SetUpFGMMapsApiWithSuffix(callHandler.messenger, nil, callHandler.pigeonSuffix)
- SetUpFGMMapsInspectorApiWithSuffix(inspector.messenger, nil, inspector.pigeonSuffix)
+ MapsApiSetup.setUp(
+ binaryMessenger: callHandler.messenger,
+ api: nil,
+ messageChannelSuffix: callHandler.pigeonSuffix
+ )
+ MapsInspectorApiSetup.setUp(
+ binaryMessenger: inspector.messenger,
+ api: nil,
+ messageChannelSuffix: inspector.pigeonSuffix)
}
public func view() -> UIView {
@@ -355,17 +313,17 @@
// MARK: - GMSMapViewDelegate methods
public func mapView(_ mapView: GMSMapView, willMove gesture: Bool) {
- mapEventHandler.didStartCameraMove()
+ dartCallbackHandler.didStartCameraMove { _ in }
}
public func mapView(_ mapView: GMSMapView, didChange position: GMSCameraPosition) {
if trackCameraPosition {
- mapEventHandler.didMoveCamera(to: FGMPlatformCameraPosition.make(from: position))
+ dartCallbackHandler.didMoveCamera(to: PlatformCameraPosition.make(from: position)) { _ in }
}
}
public func mapView(_ mapView: GMSMapView, idleAt position: GMSCameraPosition) {
- mapEventHandler.didIdleCamera()
+ dartCallbackHandler.didIdleCamera { _ in }
}
public func mapView(_ mapView: GMSMapView, didTap marker: GMSMarker) -> Bool {
@@ -421,14 +379,14 @@
}
public func mapView(_ mapView: GMSMapView, didTapAt coordinate: CLLocationCoordinate2D) {
- mapEventHandler.didTap(atPosition: FGMPlatformLatLng.make(from: coordinate))
+ dartCallbackHandler.didTap(at: PlatformLatLng.make(from: coordinate)) { _ in }
}
public func mapView(_ mapView: GMSMapView, didLongPressAt coordinate: CLLocationCoordinate2D) {
- mapEventHandler.didLongPress(atPosition: FGMPlatformLatLng.make(from: coordinate))
+ dartCallbackHandler.didLongPress(at: PlatformLatLng.make(from: coordinate)) { _ in }
}
- func interpretMapConfiguration(_ config: FGMPlatformMapConfiguration) {
+ func interpretMapConfiguration(_ config: PlatformMapConfiguration) {
// Any changes here must also be made to the `init` method above. See the comment there for
// details.
let (styleUpdateAttempted, errorString) = GoogleMapController.updateMapView(
@@ -437,7 +395,7 @@
styleError = errorString
}
if let trackCameraPosition = config.trackCameraPosition {
- self.trackCameraPosition = trackCameraPosition.boolValue
+ self.trackCameraPosition = trackCameraPosition
}
}
@@ -447,7 +405,7 @@
/// describing any error interpreting the style in `config`. If the boolean is true, the error
/// string should be stored in `styleError` for later access.
static func updateMapView(
- _ mapView: GMSMapView, fromConfiguration config: FGMPlatformMapConfiguration
+ _ mapView: GMSMapView, fromConfiguration config: PlatformMapConfiguration
) -> (Bool, String?) {
if let cameraTargetBounds = config.cameraTargetBounds {
if let bounds = cameraTargetBounds.bounds {
@@ -457,23 +415,23 @@
}
}
if let compassEnabled = config.compassEnabled {
- mapView.settings.compassButton = compassEnabled.boolValue
+ mapView.settings.compassButton = compassEnabled
}
if let indoorEnabled = config.indoorViewEnabled {
- mapView.isIndoorEnabled = indoorEnabled.boolValue
+ mapView.isIndoorEnabled = indoorEnabled
}
if let trafficEnabled = config.trafficEnabled {
- mapView.isTrafficEnabled = trafficEnabled.boolValue
+ mapView.isTrafficEnabled = trafficEnabled
}
if let buildingsEnabled = config.buildingsEnabled {
- mapView.isBuildingsEnabled = buildingsEnabled.boolValue
+ mapView.isBuildingsEnabled = buildingsEnabled
}
if let mapType = config.mapType {
- mapView.mapType = mapType.value.gmsMapViewType
+ mapView.mapType = mapType.gmsMapViewType
}
if let zoomData = config.minMaxZoomPreference {
- let minZoom = zoomData.min?.floatValue ?? kGMSMinZoomLevel
- let maxZoom = zoomData.max?.floatValue ?? kGMSMaxZoomLevel
+ let minZoom = zoomData.min.map { Float($0) } ?? kGMSMinZoomLevel
+ let maxZoom = zoomData.max.map { Float($0) } ?? kGMSMaxZoomLevel
mapView.setMinZoom(minZoom, maxZoom: maxZoom)
}
if let padding = config.padding {
@@ -485,22 +443,22 @@
)
}
if let rotateGesturesEnabled = config.rotateGesturesEnabled {
- mapView.settings.rotateGestures = rotateGesturesEnabled.boolValue
+ mapView.settings.rotateGestures = rotateGesturesEnabled
}
if let scrollGesturesEnabled = config.scrollGesturesEnabled {
- mapView.settings.scrollGestures = scrollGesturesEnabled.boolValue
+ mapView.settings.scrollGestures = scrollGesturesEnabled
}
if let tiltGesturesEnabled = config.tiltGesturesEnabled {
- mapView.settings.tiltGestures = tiltGesturesEnabled.boolValue
+ mapView.settings.tiltGestures = tiltGesturesEnabled
}
if let zoomGesturesEnabled = config.zoomGesturesEnabled {
- mapView.settings.zoomGestures = zoomGesturesEnabled.boolValue
+ mapView.settings.zoomGestures = zoomGesturesEnabled
}
if let myLocationEnabled = config.myLocationEnabled {
- mapView.isMyLocationEnabled = myLocationEnabled.boolValue
+ mapView.isMyLocationEnabled = myLocationEnabled
}
if let myLocationButtonEnabled = config.myLocationButtonEnabled {
- mapView.settings.myLocationButton = myLocationButtonEnabled.boolValue
+ mapView.settings.myLocationButton = myLocationButtonEnabled
}
if let mapStyle = config.style {
let (style, errorString) = GoogleMapController.parseMapStyle(mapStyle)
@@ -513,36 +471,11 @@
}
}
-// TODO(stuartmorgan): Remove this in favor of an extension to add FGMTileProviderDelegate to
-// the Pigeon Flutter API object once this plugin has switched to Swift Pigeon generation
-// (adjusting the protocol to match the Swift version of the signature).
-private class ConcreteTileProvider: NSObject, TileProviderDelegate {
- let handler: FGMMapsCallbackApi
-
- init(dartCallbackHandler: FGMMapsCallbackApi) {
- handler = dartCallbackHandler
- }
-
- public func tile(
- withOverlayIdentifier tileOverlayId: String,
- location: FGMPlatformPoint,
- zoom: Int,
- completion: @escaping (FGMPlatformTile?, FlutterError?) -> Void
- ) {
- handler.tile(
- withOverlayIdentifier: tileOverlayId,
- location: location,
- zoom: zoom,
- completion: completion
- )
- }
-}
-
-class MapCallHandler: NSObject, FGMMapsApi {
+class MapCallHandler: MapsApi {
weak var controller: GoogleMapController?
let messenger: FlutterBinaryMessenger
let pigeonSuffix: String
- var transactionWrapper: FGMCATransactionProtocol
+ var transactionWrapper: MapAnimationCATransactionProtocol
init(
messenger: FlutterBinaryMessenger,
@@ -550,17 +483,17 @@
) {
self.messenger = messenger
self.pigeonSuffix = suffix
- self.transactionWrapper = FGMCATransactionWrapper()
- super.init()
+ self.transactionWrapper = DefaultMapAnimationCATransaction()
}
- func waitForMapWithError(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>) {
+ func waitForMap() {
// No-op; this call just ensures synchronization with the platform thread.
}
func updateCircles(
- byAdding toAdd: [FGMPlatformCircle], changing toChange: [FGMPlatformCircle],
- removing idsToRemove: [String], error: AutoreleasingUnsafeMutablePointer<FlutterError?>
+ adding toAdd: [PlatformCircle],
+ changing toChange: [PlatformCircle],
+ removing idsToRemove: [String]
) {
controller?.circlesController.add(toAdd)
controller?.circlesController.change(toChange)
@@ -568,24 +501,23 @@
}
func updateHeatmaps(
- byAdding toAdd: [FGMPlatformHeatmap], changing toChange: [FGMPlatformHeatmap],
- removing idsToRemove: [String], error: AutoreleasingUnsafeMutablePointer<FlutterError?>
+ adding toAdd: [PlatformHeatmap],
+ changing toChange: [PlatformHeatmap],
+ removing idsToRemove: [String]
) {
controller?.heatmapsController.add(toAdd)
controller?.heatmapsController.change(toChange)
controller?.heatmapsController.removeHeatmaps(withIdentifiers: idsToRemove)
}
- func update(
- with configuration: FGMPlatformMapConfiguration,
- error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) {
+ func updateWithMapConfiguration(_ configuration: PlatformMapConfiguration) {
controller?.interpretMapConfiguration(configuration)
}
func updateMarkers(
- byAdding toAdd: [FGMPlatformMarker], changing toChange: [FGMPlatformMarker],
- removing idsToRemove: [String], error: AutoreleasingUnsafeMutablePointer<FlutterError?>
+ adding toAdd: [PlatformMarker],
+ changing toChange: [PlatformMarker],
+ removing idsToRemove: [String]
) {
controller?.markersController.add(toAdd)
controller?.markersController.change(toChange)
@@ -595,16 +527,17 @@
}
func updateClusterManagers(
- byAdding toAdd: [FGMPlatformClusterManager], removing idsToRemove: [String],
- error: AutoreleasingUnsafeMutablePointer<FlutterError?>
+ adding toAdd: [PlatformClusterManager],
+ removing idsToRemove: [String]
) {
controller?.clusterManagersController.add(toAdd)
controller?.clusterManagersController.removeClusterManagers(withIdentifiers: idsToRemove)
}
func updatePolygons(
- byAdding toAdd: [FGMPlatformPolygon], changing toChange: [FGMPlatformPolygon],
- removing idsToRemove: [String], error: AutoreleasingUnsafeMutablePointer<FlutterError?>
+ adding toAdd: [PlatformPolygon],
+ changing toChange: [PlatformPolygon],
+ removing idsToRemove: [String]
) {
controller?.polygonsController.add(toAdd)
controller?.polygonsController.change(toChange)
@@ -612,8 +545,9 @@
}
func updatePolylines(
- byAdding toAdd: [FGMPlatformPolyline], changing toChange: [FGMPlatformPolyline],
- removing idsToRemove: [String], error: AutoreleasingUnsafeMutablePointer<FlutterError?>
+ adding toAdd: [PlatformPolyline],
+ changing toChange: [PlatformPolyline],
+ removing idsToRemove: [String]
) {
controller?.polylinesController.add(toAdd)
controller?.polylinesController.change(toChange)
@@ -621,8 +555,9 @@
}
func updateTileOverlays(
- byAdding toAdd: [FGMPlatformTileOverlay], changing toChange: [FGMPlatformTileOverlay],
- removing idsToRemove: [String], error: AutoreleasingUnsafeMutablePointer<FlutterError?>
+ adding toAdd: [PlatformTileOverlay],
+ changing toChange: [PlatformTileOverlay],
+ removing idsToRemove: [String]
) {
controller?.tileOverlaysController.add(toAdd)
controller?.tileOverlaysController.change(toChange)
@@ -630,150 +565,128 @@
}
func updateGroundOverlays(
- byAdding toAdd: [FGMPlatformGroundOverlay], changing toChange: [FGMPlatformGroundOverlay],
- removing idsToRemove: [String], error: AutoreleasingUnsafeMutablePointer<FlutterError?>
+ adding toAdd: [PlatformGroundOverlay],
+ changing toChange: [PlatformGroundOverlay],
+ removing idsToRemove: [String]
) {
controller?.groundOverlaysController.add(toAdd)
controller?.groundOverlaysController.change(toChange)
controller?.groundOverlaysController.removeGroundOverlays(withIdentifiers: idsToRemove)
}
- func latLng(
- forScreenCoordinate screenCoordinate: FGMPlatformPoint,
- error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) -> FGMPlatformLatLng? {
+ func latLng(for screenCoordinate: PlatformPoint) throws -> PlatformLatLng {
guard let mapView = controller?.mapView else {
- error.pointee = FlutterError(
+ throw PigeonError(
code: "GoogleMap uninitialized",
message: "getLatLng called prior to map initialization",
details: nil
)
- return nil
}
let point = screenCoordinate.toCGPoint()
let latlng = mapView.projection.coordinate(for: point)
- return FGMPlatformLatLng.make(from: latlng)
+ return PlatformLatLng.make(from: latlng)
}
- func screenCoordinates(
- for latLng: FGMPlatformLatLng, error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) -> FGMPlatformPoint? {
+ func screenCoordinates(for latLng: PlatformLatLng) throws -> PlatformPoint {
guard let mapView = controller?.mapView else {
- error.pointee = FlutterError(
+ throw PigeonError(
code: "GoogleMap uninitialized",
message: "getScreenCoordinate called prior to map initialization",
details: nil
)
- return nil
}
let location = latLng.toCLLocationCoordinate2D()
let point = mapView.projection.point(for: location)
- return FGMPlatformPoint.make(from: point)
+ return PlatformPoint.make(from: point)
}
- func visibleMapRegion(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>)
- -> FGMPlatformLatLngBounds?
- {
+ func visibleMapRegion() throws -> PlatformLatLngBounds {
guard let mapView = controller?.mapView else {
- error.pointee = FlutterError(
+ throw PigeonError(
code: "GoogleMap uninitialized",
message: "getVisibleRegion called prior to map initialization",
details: nil
)
- return nil
}
let visibleRegion = mapView.projection.visibleRegion()
let bounds = GMSCoordinateBounds(region: visibleRegion)
- return FGMPlatformLatLngBounds.make(from: bounds)
+ return PlatformLatLngBounds.make(from: bounds)
}
- func moveCamera(
- with cameraUpdate: FGMPlatformCameraUpdate,
- error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) {
+ func moveCamera(_ cameraUpdate: PlatformCameraUpdate) throws {
guard let update = cameraUpdate.toGMSCameraUpdate() else {
- error.pointee = FlutterError(
+ throw PigeonError(
code: "Invalid update",
message: "Unrecognized camera update",
details: nil
)
- return
}
controller?.mapView.moveCamera(update)
}
func animateCamera(
- with cameraUpdate: FGMPlatformCameraUpdate, duration durationMilliseconds: NSNumber?,
- error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) {
+ _ cameraUpdate: PlatformCameraUpdate,
+ duration durationMilliseconds: Int64?
+ ) throws {
guard let update = cameraUpdate.toGMSCameraUpdate() else {
- error.pointee = FlutterError(
+ throw PigeonError(
code: "Invalid update",
message: "Unrecognized camera update",
details: nil
)
- return
}
let transaction = durationMilliseconds != nil ? transactionWrapper : nil
transaction?.begin()
if let duration = durationMilliseconds {
- transaction?.setAnimationDuration(duration.doubleValue / 1000.0)
+ transaction?.setAnimationDuration(Double(duration) / 1000.0)
}
controller?.mapView.animate(with: update)
transaction?.commit()
}
- func currentZoomLevel(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>) -> NSNumber? {
+ func zoomLevel() throws -> Double {
guard let mapView = controller?.mapView else {
- return nil
+ throw PigeonError(
+ code: "GoogleMap uninitialized",
+ message: "getZoomLevel called prior to map initialization",
+ details: nil
+ )
}
- return NSNumber(value: mapView.camera.zoom)
+ return Double(mapView.camera.zoom)
}
- func showInfoWindowForMarker(
- withIdentifier markerId: String, error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) {
- controller?.markersController.showMarkerInfoWindow(withIdentifier: markerId, error: error)
+ func showInfoWindowForMarker(withIdentifier markerId: String) throws {
+ try controller?.markersController.showMarkerInfoWindow(withIdentifier: markerId)
}
- func hideInfoWindowForMarker(
- withIdentifier markerId: String, error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) {
- controller?.markersController.hideMarkerInfoWindow(withIdentifier: markerId, error: error)
+ func hideInfoWindowForMarker(withIdentifier markerId: String) throws {
+ try controller?.markersController.hideMarkerInfoWindow(withIdentifier: markerId)
}
- func isShowingInfoWindowForMarker(
- withIdentifier markerId: String, error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) -> NSNumber? {
- return controller?.markersController.isInfoWindowShownForMarker(
- withIdentifier: markerId, error: error)
+ func isShowingInfoWindowForMarker(withIdentifier markerId: String) throws -> Bool {
+ return try controller?.markersController.isInfoWindowShownForMarker(withIdentifier: markerId)
+ ?? false
}
- func setStyle(_ style: String, error: AutoreleasingUnsafeMutablePointer<FlutterError?>) -> String?
- {
+ func setStyle(_ style: String) -> String? {
return controller?.setMapStyle(style)
}
- func lastStyleError(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>) -> String? {
+ func lastStyleError() -> String? {
return controller?.styleError
}
- func clearTileCacheForOverlay(
- withIdentifier tileOverlayId: String, error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) {
+ func clearTileCacheForOverlay(withIdentifier tileOverlayId: String) {
controller?.tileOverlaysController.clearTileCache(withIdentifier: tileOverlayId)
}
- func takeSnapshotWithError(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>)
- -> FlutterStandardTypedData?
- {
+ func takeSnapshot() throws -> FlutterStandardTypedData? {
guard let mapView = controller?.mapView else {
- error.pointee = FlutterError(
+ throw PigeonError(
code: "GoogleMap uninitialized",
message: "takeSnapshot called prior to map initialization",
details: nil
)
- return nil
}
let renderer = UIGraphicsImageRenderer(size: mapView.bounds.size)
let image = renderer.image { context in
@@ -785,17 +698,12 @@
return nil
}
- func isAdvancedMarkersAvailable(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>)
- -> NSNumber?
- {
- guard let mapView = controller?.mapView else {
- return false
- }
- return NSNumber(value: mapView.mapCapabilities.contains(.advancedMarkers))
+ func isAdvancedMarkersAvailable() -> Bool {
+ return controller?.mapView.mapCapabilities.contains(.advancedMarkers) ?? false
}
}
-class MapInspector: NSObject, FGMMapsInspectorApi {
+class MapInspector: MapsInspectorApi {
weak var controller: GoogleMapController?
let messenger: FlutterBinaryMessenger
let pigeonSuffix: String
@@ -806,134 +714,87 @@
) {
self.messenger = messenger
self.pigeonSuffix = suffix
- super.init()
}
- func areBuildingsEnabledWithError(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>)
- -> NSNumber?
- {
- guard let mapView = controller?.mapView else {
- return nil
- }
- return NSNumber(value: mapView.isBuildingsEnabled)
+ func areBuildingsEnabled() -> Bool {
+ return controller?.mapView.isBuildingsEnabled ?? false
}
- func areRotateGesturesEnabledWithError(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>)
- -> NSNumber?
- {
- guard let mapView = controller?.mapView else {
- return nil
- }
- return NSNumber(value: mapView.settings.rotateGestures)
+ func areRotateGesturesEnabled() -> Bool {
+ return controller?.mapView.settings.rotateGestures ?? false
}
- func areScrollGesturesEnabledWithError(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>)
- -> NSNumber?
- {
- guard let mapView = controller?.mapView else {
- return nil
- }
- return NSNumber(value: mapView.settings.scrollGestures)
+ func areScrollGesturesEnabled() -> Bool {
+ return controller?.mapView.settings.scrollGestures ?? false
}
- func areTiltGesturesEnabledWithError(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>)
- -> NSNumber?
- {
- guard let mapView = controller?.mapView else {
- return nil
- }
- return NSNumber(value: mapView.settings.tiltGestures)
+ func areTiltGesturesEnabled() -> Bool {
+ return controller?.mapView.settings.tiltGestures ?? false
}
- func areZoomGesturesEnabledWithError(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>)
- -> NSNumber?
- {
- guard let mapView = controller?.mapView else {
- return nil
- }
- return NSNumber(value: mapView.settings.zoomGestures)
+ func areZoomGesturesEnabled() -> Bool {
+ return controller?.mapView.settings.zoomGestures ?? false
}
- func tileOverlay(
- withIdentifier tileOverlayId: String, error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) -> FGMPlatformTileLayer? {
+ func isCompassEnabled() -> Bool {
+ return controller?.mapView.settings.compassButton ?? false
+ }
+
+ func isMyLocationButtonEnabled() -> Bool {
+ return controller?.mapView.settings.myLocationButton ?? false
+ }
+
+ func isTrafficEnabled() -> Bool {
+ return controller?.mapView.isTrafficEnabled ?? false
+ }
+
+ func tileOverlay(withIdentifier tileOverlayId: String) -> PlatformTileLayer? {
guard let controller = controller,
let layer = controller.tileOverlaysController.tileOverlay(withIdentifier: tileOverlayId)?
.layer
else {
return nil
}
- return FGMPlatformTileLayer.make(
- withVisible: layer.map != nil,
+ return PlatformTileLayer(
+ visible: layer.map != nil,
fadeIn: layer.fadeIn,
opacity: Double(layer.opacity),
- zIndex: Int(layer.zIndex)
+ zIndex: Int64(layer.zIndex)
)
}
- func heatmap(
- withIdentifier heatmapId: String, error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) -> FGMPlatformHeatmap? {
+ func heatmap(withIdentifier heatmapId: String) -> PlatformHeatmap? {
return controller?.heatmapsController.heatmap(withIdentifier: heatmapId)
}
- func clusters(
- withIdentifier clusterManagerId: String, error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) -> [FGMPlatformCluster]? {
- return controller?.clusterManagersController.clusters(
- withIdentifier: clusterManagerId, error: error)
+ func clusters(withIdentifier clusterManagerId: String) throws -> [PlatformCluster] {
+ return try controller?.clusterManagersController.clusters(withIdentifier: clusterManagerId)
+ ?? []
}
- func isCompassEnabledWithError(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>)
- -> NSNumber?
- {
+ func zoomRange() throws -> PlatformZoomRange {
guard let mapView = controller?.mapView else {
- return nil
+ throw PigeonError(
+ code: "GoogleMap uninitialized",
+ message: "zoomRange called prior to map initialization",
+ details: nil
+ )
}
- return NSNumber(value: mapView.settings.compassButton)
+ return PlatformZoomRange(min: Double(mapView.minZoom), max: Double(mapView.maxZoom))
}
- func isMyLocationButtonEnabledWithError(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>)
- -> NSNumber?
- {
- guard let mapView = controller?.mapView else {
- return nil
- }
- return NSNumber(value: mapView.settings.myLocationButton)
- }
-
- func isTrafficEnabledWithError(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>)
- -> NSNumber?
- {
- guard let mapView = controller?.mapView else {
- return nil
- }
- return NSNumber(value: mapView.isTrafficEnabled)
- }
-
- func zoomRange(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>) -> FGMPlatformZoomRange?
- {
- guard let mapView = controller?.mapView else {
- return nil
- }
- return FGMPlatformZoomRange.make(
- withMin: NSNumber(value: mapView.minZoom),
- max: NSNumber(value: mapView.maxZoom)
- )
- }
-
- func groundOverlay(
- withIdentifier groundOverlayId: String, error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) -> FGMPlatformGroundOverlay? {
+ func groundOverlay(withIdentifier groundOverlayId: String) -> PlatformGroundOverlay? {
return controller?.groundOverlaysController.groundOverlay(withIdentifier: groundOverlayId)
}
- func cameraPosition(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>)
- -> FGMPlatformCameraPosition?
- {
+ func cameraPosition() throws -> PlatformCameraPosition {
guard let mapView = controller?.mapView else {
- return nil
+ throw PigeonError(
+ code: "GoogleMap uninitialized",
+ message: "cameraPosition called prior to map initialization",
+ details: nil
+ )
}
- return FGMPlatformCameraPosition.make(from: mapView.camera)
+ return PlatformCameraPosition.make(from: mapView.camera)
}
}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/GoogleMapFactory.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/GoogleMapFactory.swift
index aa7bcf5..5e263d2 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/GoogleMapFactory.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/GoogleMapFactory.swift
@@ -5,10 +5,6 @@
import Flutter
import GoogleMaps
-#if canImport(google_maps_flutter_ios_sdk10_objc)
- import google_maps_flutter_ios_sdk10_objc
-#endif
-
class GoogleMapFactory: NSObject, FlutterPlatformViewFactory {
weak var registrar: FlutterPluginRegistrar?
static var sharedMapServices = GMSServices.sharedServices()
@@ -25,10 +21,10 @@
return GoogleMapController(
frame: frame, viewIdentifier: viewId,
- creationParameters: args as! FGMPlatformMapViewCreationParams, registrar: registrar!)
+ creationParameters: args as! PlatformMapViewCreationParams, registrar: registrar!)
}
func createArgsCodec() -> any FlutterMessageCodec & NSObjectProtocol {
- return FGMGetGoogleMapsFlutterPigeonMessagesCodec()
+ return MessagesPigeonCodec.shared
}
}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/GroundOverlayController.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/GroundOverlayController.swift
index d3bd9ff..58fc283 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/GroundOverlayController.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/GroundOverlayController.swift
@@ -3,18 +3,15 @@
// found in the LICENSE file.
import GoogleMaps
+import GoogleMapsUtils
import UIKit
-#if canImport(google_maps_flutter_ios_sdk10_objc)
- import google_maps_flutter_ios_sdk10_objc
-#endif
-
/// Controller of a single ground overlay on the map.
-class GroundOverlayController: NSObject {
+class GroundOverlayController {
let groundOverlay: GMSGroundOverlay
private weak var mapView: GMSMapView?
let createdWithBounds: Bool
- var zoomLevel: NSNumber?
+ var zoomLevel: Double?
init(
groundOverlay: GMSGroundOverlay, identifier: String, mapView: GMSMapView,
@@ -24,18 +21,18 @@
self.mapView = mapView
self.groundOverlay.userData = [identifier]
self.createdWithBounds = isCreatedWithBounds
- super.init()
}
func removeGroundOverlay() {
groundOverlay.map = nil
}
- /// Updates the controller's ground overlay with the properties from a FGMPlatformGroundOverlay.
+ /// Updates the controller's ground overlay with the properties from a PlatformGroundOverlay.
///
/// Setting the ground overlay to visible will set its map to the controller's mapView.
func update(
- from platformGroundOverlay: FGMPlatformGroundOverlay, assetProvider: FGMAssetProvider,
+ from platformGroundOverlay: PlatformGroundOverlay,
+ assetProvider: AssetProvider,
screenScale: CGFloat
) {
if let mapView = mapView {
@@ -50,14 +47,14 @@
}
}
- /// Updates the given GMSGroundOverlay with the properties from a FGMPlatformGroundOverlay.
+ /// Updates the given GMSGroundOverlay with the properties from a PlatformGroundOverlay.
///
/// Setting the ground overlay to visible will set its map to the given mapView.
static func update(
_ groundOverlay: GMSGroundOverlay,
- from platformGroundOverlay: FGMPlatformGroundOverlay,
+ from platformGroundOverlay: PlatformGroundOverlay,
mapView: GMSMapView,
- assetProvider: FGMAssetProvider,
+ assetProvider: AssetProvider,
screenScale: CGFloat,
usingBounds useBounds: Bool
) {
@@ -100,20 +97,19 @@
}
/// Controller of multiple ground overlays on the map.
-class GroundOverlaysController: NSObject {
+class GroundOverlaysController {
private var groundOverlayControllerByIdentifier: [String: GroundOverlayController] = [:]
- private weak var eventDelegate: FGMMapEventDelegate?
- private let assetProvider: FGMAssetProvider
+ private weak var eventDelegate: MapEventDelegate?
+ private let assetProvider: AssetProvider
private weak var mapView: GMSMapView?
- init(mapView: GMSMapView, eventDelegate: FGMMapEventDelegate, assetProvider: FGMAssetProvider) {
+ init(mapView: GMSMapView, eventDelegate: MapEventDelegate, assetProvider: AssetProvider) {
self.mapView = mapView
self.eventDelegate = eventDelegate
self.assetProvider = assetProvider
- super.init()
}
- func add(_ groundOverlaysToAdd: [FGMPlatformGroundOverlay]) {
+ func add(_ groundOverlaysToAdd: [PlatformGroundOverlay]) {
guard let mapView = mapView else { return }
let screenScale = getScreenScale()
for groundOverlay in groundOverlaysToAdd {
@@ -135,7 +131,7 @@
),
// The actual icon will be set in the update() call below.
icon: nil,
- zoomLevel: CGFloat(zoomLevel.doubleValue)
+ zoomLevel: CGFloat(zoomLevel)
)
} else {
isCreatedWithBounds = true
@@ -178,7 +174,7 @@
}
}
- func change(_ groundOverlaysToChange: [FGMPlatformGroundOverlay]) {
+ func change(_ groundOverlaysToChange: [PlatformGroundOverlay]) {
let screenScale = getScreenScale()
for groundOverlay in groundOverlaysToChange {
let identifier = groundOverlay.groundOverlayId
@@ -201,7 +197,7 @@
func didTapGroundOverlay(withIdentifier identifier: String) {
if hasGroundOverlays(withIdentifier: identifier) {
- eventDelegate?.didTapGroundOverlay(withIdentifier: identifier)
+ eventDelegate?.didTapGroundOverlay(withIdentifier: identifier) { _ in }
}
}
@@ -219,11 +215,11 @@
return mapView?.traitCollection.displayScale ?? 1.0
}
- func groundOverlay(withIdentifier identifier: String) -> FGMPlatformGroundOverlay? {
+ func groundOverlay(withIdentifier identifier: String) -> PlatformGroundOverlay? {
guard let controller = groundOverlayControllerByIdentifier[identifier] else {
return nil
}
- return FGMPlatformGroundOverlay.make(
+ return PlatformGroundOverlay.make(
from: controller.groundOverlay,
overlayId: identifier,
isCreatedWithBounds: controller.createdWithBounds,
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/HeatmapController.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/HeatmapController.swift
index f88aad2..78be4c5 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/HeatmapController.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/HeatmapController.swift
@@ -3,20 +3,16 @@
// found in the LICENSE file.
import GoogleMaps
-
-#if canImport(google_maps_flutter_ios_sdk10_objc)
- import google_maps_flutter_ios_sdk10_objc
-#endif
+import GoogleMapsUtils
/// Controller of a single Heatmap on the map.
-class HeatmapController: NSObject {
+class HeatmapController {
let heatmapTileLayer: GMUHeatmapTileLayer
private weak var mapView: GMSMapView?
- init(heatmap: FGMPlatformHeatmap, tileLayer: GMUHeatmapTileLayer, mapView: GMSMapView) {
+ init(heatmap: PlatformHeatmap, tileLayer: GMUHeatmapTileLayer, mapView: GMSMapView) {
self.heatmapTileLayer = tileLayer
self.mapView = mapView
- super.init()
HeatmapController.update(tileLayer, from: heatmap, mapView: mapView)
}
@@ -28,7 +24,7 @@
heatmapTileLayer.clearTileCache()
}
- func update(from platformHeatmap: FGMPlatformHeatmap) {
+ func update(from platformHeatmap: PlatformHeatmap) {
if let mapView = mapView {
HeatmapController.update(heatmapTileLayer, from: platformHeatmap, mapView: mapView)
}
@@ -39,10 +35,10 @@
/// Setting the heatmap to visible will set its map to the given mapView.
static func update(
_ heatmapTileLayer: GMUHeatmapTileLayer,
- from platformHeatmap: FGMPlatformHeatmap,
+ from platformHeatmap: PlatformHeatmap,
mapView: GMSMapView
) {
- heatmapTileLayer.weightedData = platformHeatmap.data.map({ $0.toGMUWeightedLatLng() })
+ heatmapTileLayer.weightedData = platformHeatmap.data.map { $0.toGMUWeightedLatLng() }
if let gradient = platformHeatmap.gradient {
heatmapTileLayer.gradient = gradient.toGMUGradient()
}
@@ -58,16 +54,15 @@
}
/// Controller of multiple Heatmaps on the map.
-class HeatmapsController: NSObject {
+class HeatmapsController {
private var heatmapIdToController: [String: HeatmapController] = [:]
private weak var mapView: GMSMapView?
init(mapView: GMSMapView) {
self.mapView = mapView
- super.init()
}
- func add(_ heatmapsToAdd: [FGMPlatformHeatmap]) {
+ func add(_ heatmapsToAdd: [PlatformHeatmap]) {
guard let mapView = mapView else { return }
for heatmap in heatmapsToAdd {
let heatmapTileLayer = GMUHeatmapTileLayer()
@@ -80,7 +75,7 @@
}
}
- func change(_ heatmapsToChange: [FGMPlatformHeatmap]) {
+ func change(_ heatmapsToChange: [PlatformHeatmap]) {
for heatmap in heatmapsToChange {
if let controller = heatmapIdToController[heatmap.heatmapId] {
controller.update(from: heatmap)
@@ -102,17 +97,17 @@
return heatmapIdToController[identifier] != nil
}
- func heatmap(withIdentifier identifier: String) -> FGMPlatformHeatmap? {
+ func heatmap(withIdentifier identifier: String) -> PlatformHeatmap? {
guard let controller = heatmapIdToController[identifier] else { return nil }
let heatmap = controller.heatmapTileLayer
- return FGMPlatformHeatmap.make(
- withHeatmapId: identifier,
- data: heatmap.weightedData.map { FGMPlatformWeightedLatLng.make(from: $0) },
- gradient: FGMPlatformHeatmapGradient.make(from: heatmap.gradient),
+ return PlatformHeatmap(
+ heatmapId: identifier,
+ data: heatmap.weightedData.map { PlatformWeightedLatLng.make(from: $0) },
+ gradient: PlatformHeatmapGradient.make(from: heatmap.gradient),
opacity: Double(heatmap.opacity),
- radius: Int(heatmap.radius),
- minimumZoomIntensity: Int(heatmap.minimumZoomIntensity),
- maximumZoomIntensity: Int(heatmap.maximumZoomIntensity)
+ radius: Int64(heatmap.radius),
+ minimumZoomIntensity: Int64(heatmap.minimumZoomIntensity),
+ maximumZoomIntensity: Int64(heatmap.maximumZoomIntensity)
)
}
}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/ImageUtils.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/ImageUtils.swift
index 8400fba..de6a479 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/ImageUtils.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/ImageUtils.swift
@@ -6,32 +6,25 @@
import GoogleMaps
import UIKit
-#if canImport(google_maps_flutter_ios_sdk10_objc)
- import google_maps_flutter_ios_sdk10_objc
-#endif
-
-extension FGMPlatformBitmap {
+extension PlatformBitmap {
/// Creates a UIImage from the Pigeon bitmap representation, suitable for use as a marker icon.
func createIcon(
- assetProvider: FGMAssetProvider,
+ assetProvider: AssetProvider,
screenScale: CGFloat
) -> UIImage? {
assert(screenScale > 0, "Screen scale must be greater than 0")
var image: UIImage?
- // See comment in messages.dart for why this is so loosely typed. See also
- // https://github.com/flutter/flutter/issues/117819.
- switch bitmap {
- case let bitmap as FGMPlatformBitmapDefaultMarker:
- let hue = bitmap.hue?.doubleValue ?? 0
+ switch self {
+ case let bitmap as PlatformBitmapDefaultMarker:
image = GMSMarker.markerImage(
with: UIColor(
- hue: CGFloat(hue) / 360.0,
+ hue: CGFloat(bitmap.hue ?? 0) / 360.0,
saturation: 1.0,
brightness: 0.7,
alpha: 1.0))
- case let bitmap as FGMPlatformBitmapAsset:
+ case let bitmap as PlatformBitmapAsset:
// Deprecated: This message handling for 'fromAsset' has been replaced by 'asset'.
// Refer to the flutter google_maps_flutter_platform_interface package for details.
if let pkg = bitmap.pkg {
@@ -43,7 +36,7 @@
image = assetProvider.imageNamed(key)
}
}
- case let bitmap as FGMPlatformBitmapAssetImage:
+ case let bitmap as PlatformBitmapAssetImage:
// Deprecated: This message handling for 'fromAssetImage' has been replaced by 'asset'.
// Refer to the flutter google_maps_flutter_platform_interface package for details.
if let key = assetProvider.lookupKey(forAsset: bitmap.name) {
@@ -51,11 +44,11 @@
image = scaledImage(assetImage, scale: bitmap.scale)
}
}
- case let bitmap as FGMPlatformBitmapBytes:
+ case let bitmap as PlatformBitmapBytes:
// Deprecated: This message handling for 'fromBytes' has been replaced by 'bytes'.
// Refer to the flutter google_maps_flutter_platform_interface package for details.
image = UIImage(data: bitmap.byteData.data, scale: screenScale)
- case let bitmap as FGMPlatformBitmapAssetMap:
+ case let bitmap as PlatformBitmapAssetMap:
if let key = assetProvider.lookupKey(forAsset: bitmap.assetName) {
image = assetProvider.imageNamed(key)
}
@@ -69,7 +62,7 @@
image = scaledImage(currentImage, scale: CGFloat(bitmap.imagePixelRatio))
}
}
- case let bitmap as FGMPlatformBitmapBytesMap:
+ case let bitmap as PlatformBitmapBytesMap:
let bytes = bitmap.byteData
image = UIImage(data: bytes.data, scale: screenScale)
if let currentImage = image {
@@ -88,7 +81,7 @@
image = UIImage(data: bytes.data)
}
}
- case let bitmap as FGMPlatformBitmapPinConfig:
+ case let bitmap as PlatformBitmapPinConfig:
let options = GMSPinImageOptions()
if let backgroundColor = bitmap.backgroundColor {
options.backgroundColor = backgroundColor.toUIColor()
@@ -209,16 +202,16 @@
/// widht and height are not given.
private func scaledImage(
_ image: UIImage,
- width: NSNumber?,
- height: NSNumber?,
+ width: Double?,
+ height: Double?,
screenScale: CGFloat
) -> UIImage {
if width == nil && height == nil {
return image
}
- let targetWidth = width == nil ? image.size.width : CGFloat(width!.doubleValue)
- let targetHeight = height == nil ? image.size.height : CGFloat(height!.doubleValue)
+ let targetWidth = width ?? image.size.width
+ let targetHeight = height ?? image.size.height
var calculatedWidth = targetWidth
var calculatedHeight = targetHeight
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/MapEventDelegate.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/MapEventDelegate.swift
new file mode 100644
index 0000000..164a8b6
--- /dev/null
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/MapEventDelegate.swift
@@ -0,0 +1,12 @@
+// Copyright 2013 The Flutter Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#if canImport(google_maps_flutter_ios_sdk10_objc)
+ import google_maps_flutter_ios_sdk10_objc
+#endif
+
+/// Delegate for map callbacks that need Dart handling.
+///
+/// This exists to add AnyObject to the requirements, so that references to it can be weak.
+protocol MapEventDelegate: AnyObject, MapsCallbackApiProtocol {}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/MarkerController.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/MarkerController.swift
index 9200d0a..8ca280b 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/MarkerController.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/MarkerController.swift
@@ -6,12 +6,8 @@
import GoogleMaps
import UIKit
-#if canImport(google_maps_flutter_ios_sdk10_objc)
- import google_maps_flutter_ios_sdk10_objc
-#endif
-
/// Defines marker controllable by Flutter.
-class MarkerController: NSObject {
+class MarkerController {
let marker: GMSMarker
private weak var mapView: GMSMapView?
private(set) var consumeTapEvents: Bool = false
@@ -22,7 +18,6 @@
self.marker = marker
self.markerIdentifier = markerIdentifier
self.mapView = mapView
- super.init()
}
func showInfoWindow() {
@@ -43,12 +38,12 @@
marker.map = nil
}
- /// Updates the controller's marker with the properties from a FGMPlatformMarker.
+ /// Updates the controller's marker with the properties from a PlatformMarker.
///
/// Setting the marker to visible will set its map to the controller's mapView.
func update(
- from platformMarker: FGMPlatformMarker,
- assetProvider: FGMAssetProvider,
+ from platformMarker: PlatformMarker,
+ assetProvider: AssetProvider,
screenScale: CGFloat
) {
clusterManagerIdentifier = platformMarker.clusterManagerId
@@ -71,14 +66,14 @@
)
}
- /// Updates the given GMSMarker with the properties from a FGMPlatformMarker.
+ /// Updates the given GMSMarker with the properties from a PlatformMarker.
///
/// Setting the marker to visible will set its map to the given mapView.
static func update(
_ marker: GMSMarker,
- from platformMarker: FGMPlatformMarker,
+ from platformMarker: PlatformMarker,
mapView: GMSMapView?,
- assetProvider: FGMAssetProvider,
+ assetProvider: AssetProvider,
screenScale: CGFloat,
usingOpacityForVisibility useOpacityForVisibility: Bool
) {
@@ -102,7 +97,7 @@
if let advancedMarker = marker as? GMSAdvancedMarker,
let collisionBehaviorValue = platformMarker.collisionBehavior
{
- advancedMarker.collisionBehavior = collisionBehaviorValue.value.gmsCollisionBehavior
+ advancedMarker.collisionBehavior = collisionBehaviorValue.gmsCollisionBehavior
}
// This must be done last, to avoid visual flickers of default property values.
@@ -116,36 +111,35 @@
}
/// Controller of multiple markers on the map.
-class MarkersController: NSObject {
+class MarkersController {
private(set) var markerIdentifierToController: [String: MarkerController] = [:]
- private weak var eventDelegate: FGMMapEventDelegate?
+ private weak var eventDelegate: MapEventDelegate?
private weak var clusterManagersController: ClusterManagersController?
- private let assetProvider: FGMAssetProvider
+ private let assetProvider: AssetProvider
private weak var mapView: GMSMapView?
- private let markerType: FGMPlatformMarkerType
+ private let markerType: PlatformMarkerType
init(
mapView: GMSMapView,
- eventDelegate: FGMMapEventDelegate,
+ eventDelegate: MapEventDelegate,
clusterManagersController: ClusterManagersController?,
- assetProvider: FGMAssetProvider,
- markerType: FGMPlatformMarkerType
+ assetProvider: AssetProvider,
+ markerType: PlatformMarkerType
) {
self.mapView = mapView
self.eventDelegate = eventDelegate
self.clusterManagersController = clusterManagersController
self.assetProvider = assetProvider
self.markerType = markerType
- super.init()
}
- func add(_ markersToAdd: [FGMPlatformMarker]) {
+ func add(_ markersToAdd: [PlatformMarker]) {
for marker in markersToAdd {
addMarker(marker)
}
}
- private func addMarker(_ markerToAdd: FGMPlatformMarker) {
+ private func addMarker(_ markerToAdd: PlatformMarker) {
guard let mapView = mapView else { return }
let position = markerToAdd.position.toCLLocationCoordinate2D()
let markerIdentifier = markerToAdd.markerId
@@ -175,13 +169,13 @@
markerIdentifierToController[markerIdentifier] = controller
}
- func change(_ markersToChange: [FGMPlatformMarker]) {
+ func change(_ markersToChange: [PlatformMarker]) {
for marker in markersToChange {
changeMarker(marker)
}
}
- private func changeMarker(_ markerToChange: FGMPlatformMarker) {
+ private func changeMarker(_ markerToChange: PlatformMarker) {
let markerIdentifier = markerToChange.markerId
guard let controller = markerIdentifierToController[markerIdentifier] else { return }
@@ -223,7 +217,7 @@
func didTapMarker(withIdentifier identifier: String) -> Bool {
guard let controller = markerIdentifierToController[identifier] else { return false }
- eventDelegate?.didTapMarker(withIdentifier: identifier)
+ eventDelegate?.didTapMarker(withIdentifier: identifier) { _ in }
return controller.consumeTapEvents
}
@@ -231,76 +225,63 @@
guard markerIdentifierToController[identifier] != nil else { return }
eventDelegate?.didStartDragForMarker(
withIdentifier: identifier,
- atPosition: FGMPlatformLatLng.make(from: location)
- )
+ at: PlatformLatLng.make(from: location)
+ ) { _ in }
}
func didDragMarker(withIdentifier identifier: String, location: CLLocationCoordinate2D) {
guard markerIdentifierToController[identifier] != nil else { return }
eventDelegate?.didDragMarker(
withIdentifier: identifier,
- atPosition: FGMPlatformLatLng.make(from: location)
- )
+ at: PlatformLatLng.make(from: location)
+ ) { _ in }
}
func didEndDraggingMarker(withIdentifier identifier: String, location: CLLocationCoordinate2D) {
guard markerIdentifierToController[identifier] != nil else { return }
eventDelegate?.didEndDragForMarker(
withIdentifier: identifier,
- atPosition: FGMPlatformLatLng.make(from: location)
- )
+ at: PlatformLatLng.make(from: location)
+ ) { _ in }
}
func didTapInfoWindowOfMarker(withIdentifier identifier: String) {
if markerIdentifierToController[identifier] != nil {
- eventDelegate?.didTapInfoWindowOfMarker(withIdentifier: identifier)
+ eventDelegate?.didTapInfoWindowOfMarker(withIdentifier: identifier) { _ in }
}
}
- func showMarkerInfoWindow(
- withIdentifier identifier: String,
- error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) {
- if let controller = markerIdentifierToController[identifier] {
- controller.showInfoWindow()
- } else {
- error.pointee = FlutterError(
+ func showMarkerInfoWindow(withIdentifier identifier: String) throws {
+ guard let controller = markerIdentifierToController[identifier] else {
+ throw PigeonError(
code: "Invalid markerId",
message: "showInfoWindow called with invalid markerId",
details: nil
)
}
+ controller.showInfoWindow()
}
- func hideMarkerInfoWindow(
- withIdentifier identifier: String,
- error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) {
- if let controller = markerIdentifierToController[identifier] {
- controller.hideInfoWindow()
- } else {
- error.pointee = FlutterError(
+ func hideMarkerInfoWindow(withIdentifier identifier: String) throws {
+ guard let controller = markerIdentifierToController[identifier] else {
+ throw PigeonError(
code: "Invalid markerId",
message: "hideInfoWindow called with invalid markerId",
details: nil
)
}
+ controller.hideInfoWindow()
}
- func isInfoWindowShownForMarker(
- withIdentifier identifier: String,
- error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) -> NSNumber? {
- if let controller = markerIdentifierToController[identifier] {
- return NSNumber(value: controller.isInfoWindowShown())
- } else {
- error.pointee = FlutterError(
+ func isInfoWindowShownForMarker(withIdentifier identifier: String) throws -> Bool {
+ guard let controller = markerIdentifierToController[identifier] else {
+ throw PigeonError(
code: "Invalid markerId",
message: "isInfoWindowShown called with invalid markerId",
details: nil
)
- return nil
}
+ return controller.isInfoWindowShown()
}
func getScreenScale() -> CGFloat {
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/Messages.g.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/Messages.g.swift
new file mode 100644
index 0000000..76dd15c
--- /dev/null
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/Messages.g.swift
@@ -0,0 +1,4174 @@
+// Copyright 2013 The Flutter Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+// Autogenerated from Pigeon (v27.3.2), do not edit directly.
+// See also: https://pub.dev/packages/pigeon
+
+import Foundation
+
+#if os(iOS)
+ import Flutter
+#elseif os(macOS)
+ import FlutterMacOS
+#else
+ #error("Unsupported platform.")
+#endif
+
+/// Error class for passing custom error details to Dart side.
+final class PigeonError: Error {
+ let code: String
+ let message: String?
+ let details: Sendable?
+
+ init(code: String, message: String?, details: Sendable?) {
+ self.code = code
+ self.message = message
+ self.details = details
+ }
+
+ var localizedDescription: String {
+ return
+ "PigeonError(code: \(code), message: \(message ?? "<nil>"), details: \(details ?? "<nil>")"
+ }
+}
+
+private func wrapResult(_ result: Any?) -> [Any?] {
+ return [result]
+}
+
+private func wrapError(_ error: Any) -> [Any?] {
+ if let pigeonError = error as? PigeonError {
+ return [
+ pigeonError.code,
+ pigeonError.message,
+ pigeonError.details,
+ ]
+ }
+ if let flutterError = error as? FlutterError {
+ return [
+ flutterError.code,
+ flutterError.message,
+ flutterError.details,
+ ]
+ }
+ return [
+ "\(error)",
+ "\(Swift.type(of: error))",
+ "Stacktrace: \(Thread.callStackSymbols)",
+ ]
+}
+
+private func createConnectionError(withChannelName channelName: String) -> PigeonError {
+ return PigeonError(
+ code: "channel-error", message: "Unable to establish connection on channel: '\(channelName)'.",
+ details: "")
+}
+
+enum MessagesPigeonInternal {
+ static func isNullish(_ value: Any?) -> Bool {
+ guard let innerValue = value else {
+ return true
+ }
+
+ if case Optional<Any>.some(Optional<Any>.none) = value {
+ return true
+ }
+
+ return innerValue is NSNull
+ }
+ static func doubleEquals(_ lhs: Double, _ rhs: Double) -> Bool {
+ return (lhs.isNaN && rhs.isNaN) || lhs == rhs
+ }
+
+ static func doubleHash(_ value: Double, _ hasher: inout Hasher) {
+ if value.isNaN {
+ hasher.combine(0x7FF8_0000_0000_0000)
+ } else {
+ // Normalize -0.0 to 0.0
+ hasher.combine(value == 0 ? 0 : value)
+ }
+ }
+
+ static func deepEquals(_ lhs: Any?, _ rhs: Any?) -> Bool {
+ let cleanLhs = nilOrValue(lhs) as Any?
+ let cleanRhs = nilOrValue(rhs) as Any?
+ switch (cleanLhs, cleanRhs) {
+ case (nil, nil):
+ return true
+
+ case (nil, _), (_, nil):
+ return false
+
+ case (let lhs as AnyObject, let rhs as AnyObject) where lhs === rhs:
+ return true
+
+ case is (Void, Void):
+ return true
+
+ case (let lhsArray, let rhsArray) as ([Any?], [Any?]):
+ guard lhsArray.count == rhsArray.count else { return false }
+ for (index, element) in lhsArray.enumerated() {
+ if !deepEquals(element, rhsArray[index]) {
+ return false
+ }
+ }
+ return true
+
+ case (let lhsArray, let rhsArray) as ([Double], [Double]):
+ guard lhsArray.count == rhsArray.count else { return false }
+ for (index, element) in lhsArray.enumerated() {
+ if !doubleEquals(element, rhsArray[index]) {
+ return false
+ }
+ }
+ return true
+
+ case (let lhsDictionary, let rhsDictionary) as ([AnyHashable: Any?], [AnyHashable: Any?]):
+ guard lhsDictionary.count == rhsDictionary.count else { return false }
+ for (lhsKey, lhsValue) in lhsDictionary {
+ var found = false
+ for (rhsKey, rhsValue) in rhsDictionary {
+ if deepEquals(lhsKey, rhsKey) {
+ if deepEquals(lhsValue, rhsValue) {
+ found = true
+ break
+ } else {
+ return false
+ }
+ }
+ }
+ if !found { return false }
+ }
+ return true
+
+ case (let lhs as Double, let rhs as Double):
+ return doubleEquals(lhs, rhs)
+
+ case (let lhsHashable, let rhsHashable) as (AnyHashable, AnyHashable):
+ return lhsHashable == rhsHashable
+
+ default:
+ return false
+ }
+ }
+
+ static func deepHash(value: Any?, hasher: inout Hasher) {
+ let cleanValue = nilOrValue(value) as Any?
+ if let cleanValue = cleanValue {
+ if let doubleValue = cleanValue as? Double {
+ doubleHash(doubleValue, &hasher)
+ } else if let valueList = cleanValue as? [Any?] {
+ for item in valueList {
+ deepHash(value: item, hasher: &hasher)
+ }
+ } else if let valueList = cleanValue as? [Double] {
+ for item in valueList {
+ doubleHash(item, &hasher)
+ }
+ } else if let valueDict = cleanValue as? [AnyHashable: Any?] {
+ var result = 0
+ for (key, value) in valueDict {
+ var entryKeyHasher = Hasher()
+ deepHash(value: key, hasher: &entryKeyHasher)
+ var entryValueHasher = Hasher()
+ deepHash(value: value, hasher: &entryValueHasher)
+ result = result &+ ((entryKeyHasher.finalize() &* 31) ^ entryValueHasher.finalize())
+ }
+ hasher.combine(result)
+ } else if let hashableValue = cleanValue as? AnyHashable {
+ hasher.combine(hashableValue)
+ } else {
+ hasher.combine(String(describing: cleanValue))
+ }
+ } else {
+ hasher.combine(0)
+ }
+ }
+
+}
+
+private func nilOrValue<T>(_ value: Any?) -> T? {
+ if value is NSNull { return nil }
+ return value as! T?
+}
+
+/// Pigeon equivalent of MapType
+enum PlatformMapType: Int, CaseIterable {
+ case none = 0
+ case normal = 1
+ case satellite = 2
+ case terrain = 3
+ case hybrid = 4
+}
+
+/// Pigeon equivalent of the MarkerCollisionBehavior enum.
+enum PlatformMarkerCollisionBehavior: Int, CaseIterable {
+ case requiredDisplay = 0
+ case optionalAndHidesLowerPriority = 1
+ case requiredAndHidesOptional = 2
+}
+
+/// Join types for polyline joints.
+enum PlatformJointType: Int, CaseIterable {
+ case mitered = 0
+ case bevel = 1
+ case round = 2
+}
+
+/// Enumeration of possible types for PatternItem.
+enum PlatformPatternItemType: Int, CaseIterable {
+ case dot = 0
+ case dash = 1
+ case gap = 2
+}
+
+enum PlatformMarkerType: Int, CaseIterable {
+ case marker = 0
+ case advancedMarker = 1
+}
+
+/// Pigeon equivalent of [MapBitmapScaling].
+enum PlatformMapBitmapScaling: Int, CaseIterable {
+ case auto = 0
+ case none = 1
+}
+
+/// Pigeon representatation of a CameraPosition.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformCameraPosition: Hashable, CustomStringConvertible {
+ var bearing: Double
+ var target: PlatformLatLng
+ var tilt: Double
+ var zoom: Double
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformCameraPosition? {
+ let bearing = pigeonVar_list[0] as! Double
+ let target = pigeonVar_list[1] as! PlatformLatLng
+ let tilt = pigeonVar_list[2] as! Double
+ let zoom = pigeonVar_list[3] as! Double
+
+ return PlatformCameraPosition(
+ bearing: bearing,
+ target: target,
+ tilt: tilt,
+ zoom: zoom
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ bearing,
+ target,
+ tilt,
+ zoom,
+ ]
+ }
+ static func == (lhs: PlatformCameraPosition, rhs: PlatformCameraPosition) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.bearing, rhs.bearing)
+ && MessagesPigeonInternal.deepEquals(lhs.target, rhs.target)
+ && MessagesPigeonInternal.deepEquals(lhs.tilt, rhs.tilt)
+ && MessagesPigeonInternal.deepEquals(lhs.zoom, rhs.zoom)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformCameraPosition")
+ MessagesPigeonInternal.deepHash(value: bearing, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: target, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: tilt, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: zoom, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformCameraPosition(bearing: \(String(describing: bearing)), target: \(String(describing: target)), tilt: \(String(describing: tilt)), zoom: \(String(describing: zoom)))"
+ }
+}
+
+/// Pigeon representation of a CameraUpdate.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+/// This protocol should not be extended by any user class outside of the generated file.
+protocol PlatformCameraUpdate {
+
+}
+
+/// Pigeon equivalent of NewCameraPosition
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformCameraUpdateNewCameraPosition: PlatformCameraUpdate {
+ var cameraPosition: PlatformCameraPosition
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformCameraUpdateNewCameraPosition? {
+ let cameraPosition = pigeonVar_list[0] as! PlatformCameraPosition
+
+ return PlatformCameraUpdateNewCameraPosition(
+ cameraPosition: cameraPosition
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ cameraPosition
+ ]
+ }
+ static func == (
+ lhs: PlatformCameraUpdateNewCameraPosition, rhs: PlatformCameraUpdateNewCameraPosition
+ ) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.cameraPosition, rhs.cameraPosition)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformCameraUpdateNewCameraPosition")
+ MessagesPigeonInternal.deepHash(value: cameraPosition, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformCameraUpdateNewCameraPosition(cameraPosition: \(String(describing: cameraPosition)))"
+ }
+}
+
+/// Pigeon equivalent of NewLatLng
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformCameraUpdateNewLatLng: PlatformCameraUpdate {
+ var latLng: PlatformLatLng
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformCameraUpdateNewLatLng? {
+ let latLng = pigeonVar_list[0] as! PlatformLatLng
+
+ return PlatformCameraUpdateNewLatLng(
+ latLng: latLng
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ latLng
+ ]
+ }
+ static func == (lhs: PlatformCameraUpdateNewLatLng, rhs: PlatformCameraUpdateNewLatLng) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.latLng, rhs.latLng)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformCameraUpdateNewLatLng")
+ MessagesPigeonInternal.deepHash(value: latLng, hasher: &hasher)
+ }
+
+ public var description: String {
+ return "PlatformCameraUpdateNewLatLng(latLng: \(String(describing: latLng)))"
+ }
+}
+
+/// Pigeon equivalent of NewLatLngBounds
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformCameraUpdateNewLatLngBounds: PlatformCameraUpdate {
+ var bounds: PlatformLatLngBounds
+ var padding: Double
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformCameraUpdateNewLatLngBounds? {
+ let bounds = pigeonVar_list[0] as! PlatformLatLngBounds
+ let padding = pigeonVar_list[1] as! Double
+
+ return PlatformCameraUpdateNewLatLngBounds(
+ bounds: bounds,
+ padding: padding
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ bounds,
+ padding,
+ ]
+ }
+ static func == (
+ lhs: PlatformCameraUpdateNewLatLngBounds, rhs: PlatformCameraUpdateNewLatLngBounds
+ ) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.bounds, rhs.bounds)
+ && MessagesPigeonInternal.deepEquals(lhs.padding, rhs.padding)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformCameraUpdateNewLatLngBounds")
+ MessagesPigeonInternal.deepHash(value: bounds, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: padding, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformCameraUpdateNewLatLngBounds(bounds: \(String(describing: bounds)), padding: \(String(describing: padding)))"
+ }
+}
+
+/// Pigeon equivalent of NewLatLngZoom
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformCameraUpdateNewLatLngZoom: PlatformCameraUpdate {
+ var latLng: PlatformLatLng
+ var zoom: Double
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformCameraUpdateNewLatLngZoom? {
+ let latLng = pigeonVar_list[0] as! PlatformLatLng
+ let zoom = pigeonVar_list[1] as! Double
+
+ return PlatformCameraUpdateNewLatLngZoom(
+ latLng: latLng,
+ zoom: zoom
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ latLng,
+ zoom,
+ ]
+ }
+ static func == (lhs: PlatformCameraUpdateNewLatLngZoom, rhs: PlatformCameraUpdateNewLatLngZoom)
+ -> Bool
+ {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.latLng, rhs.latLng)
+ && MessagesPigeonInternal.deepEquals(lhs.zoom, rhs.zoom)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformCameraUpdateNewLatLngZoom")
+ MessagesPigeonInternal.deepHash(value: latLng, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: zoom, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformCameraUpdateNewLatLngZoom(latLng: \(String(describing: latLng)), zoom: \(String(describing: zoom)))"
+ }
+}
+
+/// Pigeon equivalent of ScrollBy
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformCameraUpdateScrollBy: PlatformCameraUpdate {
+ var dx: Double
+ var dy: Double
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformCameraUpdateScrollBy? {
+ let dx = pigeonVar_list[0] as! Double
+ let dy = pigeonVar_list[1] as! Double
+
+ return PlatformCameraUpdateScrollBy(
+ dx: dx,
+ dy: dy
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ dx,
+ dy,
+ ]
+ }
+ static func == (lhs: PlatformCameraUpdateScrollBy, rhs: PlatformCameraUpdateScrollBy) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.dx, rhs.dx)
+ && MessagesPigeonInternal.deepEquals(lhs.dy, rhs.dy)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformCameraUpdateScrollBy")
+ MessagesPigeonInternal.deepHash(value: dx, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: dy, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformCameraUpdateScrollBy(dx: \(String(describing: dx)), dy: \(String(describing: dy)))"
+ }
+}
+
+/// Pigeon equivalent of ZoomBy
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformCameraUpdateZoomBy: PlatformCameraUpdate {
+ var amount: Double
+ var focus: PlatformPoint? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformCameraUpdateZoomBy? {
+ let amount = pigeonVar_list[0] as! Double
+ let focus: PlatformPoint? = nilOrValue(pigeonVar_list[1])
+
+ return PlatformCameraUpdateZoomBy(
+ amount: amount,
+ focus: focus
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ amount,
+ focus,
+ ]
+ }
+ static func == (lhs: PlatformCameraUpdateZoomBy, rhs: PlatformCameraUpdateZoomBy) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.amount, rhs.amount)
+ && MessagesPigeonInternal.deepEquals(lhs.focus, rhs.focus)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformCameraUpdateZoomBy")
+ MessagesPigeonInternal.deepHash(value: amount, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: focus, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformCameraUpdateZoomBy(amount: \(String(describing: amount)), focus: \(String(describing: focus)))"
+ }
+}
+
+/// Pigeon equivalent of ZoomIn/ZoomOut
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformCameraUpdateZoom: PlatformCameraUpdate {
+ var out: Bool
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformCameraUpdateZoom? {
+ let out = pigeonVar_list[0] as! Bool
+
+ return PlatformCameraUpdateZoom(
+ out: out
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ out
+ ]
+ }
+ static func == (lhs: PlatformCameraUpdateZoom, rhs: PlatformCameraUpdateZoom) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.out, rhs.out)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformCameraUpdateZoom")
+ MessagesPigeonInternal.deepHash(value: out, hasher: &hasher)
+ }
+
+ public var description: String {
+ return "PlatformCameraUpdateZoom(out: \(String(describing: out)))"
+ }
+}
+
+/// Pigeon equivalent of ZoomTo
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformCameraUpdateZoomTo: PlatformCameraUpdate {
+ var zoom: Double
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformCameraUpdateZoomTo? {
+ let zoom = pigeonVar_list[0] as! Double
+
+ return PlatformCameraUpdateZoomTo(
+ zoom: zoom
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ zoom
+ ]
+ }
+ static func == (lhs: PlatformCameraUpdateZoomTo, rhs: PlatformCameraUpdateZoomTo) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.zoom, rhs.zoom)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformCameraUpdateZoomTo")
+ MessagesPigeonInternal.deepHash(value: zoom, hasher: &hasher)
+ }
+
+ public var description: String {
+ return "PlatformCameraUpdateZoomTo(zoom: \(String(describing: zoom)))"
+ }
+}
+
+/// Pigeon equivalent of the Circle class.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformCircle: Hashable, CustomStringConvertible {
+ var consumeTapEvents: Bool
+ var fillColor: PlatformColor
+ var strokeColor: PlatformColor
+ var visible: Bool
+ var strokeWidth: Int64
+ var zIndex: Double
+ var center: PlatformLatLng
+ var radius: Double
+ var circleId: String
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformCircle? {
+ let consumeTapEvents = pigeonVar_list[0] as! Bool
+ let fillColor = pigeonVar_list[1] as! PlatformColor
+ let strokeColor = pigeonVar_list[2] as! PlatformColor
+ let visible = pigeonVar_list[3] as! Bool
+ let strokeWidth = pigeonVar_list[4] as! Int64
+ let zIndex = pigeonVar_list[5] as! Double
+ let center = pigeonVar_list[6] as! PlatformLatLng
+ let radius = pigeonVar_list[7] as! Double
+ let circleId = pigeonVar_list[8] as! String
+
+ return PlatformCircle(
+ consumeTapEvents: consumeTapEvents,
+ fillColor: fillColor,
+ strokeColor: strokeColor,
+ visible: visible,
+ strokeWidth: strokeWidth,
+ zIndex: zIndex,
+ center: center,
+ radius: radius,
+ circleId: circleId
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ consumeTapEvents,
+ fillColor,
+ strokeColor,
+ visible,
+ strokeWidth,
+ zIndex,
+ center,
+ radius,
+ circleId,
+ ]
+ }
+ static func == (lhs: PlatformCircle, rhs: PlatformCircle) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.consumeTapEvents, rhs.consumeTapEvents)
+ && MessagesPigeonInternal.deepEquals(lhs.fillColor, rhs.fillColor)
+ && MessagesPigeonInternal.deepEquals(lhs.strokeColor, rhs.strokeColor)
+ && MessagesPigeonInternal.deepEquals(lhs.visible, rhs.visible)
+ && MessagesPigeonInternal.deepEquals(lhs.strokeWidth, rhs.strokeWidth)
+ && MessagesPigeonInternal.deepEquals(lhs.zIndex, rhs.zIndex)
+ && MessagesPigeonInternal.deepEquals(lhs.center, rhs.center)
+ && MessagesPigeonInternal.deepEquals(lhs.radius, rhs.radius)
+ && MessagesPigeonInternal.deepEquals(lhs.circleId, rhs.circleId)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformCircle")
+ MessagesPigeonInternal.deepHash(value: consumeTapEvents, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: fillColor, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: strokeColor, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: visible, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: strokeWidth, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: zIndex, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: center, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: radius, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: circleId, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformCircle(consumeTapEvents: \(String(describing: consumeTapEvents)), fillColor: \(String(describing: fillColor)), strokeColor: \(String(describing: strokeColor)), visible: \(String(describing: visible)), strokeWidth: \(String(describing: strokeWidth)), zIndex: \(String(describing: zIndex)), center: \(String(describing: center)), radius: \(String(describing: radius)), circleId: \(String(describing: circleId)))"
+ }
+}
+
+/// Pigeon equivalent of the Heatmap class.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformHeatmap: Hashable, CustomStringConvertible {
+ var heatmapId: String
+ var data: [PlatformWeightedLatLng]
+ var gradient: PlatformHeatmapGradient? = nil
+ var opacity: Double
+ var radius: Int64
+ var minimumZoomIntensity: Int64
+ var maximumZoomIntensity: Int64
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformHeatmap? {
+ let heatmapId = pigeonVar_list[0] as! String
+ let data = pigeonVar_list[1] as! [PlatformWeightedLatLng]
+ let gradient: PlatformHeatmapGradient? = nilOrValue(pigeonVar_list[2])
+ let opacity = pigeonVar_list[3] as! Double
+ let radius = pigeonVar_list[4] as! Int64
+ let minimumZoomIntensity = pigeonVar_list[5] as! Int64
+ let maximumZoomIntensity = pigeonVar_list[6] as! Int64
+
+ return PlatformHeatmap(
+ heatmapId: heatmapId,
+ data: data,
+ gradient: gradient,
+ opacity: opacity,
+ radius: radius,
+ minimumZoomIntensity: minimumZoomIntensity,
+ maximumZoomIntensity: maximumZoomIntensity
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ heatmapId,
+ data,
+ gradient,
+ opacity,
+ radius,
+ minimumZoomIntensity,
+ maximumZoomIntensity,
+ ]
+ }
+ static func == (lhs: PlatformHeatmap, rhs: PlatformHeatmap) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.heatmapId, rhs.heatmapId)
+ && MessagesPigeonInternal.deepEquals(lhs.data, rhs.data)
+ && MessagesPigeonInternal.deepEquals(lhs.gradient, rhs.gradient)
+ && MessagesPigeonInternal.deepEquals(lhs.opacity, rhs.opacity)
+ && MessagesPigeonInternal.deepEquals(lhs.radius, rhs.radius)
+ && MessagesPigeonInternal.deepEquals(lhs.minimumZoomIntensity, rhs.minimumZoomIntensity)
+ && MessagesPigeonInternal.deepEquals(lhs.maximumZoomIntensity, rhs.maximumZoomIntensity)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformHeatmap")
+ MessagesPigeonInternal.deepHash(value: heatmapId, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: data, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: gradient, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: opacity, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: radius, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: minimumZoomIntensity, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: maximumZoomIntensity, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformHeatmap(heatmapId: \(String(describing: heatmapId)), data: \(String(describing: data)), gradient: \(String(describing: gradient)), opacity: \(String(describing: opacity)), radius: \(String(describing: radius)), minimumZoomIntensity: \(String(describing: minimumZoomIntensity)), maximumZoomIntensity: \(String(describing: maximumZoomIntensity)))"
+ }
+}
+
+/// Pigeon equivalent of the HeatmapGradient class.
+///
+/// The GMUGradient structure is slightly different from HeatmapGradient, so
+/// this matches the iOS API so that conversion can be done on the Dart side
+/// where the structures are easier to work with.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformHeatmapGradient: Hashable, CustomStringConvertible {
+ var colors: [PlatformColor]
+ var startPoints: [Double]
+ var colorMapSize: Int64
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformHeatmapGradient? {
+ let colors = pigeonVar_list[0] as! [PlatformColor]
+ let startPoints = pigeonVar_list[1] as! [Double]
+ let colorMapSize = pigeonVar_list[2] as! Int64
+
+ return PlatformHeatmapGradient(
+ colors: colors,
+ startPoints: startPoints,
+ colorMapSize: colorMapSize
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ colors,
+ startPoints,
+ colorMapSize,
+ ]
+ }
+ static func == (lhs: PlatformHeatmapGradient, rhs: PlatformHeatmapGradient) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.colors, rhs.colors)
+ && MessagesPigeonInternal.deepEquals(lhs.startPoints, rhs.startPoints)
+ && MessagesPigeonInternal.deepEquals(lhs.colorMapSize, rhs.colorMapSize)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformHeatmapGradient")
+ MessagesPigeonInternal.deepHash(value: colors, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: startPoints, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: colorMapSize, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformHeatmapGradient(colors: \(String(describing: colors)), startPoints: \(String(describing: startPoints)), colorMapSize: \(String(describing: colorMapSize)))"
+ }
+}
+
+/// Pigeon equivalent of the WeightedLatLng class.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformWeightedLatLng: Hashable, CustomStringConvertible {
+ var point: PlatformLatLng
+ var weight: Double
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformWeightedLatLng? {
+ let point = pigeonVar_list[0] as! PlatformLatLng
+ let weight = pigeonVar_list[1] as! Double
+
+ return PlatformWeightedLatLng(
+ point: point,
+ weight: weight
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ point,
+ weight,
+ ]
+ }
+ static func == (lhs: PlatformWeightedLatLng, rhs: PlatformWeightedLatLng) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.point, rhs.point)
+ && MessagesPigeonInternal.deepEquals(lhs.weight, rhs.weight)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformWeightedLatLng")
+ MessagesPigeonInternal.deepHash(value: point, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: weight, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformWeightedLatLng(point: \(String(describing: point)), weight: \(String(describing: weight)))"
+ }
+}
+
+/// Pigeon equivalent of the InfoWindow class.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformInfoWindow: Hashable, CustomStringConvertible {
+ var title: String? = nil
+ var snippet: String? = nil
+ var anchor: PlatformPoint
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformInfoWindow? {
+ let title: String? = nilOrValue(pigeonVar_list[0])
+ let snippet: String? = nilOrValue(pigeonVar_list[1])
+ let anchor = pigeonVar_list[2] as! PlatformPoint
+
+ return PlatformInfoWindow(
+ title: title,
+ snippet: snippet,
+ anchor: anchor
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ title,
+ snippet,
+ anchor,
+ ]
+ }
+ static func == (lhs: PlatformInfoWindow, rhs: PlatformInfoWindow) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.title, rhs.title)
+ && MessagesPigeonInternal.deepEquals(lhs.snippet, rhs.snippet)
+ && MessagesPigeonInternal.deepEquals(lhs.anchor, rhs.anchor)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformInfoWindow")
+ MessagesPigeonInternal.deepHash(value: title, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: snippet, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: anchor, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformInfoWindow(title: \(String(describing: title)), snippet: \(String(describing: snippet)), anchor: \(String(describing: anchor)))"
+ }
+}
+
+/// Pigeon equivalent of Cluster.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformCluster: Hashable, CustomStringConvertible {
+ var clusterManagerId: String
+ var position: PlatformLatLng
+ var bounds: PlatformLatLngBounds
+ var markerIds: [String]
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformCluster? {
+ let clusterManagerId = pigeonVar_list[0] as! String
+ let position = pigeonVar_list[1] as! PlatformLatLng
+ let bounds = pigeonVar_list[2] as! PlatformLatLngBounds
+ let markerIds = pigeonVar_list[3] as! [String]
+
+ return PlatformCluster(
+ clusterManagerId: clusterManagerId,
+ position: position,
+ bounds: bounds,
+ markerIds: markerIds
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ clusterManagerId,
+ position,
+ bounds,
+ markerIds,
+ ]
+ }
+ static func == (lhs: PlatformCluster, rhs: PlatformCluster) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.clusterManagerId, rhs.clusterManagerId)
+ && MessagesPigeonInternal.deepEquals(lhs.position, rhs.position)
+ && MessagesPigeonInternal.deepEquals(lhs.bounds, rhs.bounds)
+ && MessagesPigeonInternal.deepEquals(lhs.markerIds, rhs.markerIds)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformCluster")
+ MessagesPigeonInternal.deepHash(value: clusterManagerId, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: position, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: bounds, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: markerIds, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformCluster(clusterManagerId: \(String(describing: clusterManagerId)), position: \(String(describing: position)), bounds: \(String(describing: bounds)), markerIds: \(String(describing: markerIds)))"
+ }
+}
+
+/// Pigeon equivalent of the ClusterManager class.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformClusterManager: Hashable, CustomStringConvertible {
+ var identifier: String
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformClusterManager? {
+ let identifier = pigeonVar_list[0] as! String
+
+ return PlatformClusterManager(
+ identifier: identifier
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ identifier
+ ]
+ }
+ static func == (lhs: PlatformClusterManager, rhs: PlatformClusterManager) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.identifier, rhs.identifier)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformClusterManager")
+ MessagesPigeonInternal.deepHash(value: identifier, hasher: &hasher)
+ }
+
+ public var description: String {
+ return "PlatformClusterManager(identifier: \(String(describing: identifier)))"
+ }
+}
+
+/// Pigeon equivalent of the Marker class.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformMarker: Hashable, CustomStringConvertible {
+ var alpha: Double
+ var anchor: PlatformPoint
+ var consumeTapEvents: Bool
+ var draggable: Bool
+ var flat: Bool
+ var icon: PlatformBitmap
+ var infoWindow: PlatformInfoWindow
+ var position: PlatformLatLng
+ var rotation: Double
+ var visible: Bool
+ var zIndex: Int64
+ var markerId: String
+ var clusterManagerId: String? = nil
+ var collisionBehavior: PlatformMarkerCollisionBehavior? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformMarker? {
+ let alpha = pigeonVar_list[0] as! Double
+ let anchor = pigeonVar_list[1] as! PlatformPoint
+ let consumeTapEvents = pigeonVar_list[2] as! Bool
+ let draggable = pigeonVar_list[3] as! Bool
+ let flat = pigeonVar_list[4] as! Bool
+ let icon = pigeonVar_list[5] as! PlatformBitmap
+ let infoWindow = pigeonVar_list[6] as! PlatformInfoWindow
+ let position = pigeonVar_list[7] as! PlatformLatLng
+ let rotation = pigeonVar_list[8] as! Double
+ let visible = pigeonVar_list[9] as! Bool
+ let zIndex = pigeonVar_list[10] as! Int64
+ let markerId = pigeonVar_list[11] as! String
+ let clusterManagerId: String? = nilOrValue(pigeonVar_list[12])
+ let collisionBehavior: PlatformMarkerCollisionBehavior? = nilOrValue(pigeonVar_list[13])
+
+ return PlatformMarker(
+ alpha: alpha,
+ anchor: anchor,
+ consumeTapEvents: consumeTapEvents,
+ draggable: draggable,
+ flat: flat,
+ icon: icon,
+ infoWindow: infoWindow,
+ position: position,
+ rotation: rotation,
+ visible: visible,
+ zIndex: zIndex,
+ markerId: markerId,
+ clusterManagerId: clusterManagerId,
+ collisionBehavior: collisionBehavior
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ alpha,
+ anchor,
+ consumeTapEvents,
+ draggable,
+ flat,
+ icon,
+ infoWindow,
+ position,
+ rotation,
+ visible,
+ zIndex,
+ markerId,
+ clusterManagerId,
+ collisionBehavior,
+ ]
+ }
+ static func == (lhs: PlatformMarker, rhs: PlatformMarker) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.alpha, rhs.alpha)
+ && MessagesPigeonInternal.deepEquals(lhs.anchor, rhs.anchor)
+ && MessagesPigeonInternal.deepEquals(lhs.consumeTapEvents, rhs.consumeTapEvents)
+ && MessagesPigeonInternal.deepEquals(lhs.draggable, rhs.draggable)
+ && MessagesPigeonInternal.deepEquals(lhs.flat, rhs.flat)
+ && MessagesPigeonInternal.deepEquals(lhs.icon, rhs.icon)
+ && MessagesPigeonInternal.deepEquals(lhs.infoWindow, rhs.infoWindow)
+ && MessagesPigeonInternal.deepEquals(lhs.position, rhs.position)
+ && MessagesPigeonInternal.deepEquals(lhs.rotation, rhs.rotation)
+ && MessagesPigeonInternal.deepEquals(lhs.visible, rhs.visible)
+ && MessagesPigeonInternal.deepEquals(lhs.zIndex, rhs.zIndex)
+ && MessagesPigeonInternal.deepEquals(lhs.markerId, rhs.markerId)
+ && MessagesPigeonInternal.deepEquals(lhs.clusterManagerId, rhs.clusterManagerId)
+ && MessagesPigeonInternal.deepEquals(lhs.collisionBehavior, rhs.collisionBehavior)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformMarker")
+ MessagesPigeonInternal.deepHash(value: alpha, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: anchor, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: consumeTapEvents, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: draggable, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: flat, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: icon, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: infoWindow, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: position, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: rotation, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: visible, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: zIndex, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: markerId, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: clusterManagerId, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: collisionBehavior, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformMarker(alpha: \(String(describing: alpha)), anchor: \(String(describing: anchor)), consumeTapEvents: \(String(describing: consumeTapEvents)), draggable: \(String(describing: draggable)), flat: \(String(describing: flat)), icon: \(String(describing: icon)), infoWindow: \(String(describing: infoWindow)), position: \(String(describing: position)), rotation: \(String(describing: rotation)), visible: \(String(describing: visible)), zIndex: \(String(describing: zIndex)), markerId: \(String(describing: markerId)), clusterManagerId: \(String(describing: clusterManagerId)), collisionBehavior: \(String(describing: collisionBehavior)))"
+ }
+}
+
+/// Pigeon equivalent of the Polygon class.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformPolygon: Hashable, CustomStringConvertible {
+ var polygonId: String
+ var consumesTapEvents: Bool
+ var fillColor: PlatformColor
+ var geodesic: Bool
+ var points: [PlatformLatLng]
+ var holes: [[PlatformLatLng]]
+ var visible: Bool
+ var strokeColor: PlatformColor
+ var strokeWidth: Int64
+ var zIndex: Int64
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformPolygon? {
+ let polygonId = pigeonVar_list[0] as! String
+ let consumesTapEvents = pigeonVar_list[1] as! Bool
+ let fillColor = pigeonVar_list[2] as! PlatformColor
+ let geodesic = pigeonVar_list[3] as! Bool
+ let points = pigeonVar_list[4] as! [PlatformLatLng]
+ let holes = pigeonVar_list[5] as! [[PlatformLatLng]]
+ let visible = pigeonVar_list[6] as! Bool
+ let strokeColor = pigeonVar_list[7] as! PlatformColor
+ let strokeWidth = pigeonVar_list[8] as! Int64
+ let zIndex = pigeonVar_list[9] as! Int64
+
+ return PlatformPolygon(
+ polygonId: polygonId,
+ consumesTapEvents: consumesTapEvents,
+ fillColor: fillColor,
+ geodesic: geodesic,
+ points: points,
+ holes: holes,
+ visible: visible,
+ strokeColor: strokeColor,
+ strokeWidth: strokeWidth,
+ zIndex: zIndex
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ polygonId,
+ consumesTapEvents,
+ fillColor,
+ geodesic,
+ points,
+ holes,
+ visible,
+ strokeColor,
+ strokeWidth,
+ zIndex,
+ ]
+ }
+ static func == (lhs: PlatformPolygon, rhs: PlatformPolygon) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.polygonId, rhs.polygonId)
+ && MessagesPigeonInternal.deepEquals(lhs.consumesTapEvents, rhs.consumesTapEvents)
+ && MessagesPigeonInternal.deepEquals(lhs.fillColor, rhs.fillColor)
+ && MessagesPigeonInternal.deepEquals(lhs.geodesic, rhs.geodesic)
+ && MessagesPigeonInternal.deepEquals(lhs.points, rhs.points)
+ && MessagesPigeonInternal.deepEquals(lhs.holes, rhs.holes)
+ && MessagesPigeonInternal.deepEquals(lhs.visible, rhs.visible)
+ && MessagesPigeonInternal.deepEquals(lhs.strokeColor, rhs.strokeColor)
+ && MessagesPigeonInternal.deepEquals(lhs.strokeWidth, rhs.strokeWidth)
+ && MessagesPigeonInternal.deepEquals(lhs.zIndex, rhs.zIndex)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformPolygon")
+ MessagesPigeonInternal.deepHash(value: polygonId, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: consumesTapEvents, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: fillColor, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: geodesic, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: points, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: holes, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: visible, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: strokeColor, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: strokeWidth, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: zIndex, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformPolygon(polygonId: \(String(describing: polygonId)), consumesTapEvents: \(String(describing: consumesTapEvents)), fillColor: \(String(describing: fillColor)), geodesic: \(String(describing: geodesic)), points: \(String(describing: points)), holes: \(String(describing: holes)), visible: \(String(describing: visible)), strokeColor: \(String(describing: strokeColor)), strokeWidth: \(String(describing: strokeWidth)), zIndex: \(String(describing: zIndex)))"
+ }
+}
+
+/// Pigeon equivalent of the Polyline class.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformPolyline: Hashable, CustomStringConvertible {
+ var polylineId: String
+ var consumesTapEvents: Bool
+ var color: PlatformColor
+ var geodesic: Bool
+ /// The joint type.
+ var jointType: PlatformJointType
+ /// The pattern data, as a list of pattern items.
+ var patterns: [PlatformPatternItem]
+ var points: [PlatformLatLng]
+ var visible: Bool
+ var width: Int64
+ var zIndex: Int64
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformPolyline? {
+ let polylineId = pigeonVar_list[0] as! String
+ let consumesTapEvents = pigeonVar_list[1] as! Bool
+ let color = pigeonVar_list[2] as! PlatformColor
+ let geodesic = pigeonVar_list[3] as! Bool
+ let jointType = pigeonVar_list[4] as! PlatformJointType
+ let patterns = pigeonVar_list[5] as! [PlatformPatternItem]
+ let points = pigeonVar_list[6] as! [PlatformLatLng]
+ let visible = pigeonVar_list[7] as! Bool
+ let width = pigeonVar_list[8] as! Int64
+ let zIndex = pigeonVar_list[9] as! Int64
+
+ return PlatformPolyline(
+ polylineId: polylineId,
+ consumesTapEvents: consumesTapEvents,
+ color: color,
+ geodesic: geodesic,
+ jointType: jointType,
+ patterns: patterns,
+ points: points,
+ visible: visible,
+ width: width,
+ zIndex: zIndex
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ polylineId,
+ consumesTapEvents,
+ color,
+ geodesic,
+ jointType,
+ patterns,
+ points,
+ visible,
+ width,
+ zIndex,
+ ]
+ }
+ static func == (lhs: PlatformPolyline, rhs: PlatformPolyline) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.polylineId, rhs.polylineId)
+ && MessagesPigeonInternal.deepEquals(lhs.consumesTapEvents, rhs.consumesTapEvents)
+ && MessagesPigeonInternal.deepEquals(lhs.color, rhs.color)
+ && MessagesPigeonInternal.deepEquals(lhs.geodesic, rhs.geodesic)
+ && MessagesPigeonInternal.deepEquals(lhs.jointType, rhs.jointType)
+ && MessagesPigeonInternal.deepEquals(lhs.patterns, rhs.patterns)
+ && MessagesPigeonInternal.deepEquals(lhs.points, rhs.points)
+ && MessagesPigeonInternal.deepEquals(lhs.visible, rhs.visible)
+ && MessagesPigeonInternal.deepEquals(lhs.width, rhs.width)
+ && MessagesPigeonInternal.deepEquals(lhs.zIndex, rhs.zIndex)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformPolyline")
+ MessagesPigeonInternal.deepHash(value: polylineId, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: consumesTapEvents, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: color, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: geodesic, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: jointType, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: patterns, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: points, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: visible, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: width, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: zIndex, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformPolyline(polylineId: \(String(describing: polylineId)), consumesTapEvents: \(String(describing: consumesTapEvents)), color: \(String(describing: color)), geodesic: \(String(describing: geodesic)), jointType: \(String(describing: jointType)), patterns: \(String(describing: patterns)), points: \(String(describing: points)), visible: \(String(describing: visible)), width: \(String(describing: width)), zIndex: \(String(describing: zIndex)))"
+ }
+}
+
+/// Pigeon equivalent of the PatternItem class.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformPatternItem: Hashable, CustomStringConvertible {
+ var type: PlatformPatternItemType
+ var length: Double? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformPatternItem? {
+ let type = pigeonVar_list[0] as! PlatformPatternItemType
+ let length: Double? = nilOrValue(pigeonVar_list[1])
+
+ return PlatformPatternItem(
+ type: type,
+ length: length
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ type,
+ length,
+ ]
+ }
+ static func == (lhs: PlatformPatternItem, rhs: PlatformPatternItem) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.type, rhs.type)
+ && MessagesPigeonInternal.deepEquals(lhs.length, rhs.length)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformPatternItem")
+ MessagesPigeonInternal.deepHash(value: type, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: length, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformPatternItem(type: \(String(describing: type)), length: \(String(describing: length)))"
+ }
+}
+
+/// Pigeon equivalent of the Tile class.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformTile: Hashable, CustomStringConvertible {
+ var width: Int64
+ var height: Int64
+ var data: FlutterStandardTypedData? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformTile? {
+ let width = pigeonVar_list[0] as! Int64
+ let height = pigeonVar_list[1] as! Int64
+ let data: FlutterStandardTypedData? = nilOrValue(pigeonVar_list[2])
+
+ return PlatformTile(
+ width: width,
+ height: height,
+ data: data
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ width,
+ height,
+ data,
+ ]
+ }
+ static func == (lhs: PlatformTile, rhs: PlatformTile) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.width, rhs.width)
+ && MessagesPigeonInternal.deepEquals(lhs.height, rhs.height)
+ && MessagesPigeonInternal.deepEquals(lhs.data, rhs.data)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformTile")
+ MessagesPigeonInternal.deepHash(value: width, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: height, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: data, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformTile(width: \(String(describing: width)), height: \(String(describing: height)), data: \(String(describing: data)))"
+ }
+}
+
+/// Pigeon equivalent of the TileOverlay class.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformTileOverlay: Hashable, CustomStringConvertible {
+ var tileOverlayId: String
+ var fadeIn: Bool
+ var transparency: Double
+ var zIndex: Int64
+ var visible: Bool
+ var tileSize: Int64
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformTileOverlay? {
+ let tileOverlayId = pigeonVar_list[0] as! String
+ let fadeIn = pigeonVar_list[1] as! Bool
+ let transparency = pigeonVar_list[2] as! Double
+ let zIndex = pigeonVar_list[3] as! Int64
+ let visible = pigeonVar_list[4] as! Bool
+ let tileSize = pigeonVar_list[5] as! Int64
+
+ return PlatformTileOverlay(
+ tileOverlayId: tileOverlayId,
+ fadeIn: fadeIn,
+ transparency: transparency,
+ zIndex: zIndex,
+ visible: visible,
+ tileSize: tileSize
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ tileOverlayId,
+ fadeIn,
+ transparency,
+ zIndex,
+ visible,
+ tileSize,
+ ]
+ }
+ static func == (lhs: PlatformTileOverlay, rhs: PlatformTileOverlay) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.tileOverlayId, rhs.tileOverlayId)
+ && MessagesPigeonInternal.deepEquals(lhs.fadeIn, rhs.fadeIn)
+ && MessagesPigeonInternal.deepEquals(lhs.transparency, rhs.transparency)
+ && MessagesPigeonInternal.deepEquals(lhs.zIndex, rhs.zIndex)
+ && MessagesPigeonInternal.deepEquals(lhs.visible, rhs.visible)
+ && MessagesPigeonInternal.deepEquals(lhs.tileSize, rhs.tileSize)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformTileOverlay")
+ MessagesPigeonInternal.deepHash(value: tileOverlayId, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: fadeIn, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: transparency, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: zIndex, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: visible, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: tileSize, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformTileOverlay(tileOverlayId: \(String(describing: tileOverlayId)), fadeIn: \(String(describing: fadeIn)), transparency: \(String(describing: transparency)), zIndex: \(String(describing: zIndex)), visible: \(String(describing: visible)), tileSize: \(String(describing: tileSize)))"
+ }
+}
+
+/// Pigeon equivalent of Flutter's EdgeInsets.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformEdgeInsets: Hashable, CustomStringConvertible {
+ var top: Double
+ var bottom: Double
+ var left: Double
+ var right: Double
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformEdgeInsets? {
+ let top = pigeonVar_list[0] as! Double
+ let bottom = pigeonVar_list[1] as! Double
+ let left = pigeonVar_list[2] as! Double
+ let right = pigeonVar_list[3] as! Double
+
+ return PlatformEdgeInsets(
+ top: top,
+ bottom: bottom,
+ left: left,
+ right: right
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ top,
+ bottom,
+ left,
+ right,
+ ]
+ }
+ static func == (lhs: PlatformEdgeInsets, rhs: PlatformEdgeInsets) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.top, rhs.top)
+ && MessagesPigeonInternal.deepEquals(lhs.bottom, rhs.bottom)
+ && MessagesPigeonInternal.deepEquals(lhs.left, rhs.left)
+ && MessagesPigeonInternal.deepEquals(lhs.right, rhs.right)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformEdgeInsets")
+ MessagesPigeonInternal.deepHash(value: top, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: bottom, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: left, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: right, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformEdgeInsets(top: \(String(describing: top)), bottom: \(String(describing: bottom)), left: \(String(describing: left)), right: \(String(describing: right)))"
+ }
+}
+
+/// Pigeon equivalent of LatLng.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformLatLng: Hashable, CustomStringConvertible {
+ var latitude: Double
+ var longitude: Double
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformLatLng? {
+ let latitude = pigeonVar_list[0] as! Double
+ let longitude = pigeonVar_list[1] as! Double
+
+ return PlatformLatLng(
+ latitude: latitude,
+ longitude: longitude
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ latitude,
+ longitude,
+ ]
+ }
+ static func == (lhs: PlatformLatLng, rhs: PlatformLatLng) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.latitude, rhs.latitude)
+ && MessagesPigeonInternal.deepEquals(lhs.longitude, rhs.longitude)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformLatLng")
+ MessagesPigeonInternal.deepHash(value: latitude, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: longitude, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformLatLng(latitude: \(String(describing: latitude)), longitude: \(String(describing: longitude)))"
+ }
+}
+
+/// Pigeon equivalent of LatLngBounds.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformLatLngBounds: Hashable, CustomStringConvertible {
+ var northeast: PlatformLatLng
+ var southwest: PlatformLatLng
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformLatLngBounds? {
+ let northeast = pigeonVar_list[0] as! PlatformLatLng
+ let southwest = pigeonVar_list[1] as! PlatformLatLng
+
+ return PlatformLatLngBounds(
+ northeast: northeast,
+ southwest: southwest
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ northeast,
+ southwest,
+ ]
+ }
+ static func == (lhs: PlatformLatLngBounds, rhs: PlatformLatLngBounds) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.northeast, rhs.northeast)
+ && MessagesPigeonInternal.deepEquals(lhs.southwest, rhs.southwest)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformLatLngBounds")
+ MessagesPigeonInternal.deepHash(value: northeast, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: southwest, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformLatLngBounds(northeast: \(String(describing: northeast)), southwest: \(String(describing: southwest)))"
+ }
+}
+
+/// Pigeon equivalent of CameraTargetBounds.
+///
+/// As with the Dart version, it exists to distinguish between not setting a
+/// a target, and having an explicitly unbounded target (null [bounds]).
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformCameraTargetBounds: Hashable, CustomStringConvertible {
+ var bounds: PlatformLatLngBounds? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformCameraTargetBounds? {
+ let bounds: PlatformLatLngBounds? = nilOrValue(pigeonVar_list[0])
+
+ return PlatformCameraTargetBounds(
+ bounds: bounds
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ bounds
+ ]
+ }
+ static func == (lhs: PlatformCameraTargetBounds, rhs: PlatformCameraTargetBounds) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.bounds, rhs.bounds)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformCameraTargetBounds")
+ MessagesPigeonInternal.deepHash(value: bounds, hasher: &hasher)
+ }
+
+ public var description: String {
+ return "PlatformCameraTargetBounds(bounds: \(String(describing: bounds)))"
+ }
+}
+
+/// Pigeon equivalent of the GroundOverlay class.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformGroundOverlay: Hashable, CustomStringConvertible {
+ var groundOverlayId: String
+ var image: PlatformBitmap
+ var position: PlatformLatLng? = nil
+ var bounds: PlatformLatLngBounds? = nil
+ var anchor: PlatformPoint? = nil
+ var transparency: Double
+ var bearing: Double
+ var zIndex: Int64
+ var visible: Bool
+ var clickable: Bool
+ var zoomLevel: Double? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformGroundOverlay? {
+ let groundOverlayId = pigeonVar_list[0] as! String
+ let image = pigeonVar_list[1] as! PlatformBitmap
+ let position: PlatformLatLng? = nilOrValue(pigeonVar_list[2])
+ let bounds: PlatformLatLngBounds? = nilOrValue(pigeonVar_list[3])
+ let anchor: PlatformPoint? = nilOrValue(pigeonVar_list[4])
+ let transparency = pigeonVar_list[5] as! Double
+ let bearing = pigeonVar_list[6] as! Double
+ let zIndex = pigeonVar_list[7] as! Int64
+ let visible = pigeonVar_list[8] as! Bool
+ let clickable = pigeonVar_list[9] as! Bool
+ let zoomLevel: Double? = nilOrValue(pigeonVar_list[10])
+
+ return PlatformGroundOverlay(
+ groundOverlayId: groundOverlayId,
+ image: image,
+ position: position,
+ bounds: bounds,
+ anchor: anchor,
+ transparency: transparency,
+ bearing: bearing,
+ zIndex: zIndex,
+ visible: visible,
+ clickable: clickable,
+ zoomLevel: zoomLevel
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ groundOverlayId,
+ image,
+ position,
+ bounds,
+ anchor,
+ transparency,
+ bearing,
+ zIndex,
+ visible,
+ clickable,
+ zoomLevel,
+ ]
+ }
+ static func == (lhs: PlatformGroundOverlay, rhs: PlatformGroundOverlay) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.groundOverlayId, rhs.groundOverlayId)
+ && MessagesPigeonInternal.deepEquals(lhs.image, rhs.image)
+ && MessagesPigeonInternal.deepEquals(lhs.position, rhs.position)
+ && MessagesPigeonInternal.deepEquals(lhs.bounds, rhs.bounds)
+ && MessagesPigeonInternal.deepEquals(lhs.anchor, rhs.anchor)
+ && MessagesPigeonInternal.deepEquals(lhs.transparency, rhs.transparency)
+ && MessagesPigeonInternal.deepEquals(lhs.bearing, rhs.bearing)
+ && MessagesPigeonInternal.deepEquals(lhs.zIndex, rhs.zIndex)
+ && MessagesPigeonInternal.deepEquals(lhs.visible, rhs.visible)
+ && MessagesPigeonInternal.deepEquals(lhs.clickable, rhs.clickable)
+ && MessagesPigeonInternal.deepEquals(lhs.zoomLevel, rhs.zoomLevel)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformGroundOverlay")
+ MessagesPigeonInternal.deepHash(value: groundOverlayId, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: image, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: position, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: bounds, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: anchor, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: transparency, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: bearing, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: zIndex, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: visible, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: clickable, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: zoomLevel, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformGroundOverlay(groundOverlayId: \(String(describing: groundOverlayId)), image: \(String(describing: image)), position: \(String(describing: position)), bounds: \(String(describing: bounds)), anchor: \(String(describing: anchor)), transparency: \(String(describing: transparency)), bearing: \(String(describing: bearing)), zIndex: \(String(describing: zIndex)), visible: \(String(describing: visible)), clickable: \(String(describing: clickable)), zoomLevel: \(String(describing: zoomLevel)))"
+ }
+}
+
+/// Information passed to the platform view creation.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformMapViewCreationParams: Hashable, CustomStringConvertible {
+ var initialCameraPosition: PlatformCameraPosition
+ var mapConfiguration: PlatformMapConfiguration
+ var initialCircles: [PlatformCircle]
+ var initialMarkers: [PlatformMarker]
+ var initialPolygons: [PlatformPolygon]
+ var initialPolylines: [PlatformPolyline]
+ var initialHeatmaps: [PlatformHeatmap]
+ var initialTileOverlays: [PlatformTileOverlay]
+ var initialClusterManagers: [PlatformClusterManager]
+ var initialGroundOverlays: [PlatformGroundOverlay]
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformMapViewCreationParams? {
+ let initialCameraPosition = pigeonVar_list[0] as! PlatformCameraPosition
+ let mapConfiguration = pigeonVar_list[1] as! PlatformMapConfiguration
+ let initialCircles = pigeonVar_list[2] as! [PlatformCircle]
+ let initialMarkers = pigeonVar_list[3] as! [PlatformMarker]
+ let initialPolygons = pigeonVar_list[4] as! [PlatformPolygon]
+ let initialPolylines = pigeonVar_list[5] as! [PlatformPolyline]
+ let initialHeatmaps = pigeonVar_list[6] as! [PlatformHeatmap]
+ let initialTileOverlays = pigeonVar_list[7] as! [PlatformTileOverlay]
+ let initialClusterManagers = pigeonVar_list[8] as! [PlatformClusterManager]
+ let initialGroundOverlays = pigeonVar_list[9] as! [PlatformGroundOverlay]
+
+ return PlatformMapViewCreationParams(
+ initialCameraPosition: initialCameraPosition,
+ mapConfiguration: mapConfiguration,
+ initialCircles: initialCircles,
+ initialMarkers: initialMarkers,
+ initialPolygons: initialPolygons,
+ initialPolylines: initialPolylines,
+ initialHeatmaps: initialHeatmaps,
+ initialTileOverlays: initialTileOverlays,
+ initialClusterManagers: initialClusterManagers,
+ initialGroundOverlays: initialGroundOverlays
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ initialCameraPosition,
+ mapConfiguration,
+ initialCircles,
+ initialMarkers,
+ initialPolygons,
+ initialPolylines,
+ initialHeatmaps,
+ initialTileOverlays,
+ initialClusterManagers,
+ initialGroundOverlays,
+ ]
+ }
+ static func == (lhs: PlatformMapViewCreationParams, rhs: PlatformMapViewCreationParams) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.initialCameraPosition, rhs.initialCameraPosition)
+ && MessagesPigeonInternal.deepEquals(lhs.mapConfiguration, rhs.mapConfiguration)
+ && MessagesPigeonInternal.deepEquals(lhs.initialCircles, rhs.initialCircles)
+ && MessagesPigeonInternal.deepEquals(lhs.initialMarkers, rhs.initialMarkers)
+ && MessagesPigeonInternal.deepEquals(lhs.initialPolygons, rhs.initialPolygons)
+ && MessagesPigeonInternal.deepEquals(lhs.initialPolylines, rhs.initialPolylines)
+ && MessagesPigeonInternal.deepEquals(lhs.initialHeatmaps, rhs.initialHeatmaps)
+ && MessagesPigeonInternal.deepEquals(lhs.initialTileOverlays, rhs.initialTileOverlays)
+ && MessagesPigeonInternal.deepEquals(lhs.initialClusterManagers, rhs.initialClusterManagers)
+ && MessagesPigeonInternal.deepEquals(lhs.initialGroundOverlays, rhs.initialGroundOverlays)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformMapViewCreationParams")
+ MessagesPigeonInternal.deepHash(value: initialCameraPosition, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: mapConfiguration, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: initialCircles, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: initialMarkers, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: initialPolygons, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: initialPolylines, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: initialHeatmaps, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: initialTileOverlays, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: initialClusterManagers, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: initialGroundOverlays, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformMapViewCreationParams(initialCameraPosition: \(String(describing: initialCameraPosition)), mapConfiguration: \(String(describing: mapConfiguration)), initialCircles: \(String(describing: initialCircles)), initialMarkers: \(String(describing: initialMarkers)), initialPolygons: \(String(describing: initialPolygons)), initialPolylines: \(String(describing: initialPolylines)), initialHeatmaps: \(String(describing: initialHeatmaps)), initialTileOverlays: \(String(describing: initialTileOverlays)), initialClusterManagers: \(String(describing: initialClusterManagers)), initialGroundOverlays: \(String(describing: initialGroundOverlays)))"
+ }
+}
+
+/// Pigeon equivalent of MapConfiguration.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformMapConfiguration: Hashable, CustomStringConvertible {
+ var compassEnabled: Bool? = nil
+ var cameraTargetBounds: PlatformCameraTargetBounds? = nil
+ var mapType: PlatformMapType? = nil
+ var minMaxZoomPreference: PlatformZoomRange? = nil
+ var rotateGesturesEnabled: Bool? = nil
+ var scrollGesturesEnabled: Bool? = nil
+ var tiltGesturesEnabled: Bool? = nil
+ var trackCameraPosition: Bool? = nil
+ var zoomGesturesEnabled: Bool? = nil
+ var myLocationEnabled: Bool? = nil
+ var myLocationButtonEnabled: Bool? = nil
+ var padding: PlatformEdgeInsets? = nil
+ var indoorViewEnabled: Bool? = nil
+ var trafficEnabled: Bool? = nil
+ var buildingsEnabled: Bool? = nil
+ var markerType: PlatformMarkerType
+ var mapId: String? = nil
+ var style: String? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformMapConfiguration? {
+ let compassEnabled: Bool? = nilOrValue(pigeonVar_list[0])
+ let cameraTargetBounds: PlatformCameraTargetBounds? = nilOrValue(pigeonVar_list[1])
+ let mapType: PlatformMapType? = nilOrValue(pigeonVar_list[2])
+ let minMaxZoomPreference: PlatformZoomRange? = nilOrValue(pigeonVar_list[3])
+ let rotateGesturesEnabled: Bool? = nilOrValue(pigeonVar_list[4])
+ let scrollGesturesEnabled: Bool? = nilOrValue(pigeonVar_list[5])
+ let tiltGesturesEnabled: Bool? = nilOrValue(pigeonVar_list[6])
+ let trackCameraPosition: Bool? = nilOrValue(pigeonVar_list[7])
+ let zoomGesturesEnabled: Bool? = nilOrValue(pigeonVar_list[8])
+ let myLocationEnabled: Bool? = nilOrValue(pigeonVar_list[9])
+ let myLocationButtonEnabled: Bool? = nilOrValue(pigeonVar_list[10])
+ let padding: PlatformEdgeInsets? = nilOrValue(pigeonVar_list[11])
+ let indoorViewEnabled: Bool? = nilOrValue(pigeonVar_list[12])
+ let trafficEnabled: Bool? = nilOrValue(pigeonVar_list[13])
+ let buildingsEnabled: Bool? = nilOrValue(pigeonVar_list[14])
+ let markerType = pigeonVar_list[15] as! PlatformMarkerType
+ let mapId: String? = nilOrValue(pigeonVar_list[16])
+ let style: String? = nilOrValue(pigeonVar_list[17])
+
+ return PlatformMapConfiguration(
+ compassEnabled: compassEnabled,
+ cameraTargetBounds: cameraTargetBounds,
+ mapType: mapType,
+ minMaxZoomPreference: minMaxZoomPreference,
+ rotateGesturesEnabled: rotateGesturesEnabled,
+ scrollGesturesEnabled: scrollGesturesEnabled,
+ tiltGesturesEnabled: tiltGesturesEnabled,
+ trackCameraPosition: trackCameraPosition,
+ zoomGesturesEnabled: zoomGesturesEnabled,
+ myLocationEnabled: myLocationEnabled,
+ myLocationButtonEnabled: myLocationButtonEnabled,
+ padding: padding,
+ indoorViewEnabled: indoorViewEnabled,
+ trafficEnabled: trafficEnabled,
+ buildingsEnabled: buildingsEnabled,
+ markerType: markerType,
+ mapId: mapId,
+ style: style
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ compassEnabled,
+ cameraTargetBounds,
+ mapType,
+ minMaxZoomPreference,
+ rotateGesturesEnabled,
+ scrollGesturesEnabled,
+ tiltGesturesEnabled,
+ trackCameraPosition,
+ zoomGesturesEnabled,
+ myLocationEnabled,
+ myLocationButtonEnabled,
+ padding,
+ indoorViewEnabled,
+ trafficEnabled,
+ buildingsEnabled,
+ markerType,
+ mapId,
+ style,
+ ]
+ }
+ static func == (lhs: PlatformMapConfiguration, rhs: PlatformMapConfiguration) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.compassEnabled, rhs.compassEnabled)
+ && MessagesPigeonInternal.deepEquals(lhs.cameraTargetBounds, rhs.cameraTargetBounds)
+ && MessagesPigeonInternal.deepEquals(lhs.mapType, rhs.mapType)
+ && MessagesPigeonInternal.deepEquals(lhs.minMaxZoomPreference, rhs.minMaxZoomPreference)
+ && MessagesPigeonInternal.deepEquals(lhs.rotateGesturesEnabled, rhs.rotateGesturesEnabled)
+ && MessagesPigeonInternal.deepEquals(lhs.scrollGesturesEnabled, rhs.scrollGesturesEnabled)
+ && MessagesPigeonInternal.deepEquals(lhs.tiltGesturesEnabled, rhs.tiltGesturesEnabled)
+ && MessagesPigeonInternal.deepEquals(lhs.trackCameraPosition, rhs.trackCameraPosition)
+ && MessagesPigeonInternal.deepEquals(lhs.zoomGesturesEnabled, rhs.zoomGesturesEnabled)
+ && MessagesPigeonInternal.deepEquals(lhs.myLocationEnabled, rhs.myLocationEnabled)
+ && MessagesPigeonInternal.deepEquals(lhs.myLocationButtonEnabled, rhs.myLocationButtonEnabled)
+ && MessagesPigeonInternal.deepEquals(lhs.padding, rhs.padding)
+ && MessagesPigeonInternal.deepEquals(lhs.indoorViewEnabled, rhs.indoorViewEnabled)
+ && MessagesPigeonInternal.deepEquals(lhs.trafficEnabled, rhs.trafficEnabled)
+ && MessagesPigeonInternal.deepEquals(lhs.buildingsEnabled, rhs.buildingsEnabled)
+ && MessagesPigeonInternal.deepEquals(lhs.markerType, rhs.markerType)
+ && MessagesPigeonInternal.deepEquals(lhs.mapId, rhs.mapId)
+ && MessagesPigeonInternal.deepEquals(lhs.style, rhs.style)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformMapConfiguration")
+ MessagesPigeonInternal.deepHash(value: compassEnabled, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: cameraTargetBounds, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: mapType, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: minMaxZoomPreference, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: rotateGesturesEnabled, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: scrollGesturesEnabled, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: tiltGesturesEnabled, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: trackCameraPosition, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: zoomGesturesEnabled, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: myLocationEnabled, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: myLocationButtonEnabled, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: padding, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: indoorViewEnabled, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: trafficEnabled, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: buildingsEnabled, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: markerType, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: mapId, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: style, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformMapConfiguration(compassEnabled: \(String(describing: compassEnabled)), cameraTargetBounds: \(String(describing: cameraTargetBounds)), mapType: \(String(describing: mapType)), minMaxZoomPreference: \(String(describing: minMaxZoomPreference)), rotateGesturesEnabled: \(String(describing: rotateGesturesEnabled)), scrollGesturesEnabled: \(String(describing: scrollGesturesEnabled)), tiltGesturesEnabled: \(String(describing: tiltGesturesEnabled)), trackCameraPosition: \(String(describing: trackCameraPosition)), zoomGesturesEnabled: \(String(describing: zoomGesturesEnabled)), myLocationEnabled: \(String(describing: myLocationEnabled)), myLocationButtonEnabled: \(String(describing: myLocationButtonEnabled)), padding: \(String(describing: padding)), indoorViewEnabled: \(String(describing: indoorViewEnabled)), trafficEnabled: \(String(describing: trafficEnabled)), buildingsEnabled: \(String(describing: buildingsEnabled)), markerType: \(String(describing: markerType)), mapId: \(String(describing: mapId)), style: \(String(describing: style)))"
+ }
+}
+
+/// Pigeon representation of an x,y coordinate.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformPoint: Hashable, CustomStringConvertible {
+ var x: Double
+ var y: Double
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformPoint? {
+ let x = pigeonVar_list[0] as! Double
+ let y = pigeonVar_list[1] as! Double
+
+ return PlatformPoint(
+ x: x,
+ y: y
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ x,
+ y,
+ ]
+ }
+ static func == (lhs: PlatformPoint, rhs: PlatformPoint) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.x, rhs.x)
+ && MessagesPigeonInternal.deepEquals(lhs.y, rhs.y)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformPoint")
+ MessagesPigeonInternal.deepHash(value: x, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: y, hasher: &hasher)
+ }
+
+ public var description: String {
+ return "PlatformPoint(x: \(String(describing: x)), y: \(String(describing: y)))"
+ }
+}
+
+/// Pigeon representation of a size.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformSize: Hashable, CustomStringConvertible {
+ var width: Double
+ var height: Double
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformSize? {
+ let width = pigeonVar_list[0] as! Double
+ let height = pigeonVar_list[1] as! Double
+
+ return PlatformSize(
+ width: width,
+ height: height
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ width,
+ height,
+ ]
+ }
+ static func == (lhs: PlatformSize, rhs: PlatformSize) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.width, rhs.width)
+ && MessagesPigeonInternal.deepEquals(lhs.height, rhs.height)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformSize")
+ MessagesPigeonInternal.deepHash(value: width, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: height, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformSize(width: \(String(describing: width)), height: \(String(describing: height)))"
+ }
+}
+
+/// Pigeon representation of a color.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformColor: Hashable, CustomStringConvertible {
+ var red: Double
+ var green: Double
+ var blue: Double
+ var alpha: Double
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformColor? {
+ let red = pigeonVar_list[0] as! Double
+ let green = pigeonVar_list[1] as! Double
+ let blue = pigeonVar_list[2] as! Double
+ let alpha = pigeonVar_list[3] as! Double
+
+ return PlatformColor(
+ red: red,
+ green: green,
+ blue: blue,
+ alpha: alpha
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ red,
+ green,
+ blue,
+ alpha,
+ ]
+ }
+ static func == (lhs: PlatformColor, rhs: PlatformColor) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.red, rhs.red)
+ && MessagesPigeonInternal.deepEquals(lhs.green, rhs.green)
+ && MessagesPigeonInternal.deepEquals(lhs.blue, rhs.blue)
+ && MessagesPigeonInternal.deepEquals(lhs.alpha, rhs.alpha)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformColor")
+ MessagesPigeonInternal.deepHash(value: red, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: green, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: blue, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: alpha, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformColor(red: \(String(describing: red)), green: \(String(describing: green)), blue: \(String(describing: blue)), alpha: \(String(describing: alpha)))"
+ }
+}
+
+/// Pigeon equivalent of GMSTileLayer properties.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformTileLayer: Hashable, CustomStringConvertible {
+ var visible: Bool
+ var fadeIn: Bool
+ var opacity: Double
+ var zIndex: Int64
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformTileLayer? {
+ let visible = pigeonVar_list[0] as! Bool
+ let fadeIn = pigeonVar_list[1] as! Bool
+ let opacity = pigeonVar_list[2] as! Double
+ let zIndex = pigeonVar_list[3] as! Int64
+
+ return PlatformTileLayer(
+ visible: visible,
+ fadeIn: fadeIn,
+ opacity: opacity,
+ zIndex: zIndex
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ visible,
+ fadeIn,
+ opacity,
+ zIndex,
+ ]
+ }
+ static func == (lhs: PlatformTileLayer, rhs: PlatformTileLayer) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.visible, rhs.visible)
+ && MessagesPigeonInternal.deepEquals(lhs.fadeIn, rhs.fadeIn)
+ && MessagesPigeonInternal.deepEquals(lhs.opacity, rhs.opacity)
+ && MessagesPigeonInternal.deepEquals(lhs.zIndex, rhs.zIndex)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformTileLayer")
+ MessagesPigeonInternal.deepHash(value: visible, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: fadeIn, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: opacity, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: zIndex, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformTileLayer(visible: \(String(describing: visible)), fadeIn: \(String(describing: fadeIn)), opacity: \(String(describing: opacity)), zIndex: \(String(describing: zIndex)))"
+ }
+}
+
+/// Pigeon equivalent of MinMaxZoomPreference.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformZoomRange: Hashable, CustomStringConvertible {
+ var min: Double? = nil
+ var max: Double? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformZoomRange? {
+ let min: Double? = nilOrValue(pigeonVar_list[0])
+ let max: Double? = nilOrValue(pigeonVar_list[1])
+
+ return PlatformZoomRange(
+ min: min,
+ max: max
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ min,
+ max,
+ ]
+ }
+ static func == (lhs: PlatformZoomRange, rhs: PlatformZoomRange) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.min, rhs.min)
+ && MessagesPigeonInternal.deepEquals(lhs.max, rhs.max)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformZoomRange")
+ MessagesPigeonInternal.deepHash(value: min, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: max, hasher: &hasher)
+ }
+
+ public var description: String {
+ return "PlatformZoomRange(min: \(String(describing: min)), max: \(String(describing: max)))"
+ }
+}
+
+/// Pigeon equivalent of [BitmapDescriptor].
+///
+/// Generated class from Pigeon that represents data sent in messages.
+/// This protocol should not be extended by any user class outside of the generated file.
+protocol PlatformBitmap {
+
+}
+
+/// Pigeon equivalent of [DefaultMarker].
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformBitmapDefaultMarker: PlatformBitmap {
+ var hue: Double? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformBitmapDefaultMarker? {
+ let hue: Double? = nilOrValue(pigeonVar_list[0])
+
+ return PlatformBitmapDefaultMarker(
+ hue: hue
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ hue
+ ]
+ }
+ static func == (lhs: PlatformBitmapDefaultMarker, rhs: PlatformBitmapDefaultMarker) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.hue, rhs.hue)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformBitmapDefaultMarker")
+ MessagesPigeonInternal.deepHash(value: hue, hasher: &hasher)
+ }
+
+ public var description: String {
+ return "PlatformBitmapDefaultMarker(hue: \(String(describing: hue)))"
+ }
+}
+
+/// Pigeon equivalent of [BytesBitmap].
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformBitmapBytes: PlatformBitmap {
+ var byteData: FlutterStandardTypedData
+ var size: PlatformSize? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformBitmapBytes? {
+ let byteData = pigeonVar_list[0] as! FlutterStandardTypedData
+ let size: PlatformSize? = nilOrValue(pigeonVar_list[1])
+
+ return PlatformBitmapBytes(
+ byteData: byteData,
+ size: size
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ byteData,
+ size,
+ ]
+ }
+ static func == (lhs: PlatformBitmapBytes, rhs: PlatformBitmapBytes) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.byteData, rhs.byteData)
+ && MessagesPigeonInternal.deepEquals(lhs.size, rhs.size)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformBitmapBytes")
+ MessagesPigeonInternal.deepHash(value: byteData, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: size, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformBitmapBytes(byteData: \(String(describing: byteData)), size: \(String(describing: size)))"
+ }
+}
+
+/// Pigeon equivalent of [AssetBitmap].
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformBitmapAsset: PlatformBitmap {
+ var name: String
+ var pkg: String? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformBitmapAsset? {
+ let name = pigeonVar_list[0] as! String
+ let pkg: String? = nilOrValue(pigeonVar_list[1])
+
+ return PlatformBitmapAsset(
+ name: name,
+ pkg: pkg
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ name,
+ pkg,
+ ]
+ }
+ static func == (lhs: PlatformBitmapAsset, rhs: PlatformBitmapAsset) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.name, rhs.name)
+ && MessagesPigeonInternal.deepEquals(lhs.pkg, rhs.pkg)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformBitmapAsset")
+ MessagesPigeonInternal.deepHash(value: name, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: pkg, hasher: &hasher)
+ }
+
+ public var description: String {
+ return "PlatformBitmapAsset(name: \(String(describing: name)), pkg: \(String(describing: pkg)))"
+ }
+}
+
+/// Pigeon equivalent of [AssetImageBitmap].
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformBitmapAssetImage: PlatformBitmap {
+ var name: String
+ var scale: Double
+ var size: PlatformSize? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformBitmapAssetImage? {
+ let name = pigeonVar_list[0] as! String
+ let scale = pigeonVar_list[1] as! Double
+ let size: PlatformSize? = nilOrValue(pigeonVar_list[2])
+
+ return PlatformBitmapAssetImage(
+ name: name,
+ scale: scale,
+ size: size
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ name,
+ scale,
+ size,
+ ]
+ }
+ static func == (lhs: PlatformBitmapAssetImage, rhs: PlatformBitmapAssetImage) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.name, rhs.name)
+ && MessagesPigeonInternal.deepEquals(lhs.scale, rhs.scale)
+ && MessagesPigeonInternal.deepEquals(lhs.size, rhs.size)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformBitmapAssetImage")
+ MessagesPigeonInternal.deepHash(value: name, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: scale, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: size, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformBitmapAssetImage(name: \(String(describing: name)), scale: \(String(describing: scale)), size: \(String(describing: size)))"
+ }
+}
+
+/// Pigeon equivalent of [AssetMapBitmap].
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformBitmapAssetMap: PlatformBitmap {
+ var assetName: String
+ var bitmapScaling: PlatformMapBitmapScaling
+ var imagePixelRatio: Double
+ var width: Double? = nil
+ var height: Double? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformBitmapAssetMap? {
+ let assetName = pigeonVar_list[0] as! String
+ let bitmapScaling = pigeonVar_list[1] as! PlatformMapBitmapScaling
+ let imagePixelRatio = pigeonVar_list[2] as! Double
+ let width: Double? = nilOrValue(pigeonVar_list[3])
+ let height: Double? = nilOrValue(pigeonVar_list[4])
+
+ return PlatformBitmapAssetMap(
+ assetName: assetName,
+ bitmapScaling: bitmapScaling,
+ imagePixelRatio: imagePixelRatio,
+ width: width,
+ height: height
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ assetName,
+ bitmapScaling,
+ imagePixelRatio,
+ width,
+ height,
+ ]
+ }
+ static func == (lhs: PlatformBitmapAssetMap, rhs: PlatformBitmapAssetMap) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.assetName, rhs.assetName)
+ && MessagesPigeonInternal.deepEquals(lhs.bitmapScaling, rhs.bitmapScaling)
+ && MessagesPigeonInternal.deepEquals(lhs.imagePixelRatio, rhs.imagePixelRatio)
+ && MessagesPigeonInternal.deepEquals(lhs.width, rhs.width)
+ && MessagesPigeonInternal.deepEquals(lhs.height, rhs.height)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformBitmapAssetMap")
+ MessagesPigeonInternal.deepHash(value: assetName, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: bitmapScaling, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: imagePixelRatio, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: width, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: height, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformBitmapAssetMap(assetName: \(String(describing: assetName)), bitmapScaling: \(String(describing: bitmapScaling)), imagePixelRatio: \(String(describing: imagePixelRatio)), width: \(String(describing: width)), height: \(String(describing: height)))"
+ }
+}
+
+/// Pigeon equivalent of [BytesMapBitmap].
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformBitmapBytesMap: PlatformBitmap {
+ var byteData: FlutterStandardTypedData
+ var bitmapScaling: PlatformMapBitmapScaling
+ var imagePixelRatio: Double
+ var width: Double? = nil
+ var height: Double? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformBitmapBytesMap? {
+ let byteData = pigeonVar_list[0] as! FlutterStandardTypedData
+ let bitmapScaling = pigeonVar_list[1] as! PlatformMapBitmapScaling
+ let imagePixelRatio = pigeonVar_list[2] as! Double
+ let width: Double? = nilOrValue(pigeonVar_list[3])
+ let height: Double? = nilOrValue(pigeonVar_list[4])
+
+ return PlatformBitmapBytesMap(
+ byteData: byteData,
+ bitmapScaling: bitmapScaling,
+ imagePixelRatio: imagePixelRatio,
+ width: width,
+ height: height
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ byteData,
+ bitmapScaling,
+ imagePixelRatio,
+ width,
+ height,
+ ]
+ }
+ static func == (lhs: PlatformBitmapBytesMap, rhs: PlatformBitmapBytesMap) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.byteData, rhs.byteData)
+ && MessagesPigeonInternal.deepEquals(lhs.bitmapScaling, rhs.bitmapScaling)
+ && MessagesPigeonInternal.deepEquals(lhs.imagePixelRatio, rhs.imagePixelRatio)
+ && MessagesPigeonInternal.deepEquals(lhs.width, rhs.width)
+ && MessagesPigeonInternal.deepEquals(lhs.height, rhs.height)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformBitmapBytesMap")
+ MessagesPigeonInternal.deepHash(value: byteData, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: bitmapScaling, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: imagePixelRatio, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: width, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: height, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformBitmapBytesMap(byteData: \(String(describing: byteData)), bitmapScaling: \(String(describing: bitmapScaling)), imagePixelRatio: \(String(describing: imagePixelRatio)), width: \(String(describing: width)), height: \(String(describing: height)))"
+ }
+}
+
+/// Pigeon equivalent of [PinConfig].
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformBitmapPinConfig: PlatformBitmap {
+ var backgroundColor: PlatformColor? = nil
+ var borderColor: PlatformColor? = nil
+ var glyphColor: PlatformColor? = nil
+ var glyphTextColor: PlatformColor? = nil
+ var glyphText: String? = nil
+ var glyphBitmap: PlatformBitmap? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformBitmapPinConfig? {
+ let backgroundColor: PlatformColor? = nilOrValue(pigeonVar_list[0])
+ let borderColor: PlatformColor? = nilOrValue(pigeonVar_list[1])
+ let glyphColor: PlatformColor? = nilOrValue(pigeonVar_list[2])
+ let glyphTextColor: PlatformColor? = nilOrValue(pigeonVar_list[3])
+ let glyphText: String? = nilOrValue(pigeonVar_list[4])
+ let glyphBitmap: PlatformBitmap? = nilOrValue(pigeonVar_list[5])
+
+ return PlatformBitmapPinConfig(
+ backgroundColor: backgroundColor,
+ borderColor: borderColor,
+ glyphColor: glyphColor,
+ glyphTextColor: glyphTextColor,
+ glyphText: glyphText,
+ glyphBitmap: glyphBitmap
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ backgroundColor,
+ borderColor,
+ glyphColor,
+ glyphTextColor,
+ glyphText,
+ glyphBitmap,
+ ]
+ }
+ static func == (lhs: PlatformBitmapPinConfig, rhs: PlatformBitmapPinConfig) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.backgroundColor, rhs.backgroundColor)
+ && MessagesPigeonInternal.deepEquals(lhs.borderColor, rhs.borderColor)
+ && MessagesPigeonInternal.deepEquals(lhs.glyphColor, rhs.glyphColor)
+ && MessagesPigeonInternal.deepEquals(lhs.glyphTextColor, rhs.glyphTextColor)
+ && MessagesPigeonInternal.deepEquals(lhs.glyphText, rhs.glyphText)
+ && MessagesPigeonInternal.deepEquals(lhs.glyphBitmap, rhs.glyphBitmap)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformBitmapPinConfig")
+ MessagesPigeonInternal.deepHash(value: backgroundColor, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: borderColor, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: glyphColor, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: glyphTextColor, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: glyphText, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: glyphBitmap, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformBitmapPinConfig(backgroundColor: \(String(describing: backgroundColor)), borderColor: \(String(describing: borderColor)), glyphColor: \(String(describing: glyphColor)), glyphTextColor: \(String(describing: glyphTextColor)), glyphText: \(String(describing: glyphText)), glyphBitmap: \(String(describing: glyphBitmap)))"
+ }
+}
+
+private class MessagesPigeonCodecReader: FlutterStandardReader {
+ override func readValue(ofType type: UInt8) -> Any? {
+ switch type {
+ case 129:
+ let enumResultAsInt: Int? = nilOrValue(self.readValue() as! Int?)
+ if let enumResultAsInt = enumResultAsInt {
+ return PlatformMapType(rawValue: enumResultAsInt)
+ }
+ return nil
+ case 130:
+ let enumResultAsInt: Int? = nilOrValue(self.readValue() as! Int?)
+ if let enumResultAsInt = enumResultAsInt {
+ return PlatformMarkerCollisionBehavior(rawValue: enumResultAsInt)
+ }
+ return nil
+ case 131:
+ let enumResultAsInt: Int? = nilOrValue(self.readValue() as! Int?)
+ if let enumResultAsInt = enumResultAsInt {
+ return PlatformJointType(rawValue: enumResultAsInt)
+ }
+ return nil
+ case 132:
+ let enumResultAsInt: Int? = nilOrValue(self.readValue() as! Int?)
+ if let enumResultAsInt = enumResultAsInt {
+ return PlatformPatternItemType(rawValue: enumResultAsInt)
+ }
+ return nil
+ case 133:
+ let enumResultAsInt: Int? = nilOrValue(self.readValue() as! Int?)
+ if let enumResultAsInt = enumResultAsInt {
+ return PlatformMarkerType(rawValue: enumResultAsInt)
+ }
+ return nil
+ case 134:
+ let enumResultAsInt: Int? = nilOrValue(self.readValue() as! Int?)
+ if let enumResultAsInt = enumResultAsInt {
+ return PlatformMapBitmapScaling(rawValue: enumResultAsInt)
+ }
+ return nil
+ case 135:
+ return PlatformCameraPosition.fromList(self.readValue() as! [Any?])
+ case 136:
+ return PlatformCameraUpdateNewCameraPosition.fromList(self.readValue() as! [Any?])
+ case 137:
+ return PlatformCameraUpdateNewLatLng.fromList(self.readValue() as! [Any?])
+ case 138:
+ return PlatformCameraUpdateNewLatLngBounds.fromList(self.readValue() as! [Any?])
+ case 139:
+ return PlatformCameraUpdateNewLatLngZoom.fromList(self.readValue() as! [Any?])
+ case 140:
+ return PlatformCameraUpdateScrollBy.fromList(self.readValue() as! [Any?])
+ case 141:
+ return PlatformCameraUpdateZoomBy.fromList(self.readValue() as! [Any?])
+ case 142:
+ return PlatformCameraUpdateZoom.fromList(self.readValue() as! [Any?])
+ case 143:
+ return PlatformCameraUpdateZoomTo.fromList(self.readValue() as! [Any?])
+ case 144:
+ return PlatformCircle.fromList(self.readValue() as! [Any?])
+ case 145:
+ return PlatformHeatmap.fromList(self.readValue() as! [Any?])
+ case 146:
+ return PlatformHeatmapGradient.fromList(self.readValue() as! [Any?])
+ case 147:
+ return PlatformWeightedLatLng.fromList(self.readValue() as! [Any?])
+ case 148:
+ return PlatformInfoWindow.fromList(self.readValue() as! [Any?])
+ case 149:
+ return PlatformCluster.fromList(self.readValue() as! [Any?])
+ case 150:
+ return PlatformClusterManager.fromList(self.readValue() as! [Any?])
+ case 151:
+ return PlatformMarker.fromList(self.readValue() as! [Any?])
+ case 152:
+ return PlatformPolygon.fromList(self.readValue() as! [Any?])
+ case 153:
+ return PlatformPolyline.fromList(self.readValue() as! [Any?])
+ case 154:
+ return PlatformPatternItem.fromList(self.readValue() as! [Any?])
+ case 155:
+ return PlatformTile.fromList(self.readValue() as! [Any?])
+ case 156:
+ return PlatformTileOverlay.fromList(self.readValue() as! [Any?])
+ case 157:
+ return PlatformEdgeInsets.fromList(self.readValue() as! [Any?])
+ case 158:
+ return PlatformLatLng.fromList(self.readValue() as! [Any?])
+ case 159:
+ return PlatformLatLngBounds.fromList(self.readValue() as! [Any?])
+ case 160:
+ return PlatformCameraTargetBounds.fromList(self.readValue() as! [Any?])
+ case 161:
+ return PlatformGroundOverlay.fromList(self.readValue() as! [Any?])
+ case 162:
+ return PlatformMapViewCreationParams.fromList(self.readValue() as! [Any?])
+ case 163:
+ return PlatformMapConfiguration.fromList(self.readValue() as! [Any?])
+ case 164:
+ return PlatformPoint.fromList(self.readValue() as! [Any?])
+ case 165:
+ return PlatformSize.fromList(self.readValue() as! [Any?])
+ case 166:
+ return PlatformColor.fromList(self.readValue() as! [Any?])
+ case 167:
+ return PlatformTileLayer.fromList(self.readValue() as! [Any?])
+ case 168:
+ return PlatformZoomRange.fromList(self.readValue() as! [Any?])
+ case 169:
+ return PlatformBitmapDefaultMarker.fromList(self.readValue() as! [Any?])
+ case 170:
+ return PlatformBitmapBytes.fromList(self.readValue() as! [Any?])
+ case 171:
+ return PlatformBitmapAsset.fromList(self.readValue() as! [Any?])
+ case 172:
+ return PlatformBitmapAssetImage.fromList(self.readValue() as! [Any?])
+ case 173:
+ return PlatformBitmapAssetMap.fromList(self.readValue() as! [Any?])
+ case 174:
+ return PlatformBitmapBytesMap.fromList(self.readValue() as! [Any?])
+ case 175:
+ return PlatformBitmapPinConfig.fromList(self.readValue() as! [Any?])
+ default:
+ return super.readValue(ofType: type)
+ }
+ }
+}
+
+private class MessagesPigeonCodecWriter: FlutterStandardWriter {
+ override func writeValue(_ value: Any) {
+ if let value = value as? PlatformMapType {
+ super.writeByte(129)
+ super.writeValue(value.rawValue)
+ } else if let value = value as? PlatformMarkerCollisionBehavior {
+ super.writeByte(130)
+ super.writeValue(value.rawValue)
+ } else if let value = value as? PlatformJointType {
+ super.writeByte(131)
+ super.writeValue(value.rawValue)
+ } else if let value = value as? PlatformPatternItemType {
+ super.writeByte(132)
+ super.writeValue(value.rawValue)
+ } else if let value = value as? PlatformMarkerType {
+ super.writeByte(133)
+ super.writeValue(value.rawValue)
+ } else if let value = value as? PlatformMapBitmapScaling {
+ super.writeByte(134)
+ super.writeValue(value.rawValue)
+ } else if let value = value as? PlatformCameraPosition {
+ super.writeByte(135)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformCameraUpdateNewCameraPosition {
+ super.writeByte(136)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformCameraUpdateNewLatLng {
+ super.writeByte(137)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformCameraUpdateNewLatLngBounds {
+ super.writeByte(138)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformCameraUpdateNewLatLngZoom {
+ super.writeByte(139)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformCameraUpdateScrollBy {
+ super.writeByte(140)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformCameraUpdateZoomBy {
+ super.writeByte(141)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformCameraUpdateZoom {
+ super.writeByte(142)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformCameraUpdateZoomTo {
+ super.writeByte(143)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformCircle {
+ super.writeByte(144)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformHeatmap {
+ super.writeByte(145)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformHeatmapGradient {
+ super.writeByte(146)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformWeightedLatLng {
+ super.writeByte(147)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformInfoWindow {
+ super.writeByte(148)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformCluster {
+ super.writeByte(149)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformClusterManager {
+ super.writeByte(150)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformMarker {
+ super.writeByte(151)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformPolygon {
+ super.writeByte(152)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformPolyline {
+ super.writeByte(153)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformPatternItem {
+ super.writeByte(154)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformTile {
+ super.writeByte(155)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformTileOverlay {
+ super.writeByte(156)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformEdgeInsets {
+ super.writeByte(157)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformLatLng {
+ super.writeByte(158)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformLatLngBounds {
+ super.writeByte(159)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformCameraTargetBounds {
+ super.writeByte(160)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformGroundOverlay {
+ super.writeByte(161)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformMapViewCreationParams {
+ super.writeByte(162)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformMapConfiguration {
+ super.writeByte(163)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformPoint {
+ super.writeByte(164)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformSize {
+ super.writeByte(165)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformColor {
+ super.writeByte(166)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformTileLayer {
+ super.writeByte(167)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformZoomRange {
+ super.writeByte(168)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformBitmapDefaultMarker {
+ super.writeByte(169)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformBitmapBytes {
+ super.writeByte(170)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformBitmapAsset {
+ super.writeByte(171)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformBitmapAssetImage {
+ super.writeByte(172)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformBitmapAssetMap {
+ super.writeByte(173)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformBitmapBytesMap {
+ super.writeByte(174)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformBitmapPinConfig {
+ super.writeByte(175)
+ super.writeValue(value.toList())
+ } else {
+ super.writeValue(value)
+ }
+ }
+}
+
+private class MessagesPigeonCodecReaderWriter: FlutterStandardReaderWriter {
+ override func reader(with data: Data) -> FlutterStandardReader {
+ return MessagesPigeonCodecReader(data: data)
+ }
+
+ override func writer(with data: NSMutableData) -> FlutterStandardWriter {
+ return MessagesPigeonCodecWriter(data: data)
+ }
+}
+
+class MessagesPigeonCodec: FlutterStandardMessageCodec, @unchecked Sendable {
+ static let shared = MessagesPigeonCodec(readerWriter: MessagesPigeonCodecReaderWriter())
+}
+
+/// Interface for non-test interactions with the native SDK.
+///
+/// For test-only state queries, see [MapsInspectorApi].
+///
+/// Generated protocol from Pigeon that represents a handler of messages from Flutter.
+protocol MapsApi {
+ /// Returns once the map instance is available.
+ func waitForMap() throws
+ /// Updates the map's configuration options.
+ ///
+ /// Only non-null configuration values will result in updates; options with
+ /// null values will remain unchanged.
+ func updateWithMapConfiguration(_ configuration: PlatformMapConfiguration) throws
+ /// Updates the set of circles on the map.
+ func updateCircles(
+ adding toAdd: [PlatformCircle], changing toChange: [PlatformCircle],
+ removing idsToRemove: [String]) throws
+ /// Updates the set of heatmaps on the map.
+ func updateHeatmaps(
+ adding toAdd: [PlatformHeatmap], changing toChange: [PlatformHeatmap],
+ removing idsToRemove: [String]) throws
+ /// Updates the set of custer managers for clusters on the map.
+ func updateClusterManagers(adding toAdd: [PlatformClusterManager], removing idsToRemove: [String])
+ throws
+ /// Updates the set of markers on the map.
+ func updateMarkers(
+ adding toAdd: [PlatformMarker], changing toChange: [PlatformMarker],
+ removing idsToRemove: [String]) throws
+ /// Updates the set of polygonss on the map.
+ func updatePolygons(
+ adding toAdd: [PlatformPolygon], changing toChange: [PlatformPolygon],
+ removing idsToRemove: [String]) throws
+ /// Updates the set of polylines on the map.
+ func updatePolylines(
+ adding toAdd: [PlatformPolyline], changing toChange: [PlatformPolyline],
+ removing idsToRemove: [String]) throws
+ /// Updates the set of tile overlays on the map.
+ func updateTileOverlays(
+ adding toAdd: [PlatformTileOverlay], changing toChange: [PlatformTileOverlay],
+ removing idsToRemove: [String]) throws
+ /// Updates the set of ground overlays on the map.
+ func updateGroundOverlays(
+ adding toAdd: [PlatformGroundOverlay], changing toChange: [PlatformGroundOverlay],
+ removing idsToRemove: [String]) throws
+ /// Gets the screen coordinate for the given map location.
+ func screenCoordinates(for latLng: PlatformLatLng) throws -> PlatformPoint
+ /// Gets the map location for the given screen coordinate.
+ func latLng(for screenCoordinate: PlatformPoint) throws -> PlatformLatLng
+ /// Gets the map region currently displayed on the map.
+ func visibleMapRegion() throws -> PlatformLatLngBounds
+ /// Moves the camera according to [cameraUpdate] immediately, with no
+ /// animation.
+ func moveCamera(_ cameraUpdate: PlatformCameraUpdate) throws
+ /// Moves the camera according to [cameraUpdate], animating the update using a
+ /// duration in milliseconds if provided.
+ func animateCamera(_ cameraUpdate: PlatformCameraUpdate, duration durationMilliseconds: Int64?)
+ throws
+ /// Gets the current map zoom level.
+ func zoomLevel() throws -> Double
+ /// Show the info window for the marker with the given ID.
+ func showInfoWindowForMarker(withIdentifier markerId: String) throws
+ /// Hide the info window for the marker with the given ID.
+ func hideInfoWindowForMarker(withIdentifier markerId: String) throws
+ /// Returns true if the marker with the given ID is currently displaying its
+ /// info window.
+ func isShowingInfoWindowForMarker(withIdentifier markerId: String) throws -> Bool
+ /// Sets the style to the given map style string, where an empty string
+ /// indicates that the style should be cleared.
+ ///
+ /// If there was an error setting the style, such as an invalid style string,
+ /// returns the error message.
+ func setStyle(_ style: String) throws -> String?
+ /// Returns the error string from the last attempt to set the map style, if
+ /// any.
+ ///
+ /// This allows checking asynchronously for initial style failures, as there
+ /// is no way to return failures from map initialization.
+ func lastStyleError() throws -> String?
+ /// Clears the cache of tiles previously requseted from the tile provider.
+ func clearTileCacheForOverlay(withIdentifier tileOverlayId: String) throws
+ /// Takes a snapshot of the map and returns its image data.
+ func takeSnapshot() throws -> FlutterStandardTypedData?
+ /// Returns true if the map supports advanced markers.
+ func isAdvancedMarkersAvailable() throws -> Bool
+}
+
+/// Generated setup class from Pigeon to handle messages through the `binaryMessenger`.
+class MapsApiSetup {
+ static var codec: FlutterStandardMessageCodec { MessagesPigeonCodec.shared }
+ /// Sets up an instance of `MapsApi` to handle messages through the `binaryMessenger`.
+ static func setUp(
+ binaryMessenger: FlutterBinaryMessenger, api: MapsApi?, messageChannelSuffix: String = ""
+ ) {
+ let channelSuffix = messageChannelSuffix.count > 0 ? ".\(messageChannelSuffix)" : ""
+ /// Returns once the map instance is available.
+ let waitForMapChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.waitForMap\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ waitForMapChannel.setMessageHandler { _, reply in
+ do {
+ try api.waitForMap()
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ waitForMapChannel.setMessageHandler(nil)
+ }
+ /// Updates the map's configuration options.
+ ///
+ /// Only non-null configuration values will result in updates; options with
+ /// null values will remain unchanged.
+ let updateMapConfigurationChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMapConfiguration\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ updateMapConfigurationChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let configurationArg = args[0] as! PlatformMapConfiguration
+ do {
+ try api.updateWithMapConfiguration(configurationArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ updateMapConfigurationChannel.setMessageHandler(nil)
+ }
+ /// Updates the set of circles on the map.
+ let updateCirclesChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateCircles\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ updateCirclesChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let toAddArg = args[0] as! [PlatformCircle]
+ let toChangeArg = args[1] as! [PlatformCircle]
+ let idsToRemoveArg = args[2] as! [String]
+ do {
+ try api.updateCircles(adding: toAddArg, changing: toChangeArg, removing: idsToRemoveArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ updateCirclesChannel.setMessageHandler(nil)
+ }
+ /// Updates the set of heatmaps on the map.
+ let updateHeatmapsChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateHeatmaps\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ updateHeatmapsChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let toAddArg = args[0] as! [PlatformHeatmap]
+ let toChangeArg = args[1] as! [PlatformHeatmap]
+ let idsToRemoveArg = args[2] as! [String]
+ do {
+ try api.updateHeatmaps(adding: toAddArg, changing: toChangeArg, removing: idsToRemoveArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ updateHeatmapsChannel.setMessageHandler(nil)
+ }
+ /// Updates the set of custer managers for clusters on the map.
+ let updateClusterManagersChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateClusterManagers\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ updateClusterManagersChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let toAddArg = args[0] as! [PlatformClusterManager]
+ let idsToRemoveArg = args[1] as! [String]
+ do {
+ try api.updateClusterManagers(adding: toAddArg, removing: idsToRemoveArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ updateClusterManagersChannel.setMessageHandler(nil)
+ }
+ /// Updates the set of markers on the map.
+ let updateMarkersChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMarkers\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ updateMarkersChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let toAddArg = args[0] as! [PlatformMarker]
+ let toChangeArg = args[1] as! [PlatformMarker]
+ let idsToRemoveArg = args[2] as! [String]
+ do {
+ try api.updateMarkers(adding: toAddArg, changing: toChangeArg, removing: idsToRemoveArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ updateMarkersChannel.setMessageHandler(nil)
+ }
+ /// Updates the set of polygonss on the map.
+ let updatePolygonsChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolygons\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ updatePolygonsChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let toAddArg = args[0] as! [PlatformPolygon]
+ let toChangeArg = args[1] as! [PlatformPolygon]
+ let idsToRemoveArg = args[2] as! [String]
+ do {
+ try api.updatePolygons(adding: toAddArg, changing: toChangeArg, removing: idsToRemoveArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ updatePolygonsChannel.setMessageHandler(nil)
+ }
+ /// Updates the set of polylines on the map.
+ let updatePolylinesChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolylines\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ updatePolylinesChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let toAddArg = args[0] as! [PlatformPolyline]
+ let toChangeArg = args[1] as! [PlatformPolyline]
+ let idsToRemoveArg = args[2] as! [String]
+ do {
+ try api.updatePolylines(adding: toAddArg, changing: toChangeArg, removing: idsToRemoveArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ updatePolylinesChannel.setMessageHandler(nil)
+ }
+ /// Updates the set of tile overlays on the map.
+ let updateTileOverlaysChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateTileOverlays\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ updateTileOverlaysChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let toAddArg = args[0] as! [PlatformTileOverlay]
+ let toChangeArg = args[1] as! [PlatformTileOverlay]
+ let idsToRemoveArg = args[2] as! [String]
+ do {
+ try api.updateTileOverlays(
+ adding: toAddArg, changing: toChangeArg, removing: idsToRemoveArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ updateTileOverlaysChannel.setMessageHandler(nil)
+ }
+ /// Updates the set of ground overlays on the map.
+ let updateGroundOverlaysChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateGroundOverlays\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ updateGroundOverlaysChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let toAddArg = args[0] as! [PlatformGroundOverlay]
+ let toChangeArg = args[1] as! [PlatformGroundOverlay]
+ let idsToRemoveArg = args[2] as! [String]
+ do {
+ try api.updateGroundOverlays(
+ adding: toAddArg, changing: toChangeArg, removing: idsToRemoveArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ updateGroundOverlaysChannel.setMessageHandler(nil)
+ }
+ /// Gets the screen coordinate for the given map location.
+ let getScreenCoordinateChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getScreenCoordinate\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ getScreenCoordinateChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let latLngArg = args[0] as! PlatformLatLng
+ do {
+ let result = try api.screenCoordinates(for: latLngArg)
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ getScreenCoordinateChannel.setMessageHandler(nil)
+ }
+ /// Gets the map location for the given screen coordinate.
+ let getLatLngChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLatLng\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ getLatLngChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let screenCoordinateArg = args[0] as! PlatformPoint
+ do {
+ let result = try api.latLng(for: screenCoordinateArg)
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ getLatLngChannel.setMessageHandler(nil)
+ }
+ /// Gets the map region currently displayed on the map.
+ let getVisibleRegionChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getVisibleRegion\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ getVisibleRegionChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.visibleMapRegion()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ getVisibleRegionChannel.setMessageHandler(nil)
+ }
+ /// Moves the camera according to [cameraUpdate] immediately, with no
+ /// animation.
+ let moveCameraChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.moveCamera\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ moveCameraChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let cameraUpdateArg = args[0] as! PlatformCameraUpdate
+ do {
+ try api.moveCamera(cameraUpdateArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ moveCameraChannel.setMessageHandler(nil)
+ }
+ /// Moves the camera according to [cameraUpdate], animating the update using a
+ /// duration in milliseconds if provided.
+ let animateCameraChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.animateCamera\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ animateCameraChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let cameraUpdateArg = args[0] as! PlatformCameraUpdate
+ let durationMillisecondsArg: Int64? = nilOrValue(args[1])
+ do {
+ try api.animateCamera(cameraUpdateArg, duration: durationMillisecondsArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ animateCameraChannel.setMessageHandler(nil)
+ }
+ /// Gets the current map zoom level.
+ let getZoomLevelChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getZoomLevel\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ getZoomLevelChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.zoomLevel()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ getZoomLevelChannel.setMessageHandler(nil)
+ }
+ /// Show the info window for the marker with the given ID.
+ let showInfoWindowChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.showInfoWindow\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ showInfoWindowChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let markerIdArg = args[0] as! String
+ do {
+ try api.showInfoWindowForMarker(withIdentifier: markerIdArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ showInfoWindowChannel.setMessageHandler(nil)
+ }
+ /// Hide the info window for the marker with the given ID.
+ let hideInfoWindowChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.hideInfoWindow\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ hideInfoWindowChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let markerIdArg = args[0] as! String
+ do {
+ try api.hideInfoWindowForMarker(withIdentifier: markerIdArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ hideInfoWindowChannel.setMessageHandler(nil)
+ }
+ /// Returns true if the marker with the given ID is currently displaying its
+ /// info window.
+ let isInfoWindowShownChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isInfoWindowShown\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ isInfoWindowShownChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let markerIdArg = args[0] as! String
+ do {
+ let result = try api.isShowingInfoWindowForMarker(withIdentifier: markerIdArg)
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ isInfoWindowShownChannel.setMessageHandler(nil)
+ }
+ /// Sets the style to the given map style string, where an empty string
+ /// indicates that the style should be cleared.
+ ///
+ /// If there was an error setting the style, such as an invalid style string,
+ /// returns the error message.
+ let setStyleChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.setStyle\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ setStyleChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let styleArg = args[0] as! String
+ do {
+ let result = try api.setStyle(styleArg)
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ setStyleChannel.setMessageHandler(nil)
+ }
+ /// Returns the error string from the last attempt to set the map style, if
+ /// any.
+ ///
+ /// This allows checking asynchronously for initial style failures, as there
+ /// is no way to return failures from map initialization.
+ let getLastStyleErrorChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLastStyleError\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ getLastStyleErrorChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.lastStyleError()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ getLastStyleErrorChannel.setMessageHandler(nil)
+ }
+ /// Clears the cache of tiles previously requseted from the tile provider.
+ let clearTileCacheChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.clearTileCache\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ clearTileCacheChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let tileOverlayIdArg = args[0] as! String
+ do {
+ try api.clearTileCacheForOverlay(withIdentifier: tileOverlayIdArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ clearTileCacheChannel.setMessageHandler(nil)
+ }
+ /// Takes a snapshot of the map and returns its image data.
+ let takeSnapshotChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.takeSnapshot\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ takeSnapshotChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.takeSnapshot()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ takeSnapshotChannel.setMessageHandler(nil)
+ }
+ /// Returns true if the map supports advanced markers.
+ let isAdvancedMarkersAvailableChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isAdvancedMarkersAvailable\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ isAdvancedMarkersAvailableChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.isAdvancedMarkersAvailable()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ isAdvancedMarkersAvailableChannel.setMessageHandler(nil)
+ }
+ }
+}
+
+/// Interface for calls from the native SDK to Dart.
+///
+/// Generated protocol from Pigeon that represents Flutter messages that can be called from Swift.
+protocol MapsCallbackApiProtocol {
+ /// Called when the map camera starts moving.
+ func didStartCameraMove(completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when the map camera moves.
+ func didMoveCamera(
+ to cameraPositionArg: PlatformCameraPosition,
+ completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when the map camera stops moving.
+ func didIdleCamera(completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when the map, not a specifc map object, is tapped.
+ func didTap(
+ at positionArg: PlatformLatLng, completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when the map, not a specifc map object, is long pressed.
+ func didLongPress(
+ at positionArg: PlatformLatLng, completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when a marker is tapped.
+ func didTapMarker(
+ withIdentifier markerIdArg: String, completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when a marker drag starts.
+ func didStartDragForMarker(
+ withIdentifier markerIdArg: String, at positionArg: PlatformLatLng,
+ completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when a marker drag updates.
+ func didDragMarker(
+ withIdentifier markerIdArg: String, at positionArg: PlatformLatLng,
+ completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when a marker drag ends.
+ func didEndDragForMarker(
+ withIdentifier markerIdArg: String, at positionArg: PlatformLatLng,
+ completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when a marker's info window is tapped.
+ func didTapInfoWindowOfMarker(
+ withIdentifier markerIdArg: String, completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when a circle is tapped.
+ func didTapCircle(
+ withIdentifier circleIdArg: String, completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when a marker cluster is tapped.
+ func didTapCluster(
+ _ clusterArg: PlatformCluster, completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when a polygon is tapped.
+ func didTapPolygon(
+ withIdentifier polygonIdArg: String, completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when a polyline is tapped.
+ func didTapPolyline(
+ withIdentifier polylineIdArg: String, completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when a ground overlay is tapped.
+ func didTapGroundOverlay(
+ withIdentifier groundOverlayIdArg: String,
+ completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called to get data for a map tile.
+ func tile(
+ withOverlayIdentifier tileOverlayIdArg: String, location locationArg: PlatformPoint,
+ zoom zoomArg: Int64, completion: @escaping (Result<PlatformTile, PigeonError>) -> Void)
+}
+class MapsCallbackApi: MapsCallbackApiProtocol {
+ private let binaryMessenger: FlutterBinaryMessenger
+ private let messageChannelSuffix: String
+ init(binaryMessenger: FlutterBinaryMessenger, messageChannelSuffix: String = "") {
+ self.binaryMessenger = binaryMessenger
+ self.messageChannelSuffix = messageChannelSuffix.count > 0 ? ".\(messageChannelSuffix)" : ""
+ }
+ var codec: MessagesPigeonCodec {
+ return MessagesPigeonCodec.shared
+ }
+ /// Called when the map camera starts moving.
+ func didStartCameraMove(completion: @escaping (Result<Void, PigeonError>) -> Void) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMoveStarted\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage(nil) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when the map camera moves.
+ func didMoveCamera(
+ to cameraPositionArg: PlatformCameraPosition,
+ completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([cameraPositionArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when the map camera stops moving.
+ func didIdleCamera(completion: @escaping (Result<Void, PigeonError>) -> Void) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraIdle\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage(nil) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when the map, not a specifc map object, is tapped.
+ func didTap(
+ at positionArg: PlatformLatLng, completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([positionArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when the map, not a specifc map object, is long pressed.
+ func didLongPress(
+ at positionArg: PlatformLatLng, completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([positionArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when a marker is tapped.
+ func didTapMarker(
+ withIdentifier markerIdArg: String, completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([markerIdArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when a marker drag starts.
+ func didStartDragForMarker(
+ withIdentifier markerIdArg: String, at positionArg: PlatformLatLng,
+ completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([markerIdArg, positionArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when a marker drag updates.
+ func didDragMarker(
+ withIdentifier markerIdArg: String, at positionArg: PlatformLatLng,
+ completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([markerIdArg, positionArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when a marker drag ends.
+ func didEndDragForMarker(
+ withIdentifier markerIdArg: String, at positionArg: PlatformLatLng,
+ completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([markerIdArg, positionArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when a marker's info window is tapped.
+ func didTapInfoWindowOfMarker(
+ withIdentifier markerIdArg: String, completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([markerIdArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when a circle is tapped.
+ func didTapCircle(
+ withIdentifier circleIdArg: String, completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([circleIdArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when a marker cluster is tapped.
+ func didTapCluster(
+ _ clusterArg: PlatformCluster, completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([clusterArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when a polygon is tapped.
+ func didTapPolygon(
+ withIdentifier polygonIdArg: String, completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([polygonIdArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when a polyline is tapped.
+ func didTapPolyline(
+ withIdentifier polylineIdArg: String, completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([polylineIdArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when a ground overlay is tapped.
+ func didTapGroundOverlay(
+ withIdentifier groundOverlayIdArg: String,
+ completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([groundOverlayIdArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called to get data for a map tile.
+ func tile(
+ withOverlayIdentifier tileOverlayIdArg: String, location locationArg: PlatformPoint,
+ zoom zoomArg: Int64, completion: @escaping (Result<PlatformTile, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([tileOverlayIdArg, locationArg, zoomArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else if listResponse[0] == nil {
+ completion(
+ .failure(
+ PigeonError(
+ code: "null-error",
+ message: "Flutter api returned null value for non-null return value.", details: "")))
+ } else {
+ let result = listResponse[0] as! PlatformTile
+ completion(.success(result))
+ }
+ }
+ }
+}
+/// Dummy interface to force generation of the platform view creation params,
+/// which are not used in any Pigeon calls, only the platform view creation
+/// call made internally by Flutter.
+///
+/// Generated protocol from Pigeon that represents a handler of messages from Flutter.
+protocol MapsPlatformViewApi {
+ func createView(type: PlatformMapViewCreationParams?) throws
+}
+
+/// Generated setup class from Pigeon to handle messages through the `binaryMessenger`.
+class MapsPlatformViewApiSetup {
+ static var codec: FlutterStandardMessageCodec { MessagesPigeonCodec.shared }
+ /// Sets up an instance of `MapsPlatformViewApi` to handle messages through the `binaryMessenger`.
+ static func setUp(
+ binaryMessenger: FlutterBinaryMessenger, api: MapsPlatformViewApi?,
+ messageChannelSuffix: String = ""
+ ) {
+ let channelSuffix = messageChannelSuffix.count > 0 ? ".\(messageChannelSuffix)" : ""
+ let createViewChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsPlatformViewApi.createView\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ createViewChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let typeArg: PlatformMapViewCreationParams? = nilOrValue(args[0])
+ do {
+ try api.createView(type: typeArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ createViewChannel.setMessageHandler(nil)
+ }
+ }
+}
+/// Inspector API only intended for use in integration tests.
+///
+/// Generated protocol from Pigeon that represents a handler of messages from Flutter.
+protocol MapsInspectorApi {
+ func areBuildingsEnabled() throws -> Bool
+ func areRotateGesturesEnabled() throws -> Bool
+ func areScrollGesturesEnabled() throws -> Bool
+ func areTiltGesturesEnabled() throws -> Bool
+ func areZoomGesturesEnabled() throws -> Bool
+ func isCompassEnabled() throws -> Bool
+ func isMyLocationButtonEnabled() throws -> Bool
+ func isTrafficEnabled() throws -> Bool
+ func tileOverlay(withIdentifier tileOverlayId: String) throws -> PlatformTileLayer?
+ func groundOverlay(withIdentifier groundOverlayId: String) throws -> PlatformGroundOverlay?
+ func heatmap(withIdentifier heatmapId: String) throws -> PlatformHeatmap?
+ func zoomRange() throws -> PlatformZoomRange
+ func clusters(withIdentifier clusterManagerId: String) throws -> [PlatformCluster]
+ func cameraPosition() throws -> PlatformCameraPosition
+}
+
+/// Generated setup class from Pigeon to handle messages through the `binaryMessenger`.
+class MapsInspectorApiSetup {
+ static var codec: FlutterStandardMessageCodec { MessagesPigeonCodec.shared }
+ /// Sets up an instance of `MapsInspectorApi` to handle messages through the `binaryMessenger`.
+ static func setUp(
+ binaryMessenger: FlutterBinaryMessenger, api: MapsInspectorApi?,
+ messageChannelSuffix: String = ""
+ ) {
+ let channelSuffix = messageChannelSuffix.count > 0 ? ".\(messageChannelSuffix)" : ""
+ let areBuildingsEnabledChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areBuildingsEnabled\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ areBuildingsEnabledChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.areBuildingsEnabled()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ areBuildingsEnabledChannel.setMessageHandler(nil)
+ }
+ let areRotateGesturesEnabledChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areRotateGesturesEnabled\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ areRotateGesturesEnabledChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.areRotateGesturesEnabled()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ areRotateGesturesEnabledChannel.setMessageHandler(nil)
+ }
+ let areScrollGesturesEnabledChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areScrollGesturesEnabled\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ areScrollGesturesEnabledChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.areScrollGesturesEnabled()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ areScrollGesturesEnabledChannel.setMessageHandler(nil)
+ }
+ let areTiltGesturesEnabledChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areTiltGesturesEnabled\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ areTiltGesturesEnabledChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.areTiltGesturesEnabled()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ areTiltGesturesEnabledChannel.setMessageHandler(nil)
+ }
+ let areZoomGesturesEnabledChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areZoomGesturesEnabled\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ areZoomGesturesEnabledChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.areZoomGesturesEnabled()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ areZoomGesturesEnabledChannel.setMessageHandler(nil)
+ }
+ let isCompassEnabledChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isCompassEnabled\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ isCompassEnabledChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.isCompassEnabled()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ isCompassEnabledChannel.setMessageHandler(nil)
+ }
+ let isMyLocationButtonEnabledChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isMyLocationButtonEnabled\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ isMyLocationButtonEnabledChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.isMyLocationButtonEnabled()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ isMyLocationButtonEnabledChannel.setMessageHandler(nil)
+ }
+ let isTrafficEnabledChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isTrafficEnabled\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ isTrafficEnabledChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.isTrafficEnabled()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ isTrafficEnabledChannel.setMessageHandler(nil)
+ }
+ let getTileOverlayInfoChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getTileOverlayInfo\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ getTileOverlayInfoChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let tileOverlayIdArg = args[0] as! String
+ do {
+ let result = try api.tileOverlay(withIdentifier: tileOverlayIdArg)
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ getTileOverlayInfoChannel.setMessageHandler(nil)
+ }
+ let getGroundOverlayInfoChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getGroundOverlayInfo\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ getGroundOverlayInfoChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let groundOverlayIdArg = args[0] as! String
+ do {
+ let result = try api.groundOverlay(withIdentifier: groundOverlayIdArg)
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ getGroundOverlayInfoChannel.setMessageHandler(nil)
+ }
+ let getHeatmapInfoChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getHeatmapInfo\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ getHeatmapInfoChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let heatmapIdArg = args[0] as! String
+ do {
+ let result = try api.heatmap(withIdentifier: heatmapIdArg)
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ getHeatmapInfoChannel.setMessageHandler(nil)
+ }
+ let getZoomRangeChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getZoomRange\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ getZoomRangeChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.zoomRange()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ getZoomRangeChannel.setMessageHandler(nil)
+ }
+ let getClustersChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getClusters\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ getClustersChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let clusterManagerIdArg = args[0] as! String
+ do {
+ let result = try api.clusters(withIdentifier: clusterManagerIdArg)
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ getClustersChannel.setMessageHandler(nil)
+ }
+ let getCameraPositionChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getCameraPosition\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ getCameraPositionChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.cameraPosition()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ getCameraPositionChannel.setMessageHandler(nil)
+ }
+ }
+}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/PolygonController.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/PolygonController.swift
index ab5c166..2677978 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/PolygonController.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/PolygonController.swift
@@ -4,12 +4,8 @@
import GoogleMaps
-#if canImport(google_maps_flutter_ios_sdk10_objc)
- import google_maps_flutter_ios_sdk10_objc
-#endif
-
/// Defines polygon controllable by Flutter.
-class PolygonController: NSObject {
+class PolygonController {
let polygon: GMSPolygon
private weak var mapView: GMSMapView?
@@ -17,33 +13,34 @@
self.polygon = GMSPolygon()
self.mapView = mapView
self.polygon.userData = [identifier]
- super.init()
}
func removePolygon() {
polygon.map = nil
}
- /// Updates the controller's polygon with the properties from a FGMPlatformPolygon.
+ /// Updates the controller's polygon with the properties from a PlatformPolygon.
///
/// Setting the polygon to visible will set its map to the controller's mapView.
- func update(from platformPolygon: FGMPlatformPolygon) {
+ func update(from platformPolygon: PlatformPolygon) {
if let mapView = mapView {
PolygonController.update(polygon, from: platformPolygon, with: mapView)
}
}
- /// Updates the given GMSPolygon with the properties from a FGMPlatformPolygon.
+ /// Updates the given GMSPolygon with the properties from a PlatformPolygon.
///
/// Setting the polygon to visible will set its map to the given mapView.
static func update(
- _ polygon: GMSPolygon, from platformPolygon: FGMPlatformPolygon, with mapView: GMSMapView
+ _ polygon: GMSPolygon,
+ from platformPolygon: PlatformPolygon,
+ with mapView: GMSMapView
) {
polygon.isTappable = platformPolygon.consumesTapEvents
polygon.zIndex = Int32(platformPolygon.zIndex)
- polygon.path = makePath(from: platformPolygon.points.map({ $0.toCLLocationCoordinate2D() }))
+ polygon.path = makePath(from: platformPolygon.points.map { $0.toCLLocationCoordinate2D() })
polygon.holes = platformPolygon.holes.map {
- makePath(from: $0.map({ $0.toCLLocationCoordinate2D() }))
+ makePath(from: $0.map { $0.toCLLocationCoordinate2D() })
}
polygon.fillColor = platformPolygon.fillColor.toUIColor()
polygon.strokeColor = platformPolygon.strokeColor.toUIColor()
@@ -54,18 +51,17 @@
}
}
-class PolygonsController: NSObject {
+class PolygonsController {
private var polygonIdentifierToController: [String: PolygonController] = [:]
- private weak var eventDelegate: FGMMapEventDelegate?
+ private weak var eventDelegate: MapEventDelegate?
private weak var mapView: GMSMapView?
- init(mapView: GMSMapView, eventDelegate: FGMMapEventDelegate) {
+ init(mapView: GMSMapView, eventDelegate: MapEventDelegate) {
self.mapView = mapView
self.eventDelegate = eventDelegate
- super.init()
}
- func add(_ polygons: [FGMPlatformPolygon]) {
+ func add(_ polygons: [PlatformPolygon]) {
guard let mapView = mapView else { return }
for polygon in polygons {
let identifier = polygon.polygonId
@@ -77,7 +73,7 @@
}
}
- func change(_ polygons: [FGMPlatformPolygon]) {
+ func change(_ polygons: [PlatformPolygon]) {
for polygon in polygons {
let identifier = polygon.polygonId
polygonIdentifierToController[identifier]?.update(from: polygon)
@@ -95,7 +91,7 @@
func didTapPolygon(withIdentifier identifier: String) {
if hasPolygon(withIdentifier: identifier) {
- eventDelegate?.didTapPolygon(withIdentifier: identifier)
+ eventDelegate?.didTapPolygon(withIdentifier: identifier) { _ in }
}
}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/PolylineController.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/PolylineController.swift
index 278c6a3..51c198f 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/PolylineController.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/PolylineController.swift
@@ -4,12 +4,8 @@
import GoogleMaps
-#if canImport(google_maps_flutter_ios_sdk10_objc)
- import google_maps_flutter_ios_sdk10_objc
-#endif
-
/// Defines polyline controllable by Flutter.
-class PolylineController: NSObject {
+class PolylineController {
let polyline: GMSPolyline
private weak var mapView: GMSMapView?
@@ -17,31 +13,32 @@
self.polyline = GMSPolyline()
self.mapView = mapView
self.polyline.userData = [identifier]
- super.init()
}
func removePolyline() {
polyline.map = nil
}
- /// Updates the controller's polyline with the properties from a FGMPlatformPolyline.
+ /// Updates the controller's polyline with the properties from a PlatformPolyline.
///
/// Setting the polyline to visible will set its map to the controller's mapView.
- func update(from platformPolyline: FGMPlatformPolyline) {
+ func update(from platformPolyline: PlatformPolyline) {
if let mapView = mapView {
PolylineController.update(polyline, from: platformPolyline, with: mapView)
}
}
- /// Updates the given GMSPolyline with the properties from a FGMPlatformPolyline.
+ /// Updates the given GMSPolyline with the properties from a PlatformPolyline.
///
/// Setting the polyline to visible will set its map to the given mapView.
static func update(
- _ polyline: GMSPolyline, from platformPolyline: FGMPlatformPolyline, with mapView: GMSMapView
+ _ polyline: GMSPolyline,
+ from platformPolyline: PlatformPolyline,
+ with mapView: GMSMapView
) {
polyline.isTappable = platformPolyline.consumesTapEvents
polyline.zIndex = Int32(platformPolyline.zIndex)
- let gmsPath = makePath(from: platformPolyline.points.map({ $0.toCLLocationCoordinate2D() }))
+ let gmsPath = makePath(from: platformPolyline.points.map { $0.toCLLocationCoordinate2D() })
polyline.path = gmsPath
let strokeColor = platformPolyline.color.toUIColor()
polyline.strokeColor = strokeColor
@@ -59,18 +56,17 @@
}
}
-class PolylinesController: NSObject {
+class PolylinesController {
private var polylineIdentifierToController: [String: PolylineController] = [:]
- private weak var eventDelegate: FGMMapEventDelegate?
+ private weak var eventDelegate: MapEventDelegate?
private weak var mapView: GMSMapView?
- init(mapView: GMSMapView, eventDelegate: FGMMapEventDelegate) {
+ init(mapView: GMSMapView, eventDelegate: MapEventDelegate) {
self.mapView = mapView
self.eventDelegate = eventDelegate
- super.init()
}
- func add(_ polylines: [FGMPlatformPolyline]) {
+ func add(_ polylines: [PlatformPolyline]) {
guard let mapView = mapView else { return }
for polyline in polylines {
let identifier = polyline.polylineId
@@ -82,7 +78,7 @@
}
}
- func change(_ polylines: [FGMPlatformPolyline]) {
+ func change(_ polylines: [PlatformPolyline]) {
for polyline in polylines {
let identifier = polyline.polylineId
polylineIdentifierToController[identifier]?.update(from: polyline)
@@ -100,7 +96,7 @@
func didTapPolyline(withIdentifier identifier: String) {
if hasPolyline(withIdentifier: identifier) {
- eventDelegate?.didTapPolyline(withIdentifier: identifier)
+ eventDelegate?.didTapPolyline(withIdentifier: identifier) { _ in }
}
}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/TileOverlayController.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/TileOverlayController.swift
index 11f159e..3dc37d4 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/TileOverlayController.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/TileOverlayController.swift
@@ -6,31 +6,24 @@
import GoogleMaps
import UIKit
-#if canImport(google_maps_flutter_ios_sdk10_objc)
- import google_maps_flutter_ios_sdk10_objc
-#endif
-
/// Protocol for requesting tiles from the Dart side.
-// TODO(stuartmorgan): Adjust this to match the Swift API once the Pigeon
-// generation is switched to Swift.
protocol TileProviderDelegate: AnyObject {
func tile(
withOverlayIdentifier tileOverlayId: String,
- location: FGMPlatformPoint,
- zoom: Int,
- completion: @escaping (FGMPlatformTile?, FlutterError?) -> Void
+ location: PlatformPoint,
+ zoom: Int64,
+ completion: @escaping (Result<PlatformTile, PigeonError>) -> Void
)
}
/// Controller of a single tile overlay on the map.
-class TileOverlayController: NSObject {
+class TileOverlayController {
let layer: GMSTileLayer
private weak var mapView: GMSMapView?
- init(tileOverlay: FGMPlatformTileOverlay, tileLayer: GMSTileLayer, mapView: GMSMapView) {
+ init(tileOverlay: PlatformTileOverlay, tileLayer: GMSTileLayer, mapView: GMSMapView) {
self.layer = tileLayer
self.mapView = mapView
- super.init()
TileOverlayController.update(tileLayer, from: tileOverlay, with: mapView)
}
@@ -42,21 +35,21 @@
layer.clearTileCache()
}
- /// Updates the controller's tile overlay with the properties from a FGMPlatformTileOverlay.
+ /// Updates the controller's tile overlay with the properties from a PlatformTileOverlay.
///
/// Setting the tile overlay to visible will set its map to the controller's mapView.
- func update(from overlay: FGMPlatformTileOverlay) {
+ func update(from overlay: PlatformTileOverlay) {
if let mapView = mapView {
TileOverlayController.update(layer, from: overlay, with: mapView)
}
}
- /// Updates the given GMSTileLayer with the properties from a FGMPlatformTileOverlay.
+ /// Updates the given GMSTileLayer with the properties from a PlatformTileOverlay.
///
/// Setting the tile overlay to visible will set its map to the given mapView.
static func update(
_ tileLayer: GMSTileLayer,
- from platformOverlay: FGMPlatformTileOverlay,
+ from platformOverlay: PlatformTileOverlay,
with mapView: GMSMapView
) {
tileLayer.opacity = Float(1.0 - platformOverlay.transparency)
@@ -121,21 +114,20 @@
}
tileProviderDelegate.tile(
withOverlayIdentifier: self.tileOverlayIdentifier,
- location: FGMPlatformPoint.makeWith(x: Double(x), y: Double(y)),
- zoom: Int(zoom)
- ) { [weak self] tile, error in
+ location: PlatformPoint(x: Double(x), y: Double(y)),
+ zoom: Int64(zoom)
+ ) { [weak self] result in
guard let self = self else {
receiver.receiveTileWith(x: x, y: y, zoom: zoom, image: kGMSTileLayerNoTile)
return
}
- let typedData = tile?.data
- let tileImage: UIImage
- if let data = typedData?.data {
- tileImage = self.handleResultTile(UIImage(data: data)) ?? kGMSTileLayerNoTile
- } else {
- tileImage = kGMSTileLayerNoTile
- }
- if let error = error {
+ var tileImage = kGMSTileLayerNoTile
+ switch result {
+ case .success(let tile):
+ if let data = tile.data?.data {
+ tileImage = self.handleResultTile(UIImage(data: data)) ?? kGMSTileLayerNoTile
+ }
+ case .failure(let error):
NSLog(
"Can't get tile: errorCode = \(error.code), errorMessage = \(error.message ?? "nil"), details = \(error.details ?? "nil")"
)
@@ -147,7 +139,7 @@
}
/// Controller of multiple tile overlays on the map.
-class TileOverlaysController: NSObject {
+class TileOverlaysController {
private var tileOverlayIdentifierToController: [String: TileOverlayController] = [:]
private weak var tileProviderDelegate: TileProviderDelegate?
private weak var mapView: GMSMapView?
@@ -155,10 +147,9 @@
init(mapView: GMSMapView, tileProvider: TileProviderDelegate) {
self.mapView = mapView
self.tileProviderDelegate = tileProvider
- super.init()
}
- func add(_ tileOverlaysToAdd: [FGMPlatformTileOverlay]) {
+ func add(_ tileOverlaysToAdd: [PlatformTileOverlay]) {
guard let mapView = mapView, let tileProviderDelegate = tileProviderDelegate else { return }
for tileOverlay in tileOverlaysToAdd {
let identifier = tileOverlay.tileOverlayId
@@ -175,7 +166,7 @@
}
}
- func change(_ tileOverlaysToChange: [FGMPlatformTileOverlay]) {
+ func change(_ tileOverlaysToChange: [PlatformTileOverlay]) {
for tileOverlay in tileOverlaysToChange {
let identifier = tileOverlay.tileOverlayId
tileOverlayIdentifierToController[identifier]?.update(from: tileOverlay)
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10_objc/FGMCATransactionWrapper.m b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10_objc/FGMCATransactionWrapper.m
deleted file mode 100644
index 5fb79de..0000000
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10_objc/FGMCATransactionWrapper.m
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2013 The Flutter Authors
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#import "FGMCATransactionWrapper.h"
-
-@import QuartzCore;
-
-@implementation FGMCATransactionWrapper
-
-- (void)begin {
- [CATransaction begin];
-}
-
-- (void)commit {
- [CATransaction commit];
-}
-
-- (void)setAnimationDuration:(CFTimeInterval)duration {
- [CATransaction setAnimationDuration:duration];
-}
-
-@end
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10_objc/google_maps_flutter_pigeon_messages.g.m b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10_objc/google_maps_flutter_pigeon_messages.g.m
deleted file mode 100644
index 205bc2a..0000000
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10_objc/google_maps_flutter_pigeon_messages.g.m
+++ /dev/null
@@ -1,4849 +0,0 @@
-// Copyright 2013 The Flutter Authors
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-// Autogenerated from Pigeon (v27.3.2), do not edit directly.
-// See also: https://pub.dev/packages/pigeon
-
-#import "google_maps_flutter_pigeon_messages.g.h"
-
-#if TARGET_OS_OSX
-@import FlutterMacOS;
-#else
-@import Flutter;
-#endif
-
-static BOOL __attribute__((unused)) FLTPigeonDeepEquals(id _Nullable a, id _Nullable b) {
- if (a == b) {
- return YES;
- }
- if (a == nil) {
- return b == [NSNull null];
- }
- if (b == nil) {
- return a == [NSNull null];
- }
- if ([a isKindOfClass:[NSNumber class]] && [b isKindOfClass:[NSNumber class]]) {
- return
- [a isEqual:b] || (isnan([(NSNumber *)a doubleValue]) && isnan([(NSNumber *)b doubleValue]));
- }
- if ([a isKindOfClass:[NSArray class]] && [b isKindOfClass:[NSArray class]]) {
- NSArray *arrayA = (NSArray *)a;
- NSArray *arrayB = (NSArray *)b;
- if (arrayA.count != arrayB.count) {
- return NO;
- }
- for (NSUInteger i = 0; i < arrayA.count; i++) {
- if (!FLTPigeonDeepEquals(arrayA[i], arrayB[i])) {
- return NO;
- }
- }
- return YES;
- }
- if ([a isKindOfClass:[NSDictionary class]] && [b isKindOfClass:[NSDictionary class]]) {
- NSDictionary *dictA = (NSDictionary *)a;
- NSDictionary *dictB = (NSDictionary *)b;
- if (dictA.count != dictB.count) {
- return NO;
- }
- for (id keyA in dictA) {
- id valueA = dictA[keyA];
- BOOL found = NO;
- for (id keyB in dictB) {
- if (FLTPigeonDeepEquals(keyA, keyB)) {
- id valueB = dictB[keyB];
- if (FLTPigeonDeepEquals(valueA, valueB)) {
- found = YES;
- break;
- } else {
- return NO;
- }
- }
- }
- if (!found) {
- return NO;
- }
- }
- return YES;
- }
- return [a isEqual:b];
-}
-
-static NSUInteger __attribute__((unused)) FLTPigeonDeepHash(id _Nullable value) {
- if (value == nil || value == (id)[NSNull null]) {
- return 0;
- }
- if ([value isKindOfClass:[NSNumber class]]) {
- NSNumber *n = (NSNumber *)value;
- double d = n.doubleValue;
- if (isnan(d)) {
- // Normalize NaN to a consistent hash.
- return (NSUInteger)0x7FF8000000000000;
- }
- if (d == 0.0) {
- // Normalize -0.0 to 0.0 so they have the same hash code.
- d = 0.0;
- }
- return @(d).hash;
- }
- if ([value isKindOfClass:[NSArray class]]) {
- NSUInteger result = 1;
- for (id item in (NSArray *)value) {
- result = result * 31 + FLTPigeonDeepHash(item);
- }
- return result;
- }
- if ([value isKindOfClass:[NSDictionary class]]) {
- NSUInteger result = 0;
- NSDictionary *dict = (NSDictionary *)value;
- for (id key in dict) {
- result += ((FLTPigeonDeepHash(key) * 31) ^ FLTPigeonDeepHash(dict[key]));
- }
- return result;
- }
- return [value hash];
-}
-
-static NSArray<id> *wrapResult(id result, FlutterError *error) {
- if (error) {
- return @[
- error.code ?: [NSNull null], error.message ?: [NSNull null], error.details ?: [NSNull null]
- ];
- }
- return @[ result ?: [NSNull null] ];
-}
-
-static FlutterError *createConnectionError(NSString *channelName) {
- return [FlutterError
- errorWithCode:@"channel-error"
- message:[NSString stringWithFormat:@"%@/%@/%@",
- @"Unable to establish connection on channel: '",
- channelName, @"'."]
- details:@""];
-}
-
-static id GetNullableObjectAtIndex(NSArray<id> *array, NSInteger key) {
- id result = array[key];
- return (result == [NSNull null]) ? nil : result;
-}
-
-/// Pigeon equivalent of MapType
-@implementation FGMPlatformMapTypeBox
-- (instancetype)initWithValue:(FGMPlatformMapType)value {
- self = [super init];
- if (self) {
- _value = value;
- }
- return self;
-}
-@end
-
-/// Pigeon equivalent of the MarkerCollisionBehavior enum.
-@implementation FGMPlatformMarkerCollisionBehaviorBox
-- (instancetype)initWithValue:(FGMPlatformMarkerCollisionBehavior)value {
- self = [super init];
- if (self) {
- _value = value;
- }
- return self;
-}
-@end
-
-/// Join types for polyline joints.
-@implementation FGMPlatformJointTypeBox
-- (instancetype)initWithValue:(FGMPlatformJointType)value {
- self = [super init];
- if (self) {
- _value = value;
- }
- return self;
-}
-@end
-
-/// Enumeration of possible types for PatternItem.
-@implementation FGMPlatformPatternItemTypeBox
-- (instancetype)initWithValue:(FGMPlatformPatternItemType)value {
- self = [super init];
- if (self) {
- _value = value;
- }
- return self;
-}
-@end
-
-@implementation FGMPlatformMarkerTypeBox
-- (instancetype)initWithValue:(FGMPlatformMarkerType)value {
- self = [super init];
- if (self) {
- _value = value;
- }
- return self;
-}
-@end
-
-/// Pigeon equivalent of [MapBitmapScaling].
-@implementation FGMPlatformMapBitmapScalingBox
-- (instancetype)initWithValue:(FGMPlatformMapBitmapScaling)value {
- self = [super init];
- if (self) {
- _value = value;
- }
- return self;
-}
-@end
-
-@interface FGMPlatformCameraPosition ()
-+ (FGMPlatformCameraPosition *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformCameraPosition *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformCameraUpdate ()
-+ (FGMPlatformCameraUpdate *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformCameraUpdate *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformCameraUpdateNewCameraPosition ()
-+ (FGMPlatformCameraUpdateNewCameraPosition *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformCameraUpdateNewCameraPosition *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformCameraUpdateNewLatLng ()
-+ (FGMPlatformCameraUpdateNewLatLng *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformCameraUpdateNewLatLng *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformCameraUpdateNewLatLngBounds ()
-+ (FGMPlatformCameraUpdateNewLatLngBounds *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformCameraUpdateNewLatLngBounds *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformCameraUpdateNewLatLngZoom ()
-+ (FGMPlatformCameraUpdateNewLatLngZoom *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformCameraUpdateNewLatLngZoom *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformCameraUpdateScrollBy ()
-+ (FGMPlatformCameraUpdateScrollBy *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformCameraUpdateScrollBy *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformCameraUpdateZoomBy ()
-+ (FGMPlatformCameraUpdateZoomBy *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformCameraUpdateZoomBy *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformCameraUpdateZoom ()
-+ (FGMPlatformCameraUpdateZoom *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformCameraUpdateZoom *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformCameraUpdateZoomTo ()
-+ (FGMPlatformCameraUpdateZoomTo *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformCameraUpdateZoomTo *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformCircle ()
-+ (FGMPlatformCircle *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformCircle *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformHeatmap ()
-+ (FGMPlatformHeatmap *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformHeatmap *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformHeatmapGradient ()
-+ (FGMPlatformHeatmapGradient *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformHeatmapGradient *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformWeightedLatLng ()
-+ (FGMPlatformWeightedLatLng *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformWeightedLatLng *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformInfoWindow ()
-+ (FGMPlatformInfoWindow *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformInfoWindow *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformCluster ()
-+ (FGMPlatformCluster *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformCluster *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformClusterManager ()
-+ (FGMPlatformClusterManager *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformClusterManager *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformMarker ()
-+ (FGMPlatformMarker *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformMarker *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformPolygon ()
-+ (FGMPlatformPolygon *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformPolygon *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformPolyline ()
-+ (FGMPlatformPolyline *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformPolyline *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformPatternItem ()
-+ (FGMPlatformPatternItem *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformPatternItem *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformTile ()
-+ (FGMPlatformTile *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformTile *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformTileOverlay ()
-+ (FGMPlatformTileOverlay *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformTileOverlay *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformEdgeInsets ()
-+ (FGMPlatformEdgeInsets *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformEdgeInsets *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformLatLng ()
-+ (FGMPlatformLatLng *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformLatLng *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformLatLngBounds ()
-+ (FGMPlatformLatLngBounds *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformLatLngBounds *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformCameraTargetBounds ()
-+ (FGMPlatformCameraTargetBounds *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformCameraTargetBounds *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformGroundOverlay ()
-+ (FGMPlatformGroundOverlay *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformGroundOverlay *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformMapViewCreationParams ()
-+ (FGMPlatformMapViewCreationParams *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformMapViewCreationParams *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformMapConfiguration ()
-+ (FGMPlatformMapConfiguration *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformMapConfiguration *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformPoint ()
-+ (FGMPlatformPoint *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformPoint *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformSize ()
-+ (FGMPlatformSize *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformSize *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformColor ()
-+ (FGMPlatformColor *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformColor *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformTileLayer ()
-+ (FGMPlatformTileLayer *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformTileLayer *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformZoomRange ()
-+ (FGMPlatformZoomRange *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformZoomRange *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformBitmap ()
-+ (FGMPlatformBitmap *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformBitmap *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformBitmapDefaultMarker ()
-+ (FGMPlatformBitmapDefaultMarker *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformBitmapDefaultMarker *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformBitmapBytes ()
-+ (FGMPlatformBitmapBytes *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformBitmapBytes *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformBitmapAsset ()
-+ (FGMPlatformBitmapAsset *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformBitmapAsset *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformBitmapAssetImage ()
-+ (FGMPlatformBitmapAssetImage *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformBitmapAssetImage *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformBitmapAssetMap ()
-+ (FGMPlatformBitmapAssetMap *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformBitmapAssetMap *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformBitmapBytesMap ()
-+ (FGMPlatformBitmapBytesMap *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformBitmapBytesMap *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformBitmapPinConfig ()
-+ (FGMPlatformBitmapPinConfig *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformBitmapPinConfig *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@implementation FGMPlatformCameraPosition
-+ (instancetype)makeWithBearing:(double)bearing
- target:(FGMPlatformLatLng *)target
- tilt:(double)tilt
- zoom:(double)zoom {
- FGMPlatformCameraPosition *pigeonResult = [[FGMPlatformCameraPosition alloc] init];
- pigeonResult.bearing = bearing;
- pigeonResult.target = target;
- pigeonResult.tilt = tilt;
- pigeonResult.zoom = zoom;
- return pigeonResult;
-}
-+ (FGMPlatformCameraPosition *)fromList:(NSArray<id> *)list {
- FGMPlatformCameraPosition *pigeonResult = [[FGMPlatformCameraPosition alloc] init];
- pigeonResult.bearing = [GetNullableObjectAtIndex(list, 0) doubleValue];
- pigeonResult.target = GetNullableObjectAtIndex(list, 1);
- pigeonResult.tilt = [GetNullableObjectAtIndex(list, 2) doubleValue];
- pigeonResult.zoom = [GetNullableObjectAtIndex(list, 3) doubleValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformCameraPosition *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformCameraPosition fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.bearing),
- self.target ?: [NSNull null],
- @(self.tilt),
- @(self.zoom),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformCameraPosition *other = (FGMPlatformCameraPosition *)object;
- return (self.bearing == other.bearing || (isnan(self.bearing) && isnan(other.bearing))) &&
- FLTPigeonDeepEquals(self.target, other.target) &&
- (self.tilt == other.tilt || (isnan(self.tilt) && isnan(other.tilt))) &&
- (self.zoom == other.zoom || (isnan(self.zoom) && isnan(other.zoom)));
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result =
- result * 31 + (isnan(self.bearing) ? (NSUInteger)0x7FF8000000000000 : @(self.bearing).hash);
- result = result * 31 + FLTPigeonDeepHash(self.target);
- result = result * 31 + (isnan(self.tilt) ? (NSUInteger)0x7FF8000000000000 : @(self.tilt).hash);
- result = result * 31 + (isnan(self.zoom) ? (NSUInteger)0x7FF8000000000000 : @(self.zoom).hash);
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:@"FGMPlatformCameraPosition(bearing: %f, target: %@, tilt: %f, zoom: %f)",
- self.bearing, self.target, self.tilt, self.zoom];
-}
-@end
-
-@implementation FGMPlatformCameraUpdate
-+ (instancetype)makeWithCameraUpdate:(id)cameraUpdate {
- FGMPlatformCameraUpdate *pigeonResult = [[FGMPlatformCameraUpdate alloc] init];
- pigeonResult.cameraUpdate = cameraUpdate;
- return pigeonResult;
-}
-+ (FGMPlatformCameraUpdate *)fromList:(NSArray<id> *)list {
- FGMPlatformCameraUpdate *pigeonResult = [[FGMPlatformCameraUpdate alloc] init];
- pigeonResult.cameraUpdate = GetNullableObjectAtIndex(list, 0);
- return pigeonResult;
-}
-+ (nullable FGMPlatformCameraUpdate *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformCameraUpdate fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.cameraUpdate ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformCameraUpdate *other = (FGMPlatformCameraUpdate *)object;
- return FLTPigeonDeepEquals(self.cameraUpdate, other.cameraUpdate);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.cameraUpdate);
- return result;
-}
-- (NSString *)description {
- return
- [NSString stringWithFormat:@"FGMPlatformCameraUpdate(cameraUpdate: %@)", self.cameraUpdate];
-}
-@end
-
-@implementation FGMPlatformCameraUpdateNewCameraPosition
-+ (instancetype)makeWithCameraPosition:(FGMPlatformCameraPosition *)cameraPosition {
- FGMPlatformCameraUpdateNewCameraPosition *pigeonResult =
- [[FGMPlatformCameraUpdateNewCameraPosition alloc] init];
- pigeonResult.cameraPosition = cameraPosition;
- return pigeonResult;
-}
-+ (FGMPlatformCameraUpdateNewCameraPosition *)fromList:(NSArray<id> *)list {
- FGMPlatformCameraUpdateNewCameraPosition *pigeonResult =
- [[FGMPlatformCameraUpdateNewCameraPosition alloc] init];
- pigeonResult.cameraPosition = GetNullableObjectAtIndex(list, 0);
- return pigeonResult;
-}
-+ (nullable FGMPlatformCameraUpdateNewCameraPosition *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformCameraUpdateNewCameraPosition fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.cameraPosition ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformCameraUpdateNewCameraPosition *other =
- (FGMPlatformCameraUpdateNewCameraPosition *)object;
- return FLTPigeonDeepEquals(self.cameraPosition, other.cameraPosition);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.cameraPosition);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformCameraUpdateNewCameraPosition(cameraPosition: %@)",
- self.cameraPosition];
-}
-@end
-
-@implementation FGMPlatformCameraUpdateNewLatLng
-+ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng {
- FGMPlatformCameraUpdateNewLatLng *pigeonResult = [[FGMPlatformCameraUpdateNewLatLng alloc] init];
- pigeonResult.latLng = latLng;
- return pigeonResult;
-}
-+ (FGMPlatformCameraUpdateNewLatLng *)fromList:(NSArray<id> *)list {
- FGMPlatformCameraUpdateNewLatLng *pigeonResult = [[FGMPlatformCameraUpdateNewLatLng alloc] init];
- pigeonResult.latLng = GetNullableObjectAtIndex(list, 0);
- return pigeonResult;
-}
-+ (nullable FGMPlatformCameraUpdateNewLatLng *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformCameraUpdateNewLatLng fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.latLng ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformCameraUpdateNewLatLng *other = (FGMPlatformCameraUpdateNewLatLng *)object;
- return FLTPigeonDeepEquals(self.latLng, other.latLng);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.latLng);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformCameraUpdateNewLatLng(latLng: %@)", self.latLng];
-}
-@end
-
-@implementation FGMPlatformCameraUpdateNewLatLngBounds
-+ (instancetype)makeWithBounds:(FGMPlatformLatLngBounds *)bounds padding:(double)padding {
- FGMPlatformCameraUpdateNewLatLngBounds *pigeonResult =
- [[FGMPlatformCameraUpdateNewLatLngBounds alloc] init];
- pigeonResult.bounds = bounds;
- pigeonResult.padding = padding;
- return pigeonResult;
-}
-+ (FGMPlatformCameraUpdateNewLatLngBounds *)fromList:(NSArray<id> *)list {
- FGMPlatformCameraUpdateNewLatLngBounds *pigeonResult =
- [[FGMPlatformCameraUpdateNewLatLngBounds alloc] init];
- pigeonResult.bounds = GetNullableObjectAtIndex(list, 0);
- pigeonResult.padding = [GetNullableObjectAtIndex(list, 1) doubleValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformCameraUpdateNewLatLngBounds *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformCameraUpdateNewLatLngBounds fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.bounds ?: [NSNull null],
- @(self.padding),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformCameraUpdateNewLatLngBounds *other = (FGMPlatformCameraUpdateNewLatLngBounds *)object;
- return FLTPigeonDeepEquals(self.bounds, other.bounds) &&
- (self.padding == other.padding || (isnan(self.padding) && isnan(other.padding)));
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.bounds);
- result =
- result * 31 + (isnan(self.padding) ? (NSUInteger)0x7FF8000000000000 : @(self.padding).hash);
- return result;
-}
-- (NSString *)description {
- return
- [NSString stringWithFormat:@"FGMPlatformCameraUpdateNewLatLngBounds(bounds: %@, padding: %f)",
- self.bounds, self.padding];
-}
-@end
-
-@implementation FGMPlatformCameraUpdateNewLatLngZoom
-+ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng zoom:(double)zoom {
- FGMPlatformCameraUpdateNewLatLngZoom *pigeonResult =
- [[FGMPlatformCameraUpdateNewLatLngZoom alloc] init];
- pigeonResult.latLng = latLng;
- pigeonResult.zoom = zoom;
- return pigeonResult;
-}
-+ (FGMPlatformCameraUpdateNewLatLngZoom *)fromList:(NSArray<id> *)list {
- FGMPlatformCameraUpdateNewLatLngZoom *pigeonResult =
- [[FGMPlatformCameraUpdateNewLatLngZoom alloc] init];
- pigeonResult.latLng = GetNullableObjectAtIndex(list, 0);
- pigeonResult.zoom = [GetNullableObjectAtIndex(list, 1) doubleValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformCameraUpdateNewLatLngZoom *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformCameraUpdateNewLatLngZoom fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.latLng ?: [NSNull null],
- @(self.zoom),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformCameraUpdateNewLatLngZoom *other = (FGMPlatformCameraUpdateNewLatLngZoom *)object;
- return FLTPigeonDeepEquals(self.latLng, other.latLng) &&
- (self.zoom == other.zoom || (isnan(self.zoom) && isnan(other.zoom)));
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.latLng);
- result = result * 31 + (isnan(self.zoom) ? (NSUInteger)0x7FF8000000000000 : @(self.zoom).hash);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformCameraUpdateNewLatLngZoom(latLng: %@, zoom: %f)",
- self.latLng, self.zoom];
-}
-@end
-
-@implementation FGMPlatformCameraUpdateScrollBy
-+ (instancetype)makeWithDx:(double)dx dy:(double)dy {
- FGMPlatformCameraUpdateScrollBy *pigeonResult = [[FGMPlatformCameraUpdateScrollBy alloc] init];
- pigeonResult.dx = dx;
- pigeonResult.dy = dy;
- return pigeonResult;
-}
-+ (FGMPlatformCameraUpdateScrollBy *)fromList:(NSArray<id> *)list {
- FGMPlatformCameraUpdateScrollBy *pigeonResult = [[FGMPlatformCameraUpdateScrollBy alloc] init];
- pigeonResult.dx = [GetNullableObjectAtIndex(list, 0) doubleValue];
- pigeonResult.dy = [GetNullableObjectAtIndex(list, 1) doubleValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformCameraUpdateScrollBy *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformCameraUpdateScrollBy fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.dx),
- @(self.dy),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformCameraUpdateScrollBy *other = (FGMPlatformCameraUpdateScrollBy *)object;
- return (self.dx == other.dx || (isnan(self.dx) && isnan(other.dx))) &&
- (self.dy == other.dy || (isnan(self.dy) && isnan(other.dy)));
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + (isnan(self.dx) ? (NSUInteger)0x7FF8000000000000 : @(self.dx).hash);
- result = result * 31 + (isnan(self.dy) ? (NSUInteger)0x7FF8000000000000 : @(self.dy).hash);
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:@"FGMPlatformCameraUpdateScrollBy(dx: %f, dy: %f)", self.dx, self.dy];
-}
-@end
-
-@implementation FGMPlatformCameraUpdateZoomBy
-+ (instancetype)makeWithAmount:(double)amount focus:(nullable FGMPlatformPoint *)focus {
- FGMPlatformCameraUpdateZoomBy *pigeonResult = [[FGMPlatformCameraUpdateZoomBy alloc] init];
- pigeonResult.amount = amount;
- pigeonResult.focus = focus;
- return pigeonResult;
-}
-+ (FGMPlatformCameraUpdateZoomBy *)fromList:(NSArray<id> *)list {
- FGMPlatformCameraUpdateZoomBy *pigeonResult = [[FGMPlatformCameraUpdateZoomBy alloc] init];
- pigeonResult.amount = [GetNullableObjectAtIndex(list, 0) doubleValue];
- pigeonResult.focus = GetNullableObjectAtIndex(list, 1);
- return pigeonResult;
-}
-+ (nullable FGMPlatformCameraUpdateZoomBy *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformCameraUpdateZoomBy fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.amount),
- self.focus ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformCameraUpdateZoomBy *other = (FGMPlatformCameraUpdateZoomBy *)object;
- return (self.amount == other.amount || (isnan(self.amount) && isnan(other.amount))) &&
- FLTPigeonDeepEquals(self.focus, other.focus);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result =
- result * 31 + (isnan(self.amount) ? (NSUInteger)0x7FF8000000000000 : @(self.amount).hash);
- result = result * 31 + FLTPigeonDeepHash(self.focus);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformCameraUpdateZoomBy(amount: %f, focus: %@)",
- self.amount, self.focus];
-}
-@end
-
-@implementation FGMPlatformCameraUpdateZoom
-+ (instancetype)makeWithOut:(BOOL)out {
- FGMPlatformCameraUpdateZoom *pigeonResult = [[FGMPlatformCameraUpdateZoom alloc] init];
- pigeonResult.out = out;
- return pigeonResult;
-}
-+ (FGMPlatformCameraUpdateZoom *)fromList:(NSArray<id> *)list {
- FGMPlatformCameraUpdateZoom *pigeonResult = [[FGMPlatformCameraUpdateZoom alloc] init];
- pigeonResult.out = [GetNullableObjectAtIndex(list, 0) boolValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformCameraUpdateZoom *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformCameraUpdateZoom fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.out),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformCameraUpdateZoom *other = (FGMPlatformCameraUpdateZoom *)object;
- return self.out == other.out;
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + @(self.out).hash;
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:@"FGMPlatformCameraUpdateZoom(out: %@)", self.out ? @"true" : @"false"];
-}
-@end
-
-@implementation FGMPlatformCameraUpdateZoomTo
-+ (instancetype)makeWithZoom:(double)zoom {
- FGMPlatformCameraUpdateZoomTo *pigeonResult = [[FGMPlatformCameraUpdateZoomTo alloc] init];
- pigeonResult.zoom = zoom;
- return pigeonResult;
-}
-+ (FGMPlatformCameraUpdateZoomTo *)fromList:(NSArray<id> *)list {
- FGMPlatformCameraUpdateZoomTo *pigeonResult = [[FGMPlatformCameraUpdateZoomTo alloc] init];
- pigeonResult.zoom = [GetNullableObjectAtIndex(list, 0) doubleValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformCameraUpdateZoomTo *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformCameraUpdateZoomTo fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.zoom),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformCameraUpdateZoomTo *other = (FGMPlatformCameraUpdateZoomTo *)object;
- return (self.zoom == other.zoom || (isnan(self.zoom) && isnan(other.zoom)));
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + (isnan(self.zoom) ? (NSUInteger)0x7FF8000000000000 : @(self.zoom).hash);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformCameraUpdateZoomTo(zoom: %f)", self.zoom];
-}
-@end
-
-@implementation FGMPlatformCircle
-+ (instancetype)makeWithConsumeTapEvents:(BOOL)consumeTapEvents
- fillColor:(FGMPlatformColor *)fillColor
- strokeColor:(FGMPlatformColor *)strokeColor
- visible:(BOOL)visible
- strokeWidth:(NSInteger)strokeWidth
- zIndex:(double)zIndex
- center:(FGMPlatformLatLng *)center
- radius:(double)radius
- circleId:(NSString *)circleId {
- FGMPlatformCircle *pigeonResult = [[FGMPlatformCircle alloc] init];
- pigeonResult.consumeTapEvents = consumeTapEvents;
- pigeonResult.fillColor = fillColor;
- pigeonResult.strokeColor = strokeColor;
- pigeonResult.visible = visible;
- pigeonResult.strokeWidth = strokeWidth;
- pigeonResult.zIndex = zIndex;
- pigeonResult.center = center;
- pigeonResult.radius = radius;
- pigeonResult.circleId = circleId;
- return pigeonResult;
-}
-+ (FGMPlatformCircle *)fromList:(NSArray<id> *)list {
- FGMPlatformCircle *pigeonResult = [[FGMPlatformCircle alloc] init];
- pigeonResult.consumeTapEvents = [GetNullableObjectAtIndex(list, 0) boolValue];
- pigeonResult.fillColor = GetNullableObjectAtIndex(list, 1);
- pigeonResult.strokeColor = GetNullableObjectAtIndex(list, 2);
- pigeonResult.visible = [GetNullableObjectAtIndex(list, 3) boolValue];
- pigeonResult.strokeWidth = [GetNullableObjectAtIndex(list, 4) integerValue];
- pigeonResult.zIndex = [GetNullableObjectAtIndex(list, 5) doubleValue];
- pigeonResult.center = GetNullableObjectAtIndex(list, 6);
- pigeonResult.radius = [GetNullableObjectAtIndex(list, 7) doubleValue];
- pigeonResult.circleId = GetNullableObjectAtIndex(list, 8);
- return pigeonResult;
-}
-+ (nullable FGMPlatformCircle *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformCircle fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.consumeTapEvents),
- self.fillColor ?: [NSNull null],
- self.strokeColor ?: [NSNull null],
- @(self.visible),
- @(self.strokeWidth),
- @(self.zIndex),
- self.center ?: [NSNull null],
- @(self.radius),
- self.circleId ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformCircle *other = (FGMPlatformCircle *)object;
- return self.consumeTapEvents == other.consumeTapEvents &&
- FLTPigeonDeepEquals(self.fillColor, other.fillColor) &&
- FLTPigeonDeepEquals(self.strokeColor, other.strokeColor) &&
- self.visible == other.visible && self.strokeWidth == other.strokeWidth &&
- (self.zIndex == other.zIndex || (isnan(self.zIndex) && isnan(other.zIndex))) &&
- FLTPigeonDeepEquals(self.center, other.center) &&
- (self.radius == other.radius || (isnan(self.radius) && isnan(other.radius))) &&
- FLTPigeonDeepEquals(self.circleId, other.circleId);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + @(self.consumeTapEvents).hash;
- result = result * 31 + FLTPigeonDeepHash(self.fillColor);
- result = result * 31 + FLTPigeonDeepHash(self.strokeColor);
- result = result * 31 + @(self.visible).hash;
- result = result * 31 + @(self.strokeWidth).hash;
- result =
- result * 31 + (isnan(self.zIndex) ? (NSUInteger)0x7FF8000000000000 : @(self.zIndex).hash);
- result = result * 31 + FLTPigeonDeepHash(self.center);
- result =
- result * 31 + (isnan(self.radius) ? (NSUInteger)0x7FF8000000000000 : @(self.radius).hash);
- result = result * 31 + FLTPigeonDeepHash(self.circleId);
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:
- @"FGMPlatformCircle(consumeTapEvents: %@, fillColor: %@, strokeColor: %@, visible: %@, "
- @"strokeWidth: %ld, zIndex: %f, center: %@, radius: %f, circleId: %@)",
- self.consumeTapEvents ? @"true" : @"false", self.fillColor, self.strokeColor,
- self.visible ? @"true" : @"false", (long)self.strokeWidth, self.zIndex, self.center,
- self.radius, self.circleId];
-}
-@end
-
-@implementation FGMPlatformHeatmap
-+ (instancetype)makeWithHeatmapId:(NSString *)heatmapId
- data:(NSArray<FGMPlatformWeightedLatLng *> *)data
- gradient:(nullable FGMPlatformHeatmapGradient *)gradient
- opacity:(double)opacity
- radius:(NSInteger)radius
- minimumZoomIntensity:(NSInteger)minimumZoomIntensity
- maximumZoomIntensity:(NSInteger)maximumZoomIntensity {
- FGMPlatformHeatmap *pigeonResult = [[FGMPlatformHeatmap alloc] init];
- pigeonResult.heatmapId = heatmapId;
- pigeonResult.data = data;
- pigeonResult.gradient = gradient;
- pigeonResult.opacity = opacity;
- pigeonResult.radius = radius;
- pigeonResult.minimumZoomIntensity = minimumZoomIntensity;
- pigeonResult.maximumZoomIntensity = maximumZoomIntensity;
- return pigeonResult;
-}
-+ (FGMPlatformHeatmap *)fromList:(NSArray<id> *)list {
- FGMPlatformHeatmap *pigeonResult = [[FGMPlatformHeatmap alloc] init];
- pigeonResult.heatmapId = GetNullableObjectAtIndex(list, 0);
- pigeonResult.data = GetNullableObjectAtIndex(list, 1);
- pigeonResult.gradient = GetNullableObjectAtIndex(list, 2);
- pigeonResult.opacity = [GetNullableObjectAtIndex(list, 3) doubleValue];
- pigeonResult.radius = [GetNullableObjectAtIndex(list, 4) integerValue];
- pigeonResult.minimumZoomIntensity = [GetNullableObjectAtIndex(list, 5) integerValue];
- pigeonResult.maximumZoomIntensity = [GetNullableObjectAtIndex(list, 6) integerValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformHeatmap *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformHeatmap fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.heatmapId ?: [NSNull null],
- self.data ?: [NSNull null],
- self.gradient ?: [NSNull null],
- @(self.opacity),
- @(self.radius),
- @(self.minimumZoomIntensity),
- @(self.maximumZoomIntensity),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformHeatmap *other = (FGMPlatformHeatmap *)object;
- return FLTPigeonDeepEquals(self.heatmapId, other.heatmapId) &&
- FLTPigeonDeepEquals(self.data, other.data) &&
- FLTPigeonDeepEquals(self.gradient, other.gradient) &&
- (self.opacity == other.opacity || (isnan(self.opacity) && isnan(other.opacity))) &&
- self.radius == other.radius && self.minimumZoomIntensity == other.minimumZoomIntensity &&
- self.maximumZoomIntensity == other.maximumZoomIntensity;
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.heatmapId);
- result = result * 31 + FLTPigeonDeepHash(self.data);
- result = result * 31 + FLTPigeonDeepHash(self.gradient);
- result =
- result * 31 + (isnan(self.opacity) ? (NSUInteger)0x7FF8000000000000 : @(self.opacity).hash);
- result = result * 31 + @(self.radius).hash;
- result = result * 31 + @(self.minimumZoomIntensity).hash;
- result = result * 31 + @(self.maximumZoomIntensity).hash;
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:@"FGMPlatformHeatmap(heatmapId: %@, data: %@, gradient: %@, opacity: %f, "
- @"radius: %ld, minimumZoomIntensity: %ld, maximumZoomIntensity: %ld)",
- self.heatmapId, self.data, self.gradient, self.opacity, (long)self.radius,
- (long)self.minimumZoomIntensity, (long)self.maximumZoomIntensity];
-}
-@end
-
-@implementation FGMPlatformHeatmapGradient
-+ (instancetype)makeWithColors:(NSArray<FGMPlatformColor *> *)colors
- startPoints:(NSArray<NSNumber *> *)startPoints
- colorMapSize:(NSInteger)colorMapSize {
- FGMPlatformHeatmapGradient *pigeonResult = [[FGMPlatformHeatmapGradient alloc] init];
- pigeonResult.colors = colors;
- pigeonResult.startPoints = startPoints;
- pigeonResult.colorMapSize = colorMapSize;
- return pigeonResult;
-}
-+ (FGMPlatformHeatmapGradient *)fromList:(NSArray<id> *)list {
- FGMPlatformHeatmapGradient *pigeonResult = [[FGMPlatformHeatmapGradient alloc] init];
- pigeonResult.colors = GetNullableObjectAtIndex(list, 0);
- pigeonResult.startPoints = GetNullableObjectAtIndex(list, 1);
- pigeonResult.colorMapSize = [GetNullableObjectAtIndex(list, 2) integerValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformHeatmapGradient *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformHeatmapGradient fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.colors ?: [NSNull null],
- self.startPoints ?: [NSNull null],
- @(self.colorMapSize),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformHeatmapGradient *other = (FGMPlatformHeatmapGradient *)object;
- return FLTPigeonDeepEquals(self.colors, other.colors) &&
- FLTPigeonDeepEquals(self.startPoints, other.startPoints) &&
- self.colorMapSize == other.colorMapSize;
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.colors);
- result = result * 31 + FLTPigeonDeepHash(self.startPoints);
- result = result * 31 + @(self.colorMapSize).hash;
- return result;
-}
-- (NSString *)description {
- return
- [NSString stringWithFormat:
- @"FGMPlatformHeatmapGradient(colors: %@, startPoints: %@, colorMapSize: %ld)",
- self.colors, self.startPoints, (long)self.colorMapSize];
-}
-@end
-
-@implementation FGMPlatformWeightedLatLng
-+ (instancetype)makeWithPoint:(FGMPlatformLatLng *)point weight:(double)weight {
- FGMPlatformWeightedLatLng *pigeonResult = [[FGMPlatformWeightedLatLng alloc] init];
- pigeonResult.point = point;
- pigeonResult.weight = weight;
- return pigeonResult;
-}
-+ (FGMPlatformWeightedLatLng *)fromList:(NSArray<id> *)list {
- FGMPlatformWeightedLatLng *pigeonResult = [[FGMPlatformWeightedLatLng alloc] init];
- pigeonResult.point = GetNullableObjectAtIndex(list, 0);
- pigeonResult.weight = [GetNullableObjectAtIndex(list, 1) doubleValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformWeightedLatLng *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformWeightedLatLng fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.point ?: [NSNull null],
- @(self.weight),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformWeightedLatLng *other = (FGMPlatformWeightedLatLng *)object;
- return FLTPigeonDeepEquals(self.point, other.point) &&
- (self.weight == other.weight || (isnan(self.weight) && isnan(other.weight)));
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.point);
- result =
- result * 31 + (isnan(self.weight) ? (NSUInteger)0x7FF8000000000000 : @(self.weight).hash);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformWeightedLatLng(point: %@, weight: %f)", self.point,
- self.weight];
-}
-@end
-
-@implementation FGMPlatformInfoWindow
-+ (instancetype)makeWithTitle:(nullable NSString *)title
- snippet:(nullable NSString *)snippet
- anchor:(FGMPlatformPoint *)anchor {
- FGMPlatformInfoWindow *pigeonResult = [[FGMPlatformInfoWindow alloc] init];
- pigeonResult.title = title;
- pigeonResult.snippet = snippet;
- pigeonResult.anchor = anchor;
- return pigeonResult;
-}
-+ (FGMPlatformInfoWindow *)fromList:(NSArray<id> *)list {
- FGMPlatformInfoWindow *pigeonResult = [[FGMPlatformInfoWindow alloc] init];
- pigeonResult.title = GetNullableObjectAtIndex(list, 0);
- pigeonResult.snippet = GetNullableObjectAtIndex(list, 1);
- pigeonResult.anchor = GetNullableObjectAtIndex(list, 2);
- return pigeonResult;
-}
-+ (nullable FGMPlatformInfoWindow *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformInfoWindow fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.title ?: [NSNull null],
- self.snippet ?: [NSNull null],
- self.anchor ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformInfoWindow *other = (FGMPlatformInfoWindow *)object;
- return FLTPigeonDeepEquals(self.title, other.title) &&
- FLTPigeonDeepEquals(self.snippet, other.snippet) &&
- FLTPigeonDeepEquals(self.anchor, other.anchor);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.title);
- result = result * 31 + FLTPigeonDeepHash(self.snippet);
- result = result * 31 + FLTPigeonDeepHash(self.anchor);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformInfoWindow(title: %@, snippet: %@, anchor: %@)",
- self.title, self.snippet, self.anchor];
-}
-@end
-
-@implementation FGMPlatformCluster
-+ (instancetype)makeWithClusterManagerId:(NSString *)clusterManagerId
- position:(FGMPlatformLatLng *)position
- bounds:(FGMPlatformLatLngBounds *)bounds
- markerIds:(NSArray<NSString *> *)markerIds {
- FGMPlatformCluster *pigeonResult = [[FGMPlatformCluster alloc] init];
- pigeonResult.clusterManagerId = clusterManagerId;
- pigeonResult.position = position;
- pigeonResult.bounds = bounds;
- pigeonResult.markerIds = markerIds;
- return pigeonResult;
-}
-+ (FGMPlatformCluster *)fromList:(NSArray<id> *)list {
- FGMPlatformCluster *pigeonResult = [[FGMPlatformCluster alloc] init];
- pigeonResult.clusterManagerId = GetNullableObjectAtIndex(list, 0);
- pigeonResult.position = GetNullableObjectAtIndex(list, 1);
- pigeonResult.bounds = GetNullableObjectAtIndex(list, 2);
- pigeonResult.markerIds = GetNullableObjectAtIndex(list, 3);
- return pigeonResult;
-}
-+ (nullable FGMPlatformCluster *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformCluster fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.clusterManagerId ?: [NSNull null],
- self.position ?: [NSNull null],
- self.bounds ?: [NSNull null],
- self.markerIds ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformCluster *other = (FGMPlatformCluster *)object;
- return FLTPigeonDeepEquals(self.clusterManagerId, other.clusterManagerId) &&
- FLTPigeonDeepEquals(self.position, other.position) &&
- FLTPigeonDeepEquals(self.bounds, other.bounds) &&
- FLTPigeonDeepEquals(self.markerIds, other.markerIds);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.clusterManagerId);
- result = result * 31 + FLTPigeonDeepHash(self.position);
- result = result * 31 + FLTPigeonDeepHash(self.bounds);
- result = result * 31 + FLTPigeonDeepHash(self.markerIds);
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:
- @"FGMPlatformCluster(clusterManagerId: %@, position: %@, bounds: %@, markerIds: %@)",
- self.clusterManagerId, self.position, self.bounds, self.markerIds];
-}
-@end
-
-@implementation FGMPlatformClusterManager
-+ (instancetype)makeWithIdentifier:(NSString *)identifier {
- FGMPlatformClusterManager *pigeonResult = [[FGMPlatformClusterManager alloc] init];
- pigeonResult.identifier = identifier;
- return pigeonResult;
-}
-+ (FGMPlatformClusterManager *)fromList:(NSArray<id> *)list {
- FGMPlatformClusterManager *pigeonResult = [[FGMPlatformClusterManager alloc] init];
- pigeonResult.identifier = GetNullableObjectAtIndex(list, 0);
- return pigeonResult;
-}
-+ (nullable FGMPlatformClusterManager *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformClusterManager fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.identifier ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformClusterManager *other = (FGMPlatformClusterManager *)object;
- return FLTPigeonDeepEquals(self.identifier, other.identifier);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.identifier);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformClusterManager(identifier: %@)", self.identifier];
-}
-@end
-
-@implementation FGMPlatformMarker
-+ (instancetype)makeWithAlpha:(double)alpha
- anchor:(FGMPlatformPoint *)anchor
- consumeTapEvents:(BOOL)consumeTapEvents
- draggable:(BOOL)draggable
- flat:(BOOL)flat
- icon:(FGMPlatformBitmap *)icon
- infoWindow:(FGMPlatformInfoWindow *)infoWindow
- position:(FGMPlatformLatLng *)position
- rotation:(double)rotation
- visible:(BOOL)visible
- zIndex:(NSInteger)zIndex
- markerId:(NSString *)markerId
- clusterManagerId:(nullable NSString *)clusterManagerId
- collisionBehavior:(nullable FGMPlatformMarkerCollisionBehaviorBox *)collisionBehavior {
- FGMPlatformMarker *pigeonResult = [[FGMPlatformMarker alloc] init];
- pigeonResult.alpha = alpha;
- pigeonResult.anchor = anchor;
- pigeonResult.consumeTapEvents = consumeTapEvents;
- pigeonResult.draggable = draggable;
- pigeonResult.flat = flat;
- pigeonResult.icon = icon;
- pigeonResult.infoWindow = infoWindow;
- pigeonResult.position = position;
- pigeonResult.rotation = rotation;
- pigeonResult.visible = visible;
- pigeonResult.zIndex = zIndex;
- pigeonResult.markerId = markerId;
- pigeonResult.clusterManagerId = clusterManagerId;
- pigeonResult.collisionBehavior = collisionBehavior;
- return pigeonResult;
-}
-+ (FGMPlatformMarker *)fromList:(NSArray<id> *)list {
- FGMPlatformMarker *pigeonResult = [[FGMPlatformMarker alloc] init];
- pigeonResult.alpha = [GetNullableObjectAtIndex(list, 0) doubleValue];
- pigeonResult.anchor = GetNullableObjectAtIndex(list, 1);
- pigeonResult.consumeTapEvents = [GetNullableObjectAtIndex(list, 2) boolValue];
- pigeonResult.draggable = [GetNullableObjectAtIndex(list, 3) boolValue];
- pigeonResult.flat = [GetNullableObjectAtIndex(list, 4) boolValue];
- pigeonResult.icon = GetNullableObjectAtIndex(list, 5);
- pigeonResult.infoWindow = GetNullableObjectAtIndex(list, 6);
- pigeonResult.position = GetNullableObjectAtIndex(list, 7);
- pigeonResult.rotation = [GetNullableObjectAtIndex(list, 8) doubleValue];
- pigeonResult.visible = [GetNullableObjectAtIndex(list, 9) boolValue];
- pigeonResult.zIndex = [GetNullableObjectAtIndex(list, 10) integerValue];
- pigeonResult.markerId = GetNullableObjectAtIndex(list, 11);
- pigeonResult.clusterManagerId = GetNullableObjectAtIndex(list, 12);
- pigeonResult.collisionBehavior = GetNullableObjectAtIndex(list, 13);
- return pigeonResult;
-}
-+ (nullable FGMPlatformMarker *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformMarker fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.alpha),
- self.anchor ?: [NSNull null],
- @(self.consumeTapEvents),
- @(self.draggable),
- @(self.flat),
- self.icon ?: [NSNull null],
- self.infoWindow ?: [NSNull null],
- self.position ?: [NSNull null],
- @(self.rotation),
- @(self.visible),
- @(self.zIndex),
- self.markerId ?: [NSNull null],
- self.clusterManagerId ?: [NSNull null],
- self.collisionBehavior ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformMarker *other = (FGMPlatformMarker *)object;
- return (self.alpha == other.alpha || (isnan(self.alpha) && isnan(other.alpha))) &&
- FLTPigeonDeepEquals(self.anchor, other.anchor) &&
- self.consumeTapEvents == other.consumeTapEvents && self.draggable == other.draggable &&
- self.flat == other.flat && FLTPigeonDeepEquals(self.icon, other.icon) &&
- FLTPigeonDeepEquals(self.infoWindow, other.infoWindow) &&
- FLTPigeonDeepEquals(self.position, other.position) &&
- (self.rotation == other.rotation || (isnan(self.rotation) && isnan(other.rotation))) &&
- self.visible == other.visible && self.zIndex == other.zIndex &&
- FLTPigeonDeepEquals(self.markerId, other.markerId) &&
- FLTPigeonDeepEquals(self.clusterManagerId, other.clusterManagerId) &&
- FLTPigeonDeepEquals(self.collisionBehavior, other.collisionBehavior);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + (isnan(self.alpha) ? (NSUInteger)0x7FF8000000000000 : @(self.alpha).hash);
- result = result * 31 + FLTPigeonDeepHash(self.anchor);
- result = result * 31 + @(self.consumeTapEvents).hash;
- result = result * 31 + @(self.draggable).hash;
- result = result * 31 + @(self.flat).hash;
- result = result * 31 + FLTPigeonDeepHash(self.icon);
- result = result * 31 + FLTPigeonDeepHash(self.infoWindow);
- result = result * 31 + FLTPigeonDeepHash(self.position);
- result =
- result * 31 + (isnan(self.rotation) ? (NSUInteger)0x7FF8000000000000 : @(self.rotation).hash);
- result = result * 31 + @(self.visible).hash;
- result = result * 31 + @(self.zIndex).hash;
- result = result * 31 + FLTPigeonDeepHash(self.markerId);
- result = result * 31 + FLTPigeonDeepHash(self.clusterManagerId);
- result = result * 31 + FLTPigeonDeepHash(self.collisionBehavior);
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:
- @"FGMPlatformMarker(alpha: %f, anchor: %@, consumeTapEvents: %@, draggable: %@, flat: "
- @"%@, icon: %@, infoWindow: %@, position: %@, rotation: %f, visible: %@, zIndex: %ld, "
- @"markerId: %@, clusterManagerId: %@, collisionBehavior: %@)",
- self.alpha, self.anchor, self.consumeTapEvents ? @"true" : @"false",
- self.draggable ? @"true" : @"false", self.flat ? @"true" : @"false", self.icon,
- self.infoWindow, self.position, self.rotation, self.visible ? @"true" : @"false",
- (long)self.zIndex, self.markerId, self.clusterManagerId, self.collisionBehavior];
-}
-@end
-
-@implementation FGMPlatformPolygon
-+ (instancetype)makeWithPolygonId:(NSString *)polygonId
- consumesTapEvents:(BOOL)consumesTapEvents
- fillColor:(FGMPlatformColor *)fillColor
- geodesic:(BOOL)geodesic
- points:(NSArray<FGMPlatformLatLng *> *)points
- holes:(NSArray<NSArray<FGMPlatformLatLng *> *> *)holes
- visible:(BOOL)visible
- strokeColor:(FGMPlatformColor *)strokeColor
- strokeWidth:(NSInteger)strokeWidth
- zIndex:(NSInteger)zIndex {
- FGMPlatformPolygon *pigeonResult = [[FGMPlatformPolygon alloc] init];
- pigeonResult.polygonId = polygonId;
- pigeonResult.consumesTapEvents = consumesTapEvents;
- pigeonResult.fillColor = fillColor;
- pigeonResult.geodesic = geodesic;
- pigeonResult.points = points;
- pigeonResult.holes = holes;
- pigeonResult.visible = visible;
- pigeonResult.strokeColor = strokeColor;
- pigeonResult.strokeWidth = strokeWidth;
- pigeonResult.zIndex = zIndex;
- return pigeonResult;
-}
-+ (FGMPlatformPolygon *)fromList:(NSArray<id> *)list {
- FGMPlatformPolygon *pigeonResult = [[FGMPlatformPolygon alloc] init];
- pigeonResult.polygonId = GetNullableObjectAtIndex(list, 0);
- pigeonResult.consumesTapEvents = [GetNullableObjectAtIndex(list, 1) boolValue];
- pigeonResult.fillColor = GetNullableObjectAtIndex(list, 2);
- pigeonResult.geodesic = [GetNullableObjectAtIndex(list, 3) boolValue];
- pigeonResult.points = GetNullableObjectAtIndex(list, 4);
- pigeonResult.holes = GetNullableObjectAtIndex(list, 5);
- pigeonResult.visible = [GetNullableObjectAtIndex(list, 6) boolValue];
- pigeonResult.strokeColor = GetNullableObjectAtIndex(list, 7);
- pigeonResult.strokeWidth = [GetNullableObjectAtIndex(list, 8) integerValue];
- pigeonResult.zIndex = [GetNullableObjectAtIndex(list, 9) integerValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformPolygon *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformPolygon fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.polygonId ?: [NSNull null],
- @(self.consumesTapEvents),
- self.fillColor ?: [NSNull null],
- @(self.geodesic),
- self.points ?: [NSNull null],
- self.holes ?: [NSNull null],
- @(self.visible),
- self.strokeColor ?: [NSNull null],
- @(self.strokeWidth),
- @(self.zIndex),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformPolygon *other = (FGMPlatformPolygon *)object;
- return FLTPigeonDeepEquals(self.polygonId, other.polygonId) &&
- self.consumesTapEvents == other.consumesTapEvents &&
- FLTPigeonDeepEquals(self.fillColor, other.fillColor) && self.geodesic == other.geodesic &&
- FLTPigeonDeepEquals(self.points, other.points) &&
- FLTPigeonDeepEquals(self.holes, other.holes) && self.visible == other.visible &&
- FLTPigeonDeepEquals(self.strokeColor, other.strokeColor) &&
- self.strokeWidth == other.strokeWidth && self.zIndex == other.zIndex;
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.polygonId);
- result = result * 31 + @(self.consumesTapEvents).hash;
- result = result * 31 + FLTPigeonDeepHash(self.fillColor);
- result = result * 31 + @(self.geodesic).hash;
- result = result * 31 + FLTPigeonDeepHash(self.points);
- result = result * 31 + FLTPigeonDeepHash(self.holes);
- result = result * 31 + @(self.visible).hash;
- result = result * 31 + FLTPigeonDeepHash(self.strokeColor);
- result = result * 31 + @(self.strokeWidth).hash;
- result = result * 31 + @(self.zIndex).hash;
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:
- @"FGMPlatformPolygon(polygonId: %@, consumesTapEvents: %@, fillColor: %@, geodesic: %@, "
- @"points: %@, holes: %@, visible: %@, strokeColor: %@, strokeWidth: %ld, zIndex: %ld)",
- self.polygonId, self.consumesTapEvents ? @"true" : @"false", self.fillColor,
- self.geodesic ? @"true" : @"false", self.points, self.holes,
- self.visible ? @"true" : @"false", self.strokeColor, (long)self.strokeWidth,
- (long)self.zIndex];
-}
-@end
-
-@implementation FGMPlatformPolyline
-+ (instancetype)makeWithPolylineId:(NSString *)polylineId
- consumesTapEvents:(BOOL)consumesTapEvents
- color:(FGMPlatformColor *)color
- geodesic:(BOOL)geodesic
- jointType:(FGMPlatformJointType)jointType
- patterns:(NSArray<FGMPlatformPatternItem *> *)patterns
- points:(NSArray<FGMPlatformLatLng *> *)points
- visible:(BOOL)visible
- width:(NSInteger)width
- zIndex:(NSInteger)zIndex {
- FGMPlatformPolyline *pigeonResult = [[FGMPlatformPolyline alloc] init];
- pigeonResult.polylineId = polylineId;
- pigeonResult.consumesTapEvents = consumesTapEvents;
- pigeonResult.color = color;
- pigeonResult.geodesic = geodesic;
- pigeonResult.jointType = jointType;
- pigeonResult.patterns = patterns;
- pigeonResult.points = points;
- pigeonResult.visible = visible;
- pigeonResult.width = width;
- pigeonResult.zIndex = zIndex;
- return pigeonResult;
-}
-+ (FGMPlatformPolyline *)fromList:(NSArray<id> *)list {
- FGMPlatformPolyline *pigeonResult = [[FGMPlatformPolyline alloc] init];
- pigeonResult.polylineId = GetNullableObjectAtIndex(list, 0);
- pigeonResult.consumesTapEvents = [GetNullableObjectAtIndex(list, 1) boolValue];
- pigeonResult.color = GetNullableObjectAtIndex(list, 2);
- pigeonResult.geodesic = [GetNullableObjectAtIndex(list, 3) boolValue];
- FGMPlatformJointTypeBox *boxedFGMPlatformJointType = GetNullableObjectAtIndex(list, 4);
- pigeonResult.jointType = boxedFGMPlatformJointType.value;
- pigeonResult.patterns = GetNullableObjectAtIndex(list, 5);
- pigeonResult.points = GetNullableObjectAtIndex(list, 6);
- pigeonResult.visible = [GetNullableObjectAtIndex(list, 7) boolValue];
- pigeonResult.width = [GetNullableObjectAtIndex(list, 8) integerValue];
- pigeonResult.zIndex = [GetNullableObjectAtIndex(list, 9) integerValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformPolyline *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformPolyline fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.polylineId ?: [NSNull null],
- @(self.consumesTapEvents),
- self.color ?: [NSNull null],
- @(self.geodesic),
- [[FGMPlatformJointTypeBox alloc] initWithValue:self.jointType],
- self.patterns ?: [NSNull null],
- self.points ?: [NSNull null],
- @(self.visible),
- @(self.width),
- @(self.zIndex),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformPolyline *other = (FGMPlatformPolyline *)object;
- return FLTPigeonDeepEquals(self.polylineId, other.polylineId) &&
- self.consumesTapEvents == other.consumesTapEvents &&
- FLTPigeonDeepEquals(self.color, other.color) && self.geodesic == other.geodesic &&
- self.jointType == other.jointType && FLTPigeonDeepEquals(self.patterns, other.patterns) &&
- FLTPigeonDeepEquals(self.points, other.points) && self.visible == other.visible &&
- self.width == other.width && self.zIndex == other.zIndex;
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.polylineId);
- result = result * 31 + @(self.consumesTapEvents).hash;
- result = result * 31 + FLTPigeonDeepHash(self.color);
- result = result * 31 + @(self.geodesic).hash;
- result = result * 31 + @(self.jointType).hash;
- result = result * 31 + FLTPigeonDeepHash(self.patterns);
- result = result * 31 + FLTPigeonDeepHash(self.points);
- result = result * 31 + @(self.visible).hash;
- result = result * 31 + @(self.width).hash;
- result = result * 31 + @(self.zIndex).hash;
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:
- @"FGMPlatformPolyline(polylineId: %@, consumesTapEvents: %@, color: %@, geodesic: %@, "
- @"jointType: %ld, patterns: %@, points: %@, visible: %@, width: %ld, zIndex: %ld)",
- self.polylineId, self.consumesTapEvents ? @"true" : @"false", self.color,
- self.geodesic ? @"true" : @"false", (long)self.jointType, self.patterns, self.points,
- self.visible ? @"true" : @"false", (long)self.width, (long)self.zIndex];
-}
-@end
-
-@implementation FGMPlatformPatternItem
-+ (instancetype)makeWithType:(FGMPlatformPatternItemType)type length:(nullable NSNumber *)length {
- FGMPlatformPatternItem *pigeonResult = [[FGMPlatformPatternItem alloc] init];
- pigeonResult.type = type;
- pigeonResult.length = length;
- return pigeonResult;
-}
-+ (FGMPlatformPatternItem *)fromList:(NSArray<id> *)list {
- FGMPlatformPatternItem *pigeonResult = [[FGMPlatformPatternItem alloc] init];
- FGMPlatformPatternItemTypeBox *boxedFGMPlatformPatternItemType =
- GetNullableObjectAtIndex(list, 0);
- pigeonResult.type = boxedFGMPlatformPatternItemType.value;
- pigeonResult.length = GetNullableObjectAtIndex(list, 1);
- return pigeonResult;
-}
-+ (nullable FGMPlatformPatternItem *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformPatternItem fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- [[FGMPlatformPatternItemTypeBox alloc] initWithValue:self.type],
- self.length ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformPatternItem *other = (FGMPlatformPatternItem *)object;
- return self.type == other.type && FLTPigeonDeepEquals(self.length, other.length);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + @(self.type).hash;
- result = result * 31 + FLTPigeonDeepHash(self.length);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformPatternItem(type: %ld, length: %@)",
- (long)self.type, self.length];
-}
-@end
-
-@implementation FGMPlatformTile
-+ (instancetype)makeWithWidth:(NSInteger)width
- height:(NSInteger)height
- data:(nullable FlutterStandardTypedData *)data {
- FGMPlatformTile *pigeonResult = [[FGMPlatformTile alloc] init];
- pigeonResult.width = width;
- pigeonResult.height = height;
- pigeonResult.data = data;
- return pigeonResult;
-}
-+ (FGMPlatformTile *)fromList:(NSArray<id> *)list {
- FGMPlatformTile *pigeonResult = [[FGMPlatformTile alloc] init];
- pigeonResult.width = [GetNullableObjectAtIndex(list, 0) integerValue];
- pigeonResult.height = [GetNullableObjectAtIndex(list, 1) integerValue];
- pigeonResult.data = GetNullableObjectAtIndex(list, 2);
- return pigeonResult;
-}
-+ (nullable FGMPlatformTile *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformTile fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.width),
- @(self.height),
- self.data ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformTile *other = (FGMPlatformTile *)object;
- return self.width == other.width && self.height == other.height &&
- FLTPigeonDeepEquals(self.data, other.data);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + @(self.width).hash;
- result = result * 31 + @(self.height).hash;
- result = result * 31 + FLTPigeonDeepHash(self.data);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformTile(width: %ld, height: %ld, data: %@)",
- (long)self.width, (long)self.height, self.data];
-}
-@end
-
-@implementation FGMPlatformTileOverlay
-+ (instancetype)makeWithTileOverlayId:(NSString *)tileOverlayId
- fadeIn:(BOOL)fadeIn
- transparency:(double)transparency
- zIndex:(NSInteger)zIndex
- visible:(BOOL)visible
- tileSize:(NSInteger)tileSize {
- FGMPlatformTileOverlay *pigeonResult = [[FGMPlatformTileOverlay alloc] init];
- pigeonResult.tileOverlayId = tileOverlayId;
- pigeonResult.fadeIn = fadeIn;
- pigeonResult.transparency = transparency;
- pigeonResult.zIndex = zIndex;
- pigeonResult.visible = visible;
- pigeonResult.tileSize = tileSize;
- return pigeonResult;
-}
-+ (FGMPlatformTileOverlay *)fromList:(NSArray<id> *)list {
- FGMPlatformTileOverlay *pigeonResult = [[FGMPlatformTileOverlay alloc] init];
- pigeonResult.tileOverlayId = GetNullableObjectAtIndex(list, 0);
- pigeonResult.fadeIn = [GetNullableObjectAtIndex(list, 1) boolValue];
- pigeonResult.transparency = [GetNullableObjectAtIndex(list, 2) doubleValue];
- pigeonResult.zIndex = [GetNullableObjectAtIndex(list, 3) integerValue];
- pigeonResult.visible = [GetNullableObjectAtIndex(list, 4) boolValue];
- pigeonResult.tileSize = [GetNullableObjectAtIndex(list, 5) integerValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformTileOverlay *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformTileOverlay fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.tileOverlayId ?: [NSNull null],
- @(self.fadeIn),
- @(self.transparency),
- @(self.zIndex),
- @(self.visible),
- @(self.tileSize),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformTileOverlay *other = (FGMPlatformTileOverlay *)object;
- return FLTPigeonDeepEquals(self.tileOverlayId, other.tileOverlayId) &&
- self.fadeIn == other.fadeIn &&
- (self.transparency == other.transparency ||
- (isnan(self.transparency) && isnan(other.transparency))) &&
- self.zIndex == other.zIndex && self.visible == other.visible &&
- self.tileSize == other.tileSize;
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.tileOverlayId);
- result = result * 31 + @(self.fadeIn).hash;
- result = result * 31 +
- (isnan(self.transparency) ? (NSUInteger)0x7FF8000000000000 : @(self.transparency).hash);
- result = result * 31 + @(self.zIndex).hash;
- result = result * 31 + @(self.visible).hash;
- result = result * 31 + @(self.tileSize).hash;
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformTileOverlay(tileOverlayId: %@, fadeIn: %@, "
- @"transparency: %f, zIndex: %ld, visible: %@, tileSize: %ld)",
- self.tileOverlayId, self.fadeIn ? @"true" : @"false",
- self.transparency, (long)self.zIndex,
- self.visible ? @"true" : @"false", (long)self.tileSize];
-}
-@end
-
-@implementation FGMPlatformEdgeInsets
-+ (instancetype)makeWithTop:(double)top
- bottom:(double)bottom
- left:(double)left
- right:(double)right {
- FGMPlatformEdgeInsets *pigeonResult = [[FGMPlatformEdgeInsets alloc] init];
- pigeonResult.top = top;
- pigeonResult.bottom = bottom;
- pigeonResult.left = left;
- pigeonResult.right = right;
- return pigeonResult;
-}
-+ (FGMPlatformEdgeInsets *)fromList:(NSArray<id> *)list {
- FGMPlatformEdgeInsets *pigeonResult = [[FGMPlatformEdgeInsets alloc] init];
- pigeonResult.top = [GetNullableObjectAtIndex(list, 0) doubleValue];
- pigeonResult.bottom = [GetNullableObjectAtIndex(list, 1) doubleValue];
- pigeonResult.left = [GetNullableObjectAtIndex(list, 2) doubleValue];
- pigeonResult.right = [GetNullableObjectAtIndex(list, 3) doubleValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformEdgeInsets *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformEdgeInsets fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.top),
- @(self.bottom),
- @(self.left),
- @(self.right),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformEdgeInsets *other = (FGMPlatformEdgeInsets *)object;
- return (self.top == other.top || (isnan(self.top) && isnan(other.top))) &&
- (self.bottom == other.bottom || (isnan(self.bottom) && isnan(other.bottom))) &&
- (self.left == other.left || (isnan(self.left) && isnan(other.left))) &&
- (self.right == other.right || (isnan(self.right) && isnan(other.right)));
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + (isnan(self.top) ? (NSUInteger)0x7FF8000000000000 : @(self.top).hash);
- result =
- result * 31 + (isnan(self.bottom) ? (NSUInteger)0x7FF8000000000000 : @(self.bottom).hash);
- result = result * 31 + (isnan(self.left) ? (NSUInteger)0x7FF8000000000000 : @(self.left).hash);
- result = result * 31 + (isnan(self.right) ? (NSUInteger)0x7FF8000000000000 : @(self.right).hash);
- return result;
-}
-- (NSString *)description {
- return
- [NSString stringWithFormat:@"FGMPlatformEdgeInsets(top: %f, bottom: %f, left: %f, right: %f)",
- self.top, self.bottom, self.left, self.right];
-}
-@end
-
-@implementation FGMPlatformLatLng
-+ (instancetype)makeWithLatitude:(double)latitude longitude:(double)longitude {
- FGMPlatformLatLng *pigeonResult = [[FGMPlatformLatLng alloc] init];
- pigeonResult.latitude = latitude;
- pigeonResult.longitude = longitude;
- return pigeonResult;
-}
-+ (FGMPlatformLatLng *)fromList:(NSArray<id> *)list {
- FGMPlatformLatLng *pigeonResult = [[FGMPlatformLatLng alloc] init];
- pigeonResult.latitude = [GetNullableObjectAtIndex(list, 0) doubleValue];
- pigeonResult.longitude = [GetNullableObjectAtIndex(list, 1) doubleValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformLatLng *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformLatLng fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.latitude),
- @(self.longitude),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformLatLng *other = (FGMPlatformLatLng *)object;
- return (self.latitude == other.latitude || (isnan(self.latitude) && isnan(other.latitude))) &&
- (self.longitude == other.longitude || (isnan(self.longitude) && isnan(other.longitude)));
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result =
- result * 31 + (isnan(self.latitude) ? (NSUInteger)0x7FF8000000000000 : @(self.latitude).hash);
- result = result * 31 +
- (isnan(self.longitude) ? (NSUInteger)0x7FF8000000000000 : @(self.longitude).hash);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformLatLng(latitude: %f, longitude: %f)",
- self.latitude, self.longitude];
-}
-@end
-
-@implementation FGMPlatformLatLngBounds
-+ (instancetype)makeWithNortheast:(FGMPlatformLatLng *)northeast
- southwest:(FGMPlatformLatLng *)southwest {
- FGMPlatformLatLngBounds *pigeonResult = [[FGMPlatformLatLngBounds alloc] init];
- pigeonResult.northeast = northeast;
- pigeonResult.southwest = southwest;
- return pigeonResult;
-}
-+ (FGMPlatformLatLngBounds *)fromList:(NSArray<id> *)list {
- FGMPlatformLatLngBounds *pigeonResult = [[FGMPlatformLatLngBounds alloc] init];
- pigeonResult.northeast = GetNullableObjectAtIndex(list, 0);
- pigeonResult.southwest = GetNullableObjectAtIndex(list, 1);
- return pigeonResult;
-}
-+ (nullable FGMPlatformLatLngBounds *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformLatLngBounds fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.northeast ?: [NSNull null],
- self.southwest ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformLatLngBounds *other = (FGMPlatformLatLngBounds *)object;
- return FLTPigeonDeepEquals(self.northeast, other.northeast) &&
- FLTPigeonDeepEquals(self.southwest, other.southwest);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.northeast);
- result = result * 31 + FLTPigeonDeepHash(self.southwest);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformLatLngBounds(northeast: %@, southwest: %@)",
- self.northeast, self.southwest];
-}
-@end
-
-@implementation FGMPlatformCameraTargetBounds
-+ (instancetype)makeWithBounds:(nullable FGMPlatformLatLngBounds *)bounds {
- FGMPlatformCameraTargetBounds *pigeonResult = [[FGMPlatformCameraTargetBounds alloc] init];
- pigeonResult.bounds = bounds;
- return pigeonResult;
-}
-+ (FGMPlatformCameraTargetBounds *)fromList:(NSArray<id> *)list {
- FGMPlatformCameraTargetBounds *pigeonResult = [[FGMPlatformCameraTargetBounds alloc] init];
- pigeonResult.bounds = GetNullableObjectAtIndex(list, 0);
- return pigeonResult;
-}
-+ (nullable FGMPlatformCameraTargetBounds *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformCameraTargetBounds fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.bounds ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformCameraTargetBounds *other = (FGMPlatformCameraTargetBounds *)object;
- return FLTPigeonDeepEquals(self.bounds, other.bounds);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.bounds);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformCameraTargetBounds(bounds: %@)", self.bounds];
-}
-@end
-
-@implementation FGMPlatformGroundOverlay
-+ (instancetype)makeWithGroundOverlayId:(NSString *)groundOverlayId
- image:(FGMPlatformBitmap *)image
- position:(nullable FGMPlatformLatLng *)position
- bounds:(nullable FGMPlatformLatLngBounds *)bounds
- anchor:(nullable FGMPlatformPoint *)anchor
- transparency:(double)transparency
- bearing:(double)bearing
- zIndex:(NSInteger)zIndex
- visible:(BOOL)visible
- clickable:(BOOL)clickable
- zoomLevel:(nullable NSNumber *)zoomLevel {
- FGMPlatformGroundOverlay *pigeonResult = [[FGMPlatformGroundOverlay alloc] init];
- pigeonResult.groundOverlayId = groundOverlayId;
- pigeonResult.image = image;
- pigeonResult.position = position;
- pigeonResult.bounds = bounds;
- pigeonResult.anchor = anchor;
- pigeonResult.transparency = transparency;
- pigeonResult.bearing = bearing;
- pigeonResult.zIndex = zIndex;
- pigeonResult.visible = visible;
- pigeonResult.clickable = clickable;
- pigeonResult.zoomLevel = zoomLevel;
- return pigeonResult;
-}
-+ (FGMPlatformGroundOverlay *)fromList:(NSArray<id> *)list {
- FGMPlatformGroundOverlay *pigeonResult = [[FGMPlatformGroundOverlay alloc] init];
- pigeonResult.groundOverlayId = GetNullableObjectAtIndex(list, 0);
- pigeonResult.image = GetNullableObjectAtIndex(list, 1);
- pigeonResult.position = GetNullableObjectAtIndex(list, 2);
- pigeonResult.bounds = GetNullableObjectAtIndex(list, 3);
- pigeonResult.anchor = GetNullableObjectAtIndex(list, 4);
- pigeonResult.transparency = [GetNullableObjectAtIndex(list, 5) doubleValue];
- pigeonResult.bearing = [GetNullableObjectAtIndex(list, 6) doubleValue];
- pigeonResult.zIndex = [GetNullableObjectAtIndex(list, 7) integerValue];
- pigeonResult.visible = [GetNullableObjectAtIndex(list, 8) boolValue];
- pigeonResult.clickable = [GetNullableObjectAtIndex(list, 9) boolValue];
- pigeonResult.zoomLevel = GetNullableObjectAtIndex(list, 10);
- return pigeonResult;
-}
-+ (nullable FGMPlatformGroundOverlay *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformGroundOverlay fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.groundOverlayId ?: [NSNull null],
- self.image ?: [NSNull null],
- self.position ?: [NSNull null],
- self.bounds ?: [NSNull null],
- self.anchor ?: [NSNull null],
- @(self.transparency),
- @(self.bearing),
- @(self.zIndex),
- @(self.visible),
- @(self.clickable),
- self.zoomLevel ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformGroundOverlay *other = (FGMPlatformGroundOverlay *)object;
- return FLTPigeonDeepEquals(self.groundOverlayId, other.groundOverlayId) &&
- FLTPigeonDeepEquals(self.image, other.image) &&
- FLTPigeonDeepEquals(self.position, other.position) &&
- FLTPigeonDeepEquals(self.bounds, other.bounds) &&
- FLTPigeonDeepEquals(self.anchor, other.anchor) &&
- (self.transparency == other.transparency ||
- (isnan(self.transparency) && isnan(other.transparency))) &&
- (self.bearing == other.bearing || (isnan(self.bearing) && isnan(other.bearing))) &&
- self.zIndex == other.zIndex && self.visible == other.visible &&
- self.clickable == other.clickable && FLTPigeonDeepEquals(self.zoomLevel, other.zoomLevel);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.groundOverlayId);
- result = result * 31 + FLTPigeonDeepHash(self.image);
- result = result * 31 + FLTPigeonDeepHash(self.position);
- result = result * 31 + FLTPigeonDeepHash(self.bounds);
- result = result * 31 + FLTPigeonDeepHash(self.anchor);
- result = result * 31 +
- (isnan(self.transparency) ? (NSUInteger)0x7FF8000000000000 : @(self.transparency).hash);
- result =
- result * 31 + (isnan(self.bearing) ? (NSUInteger)0x7FF8000000000000 : @(self.bearing).hash);
- result = result * 31 + @(self.zIndex).hash;
- result = result * 31 + @(self.visible).hash;
- result = result * 31 + @(self.clickable).hash;
- result = result * 31 + FLTPigeonDeepHash(self.zoomLevel);
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:@"FGMPlatformGroundOverlay(groundOverlayId: %@, image: %@, position: %@, "
- @"bounds: %@, anchor: %@, transparency: %f, bearing: %f, zIndex: %ld, "
- @"visible: %@, clickable: %@, zoomLevel: %@)",
- self.groundOverlayId, self.image, self.position, self.bounds, self.anchor,
- self.transparency, self.bearing, (long)self.zIndex,
- self.visible ? @"true" : @"false", self.clickable ? @"true" : @"false",
- self.zoomLevel];
-}
-@end
-
-@implementation FGMPlatformMapViewCreationParams
-+ (instancetype)
- makeWithInitialCameraPosition:(FGMPlatformCameraPosition *)initialCameraPosition
- mapConfiguration:(FGMPlatformMapConfiguration *)mapConfiguration
- initialCircles:(NSArray<FGMPlatformCircle *> *)initialCircles
- initialMarkers:(NSArray<FGMPlatformMarker *> *)initialMarkers
- initialPolygons:(NSArray<FGMPlatformPolygon *> *)initialPolygons
- initialPolylines:(NSArray<FGMPlatformPolyline *> *)initialPolylines
- initialHeatmaps:(NSArray<FGMPlatformHeatmap *> *)initialHeatmaps
- initialTileOverlays:(NSArray<FGMPlatformTileOverlay *> *)initialTileOverlays
- initialClusterManagers:(NSArray<FGMPlatformClusterManager *> *)initialClusterManagers
- initialGroundOverlays:(NSArray<FGMPlatformGroundOverlay *> *)initialGroundOverlays {
- FGMPlatformMapViewCreationParams *pigeonResult = [[FGMPlatformMapViewCreationParams alloc] init];
- pigeonResult.initialCameraPosition = initialCameraPosition;
- pigeonResult.mapConfiguration = mapConfiguration;
- pigeonResult.initialCircles = initialCircles;
- pigeonResult.initialMarkers = initialMarkers;
- pigeonResult.initialPolygons = initialPolygons;
- pigeonResult.initialPolylines = initialPolylines;
- pigeonResult.initialHeatmaps = initialHeatmaps;
- pigeonResult.initialTileOverlays = initialTileOverlays;
- pigeonResult.initialClusterManagers = initialClusterManagers;
- pigeonResult.initialGroundOverlays = initialGroundOverlays;
- return pigeonResult;
-}
-+ (FGMPlatformMapViewCreationParams *)fromList:(NSArray<id> *)list {
- FGMPlatformMapViewCreationParams *pigeonResult = [[FGMPlatformMapViewCreationParams alloc] init];
- pigeonResult.initialCameraPosition = GetNullableObjectAtIndex(list, 0);
- pigeonResult.mapConfiguration = GetNullableObjectAtIndex(list, 1);
- pigeonResult.initialCircles = GetNullableObjectAtIndex(list, 2);
- pigeonResult.initialMarkers = GetNullableObjectAtIndex(list, 3);
- pigeonResult.initialPolygons = GetNullableObjectAtIndex(list, 4);
- pigeonResult.initialPolylines = GetNullableObjectAtIndex(list, 5);
- pigeonResult.initialHeatmaps = GetNullableObjectAtIndex(list, 6);
- pigeonResult.initialTileOverlays = GetNullableObjectAtIndex(list, 7);
- pigeonResult.initialClusterManagers = GetNullableObjectAtIndex(list, 8);
- pigeonResult.initialGroundOverlays = GetNullableObjectAtIndex(list, 9);
- return pigeonResult;
-}
-+ (nullable FGMPlatformMapViewCreationParams *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformMapViewCreationParams fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.initialCameraPosition ?: [NSNull null],
- self.mapConfiguration ?: [NSNull null],
- self.initialCircles ?: [NSNull null],
- self.initialMarkers ?: [NSNull null],
- self.initialPolygons ?: [NSNull null],
- self.initialPolylines ?: [NSNull null],
- self.initialHeatmaps ?: [NSNull null],
- self.initialTileOverlays ?: [NSNull null],
- self.initialClusterManagers ?: [NSNull null],
- self.initialGroundOverlays ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformMapViewCreationParams *other = (FGMPlatformMapViewCreationParams *)object;
- return FLTPigeonDeepEquals(self.initialCameraPosition, other.initialCameraPosition) &&
- FLTPigeonDeepEquals(self.mapConfiguration, other.mapConfiguration) &&
- FLTPigeonDeepEquals(self.initialCircles, other.initialCircles) &&
- FLTPigeonDeepEquals(self.initialMarkers, other.initialMarkers) &&
- FLTPigeonDeepEquals(self.initialPolygons, other.initialPolygons) &&
- FLTPigeonDeepEquals(self.initialPolylines, other.initialPolylines) &&
- FLTPigeonDeepEquals(self.initialHeatmaps, other.initialHeatmaps) &&
- FLTPigeonDeepEquals(self.initialTileOverlays, other.initialTileOverlays) &&
- FLTPigeonDeepEquals(self.initialClusterManagers, other.initialClusterManagers) &&
- FLTPigeonDeepEquals(self.initialGroundOverlays, other.initialGroundOverlays);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.initialCameraPosition);
- result = result * 31 + FLTPigeonDeepHash(self.mapConfiguration);
- result = result * 31 + FLTPigeonDeepHash(self.initialCircles);
- result = result * 31 + FLTPigeonDeepHash(self.initialMarkers);
- result = result * 31 + FLTPigeonDeepHash(self.initialPolygons);
- result = result * 31 + FLTPigeonDeepHash(self.initialPolylines);
- result = result * 31 + FLTPigeonDeepHash(self.initialHeatmaps);
- result = result * 31 + FLTPigeonDeepHash(self.initialTileOverlays);
- result = result * 31 + FLTPigeonDeepHash(self.initialClusterManagers);
- result = result * 31 + FLTPigeonDeepHash(self.initialGroundOverlays);
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:
- @"FGMPlatformMapViewCreationParams(initialCameraPosition: %@, mapConfiguration: %@, "
- @"initialCircles: %@, initialMarkers: %@, initialPolygons: %@, initialPolylines: %@, "
- @"initialHeatmaps: %@, initialTileOverlays: %@, initialClusterManagers: %@, "
- @"initialGroundOverlays: %@)",
- self.initialCameraPosition, self.mapConfiguration, self.initialCircles,
- self.initialMarkers, self.initialPolygons, self.initialPolylines, self.initialHeatmaps,
- self.initialTileOverlays, self.initialClusterManagers, self.initialGroundOverlays];
-}
-@end
-
-@implementation FGMPlatformMapConfiguration
-+ (instancetype)makeWithCompassEnabled:(nullable NSNumber *)compassEnabled
- cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds
- mapType:(nullable FGMPlatformMapTypeBox *)mapType
- minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference
- rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled
- scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled
- tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled
- trackCameraPosition:(nullable NSNumber *)trackCameraPosition
- zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled
- myLocationEnabled:(nullable NSNumber *)myLocationEnabled
- myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled
- padding:(nullable FGMPlatformEdgeInsets *)padding
- indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled
- trafficEnabled:(nullable NSNumber *)trafficEnabled
- buildingsEnabled:(nullable NSNumber *)buildingsEnabled
- markerType:(FGMPlatformMarkerType)markerType
- mapId:(nullable NSString *)mapId
- style:(nullable NSString *)style {
- FGMPlatformMapConfiguration *pigeonResult = [[FGMPlatformMapConfiguration alloc] init];
- pigeonResult.compassEnabled = compassEnabled;
- pigeonResult.cameraTargetBounds = cameraTargetBounds;
- pigeonResult.mapType = mapType;
- pigeonResult.minMaxZoomPreference = minMaxZoomPreference;
- pigeonResult.rotateGesturesEnabled = rotateGesturesEnabled;
- pigeonResult.scrollGesturesEnabled = scrollGesturesEnabled;
- pigeonResult.tiltGesturesEnabled = tiltGesturesEnabled;
- pigeonResult.trackCameraPosition = trackCameraPosition;
- pigeonResult.zoomGesturesEnabled = zoomGesturesEnabled;
- pigeonResult.myLocationEnabled = myLocationEnabled;
- pigeonResult.myLocationButtonEnabled = myLocationButtonEnabled;
- pigeonResult.padding = padding;
- pigeonResult.indoorViewEnabled = indoorViewEnabled;
- pigeonResult.trafficEnabled = trafficEnabled;
- pigeonResult.buildingsEnabled = buildingsEnabled;
- pigeonResult.markerType = markerType;
- pigeonResult.mapId = mapId;
- pigeonResult.style = style;
- return pigeonResult;
-}
-+ (FGMPlatformMapConfiguration *)fromList:(NSArray<id> *)list {
- FGMPlatformMapConfiguration *pigeonResult = [[FGMPlatformMapConfiguration alloc] init];
- pigeonResult.compassEnabled = GetNullableObjectAtIndex(list, 0);
- pigeonResult.cameraTargetBounds = GetNullableObjectAtIndex(list, 1);
- pigeonResult.mapType = GetNullableObjectAtIndex(list, 2);
- pigeonResult.minMaxZoomPreference = GetNullableObjectAtIndex(list, 3);
- pigeonResult.rotateGesturesEnabled = GetNullableObjectAtIndex(list, 4);
- pigeonResult.scrollGesturesEnabled = GetNullableObjectAtIndex(list, 5);
- pigeonResult.tiltGesturesEnabled = GetNullableObjectAtIndex(list, 6);
- pigeonResult.trackCameraPosition = GetNullableObjectAtIndex(list, 7);
- pigeonResult.zoomGesturesEnabled = GetNullableObjectAtIndex(list, 8);
- pigeonResult.myLocationEnabled = GetNullableObjectAtIndex(list, 9);
- pigeonResult.myLocationButtonEnabled = GetNullableObjectAtIndex(list, 10);
- pigeonResult.padding = GetNullableObjectAtIndex(list, 11);
- pigeonResult.indoorViewEnabled = GetNullableObjectAtIndex(list, 12);
- pigeonResult.trafficEnabled = GetNullableObjectAtIndex(list, 13);
- pigeonResult.buildingsEnabled = GetNullableObjectAtIndex(list, 14);
- FGMPlatformMarkerTypeBox *boxedFGMPlatformMarkerType = GetNullableObjectAtIndex(list, 15);
- pigeonResult.markerType = boxedFGMPlatformMarkerType.value;
- pigeonResult.mapId = GetNullableObjectAtIndex(list, 16);
- pigeonResult.style = GetNullableObjectAtIndex(list, 17);
- return pigeonResult;
-}
-+ (nullable FGMPlatformMapConfiguration *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformMapConfiguration fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.compassEnabled ?: [NSNull null],
- self.cameraTargetBounds ?: [NSNull null],
- self.mapType ?: [NSNull null],
- self.minMaxZoomPreference ?: [NSNull null],
- self.rotateGesturesEnabled ?: [NSNull null],
- self.scrollGesturesEnabled ?: [NSNull null],
- self.tiltGesturesEnabled ?: [NSNull null],
- self.trackCameraPosition ?: [NSNull null],
- self.zoomGesturesEnabled ?: [NSNull null],
- self.myLocationEnabled ?: [NSNull null],
- self.myLocationButtonEnabled ?: [NSNull null],
- self.padding ?: [NSNull null],
- self.indoorViewEnabled ?: [NSNull null],
- self.trafficEnabled ?: [NSNull null],
- self.buildingsEnabled ?: [NSNull null],
- [[FGMPlatformMarkerTypeBox alloc] initWithValue:self.markerType],
- self.mapId ?: [NSNull null],
- self.style ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformMapConfiguration *other = (FGMPlatformMapConfiguration *)object;
- return FLTPigeonDeepEquals(self.compassEnabled, other.compassEnabled) &&
- FLTPigeonDeepEquals(self.cameraTargetBounds, other.cameraTargetBounds) &&
- FLTPigeonDeepEquals(self.mapType, other.mapType) &&
- FLTPigeonDeepEquals(self.minMaxZoomPreference, other.minMaxZoomPreference) &&
- FLTPigeonDeepEquals(self.rotateGesturesEnabled, other.rotateGesturesEnabled) &&
- FLTPigeonDeepEquals(self.scrollGesturesEnabled, other.scrollGesturesEnabled) &&
- FLTPigeonDeepEquals(self.tiltGesturesEnabled, other.tiltGesturesEnabled) &&
- FLTPigeonDeepEquals(self.trackCameraPosition, other.trackCameraPosition) &&
- FLTPigeonDeepEquals(self.zoomGesturesEnabled, other.zoomGesturesEnabled) &&
- FLTPigeonDeepEquals(self.myLocationEnabled, other.myLocationEnabled) &&
- FLTPigeonDeepEquals(self.myLocationButtonEnabled, other.myLocationButtonEnabled) &&
- FLTPigeonDeepEquals(self.padding, other.padding) &&
- FLTPigeonDeepEquals(self.indoorViewEnabled, other.indoorViewEnabled) &&
- FLTPigeonDeepEquals(self.trafficEnabled, other.trafficEnabled) &&
- FLTPigeonDeepEquals(self.buildingsEnabled, other.buildingsEnabled) &&
- self.markerType == other.markerType && FLTPigeonDeepEquals(self.mapId, other.mapId) &&
- FLTPigeonDeepEquals(self.style, other.style);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.compassEnabled);
- result = result * 31 + FLTPigeonDeepHash(self.cameraTargetBounds);
- result = result * 31 + FLTPigeonDeepHash(self.mapType);
- result = result * 31 + FLTPigeonDeepHash(self.minMaxZoomPreference);
- result = result * 31 + FLTPigeonDeepHash(self.rotateGesturesEnabled);
- result = result * 31 + FLTPigeonDeepHash(self.scrollGesturesEnabled);
- result = result * 31 + FLTPigeonDeepHash(self.tiltGesturesEnabled);
- result = result * 31 + FLTPigeonDeepHash(self.trackCameraPosition);
- result = result * 31 + FLTPigeonDeepHash(self.zoomGesturesEnabled);
- result = result * 31 + FLTPigeonDeepHash(self.myLocationEnabled);
- result = result * 31 + FLTPigeonDeepHash(self.myLocationButtonEnabled);
- result = result * 31 + FLTPigeonDeepHash(self.padding);
- result = result * 31 + FLTPigeonDeepHash(self.indoorViewEnabled);
- result = result * 31 + FLTPigeonDeepHash(self.trafficEnabled);
- result = result * 31 + FLTPigeonDeepHash(self.buildingsEnabled);
- result = result * 31 + @(self.markerType).hash;
- result = result * 31 + FLTPigeonDeepHash(self.mapId);
- result = result * 31 + FLTPigeonDeepHash(self.style);
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:
- @"FGMPlatformMapConfiguration(compassEnabled: %@, cameraTargetBounds: %@, mapType: %@, "
- @"minMaxZoomPreference: %@, rotateGesturesEnabled: %@, scrollGesturesEnabled: %@, "
- @"tiltGesturesEnabled: %@, trackCameraPosition: %@, zoomGesturesEnabled: %@, "
- @"myLocationEnabled: %@, myLocationButtonEnabled: %@, padding: %@, indoorViewEnabled: "
- @"%@, trafficEnabled: %@, buildingsEnabled: %@, markerType: %ld, mapId: %@, style: %@)",
- self.compassEnabled, self.cameraTargetBounds, self.mapType, self.minMaxZoomPreference,
- self.rotateGesturesEnabled, self.scrollGesturesEnabled, self.tiltGesturesEnabled,
- self.trackCameraPosition, self.zoomGesturesEnabled, self.myLocationEnabled,
- self.myLocationButtonEnabled, self.padding, self.indoorViewEnabled, self.trafficEnabled,
- self.buildingsEnabled, (long)self.markerType, self.mapId, self.style];
-}
-@end
-
-@implementation FGMPlatformPoint
-+ (instancetype)makeWithX:(double)x y:(double)y {
- FGMPlatformPoint *pigeonResult = [[FGMPlatformPoint alloc] init];
- pigeonResult.x = x;
- pigeonResult.y = y;
- return pigeonResult;
-}
-+ (FGMPlatformPoint *)fromList:(NSArray<id> *)list {
- FGMPlatformPoint *pigeonResult = [[FGMPlatformPoint alloc] init];
- pigeonResult.x = [GetNullableObjectAtIndex(list, 0) doubleValue];
- pigeonResult.y = [GetNullableObjectAtIndex(list, 1) doubleValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformPoint *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformPoint fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.x),
- @(self.y),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformPoint *other = (FGMPlatformPoint *)object;
- return (self.x == other.x || (isnan(self.x) && isnan(other.x))) &&
- (self.y == other.y || (isnan(self.y) && isnan(other.y)));
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + (isnan(self.x) ? (NSUInteger)0x7FF8000000000000 : @(self.x).hash);
- result = result * 31 + (isnan(self.y) ? (NSUInteger)0x7FF8000000000000 : @(self.y).hash);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformPoint(x: %f, y: %f)", self.x, self.y];
-}
-@end
-
-@implementation FGMPlatformSize
-+ (instancetype)makeWithWidth:(double)width height:(double)height {
- FGMPlatformSize *pigeonResult = [[FGMPlatformSize alloc] init];
- pigeonResult.width = width;
- pigeonResult.height = height;
- return pigeonResult;
-}
-+ (FGMPlatformSize *)fromList:(NSArray<id> *)list {
- FGMPlatformSize *pigeonResult = [[FGMPlatformSize alloc] init];
- pigeonResult.width = [GetNullableObjectAtIndex(list, 0) doubleValue];
- pigeonResult.height = [GetNullableObjectAtIndex(list, 1) doubleValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformSize *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformSize fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.width),
- @(self.height),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformSize *other = (FGMPlatformSize *)object;
- return (self.width == other.width || (isnan(self.width) && isnan(other.width))) &&
- (self.height == other.height || (isnan(self.height) && isnan(other.height)));
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + (isnan(self.width) ? (NSUInteger)0x7FF8000000000000 : @(self.width).hash);
- result =
- result * 31 + (isnan(self.height) ? (NSUInteger)0x7FF8000000000000 : @(self.height).hash);
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:@"FGMPlatformSize(width: %f, height: %f)", self.width, self.height];
-}
-@end
-
-@implementation FGMPlatformColor
-+ (instancetype)makeWithRed:(double)red green:(double)green blue:(double)blue alpha:(double)alpha {
- FGMPlatformColor *pigeonResult = [[FGMPlatformColor alloc] init];
- pigeonResult.red = red;
- pigeonResult.green = green;
- pigeonResult.blue = blue;
- pigeonResult.alpha = alpha;
- return pigeonResult;
-}
-+ (FGMPlatformColor *)fromList:(NSArray<id> *)list {
- FGMPlatformColor *pigeonResult = [[FGMPlatformColor alloc] init];
- pigeonResult.red = [GetNullableObjectAtIndex(list, 0) doubleValue];
- pigeonResult.green = [GetNullableObjectAtIndex(list, 1) doubleValue];
- pigeonResult.blue = [GetNullableObjectAtIndex(list, 2) doubleValue];
- pigeonResult.alpha = [GetNullableObjectAtIndex(list, 3) doubleValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformColor *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformColor fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.red),
- @(self.green),
- @(self.blue),
- @(self.alpha),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformColor *other = (FGMPlatformColor *)object;
- return (self.red == other.red || (isnan(self.red) && isnan(other.red))) &&
- (self.green == other.green || (isnan(self.green) && isnan(other.green))) &&
- (self.blue == other.blue || (isnan(self.blue) && isnan(other.blue))) &&
- (self.alpha == other.alpha || (isnan(self.alpha) && isnan(other.alpha)));
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + (isnan(self.red) ? (NSUInteger)0x7FF8000000000000 : @(self.red).hash);
- result = result * 31 + (isnan(self.green) ? (NSUInteger)0x7FF8000000000000 : @(self.green).hash);
- result = result * 31 + (isnan(self.blue) ? (NSUInteger)0x7FF8000000000000 : @(self.blue).hash);
- result = result * 31 + (isnan(self.alpha) ? (NSUInteger)0x7FF8000000000000 : @(self.alpha).hash);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformColor(red: %f, green: %f, blue: %f, alpha: %f)",
- self.red, self.green, self.blue, self.alpha];
-}
-@end
-
-@implementation FGMPlatformTileLayer
-+ (instancetype)makeWithVisible:(BOOL)visible
- fadeIn:(BOOL)fadeIn
- opacity:(double)opacity
- zIndex:(NSInteger)zIndex {
- FGMPlatformTileLayer *pigeonResult = [[FGMPlatformTileLayer alloc] init];
- pigeonResult.visible = visible;
- pigeonResult.fadeIn = fadeIn;
- pigeonResult.opacity = opacity;
- pigeonResult.zIndex = zIndex;
- return pigeonResult;
-}
-+ (FGMPlatformTileLayer *)fromList:(NSArray<id> *)list {
- FGMPlatformTileLayer *pigeonResult = [[FGMPlatformTileLayer alloc] init];
- pigeonResult.visible = [GetNullableObjectAtIndex(list, 0) boolValue];
- pigeonResult.fadeIn = [GetNullableObjectAtIndex(list, 1) boolValue];
- pigeonResult.opacity = [GetNullableObjectAtIndex(list, 2) doubleValue];
- pigeonResult.zIndex = [GetNullableObjectAtIndex(list, 3) integerValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformTileLayer *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformTileLayer fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.visible),
- @(self.fadeIn),
- @(self.opacity),
- @(self.zIndex),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformTileLayer *other = (FGMPlatformTileLayer *)object;
- return self.visible == other.visible && self.fadeIn == other.fadeIn &&
- (self.opacity == other.opacity || (isnan(self.opacity) && isnan(other.opacity))) &&
- self.zIndex == other.zIndex;
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + @(self.visible).hash;
- result = result * 31 + @(self.fadeIn).hash;
- result =
- result * 31 + (isnan(self.opacity) ? (NSUInteger)0x7FF8000000000000 : @(self.opacity).hash);
- result = result * 31 + @(self.zIndex).hash;
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:@"FGMPlatformTileLayer(visible: %@, fadeIn: %@, opacity: %f, zIndex: %ld)",
- self.visible ? @"true" : @"false", self.fadeIn ? @"true" : @"false",
- self.opacity, (long)self.zIndex];
-}
-@end
-
-@implementation FGMPlatformZoomRange
-+ (instancetype)makeWithMin:(nullable NSNumber *)min max:(nullable NSNumber *)max {
- FGMPlatformZoomRange *pigeonResult = [[FGMPlatformZoomRange alloc] init];
- pigeonResult.min = min;
- pigeonResult.max = max;
- return pigeonResult;
-}
-+ (FGMPlatformZoomRange *)fromList:(NSArray<id> *)list {
- FGMPlatformZoomRange *pigeonResult = [[FGMPlatformZoomRange alloc] init];
- pigeonResult.min = GetNullableObjectAtIndex(list, 0);
- pigeonResult.max = GetNullableObjectAtIndex(list, 1);
- return pigeonResult;
-}
-+ (nullable FGMPlatformZoomRange *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformZoomRange fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.min ?: [NSNull null],
- self.max ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformZoomRange *other = (FGMPlatformZoomRange *)object;
- return FLTPigeonDeepEquals(self.min, other.min) && FLTPigeonDeepEquals(self.max, other.max);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.min);
- result = result * 31 + FLTPigeonDeepHash(self.max);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformZoomRange(min: %@, max: %@)", self.min, self.max];
-}
-@end
-
-@implementation FGMPlatformBitmap
-+ (instancetype)makeWithBitmap:(id)bitmap {
- FGMPlatformBitmap *pigeonResult = [[FGMPlatformBitmap alloc] init];
- pigeonResult.bitmap = bitmap;
- return pigeonResult;
-}
-+ (FGMPlatformBitmap *)fromList:(NSArray<id> *)list {
- FGMPlatformBitmap *pigeonResult = [[FGMPlatformBitmap alloc] init];
- pigeonResult.bitmap = GetNullableObjectAtIndex(list, 0);
- return pigeonResult;
-}
-+ (nullable FGMPlatformBitmap *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformBitmap fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.bitmap ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformBitmap *other = (FGMPlatformBitmap *)object;
- return FLTPigeonDeepEquals(self.bitmap, other.bitmap);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.bitmap);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformBitmap(bitmap: %@)", self.bitmap];
-}
-@end
-
-@implementation FGMPlatformBitmapDefaultMarker
-+ (instancetype)makeWithHue:(nullable NSNumber *)hue {
- FGMPlatformBitmapDefaultMarker *pigeonResult = [[FGMPlatformBitmapDefaultMarker alloc] init];
- pigeonResult.hue = hue;
- return pigeonResult;
-}
-+ (FGMPlatformBitmapDefaultMarker *)fromList:(NSArray<id> *)list {
- FGMPlatformBitmapDefaultMarker *pigeonResult = [[FGMPlatformBitmapDefaultMarker alloc] init];
- pigeonResult.hue = GetNullableObjectAtIndex(list, 0);
- return pigeonResult;
-}
-+ (nullable FGMPlatformBitmapDefaultMarker *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformBitmapDefaultMarker fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.hue ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformBitmapDefaultMarker *other = (FGMPlatformBitmapDefaultMarker *)object;
- return FLTPigeonDeepEquals(self.hue, other.hue);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.hue);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformBitmapDefaultMarker(hue: %@)", self.hue];
-}
-@end
-
-@implementation FGMPlatformBitmapBytes
-+ (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData
- size:(nullable FGMPlatformSize *)size {
- FGMPlatformBitmapBytes *pigeonResult = [[FGMPlatformBitmapBytes alloc] init];
- pigeonResult.byteData = byteData;
- pigeonResult.size = size;
- return pigeonResult;
-}
-+ (FGMPlatformBitmapBytes *)fromList:(NSArray<id> *)list {
- FGMPlatformBitmapBytes *pigeonResult = [[FGMPlatformBitmapBytes alloc] init];
- pigeonResult.byteData = GetNullableObjectAtIndex(list, 0);
- pigeonResult.size = GetNullableObjectAtIndex(list, 1);
- return pigeonResult;
-}
-+ (nullable FGMPlatformBitmapBytes *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformBitmapBytes fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.byteData ?: [NSNull null],
- self.size ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformBitmapBytes *other = (FGMPlatformBitmapBytes *)object;
- return FLTPigeonDeepEquals(self.byteData, other.byteData) &&
- FLTPigeonDeepEquals(self.size, other.size);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.byteData);
- result = result * 31 + FLTPigeonDeepHash(self.size);
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:@"FGMPlatformBitmapBytes(byteData: %@, size: %@)", self.byteData, self.size];
-}
-@end
-
-@implementation FGMPlatformBitmapAsset
-+ (instancetype)makeWithName:(NSString *)name pkg:(nullable NSString *)pkg {
- FGMPlatformBitmapAsset *pigeonResult = [[FGMPlatformBitmapAsset alloc] init];
- pigeonResult.name = name;
- pigeonResult.pkg = pkg;
- return pigeonResult;
-}
-+ (FGMPlatformBitmapAsset *)fromList:(NSArray<id> *)list {
- FGMPlatformBitmapAsset *pigeonResult = [[FGMPlatformBitmapAsset alloc] init];
- pigeonResult.name = GetNullableObjectAtIndex(list, 0);
- pigeonResult.pkg = GetNullableObjectAtIndex(list, 1);
- return pigeonResult;
-}
-+ (nullable FGMPlatformBitmapAsset *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformBitmapAsset fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.name ?: [NSNull null],
- self.pkg ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformBitmapAsset *other = (FGMPlatformBitmapAsset *)object;
- return FLTPigeonDeepEquals(self.name, other.name) && FLTPigeonDeepEquals(self.pkg, other.pkg);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.name);
- result = result * 31 + FLTPigeonDeepHash(self.pkg);
- return result;
-}
-- (NSString *)description {
- return
- [NSString stringWithFormat:@"FGMPlatformBitmapAsset(name: %@, pkg: %@)", self.name, self.pkg];
-}
-@end
-
-@implementation FGMPlatformBitmapAssetImage
-+ (instancetype)makeWithName:(NSString *)name
- scale:(double)scale
- size:(nullable FGMPlatformSize *)size {
- FGMPlatformBitmapAssetImage *pigeonResult = [[FGMPlatformBitmapAssetImage alloc] init];
- pigeonResult.name = name;
- pigeonResult.scale = scale;
- pigeonResult.size = size;
- return pigeonResult;
-}
-+ (FGMPlatformBitmapAssetImage *)fromList:(NSArray<id> *)list {
- FGMPlatformBitmapAssetImage *pigeonResult = [[FGMPlatformBitmapAssetImage alloc] init];
- pigeonResult.name = GetNullableObjectAtIndex(list, 0);
- pigeonResult.scale = [GetNullableObjectAtIndex(list, 1) doubleValue];
- pigeonResult.size = GetNullableObjectAtIndex(list, 2);
- return pigeonResult;
-}
-+ (nullable FGMPlatformBitmapAssetImage *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformBitmapAssetImage fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.name ?: [NSNull null],
- @(self.scale),
- self.size ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformBitmapAssetImage *other = (FGMPlatformBitmapAssetImage *)object;
- return FLTPigeonDeepEquals(self.name, other.name) &&
- (self.scale == other.scale || (isnan(self.scale) && isnan(other.scale))) &&
- FLTPigeonDeepEquals(self.size, other.size);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.name);
- result = result * 31 + (isnan(self.scale) ? (NSUInteger)0x7FF8000000000000 : @(self.scale).hash);
- result = result * 31 + FLTPigeonDeepHash(self.size);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformBitmapAssetImage(name: %@, scale: %f, size: %@)",
- self.name, self.scale, self.size];
-}
-@end
-
-@implementation FGMPlatformBitmapAssetMap
-+ (instancetype)makeWithAssetName:(NSString *)assetName
- bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling
- imagePixelRatio:(double)imagePixelRatio
- width:(nullable NSNumber *)width
- height:(nullable NSNumber *)height {
- FGMPlatformBitmapAssetMap *pigeonResult = [[FGMPlatformBitmapAssetMap alloc] init];
- pigeonResult.assetName = assetName;
- pigeonResult.bitmapScaling = bitmapScaling;
- pigeonResult.imagePixelRatio = imagePixelRatio;
- pigeonResult.width = width;
- pigeonResult.height = height;
- return pigeonResult;
-}
-+ (FGMPlatformBitmapAssetMap *)fromList:(NSArray<id> *)list {
- FGMPlatformBitmapAssetMap *pigeonResult = [[FGMPlatformBitmapAssetMap alloc] init];
- pigeonResult.assetName = GetNullableObjectAtIndex(list, 0);
- FGMPlatformMapBitmapScalingBox *boxedFGMPlatformMapBitmapScaling =
- GetNullableObjectAtIndex(list, 1);
- pigeonResult.bitmapScaling = boxedFGMPlatformMapBitmapScaling.value;
- pigeonResult.imagePixelRatio = [GetNullableObjectAtIndex(list, 2) doubleValue];
- pigeonResult.width = GetNullableObjectAtIndex(list, 3);
- pigeonResult.height = GetNullableObjectAtIndex(list, 4);
- return pigeonResult;
-}
-+ (nullable FGMPlatformBitmapAssetMap *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformBitmapAssetMap fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.assetName ?: [NSNull null],
- [[FGMPlatformMapBitmapScalingBox alloc] initWithValue:self.bitmapScaling],
- @(self.imagePixelRatio),
- self.width ?: [NSNull null],
- self.height ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformBitmapAssetMap *other = (FGMPlatformBitmapAssetMap *)object;
- return FLTPigeonDeepEquals(self.assetName, other.assetName) &&
- self.bitmapScaling == other.bitmapScaling &&
- (self.imagePixelRatio == other.imagePixelRatio ||
- (isnan(self.imagePixelRatio) && isnan(other.imagePixelRatio))) &&
- FLTPigeonDeepEquals(self.width, other.width) &&
- FLTPigeonDeepEquals(self.height, other.height);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.assetName);
- result = result * 31 + @(self.bitmapScaling).hash;
- result = result * 31 + (isnan(self.imagePixelRatio) ? (NSUInteger)0x7FF8000000000000
- : @(self.imagePixelRatio).hash);
- result = result * 31 + FLTPigeonDeepHash(self.width);
- result = result * 31 + FLTPigeonDeepHash(self.height);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformBitmapAssetMap(assetName: %@, bitmapScaling: %ld, "
- @"imagePixelRatio: %f, width: %@, height: %@)",
- self.assetName, (long)self.bitmapScaling, self.imagePixelRatio,
- self.width, self.height];
-}
-@end
-
-@implementation FGMPlatformBitmapBytesMap
-+ (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData
- bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling
- imagePixelRatio:(double)imagePixelRatio
- width:(nullable NSNumber *)width
- height:(nullable NSNumber *)height {
- FGMPlatformBitmapBytesMap *pigeonResult = [[FGMPlatformBitmapBytesMap alloc] init];
- pigeonResult.byteData = byteData;
- pigeonResult.bitmapScaling = bitmapScaling;
- pigeonResult.imagePixelRatio = imagePixelRatio;
- pigeonResult.width = width;
- pigeonResult.height = height;
- return pigeonResult;
-}
-+ (FGMPlatformBitmapBytesMap *)fromList:(NSArray<id> *)list {
- FGMPlatformBitmapBytesMap *pigeonResult = [[FGMPlatformBitmapBytesMap alloc] init];
- pigeonResult.byteData = GetNullableObjectAtIndex(list, 0);
- FGMPlatformMapBitmapScalingBox *boxedFGMPlatformMapBitmapScaling =
- GetNullableObjectAtIndex(list, 1);
- pigeonResult.bitmapScaling = boxedFGMPlatformMapBitmapScaling.value;
- pigeonResult.imagePixelRatio = [GetNullableObjectAtIndex(list, 2) doubleValue];
- pigeonResult.width = GetNullableObjectAtIndex(list, 3);
- pigeonResult.height = GetNullableObjectAtIndex(list, 4);
- return pigeonResult;
-}
-+ (nullable FGMPlatformBitmapBytesMap *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformBitmapBytesMap fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.byteData ?: [NSNull null],
- [[FGMPlatformMapBitmapScalingBox alloc] initWithValue:self.bitmapScaling],
- @(self.imagePixelRatio),
- self.width ?: [NSNull null],
- self.height ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformBitmapBytesMap *other = (FGMPlatformBitmapBytesMap *)object;
- return FLTPigeonDeepEquals(self.byteData, other.byteData) &&
- self.bitmapScaling == other.bitmapScaling &&
- (self.imagePixelRatio == other.imagePixelRatio ||
- (isnan(self.imagePixelRatio) && isnan(other.imagePixelRatio))) &&
- FLTPigeonDeepEquals(self.width, other.width) &&
- FLTPigeonDeepEquals(self.height, other.height);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.byteData);
- result = result * 31 + @(self.bitmapScaling).hash;
- result = result * 31 + (isnan(self.imagePixelRatio) ? (NSUInteger)0x7FF8000000000000
- : @(self.imagePixelRatio).hash);
- result = result * 31 + FLTPigeonDeepHash(self.width);
- result = result * 31 + FLTPigeonDeepHash(self.height);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformBitmapBytesMap(byteData: %@, bitmapScaling: %ld, "
- @"imagePixelRatio: %f, width: %@, height: %@)",
- self.byteData, (long)self.bitmapScaling, self.imagePixelRatio,
- self.width, self.height];
-}
-@end
-
-@implementation FGMPlatformBitmapPinConfig
-+ (instancetype)makeWithBackgroundColor:(nullable FGMPlatformColor *)backgroundColor
- borderColor:(nullable FGMPlatformColor *)borderColor
- glyphColor:(nullable FGMPlatformColor *)glyphColor
- glyphTextColor:(nullable FGMPlatformColor *)glyphTextColor
- glyphText:(nullable NSString *)glyphText
- glyphBitmap:(nullable FGMPlatformBitmap *)glyphBitmap {
- FGMPlatformBitmapPinConfig *pigeonResult = [[FGMPlatformBitmapPinConfig alloc] init];
- pigeonResult.backgroundColor = backgroundColor;
- pigeonResult.borderColor = borderColor;
- pigeonResult.glyphColor = glyphColor;
- pigeonResult.glyphTextColor = glyphTextColor;
- pigeonResult.glyphText = glyphText;
- pigeonResult.glyphBitmap = glyphBitmap;
- return pigeonResult;
-}
-+ (FGMPlatformBitmapPinConfig *)fromList:(NSArray<id> *)list {
- FGMPlatformBitmapPinConfig *pigeonResult = [[FGMPlatformBitmapPinConfig alloc] init];
- pigeonResult.backgroundColor = GetNullableObjectAtIndex(list, 0);
- pigeonResult.borderColor = GetNullableObjectAtIndex(list, 1);
- pigeonResult.glyphColor = GetNullableObjectAtIndex(list, 2);
- pigeonResult.glyphTextColor = GetNullableObjectAtIndex(list, 3);
- pigeonResult.glyphText = GetNullableObjectAtIndex(list, 4);
- pigeonResult.glyphBitmap = GetNullableObjectAtIndex(list, 5);
- return pigeonResult;
-}
-+ (nullable FGMPlatformBitmapPinConfig *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformBitmapPinConfig fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.backgroundColor ?: [NSNull null],
- self.borderColor ?: [NSNull null],
- self.glyphColor ?: [NSNull null],
- self.glyphTextColor ?: [NSNull null],
- self.glyphText ?: [NSNull null],
- self.glyphBitmap ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformBitmapPinConfig *other = (FGMPlatformBitmapPinConfig *)object;
- return FLTPigeonDeepEquals(self.backgroundColor, other.backgroundColor) &&
- FLTPigeonDeepEquals(self.borderColor, other.borderColor) &&
- FLTPigeonDeepEquals(self.glyphColor, other.glyphColor) &&
- FLTPigeonDeepEquals(self.glyphTextColor, other.glyphTextColor) &&
- FLTPigeonDeepEquals(self.glyphText, other.glyphText) &&
- FLTPigeonDeepEquals(self.glyphBitmap, other.glyphBitmap);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.backgroundColor);
- result = result * 31 + FLTPigeonDeepHash(self.borderColor);
- result = result * 31 + FLTPigeonDeepHash(self.glyphColor);
- result = result * 31 + FLTPigeonDeepHash(self.glyphTextColor);
- result = result * 31 + FLTPigeonDeepHash(self.glyphText);
- result = result * 31 + FLTPigeonDeepHash(self.glyphBitmap);
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:@"FGMPlatformBitmapPinConfig(backgroundColor: %@, borderColor: %@, "
- @"glyphColor: %@, glyphTextColor: %@, glyphText: %@, glyphBitmap: %@)",
- self.backgroundColor, self.borderColor, self.glyphColor, self.glyphTextColor,
- self.glyphText, self.glyphBitmap];
-}
-@end
-
-@interface FGMGoogleMapsFlutterPigeonMessagesPigeonCodecReader : FlutterStandardReader
-@end
-@implementation FGMGoogleMapsFlutterPigeonMessagesPigeonCodecReader
-- (nullable id)readValueOfType:(UInt8)type {
- switch (type) {
- case 129: {
- NSNumber *enumAsNumber = [self readValue];
- return enumAsNumber == nil
- ? nil
- : [[FGMPlatformMapTypeBox alloc] initWithValue:[enumAsNumber integerValue]];
- }
- case 130: {
- NSNumber *enumAsNumber = [self readValue];
- return enumAsNumber == nil ? nil
- : [[FGMPlatformMarkerCollisionBehaviorBox alloc]
- initWithValue:[enumAsNumber integerValue]];
- }
- case 131: {
- NSNumber *enumAsNumber = [self readValue];
- return enumAsNumber == nil
- ? nil
- : [[FGMPlatformJointTypeBox alloc] initWithValue:[enumAsNumber integerValue]];
- }
- case 132: {
- NSNumber *enumAsNumber = [self readValue];
- return enumAsNumber == nil ? nil
- : [[FGMPlatformPatternItemTypeBox alloc]
- initWithValue:[enumAsNumber integerValue]];
- }
- case 133: {
- NSNumber *enumAsNumber = [self readValue];
- return enumAsNumber == nil
- ? nil
- : [[FGMPlatformMarkerTypeBox alloc] initWithValue:[enumAsNumber integerValue]];
- }
- case 134: {
- NSNumber *enumAsNumber = [self readValue];
- return enumAsNumber == nil ? nil
- : [[FGMPlatformMapBitmapScalingBox alloc]
- initWithValue:[enumAsNumber integerValue]];
- }
- case 135:
- return [FGMPlatformCameraPosition fromList:[self readValue]];
- case 136:
- return [FGMPlatformCameraUpdate fromList:[self readValue]];
- case 137:
- return [FGMPlatformCameraUpdateNewCameraPosition fromList:[self readValue]];
- case 138:
- return [FGMPlatformCameraUpdateNewLatLng fromList:[self readValue]];
- case 139:
- return [FGMPlatformCameraUpdateNewLatLngBounds fromList:[self readValue]];
- case 140:
- return [FGMPlatformCameraUpdateNewLatLngZoom fromList:[self readValue]];
- case 141:
- return [FGMPlatformCameraUpdateScrollBy fromList:[self readValue]];
- case 142:
- return [FGMPlatformCameraUpdateZoomBy fromList:[self readValue]];
- case 143:
- return [FGMPlatformCameraUpdateZoom fromList:[self readValue]];
- case 144:
- return [FGMPlatformCameraUpdateZoomTo fromList:[self readValue]];
- case 145:
- return [FGMPlatformCircle fromList:[self readValue]];
- case 146:
- return [FGMPlatformHeatmap fromList:[self readValue]];
- case 147:
- return [FGMPlatformHeatmapGradient fromList:[self readValue]];
- case 148:
- return [FGMPlatformWeightedLatLng fromList:[self readValue]];
- case 149:
- return [FGMPlatformInfoWindow fromList:[self readValue]];
- case 150:
- return [FGMPlatformCluster fromList:[self readValue]];
- case 151:
- return [FGMPlatformClusterManager fromList:[self readValue]];
- case 152:
- return [FGMPlatformMarker fromList:[self readValue]];
- case 153:
- return [FGMPlatformPolygon fromList:[self readValue]];
- case 154:
- return [FGMPlatformPolyline fromList:[self readValue]];
- case 155:
- return [FGMPlatformPatternItem fromList:[self readValue]];
- case 156:
- return [FGMPlatformTile fromList:[self readValue]];
- case 157:
- return [FGMPlatformTileOverlay fromList:[self readValue]];
- case 158:
- return [FGMPlatformEdgeInsets fromList:[self readValue]];
- case 159:
- return [FGMPlatformLatLng fromList:[self readValue]];
- case 160:
- return [FGMPlatformLatLngBounds fromList:[self readValue]];
- case 161:
- return [FGMPlatformCameraTargetBounds fromList:[self readValue]];
- case 162:
- return [FGMPlatformGroundOverlay fromList:[self readValue]];
- case 163:
- return [FGMPlatformMapViewCreationParams fromList:[self readValue]];
- case 164:
- return [FGMPlatformMapConfiguration fromList:[self readValue]];
- case 165:
- return [FGMPlatformPoint fromList:[self readValue]];
- case 166:
- return [FGMPlatformSize fromList:[self readValue]];
- case 167:
- return [FGMPlatformColor fromList:[self readValue]];
- case 168:
- return [FGMPlatformTileLayer fromList:[self readValue]];
- case 169:
- return [FGMPlatformZoomRange fromList:[self readValue]];
- case 170:
- return [FGMPlatformBitmap fromList:[self readValue]];
- case 171:
- return [FGMPlatformBitmapDefaultMarker fromList:[self readValue]];
- case 172:
- return [FGMPlatformBitmapBytes fromList:[self readValue]];
- case 173:
- return [FGMPlatformBitmapAsset fromList:[self readValue]];
- case 174:
- return [FGMPlatformBitmapAssetImage fromList:[self readValue]];
- case 175:
- return [FGMPlatformBitmapAssetMap fromList:[self readValue]];
- case 176:
- return [FGMPlatformBitmapBytesMap fromList:[self readValue]];
- case 177:
- return [FGMPlatformBitmapPinConfig fromList:[self readValue]];
- default:
- return [super readValueOfType:type];
- }
-}
-@end
-
-@interface FGMGoogleMapsFlutterPigeonMessagesPigeonCodecWriter : FlutterStandardWriter
-@end
-@implementation FGMGoogleMapsFlutterPigeonMessagesPigeonCodecWriter
-- (void)writeValue:(id)value {
- if ([value isKindOfClass:[FGMPlatformMapTypeBox class]]) {
- FGMPlatformMapTypeBox *box = (FGMPlatformMapTypeBox *)value;
- [self writeByte:129];
- [self writeValue:(value == nil ? [NSNull null] : [NSNumber numberWithInteger:box.value])];
- } else if ([value isKindOfClass:[FGMPlatformMarkerCollisionBehaviorBox class]]) {
- FGMPlatformMarkerCollisionBehaviorBox *box = (FGMPlatformMarkerCollisionBehaviorBox *)value;
- [self writeByte:130];
- [self writeValue:(value == nil ? [NSNull null] : [NSNumber numberWithInteger:box.value])];
- } else if ([value isKindOfClass:[FGMPlatformJointTypeBox class]]) {
- FGMPlatformJointTypeBox *box = (FGMPlatformJointTypeBox *)value;
- [self writeByte:131];
- [self writeValue:(value == nil ? [NSNull null] : [NSNumber numberWithInteger:box.value])];
- } else if ([value isKindOfClass:[FGMPlatformPatternItemTypeBox class]]) {
- FGMPlatformPatternItemTypeBox *box = (FGMPlatformPatternItemTypeBox *)value;
- [self writeByte:132];
- [self writeValue:(value == nil ? [NSNull null] : [NSNumber numberWithInteger:box.value])];
- } else if ([value isKindOfClass:[FGMPlatformMarkerTypeBox class]]) {
- FGMPlatformMarkerTypeBox *box = (FGMPlatformMarkerTypeBox *)value;
- [self writeByte:133];
- [self writeValue:(value == nil ? [NSNull null] : [NSNumber numberWithInteger:box.value])];
- } else if ([value isKindOfClass:[FGMPlatformMapBitmapScalingBox class]]) {
- FGMPlatformMapBitmapScalingBox *box = (FGMPlatformMapBitmapScalingBox *)value;
- [self writeByte:134];
- [self writeValue:(value == nil ? [NSNull null] : [NSNumber numberWithInteger:box.value])];
- } else if ([value isKindOfClass:[FGMPlatformCameraPosition class]]) {
- [self writeByte:135];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformCameraUpdate class]]) {
- [self writeByte:136];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformCameraUpdateNewCameraPosition class]]) {
- [self writeByte:137];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformCameraUpdateNewLatLng class]]) {
- [self writeByte:138];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformCameraUpdateNewLatLngBounds class]]) {
- [self writeByte:139];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformCameraUpdateNewLatLngZoom class]]) {
- [self writeByte:140];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformCameraUpdateScrollBy class]]) {
- [self writeByte:141];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformCameraUpdateZoomBy class]]) {
- [self writeByte:142];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformCameraUpdateZoom class]]) {
- [self writeByte:143];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformCameraUpdateZoomTo class]]) {
- [self writeByte:144];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformCircle class]]) {
- [self writeByte:145];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformHeatmap class]]) {
- [self writeByte:146];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformHeatmapGradient class]]) {
- [self writeByte:147];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformWeightedLatLng class]]) {
- [self writeByte:148];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformInfoWindow class]]) {
- [self writeByte:149];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformCluster class]]) {
- [self writeByte:150];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformClusterManager class]]) {
- [self writeByte:151];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformMarker class]]) {
- [self writeByte:152];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformPolygon class]]) {
- [self writeByte:153];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformPolyline class]]) {
- [self writeByte:154];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformPatternItem class]]) {
- [self writeByte:155];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformTile class]]) {
- [self writeByte:156];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformTileOverlay class]]) {
- [self writeByte:157];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformEdgeInsets class]]) {
- [self writeByte:158];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformLatLng class]]) {
- [self writeByte:159];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformLatLngBounds class]]) {
- [self writeByte:160];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformCameraTargetBounds class]]) {
- [self writeByte:161];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformGroundOverlay class]]) {
- [self writeByte:162];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformMapViewCreationParams class]]) {
- [self writeByte:163];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformMapConfiguration class]]) {
- [self writeByte:164];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformPoint class]]) {
- [self writeByte:165];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformSize class]]) {
- [self writeByte:166];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformColor class]]) {
- [self writeByte:167];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformTileLayer class]]) {
- [self writeByte:168];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformZoomRange class]]) {
- [self writeByte:169];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformBitmap class]]) {
- [self writeByte:170];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformBitmapDefaultMarker class]]) {
- [self writeByte:171];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformBitmapBytes class]]) {
- [self writeByte:172];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformBitmapAsset class]]) {
- [self writeByte:173];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformBitmapAssetImage class]]) {
- [self writeByte:174];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformBitmapAssetMap class]]) {
- [self writeByte:175];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformBitmapBytesMap class]]) {
- [self writeByte:176];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformBitmapPinConfig class]]) {
- [self writeByte:177];
- [self writeValue:[value toList]];
- } else {
- [super writeValue:value];
- }
-}
-@end
-
-@interface FGMGoogleMapsFlutterPigeonMessagesPigeonCodecReaderWriter : FlutterStandardReaderWriter
-@end
-@implementation FGMGoogleMapsFlutterPigeonMessagesPigeonCodecReaderWriter
-- (FlutterStandardWriter *)writerWithData:(NSMutableData *)data {
- return [[FGMGoogleMapsFlutterPigeonMessagesPigeonCodecWriter alloc] initWithData:data];
-}
-- (FlutterStandardReader *)readerWithData:(NSData *)data {
- return [[FGMGoogleMapsFlutterPigeonMessagesPigeonCodecReader alloc] initWithData:data];
-}
-@end
-
-NSObject<FlutterMessageCodec> *FGMGetGoogleMapsFlutterPigeonMessagesCodec(void) {
- static FlutterStandardMessageCodec *sSharedObject = nil;
- static dispatch_once_t sPred = 0;
- dispatch_once(&sPred, ^{
- FGMGoogleMapsFlutterPigeonMessagesPigeonCodecReaderWriter *readerWriter =
- [[FGMGoogleMapsFlutterPigeonMessagesPigeonCodecReaderWriter alloc] init];
- sSharedObject = [FlutterStandardMessageCodec codecWithReaderWriter:readerWriter];
- });
- return sSharedObject;
-}
-void SetUpFGMMapsApi(id<FlutterBinaryMessenger> binaryMessenger, NSObject<FGMMapsApi> *api) {
- SetUpFGMMapsApiWithSuffix(binaryMessenger, api, @"");
-}
-
-void SetUpFGMMapsApiWithSuffix(id<FlutterBinaryMessenger> binaryMessenger,
- NSObject<FGMMapsApi> *api, NSString *messageChannelSuffix) {
- messageChannelSuffix = messageChannelSuffix.length > 0
- ? [NSString stringWithFormat:@".%@", messageChannelSuffix]
- : @"";
- /// Returns once the map instance is available.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString
- stringWithFormat:
- @"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.waitForMap",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(waitForMapWithError:)],
- @"FGMMapsApi api (%@) doesn't respond to @selector(waitForMapWithError:)", api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- [api waitForMapWithError:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Updates the map's configuration options.
- ///
- /// Only non-null configuration values will result in updates; options with
- /// null values will remain unchanged.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.updateMapConfiguration",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert(
- [api respondsToSelector:@selector(updateWithMapConfiguration:error:)],
- @"FGMMapsApi api (%@) doesn't respond to @selector(updateWithMapConfiguration:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- FGMPlatformMapConfiguration *arg_configuration = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- [api updateWithMapConfiguration:arg_configuration error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Updates the set of circles on the map.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString
- stringWithFormat:
- @"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateCircles",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(updateCirclesByAdding:changing:removing:error:)],
- @"FGMMapsApi api (%@) doesn't respond to "
- @"@selector(updateCirclesByAdding:changing:removing:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSArray<FGMPlatformCircle *> *arg_toAdd = GetNullableObjectAtIndex(args, 0);
- NSArray<FGMPlatformCircle *> *arg_toChange = GetNullableObjectAtIndex(args, 1);
- NSArray<NSString *> *arg_idsToRemove = GetNullableObjectAtIndex(args, 2);
- FlutterError *error;
- [api updateCirclesByAdding:arg_toAdd
- changing:arg_toChange
- removing:arg_idsToRemove
- error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Updates the set of heatmaps on the map.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.updateHeatmaps",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(updateHeatmapsByAdding:changing:removing:error:)],
- @"FGMMapsApi api (%@) doesn't respond to "
- @"@selector(updateHeatmapsByAdding:changing:removing:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSArray<FGMPlatformHeatmap *> *arg_toAdd = GetNullableObjectAtIndex(args, 0);
- NSArray<FGMPlatformHeatmap *> *arg_toChange = GetNullableObjectAtIndex(args, 1);
- NSArray<NSString *> *arg_idsToRemove = GetNullableObjectAtIndex(args, 2);
- FlutterError *error;
- [api updateHeatmapsByAdding:arg_toAdd
- changing:arg_toChange
- removing:arg_idsToRemove
- error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Updates the set of custer managers for clusters on the map.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.updateClusterManagers",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(updateClusterManagersByAdding:removing:error:)],
- @"FGMMapsApi api (%@) doesn't respond to "
- @"@selector(updateClusterManagersByAdding:removing:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSArray<FGMPlatformClusterManager *> *arg_toAdd = GetNullableObjectAtIndex(args, 0);
- NSArray<NSString *> *arg_idsToRemove = GetNullableObjectAtIndex(args, 1);
- FlutterError *error;
- [api updateClusterManagersByAdding:arg_toAdd removing:arg_idsToRemove error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Updates the set of markers on the map.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString
- stringWithFormat:
- @"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMarkers",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(updateMarkersByAdding:changing:removing:error:)],
- @"FGMMapsApi api (%@) doesn't respond to "
- @"@selector(updateMarkersByAdding:changing:removing:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSArray<FGMPlatformMarker *> *arg_toAdd = GetNullableObjectAtIndex(args, 0);
- NSArray<FGMPlatformMarker *> *arg_toChange = GetNullableObjectAtIndex(args, 1);
- NSArray<NSString *> *arg_idsToRemove = GetNullableObjectAtIndex(args, 2);
- FlutterError *error;
- [api updateMarkersByAdding:arg_toAdd
- changing:arg_toChange
- removing:arg_idsToRemove
- error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Updates the set of polygonss on the map.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.updatePolygons",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(updatePolygonsByAdding:changing:removing:error:)],
- @"FGMMapsApi api (%@) doesn't respond to "
- @"@selector(updatePolygonsByAdding:changing:removing:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSArray<FGMPlatformPolygon *> *arg_toAdd = GetNullableObjectAtIndex(args, 0);
- NSArray<FGMPlatformPolygon *> *arg_toChange = GetNullableObjectAtIndex(args, 1);
- NSArray<NSString *> *arg_idsToRemove = GetNullableObjectAtIndex(args, 2);
- FlutterError *error;
- [api updatePolygonsByAdding:arg_toAdd
- changing:arg_toChange
- removing:arg_idsToRemove
- error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Updates the set of polylines on the map.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.updatePolylines",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(updatePolylinesByAdding:
- changing:removing:error:)],
- @"FGMMapsApi api (%@) doesn't respond to "
- @"@selector(updatePolylinesByAdding:changing:removing:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSArray<FGMPlatformPolyline *> *arg_toAdd = GetNullableObjectAtIndex(args, 0);
- NSArray<FGMPlatformPolyline *> *arg_toChange = GetNullableObjectAtIndex(args, 1);
- NSArray<NSString *> *arg_idsToRemove = GetNullableObjectAtIndex(args, 2);
- FlutterError *error;
- [api updatePolylinesByAdding:arg_toAdd
- changing:arg_toChange
- removing:arg_idsToRemove
- error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Updates the set of tile overlays on the map.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.updateTileOverlays",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(updateTileOverlaysByAdding:
- changing:removing:error:)],
- @"FGMMapsApi api (%@) doesn't respond to "
- @"@selector(updateTileOverlaysByAdding:changing:removing:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSArray<FGMPlatformTileOverlay *> *arg_toAdd = GetNullableObjectAtIndex(args, 0);
- NSArray<FGMPlatformTileOverlay *> *arg_toChange = GetNullableObjectAtIndex(args, 1);
- NSArray<NSString *> *arg_idsToRemove = GetNullableObjectAtIndex(args, 2);
- FlutterError *error;
- [api updateTileOverlaysByAdding:arg_toAdd
- changing:arg_toChange
- removing:arg_idsToRemove
- error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Updates the set of ground overlays on the map.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.updateGroundOverlays",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(updateGroundOverlaysByAdding:
- changing:removing:error:)],
- @"FGMMapsApi api (%@) doesn't respond to "
- @"@selector(updateGroundOverlaysByAdding:changing:removing:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSArray<FGMPlatformGroundOverlay *> *arg_toAdd = GetNullableObjectAtIndex(args, 0);
- NSArray<FGMPlatformGroundOverlay *> *arg_toChange = GetNullableObjectAtIndex(args, 1);
- NSArray<NSString *> *arg_idsToRemove = GetNullableObjectAtIndex(args, 2);
- FlutterError *error;
- [api updateGroundOverlaysByAdding:arg_toAdd
- changing:arg_toChange
- removing:arg_idsToRemove
- error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Gets the screen coordinate for the given map location.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.getScreenCoordinate",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert(
- [api respondsToSelector:@selector(screenCoordinatesForLatLng:error:)],
- @"FGMMapsApi api (%@) doesn't respond to @selector(screenCoordinatesForLatLng:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- FGMPlatformLatLng *arg_latLng = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- FGMPlatformPoint *output = [api screenCoordinatesForLatLng:arg_latLng error:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Gets the map location for the given screen coordinate.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:
- [NSString
- stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLatLng",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert(
- [api respondsToSelector:@selector(latLngForScreenCoordinate:error:)],
- @"FGMMapsApi api (%@) doesn't respond to @selector(latLngForScreenCoordinate:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- FGMPlatformPoint *arg_screenCoordinate = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- FGMPlatformLatLng *output = [api latLngForScreenCoordinate:arg_screenCoordinate
- error:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Gets the map region currently displayed on the map.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.getVisibleRegion",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(visibleMapRegion:)],
- @"FGMMapsApi api (%@) doesn't respond to @selector(visibleMapRegion:)", api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- FGMPlatformLatLngBounds *output = [api visibleMapRegion:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Moves the camera according to [cameraUpdate] immediately, with no
- /// animation.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString
- stringWithFormat:
- @"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.moveCamera",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(moveCameraWithUpdate:error:)],
- @"FGMMapsApi api (%@) doesn't respond to @selector(moveCameraWithUpdate:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- FGMPlatformCameraUpdate *arg_cameraUpdate = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- [api moveCameraWithUpdate:arg_cameraUpdate error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Moves the camera according to [cameraUpdate], animating the update using a
- /// duration in milliseconds if provided.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString
- stringWithFormat:
- @"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.animateCamera",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(animateCameraWithUpdate:duration:error:)],
- @"FGMMapsApi api (%@) doesn't respond to "
- @"@selector(animateCameraWithUpdate:duration:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- FGMPlatformCameraUpdate *arg_cameraUpdate = GetNullableObjectAtIndex(args, 0);
- NSNumber *arg_durationMilliseconds = GetNullableObjectAtIndex(args, 1);
- FlutterError *error;
- [api animateCameraWithUpdate:arg_cameraUpdate
- duration:arg_durationMilliseconds
- error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Gets the current map zoom level.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString
- stringWithFormat:
- @"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getZoomLevel",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(currentZoomLevel:)],
- @"FGMMapsApi api (%@) doesn't respond to @selector(currentZoomLevel:)", api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- NSNumber *output = [api currentZoomLevel:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Show the info window for the marker with the given ID.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.showInfoWindow",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(showInfoWindowForMarkerWithIdentifier:error:)],
- @"FGMMapsApi api (%@) doesn't respond to "
- @"@selector(showInfoWindowForMarkerWithIdentifier:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSString *arg_markerId = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- [api showInfoWindowForMarkerWithIdentifier:arg_markerId error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Hide the info window for the marker with the given ID.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.hideInfoWindow",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(hideInfoWindowForMarkerWithIdentifier:error:)],
- @"FGMMapsApi api (%@) doesn't respond to "
- @"@selector(hideInfoWindowForMarkerWithIdentifier:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSString *arg_markerId = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- [api hideInfoWindowForMarkerWithIdentifier:arg_markerId error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Returns true if the marker with the given ID is currently displaying its
- /// info window.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.isInfoWindowShown",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(isShowingInfoWindowForMarkerWithIdentifier:
- error:)],
- @"FGMMapsApi api (%@) doesn't respond to "
- @"@selector(isShowingInfoWindowForMarkerWithIdentifier:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSString *arg_markerId = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- NSNumber *output = [api isShowingInfoWindowForMarkerWithIdentifier:arg_markerId
- error:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Sets the style to the given map style string, where an empty string
- /// indicates that the style should be cleared.
- ///
- /// If there was an error setting the style, such as an invalid style string,
- /// returns the error message.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:
- [NSString
- stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.setStyle",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(setStyle:error:)],
- @"FGMMapsApi api (%@) doesn't respond to @selector(setStyle:error:)", api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSString *arg_style = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- NSString *output = [api setStyle:arg_style error:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Returns the error string from the last attempt to set the map style, if
- /// any.
- ///
- /// This allows checking asynchronously for initial style failures, as there
- /// is no way to return failures from map initialization.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.getLastStyleError",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(lastStyleError:)],
- @"FGMMapsApi api (%@) doesn't respond to @selector(lastStyleError:)", api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- NSString *output = [api lastStyleError:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Clears the cache of tiles previously requseted from the tile provider.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.clearTileCache",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(clearTileCacheForOverlayWithIdentifier:error:)],
- @"FGMMapsApi api (%@) doesn't respond to "
- @"@selector(clearTileCacheForOverlayWithIdentifier:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSString *arg_tileOverlayId = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- [api clearTileCacheForOverlayWithIdentifier:arg_tileOverlayId error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Takes a snapshot of the map and returns its image data.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString
- stringWithFormat:
- @"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.takeSnapshot",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(takeSnapshotWithError:)],
- @"FGMMapsApi api (%@) doesn't respond to @selector(takeSnapshotWithError:)", api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- FlutterStandardTypedData *output = [api takeSnapshotWithError:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Returns true if the map supports advanced markers.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.isAdvancedMarkersAvailable",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(isAdvancedMarkersAvailable:)],
- @"FGMMapsApi api (%@) doesn't respond to @selector(isAdvancedMarkersAvailable:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- NSNumber *output = [api isAdvancedMarkersAvailable:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
-}
-@interface FGMMapsCallbackApi ()
-@property(nonatomic, strong) NSObject<FlutterBinaryMessenger> *binaryMessenger;
-@property(nonatomic, strong) NSString *messageChannelSuffix;
-@end
-
-@implementation FGMMapsCallbackApi
-
-- (instancetype)initWithBinaryMessenger:(NSObject<FlutterBinaryMessenger> *)binaryMessenger {
- return [self initWithBinaryMessenger:binaryMessenger messageChannelSuffix:@""];
-}
-- (instancetype)initWithBinaryMessenger:(NSObject<FlutterBinaryMessenger> *)binaryMessenger
- messageChannelSuffix:(nullable NSString *)messageChannelSuffix {
- self = [self init];
- if (self) {
- _binaryMessenger = binaryMessenger;
- _messageChannelSuffix = [messageChannelSuffix length] == 0
- ? @""
- : [NSString stringWithFormat:@".%@", messageChannelSuffix];
- }
- return self;
-}
-- (void)didStartCameraMoveWithCompletion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:
- @"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMoveStarted",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:nil
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didMoveCameraToPosition:(FGMPlatformCameraPosition *)arg_cameraPosition
- completion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[ arg_cameraPosition ?: [NSNull null] ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didIdleCameraWithCompletion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraIdle",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:nil
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didTapAtPosition:(FGMPlatformLatLng *)arg_position
- completion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[ arg_position ?: [NSNull null] ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didLongPressAtPosition:(FGMPlatformLatLng *)arg_position
- completion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[ arg_position ?: [NSNull null] ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didTapMarkerWithIdentifier:(NSString *)arg_markerId
- completion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[ arg_markerId ?: [NSNull null] ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didStartDragForMarkerWithIdentifier:(NSString *)arg_markerId
- atPosition:(FGMPlatformLatLng *)arg_position
- completion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:
- @"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[ arg_markerId ?: [NSNull null], arg_position ?: [NSNull null] ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didDragMarkerWithIdentifier:(NSString *)arg_markerId
- atPosition:(FGMPlatformLatLng *)arg_position
- completion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[ arg_markerId ?: [NSNull null], arg_position ?: [NSNull null] ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didEndDragForMarkerWithIdentifier:(NSString *)arg_markerId
- atPosition:(FGMPlatformLatLng *)arg_position
- completion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:
- @"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[ arg_markerId ?: [NSNull null], arg_position ?: [NSNull null] ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)arg_markerId
- completion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:
- @"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[ arg_markerId ?: [NSNull null] ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didTapCircleWithIdentifier:(NSString *)arg_circleId
- completion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[ arg_circleId ?: [NSNull null] ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didTapCluster:(FGMPlatformCluster *)arg_cluster
- completion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[ arg_cluster ?: [NSNull null] ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didTapPolygonWithIdentifier:(NSString *)arg_polygonId
- completion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[ arg_polygonId ?: [NSNull null] ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didTapPolylineWithIdentifier:(NSString *)arg_polylineId
- completion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[ arg_polylineId ?: [NSNull null] ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didTapGroundOverlayWithIdentifier:(NSString *)arg_groundOverlayId
- completion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:
- @"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[ arg_groundOverlayId ?: [NSNull null] ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)tileWithOverlayIdentifier:(NSString *)arg_tileOverlayId
- location:(FGMPlatformPoint *)arg_location
- zoom:(NSInteger)arg_zoom
- completion:(void (^)(FGMPlatformTile *_Nullable,
- FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:
- @"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[
- arg_tileOverlayId ?: [NSNull null], arg_location ?: [NSNull null], @(arg_zoom)
- ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion(nil, [FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- FGMPlatformTile *output = reply[0] == [NSNull null] ? nil : reply[0];
- completion(output, nil);
- }
- } else {
- completion(nil, createConnectionError(channelName));
- }
- }];
-}
-@end
-
-void SetUpFGMMapsPlatformViewApi(id<FlutterBinaryMessenger> binaryMessenger,
- NSObject<FGMMapsPlatformViewApi> *api) {
- SetUpFGMMapsPlatformViewApiWithSuffix(binaryMessenger, api, @"");
-}
-
-void SetUpFGMMapsPlatformViewApiWithSuffix(id<FlutterBinaryMessenger> binaryMessenger,
- NSObject<FGMMapsPlatformViewApi> *api,
- NSString *messageChannelSuffix) {
- messageChannelSuffix = messageChannelSuffix.length > 0
- ? [NSString stringWithFormat:@".%@", messageChannelSuffix]
- : @"";
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsPlatformViewApi.createView",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert(
- [api respondsToSelector:@selector(createViewType:error:)],
- @"FGMMapsPlatformViewApi api (%@) doesn't respond to @selector(createViewType:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- FGMPlatformMapViewCreationParams *arg_type = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- [api createViewType:arg_type error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
-}
-void SetUpFGMMapsInspectorApi(id<FlutterBinaryMessenger> binaryMessenger,
- NSObject<FGMMapsInspectorApi> *api) {
- SetUpFGMMapsInspectorApiWithSuffix(binaryMessenger, api, @"");
-}
-
-void SetUpFGMMapsInspectorApiWithSuffix(id<FlutterBinaryMessenger> binaryMessenger,
- NSObject<FGMMapsInspectorApi> *api,
- NSString *messageChannelSuffix) {
- messageChannelSuffix = messageChannelSuffix.length > 0
- ? [NSString stringWithFormat:@".%@", messageChannelSuffix]
- : @"";
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.areBuildingsEnabled",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(areBuildingsEnabledWithError:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to "
- @"@selector(areBuildingsEnabledWithError:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- NSNumber *output = [api areBuildingsEnabledWithError:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.areRotateGesturesEnabled",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(areRotateGesturesEnabledWithError:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to "
- @"@selector(areRotateGesturesEnabledWithError:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- NSNumber *output = [api areRotateGesturesEnabledWithError:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.areScrollGesturesEnabled",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(areScrollGesturesEnabledWithError:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to "
- @"@selector(areScrollGesturesEnabledWithError:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- NSNumber *output = [api areScrollGesturesEnabledWithError:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.areTiltGesturesEnabled",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(areTiltGesturesEnabledWithError:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to "
- @"@selector(areTiltGesturesEnabledWithError:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- NSNumber *output = [api areTiltGesturesEnabledWithError:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.areZoomGesturesEnabled",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(areZoomGesturesEnabledWithError:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to "
- @"@selector(areZoomGesturesEnabledWithError:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- NSNumber *output = [api areZoomGesturesEnabledWithError:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.isCompassEnabled",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert(
- [api respondsToSelector:@selector(isCompassEnabledWithError:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(isCompassEnabledWithError:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- NSNumber *output = [api isCompassEnabledWithError:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.isMyLocationButtonEnabled",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(isMyLocationButtonEnabledWithError:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to "
- @"@selector(isMyLocationButtonEnabledWithError:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- NSNumber *output = [api isMyLocationButtonEnabledWithError:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.isTrafficEnabled",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert(
- [api respondsToSelector:@selector(isTrafficEnabledWithError:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(isTrafficEnabledWithError:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- NSNumber *output = [api isTrafficEnabledWithError:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.getTileOverlayInfo",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(tileOverlayWithIdentifier:error:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to "
- @"@selector(tileOverlayWithIdentifier:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSString *arg_tileOverlayId = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- FGMPlatformTileLayer *output = [api tileOverlayWithIdentifier:arg_tileOverlayId
- error:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.getGroundOverlayInfo",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(groundOverlayWithIdentifier:error:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to "
- @"@selector(groundOverlayWithIdentifier:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSString *arg_groundOverlayId = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- FGMPlatformGroundOverlay *output = [api groundOverlayWithIdentifier:arg_groundOverlayId
- error:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.getHeatmapInfo",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(heatmapWithIdentifier:error:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to "
- @"@selector(heatmapWithIdentifier:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSString *arg_heatmapId = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- FGMPlatformHeatmap *output = [api heatmapWithIdentifier:arg_heatmapId error:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.getZoomRange",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(zoomRange:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(zoomRange:)", api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- FGMPlatformZoomRange *output = [api zoomRange:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.getClusters",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(clustersWithIdentifier:error:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to "
- @"@selector(clustersWithIdentifier:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSString *arg_clusterManagerId = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- NSArray<FGMPlatformCluster *> *output = [api clustersWithIdentifier:arg_clusterManagerId
- error:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.getCameraPosition",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(cameraPosition:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(cameraPosition:)", api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- FGMPlatformCameraPosition *output = [api cameraPosition:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
-}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10_objc/include/google_maps_flutter_ios_sdk10_objc/FGMAssetProvider.h b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10_objc/include/google_maps_flutter_ios_sdk10_objc/FGMAssetProvider.h
deleted file mode 100644
index 2254ec7..0000000
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10_objc/include/google_maps_flutter_ios_sdk10_objc/FGMAssetProvider.h
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2013 The Flutter Authors
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-@import UIKit;
-
-NS_ASSUME_NONNULL_BEGIN
-
-/// Protocol for looking up Flutter assets and resolving them to images.
-///
-/// This is used to allow testing with mock assets without mocking the entire
-/// Flutter plugin registrar and UIImage class.
-@protocol FGMAssetProvider <NSObject>
-
-/// Returns the key for the given asset.
-///
-/// Wraps the FlutterPluginRegistrar method of the same name.
-///
-/// @param asset The name of the asset.
-/// @return The key for the asset, or nil if not found.
-- (nullable NSString *)lookupKeyForAsset:(NSString *)asset;
-
-/// Returns the key for the given asset from the given package.
-///
-/// Wraps the FlutterPluginRegistrar method of the same name.
-///
-/// @param asset The name of the asset.
-/// @param package The name of the package to load the asset from.
-/// @return The key for the asset, or nil if not found.
-- (nullable NSString *)lookupKeyForAsset:(NSString *)asset fromPackage:(NSString *)package;
-
-/// Returns the image for the given named asset.
-///
-/// Wraps the UIImage method of the same name.
-///
-/// @param name The name of the image asset or file.
-/// @return The image, or nil if not found.
-- (nullable UIImage *)imageNamed:(NSString *)name;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10_objc/include/google_maps_flutter_ios_sdk10_objc/FGMCATransactionWrapper.h b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10_objc/include/google_maps_flutter_ios_sdk10_objc/FGMCATransactionWrapper.h
deleted file mode 100644
index 41df2de..0000000
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10_objc/include/google_maps_flutter_ios_sdk10_objc/FGMCATransactionWrapper.h
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2013 The Flutter Authors
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-@import Foundation;
-
-NS_ASSUME_NONNULL_BEGIN
-
-/// Protocol for CATransaction to allow mocking in tests.
-@protocol FGMCATransactionProtocol <NSObject>
-- (void)begin;
-- (void)commit;
-- (void)setAnimationDuration:(CFTimeInterval)duration;
-@end
-
-/// Wrapper for CATransaction to allow mocking in tests.
-@interface FGMCATransactionWrapper : NSObject <FGMCATransactionProtocol>
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10_objc/include/google_maps_flutter_ios_sdk10_objc/FGMMapEventDelegate.h b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10_objc/include/google_maps_flutter_ios_sdk10_objc/FGMMapEventDelegate.h
deleted file mode 100644
index f93f1ad..0000000
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10_objc/include/google_maps_flutter_ios_sdk10_objc/FGMMapEventDelegate.h
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2013 The Flutter Authors
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-@import Foundation;
-
-#import "google_maps_flutter_pigeon_messages.g.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-/// Delegate for map event notifications.
-///
-/// This is abstraction of the map event portions of FGMMapsCallbackApi, to
-/// avoid coupling all the individual controllers to the Pigeon implementation
-/// of event handling, and to allow for mocks/fakes in unit tests.
-@protocol FGMMapEventDelegate <NSObject>
-
-/// Called when the map camera starts moving.
-- (void)didStartCameraMove;
-
-/// Called when the map camera moves.
-- (void)didMoveCameraToPosition:(FGMPlatformCameraPosition *)cameraPosition;
-
-/// Called when the map camera stops moving.
-- (void)didIdleCamera;
-
-/// Called when the map, not a specifc map object, is tapped.
-- (void)didTapAtPosition:(FGMPlatformLatLng *)position;
-
-/// Called when the map, not a specifc map object, is long pressed.
-- (void)didLongPressAtPosition:(FGMPlatformLatLng *)position;
-
-/// Called when a marker is tapped.
-- (void)didTapMarkerWithIdentifier:(NSString *)markerId;
-
-/// Called when a marker drag starts.
-- (void)didStartDragForMarkerWithIdentifier:(NSString *)markerId
- atPosition:(FGMPlatformLatLng *)position;
-
-/// Called when a marker drag updates.
-- (void)didDragMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position;
-
-/// Called when a marker drag ends.
-- (void)didEndDragForMarkerWithIdentifier:(NSString *)markerId
- atPosition:(FGMPlatformLatLng *)position;
-
-/// Called when a marker's info window is tapped.
-- (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)markerId;
-
-/// Called when a circle is tapped.
-- (void)didTapCircleWithIdentifier:(NSString *)circleId;
-
-/// Called when a marker cluster is tapped.
-- (void)didTapCluster:(FGMPlatformCluster *)cluster;
-
-/// Called when a polygon is tapped.
-- (void)didTapPolygonWithIdentifier:(NSString *)polygonId;
-
-/// Called when a polyline is tapped.
-- (void)didTapPolylineWithIdentifier:(NSString *)polylineId;
-
-/// Called when a ground overlay is tapped.
-- (void)didTapGroundOverlayWithIdentifier:(NSString *)groundOverlayId;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10_objc/include/google_maps_flutter_ios_sdk10_objc/GoogleMapsUtilsTrampoline.h b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10_objc/include/google_maps_flutter_ios_sdk10_objc/GoogleMapsUtilsTrampoline.h
deleted file mode 100644
index cf6399b..0000000
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10_objc/include/google_maps_flutter_ios_sdk10_objc/GoogleMapsUtilsTrampoline.h
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright 2013 The Flutter Authors
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// If Swift Package Manager is in use, Objective-C headers are available under the
-// GoogleMapsUtilsObjC package. When using CocoaPods, the headers are provided by the
-// GoogleMapsUtils package.
-#ifdef FGM_USING_COCOAPODS
-@import GoogleMapsUtils;
-#else
-@import GoogleMapsUtilsObjC;
-#endif
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10_objc/include/google_maps_flutter_ios_sdk10_objc/google_maps_flutter_pigeon_messages.g.h b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10_objc/include/google_maps_flutter_ios_sdk10_objc/google_maps_flutter_pigeon_messages.g.h
deleted file mode 100644
index fbd78a7..0000000
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10_objc/include/google_maps_flutter_ios_sdk10_objc/google_maps_flutter_pigeon_messages.g.h
+++ /dev/null
@@ -1,991 +0,0 @@
-// Copyright 2013 The Flutter Authors
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-// Autogenerated from Pigeon (v27.3.2), do not edit directly.
-// See also: https://pub.dev/packages/pigeon
-
-@import Foundation;
-
-@protocol FlutterBinaryMessenger;
-@protocol FlutterMessageCodec;
-@class FlutterError;
-@class FlutterStandardTypedData;
-
-NS_ASSUME_NONNULL_BEGIN
-
-/// Pigeon equivalent of MapType
-typedef NS_ENUM(NSUInteger, FGMPlatformMapType) {
- FGMPlatformMapTypeNone = 0,
- FGMPlatformMapTypeNormal = 1,
- FGMPlatformMapTypeSatellite = 2,
- FGMPlatformMapTypeTerrain = 3,
- FGMPlatformMapTypeHybrid = 4,
-};
-
-/// Wrapper for FGMPlatformMapType to allow for nullability.
-@interface FGMPlatformMapTypeBox : NSObject
-@property(nonatomic, assign) FGMPlatformMapType value;
-- (instancetype)initWithValue:(FGMPlatformMapType)value;
-@end
-
-/// Pigeon equivalent of the MarkerCollisionBehavior enum.
-typedef NS_ENUM(NSUInteger, FGMPlatformMarkerCollisionBehavior) {
- FGMPlatformMarkerCollisionBehaviorRequiredDisplay = 0,
- FGMPlatformMarkerCollisionBehaviorOptionalAndHidesLowerPriority = 1,
- FGMPlatformMarkerCollisionBehaviorRequiredAndHidesOptional = 2,
-};
-
-/// Wrapper for FGMPlatformMarkerCollisionBehavior to allow for nullability.
-@interface FGMPlatformMarkerCollisionBehaviorBox : NSObject
-@property(nonatomic, assign) FGMPlatformMarkerCollisionBehavior value;
-- (instancetype)initWithValue:(FGMPlatformMarkerCollisionBehavior)value;
-@end
-
-/// Join types for polyline joints.
-typedef NS_ENUM(NSUInteger, FGMPlatformJointType) {
- FGMPlatformJointTypeMitered = 0,
- FGMPlatformJointTypeBevel = 1,
- FGMPlatformJointTypeRound = 2,
-};
-
-/// Wrapper for FGMPlatformJointType to allow for nullability.
-@interface FGMPlatformJointTypeBox : NSObject
-@property(nonatomic, assign) FGMPlatformJointType value;
-- (instancetype)initWithValue:(FGMPlatformJointType)value;
-@end
-
-/// Enumeration of possible types for PatternItem.
-typedef NS_ENUM(NSUInteger, FGMPlatformPatternItemType) {
- FGMPlatformPatternItemTypeDot = 0,
- FGMPlatformPatternItemTypeDash = 1,
- FGMPlatformPatternItemTypeGap = 2,
-};
-
-/// Wrapper for FGMPlatformPatternItemType to allow for nullability.
-@interface FGMPlatformPatternItemTypeBox : NSObject
-@property(nonatomic, assign) FGMPlatformPatternItemType value;
-- (instancetype)initWithValue:(FGMPlatformPatternItemType)value;
-@end
-
-typedef NS_ENUM(NSUInteger, FGMPlatformMarkerType) {
- FGMPlatformMarkerTypeMarker = 0,
- FGMPlatformMarkerTypeAdvancedMarker = 1,
-};
-
-/// Wrapper for FGMPlatformMarkerType to allow for nullability.
-@interface FGMPlatformMarkerTypeBox : NSObject
-@property(nonatomic, assign) FGMPlatformMarkerType value;
-- (instancetype)initWithValue:(FGMPlatformMarkerType)value;
-@end
-
-/// Pigeon equivalent of [MapBitmapScaling].
-typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) {
- FGMPlatformMapBitmapScalingAuto = 0,
- FGMPlatformMapBitmapScalingNone = 1,
-};
-
-/// Wrapper for FGMPlatformMapBitmapScaling to allow for nullability.
-@interface FGMPlatformMapBitmapScalingBox : NSObject
-@property(nonatomic, assign) FGMPlatformMapBitmapScaling value;
-- (instancetype)initWithValue:(FGMPlatformMapBitmapScaling)value;
-@end
-
-@class FGMPlatformCameraPosition;
-@class FGMPlatformCameraUpdate;
-@class FGMPlatformCameraUpdateNewCameraPosition;
-@class FGMPlatformCameraUpdateNewLatLng;
-@class FGMPlatformCameraUpdateNewLatLngBounds;
-@class FGMPlatformCameraUpdateNewLatLngZoom;
-@class FGMPlatformCameraUpdateScrollBy;
-@class FGMPlatformCameraUpdateZoomBy;
-@class FGMPlatformCameraUpdateZoom;
-@class FGMPlatformCameraUpdateZoomTo;
-@class FGMPlatformCircle;
-@class FGMPlatformHeatmap;
-@class FGMPlatformHeatmapGradient;
-@class FGMPlatformWeightedLatLng;
-@class FGMPlatformInfoWindow;
-@class FGMPlatformCluster;
-@class FGMPlatformClusterManager;
-@class FGMPlatformMarker;
-@class FGMPlatformPolygon;
-@class FGMPlatformPolyline;
-@class FGMPlatformPatternItem;
-@class FGMPlatformTile;
-@class FGMPlatformTileOverlay;
-@class FGMPlatformEdgeInsets;
-@class FGMPlatformLatLng;
-@class FGMPlatformLatLngBounds;
-@class FGMPlatformCameraTargetBounds;
-@class FGMPlatformGroundOverlay;
-@class FGMPlatformMapViewCreationParams;
-@class FGMPlatformMapConfiguration;
-@class FGMPlatformPoint;
-@class FGMPlatformSize;
-@class FGMPlatformColor;
-@class FGMPlatformTileLayer;
-@class FGMPlatformZoomRange;
-@class FGMPlatformBitmap;
-@class FGMPlatformBitmapDefaultMarker;
-@class FGMPlatformBitmapBytes;
-@class FGMPlatformBitmapAsset;
-@class FGMPlatformBitmapAssetImage;
-@class FGMPlatformBitmapAssetMap;
-@class FGMPlatformBitmapBytesMap;
-@class FGMPlatformBitmapPinConfig;
-
-/// Pigeon representatation of a CameraPosition.
-@interface FGMPlatformCameraPosition : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithBearing:(double)bearing
- target:(FGMPlatformLatLng *)target
- tilt:(double)tilt
- zoom:(double)zoom;
-@property(nonatomic, assign) double bearing;
-@property(nonatomic, strong) FGMPlatformLatLng *target;
-@property(nonatomic, assign) double tilt;
-@property(nonatomic, assign) double zoom;
-@end
-
-/// Pigeon representation of a CameraUpdate.
-@interface FGMPlatformCameraUpdate : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithCameraUpdate:(id)cameraUpdate;
-/// This Object must be one of the classes below prefixed with
-/// PlatformCameraUpdate. Each such class represents a different type of
-/// camera update, and each holds a different set of data, preventing the
-/// use of a single unified class.
-@property(nonatomic, strong) id cameraUpdate;
-@end
-
-/// Pigeon equivalent of NewCameraPosition
-@interface FGMPlatformCameraUpdateNewCameraPosition : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithCameraPosition:(FGMPlatformCameraPosition *)cameraPosition;
-@property(nonatomic, strong) FGMPlatformCameraPosition *cameraPosition;
-@end
-
-/// Pigeon equivalent of NewLatLng
-@interface FGMPlatformCameraUpdateNewLatLng : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng;
-@property(nonatomic, strong) FGMPlatformLatLng *latLng;
-@end
-
-/// Pigeon equivalent of NewLatLngBounds
-@interface FGMPlatformCameraUpdateNewLatLngBounds : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithBounds:(FGMPlatformLatLngBounds *)bounds padding:(double)padding;
-@property(nonatomic, strong) FGMPlatformLatLngBounds *bounds;
-@property(nonatomic, assign) double padding;
-@end
-
-/// Pigeon equivalent of NewLatLngZoom
-@interface FGMPlatformCameraUpdateNewLatLngZoom : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng zoom:(double)zoom;
-@property(nonatomic, strong) FGMPlatformLatLng *latLng;
-@property(nonatomic, assign) double zoom;
-@end
-
-/// Pigeon equivalent of ScrollBy
-@interface FGMPlatformCameraUpdateScrollBy : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithDx:(double)dx dy:(double)dy;
-@property(nonatomic, assign) double dx;
-@property(nonatomic, assign) double dy;
-@end
-
-/// Pigeon equivalent of ZoomBy
-@interface FGMPlatformCameraUpdateZoomBy : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithAmount:(double)amount focus:(nullable FGMPlatformPoint *)focus;
-@property(nonatomic, assign) double amount;
-@property(nonatomic, strong, nullable) FGMPlatformPoint *focus;
-@end
-
-/// Pigeon equivalent of ZoomIn/ZoomOut
-@interface FGMPlatformCameraUpdateZoom : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithOut:(BOOL)out;
-@property(nonatomic, assign) BOOL out;
-@end
-
-/// Pigeon equivalent of ZoomTo
-@interface FGMPlatformCameraUpdateZoomTo : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithZoom:(double)zoom;
-@property(nonatomic, assign) double zoom;
-@end
-
-/// Pigeon equivalent of the Circle class.
-@interface FGMPlatformCircle : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithConsumeTapEvents:(BOOL)consumeTapEvents
- fillColor:(FGMPlatformColor *)fillColor
- strokeColor:(FGMPlatformColor *)strokeColor
- visible:(BOOL)visible
- strokeWidth:(NSInteger)strokeWidth
- zIndex:(double)zIndex
- center:(FGMPlatformLatLng *)center
- radius:(double)radius
- circleId:(NSString *)circleId;
-@property(nonatomic, assign) BOOL consumeTapEvents;
-@property(nonatomic, strong) FGMPlatformColor *fillColor;
-@property(nonatomic, strong) FGMPlatformColor *strokeColor;
-@property(nonatomic, assign) BOOL visible;
-@property(nonatomic, assign) NSInteger strokeWidth;
-@property(nonatomic, assign) double zIndex;
-@property(nonatomic, strong) FGMPlatformLatLng *center;
-@property(nonatomic, assign) double radius;
-@property(nonatomic, copy) NSString *circleId;
-@end
-
-/// Pigeon equivalent of the Heatmap class.
-@interface FGMPlatformHeatmap : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithHeatmapId:(NSString *)heatmapId
- data:(NSArray<FGMPlatformWeightedLatLng *> *)data
- gradient:(nullable FGMPlatformHeatmapGradient *)gradient
- opacity:(double)opacity
- radius:(NSInteger)radius
- minimumZoomIntensity:(NSInteger)minimumZoomIntensity
- maximumZoomIntensity:(NSInteger)maximumZoomIntensity;
-@property(nonatomic, copy) NSString *heatmapId;
-@property(nonatomic, copy) NSArray<FGMPlatformWeightedLatLng *> *data;
-@property(nonatomic, strong, nullable) FGMPlatformHeatmapGradient *gradient;
-@property(nonatomic, assign) double opacity;
-@property(nonatomic, assign) NSInteger radius;
-@property(nonatomic, assign) NSInteger minimumZoomIntensity;
-@property(nonatomic, assign) NSInteger maximumZoomIntensity;
-@end
-
-/// Pigeon equivalent of the HeatmapGradient class.
-///
-/// The GMUGradient structure is slightly different from HeatmapGradient, so
-/// this matches the iOS API so that conversion can be done on the Dart side
-/// where the structures are easier to work with.
-@interface FGMPlatformHeatmapGradient : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithColors:(NSArray<FGMPlatformColor *> *)colors
- startPoints:(NSArray<NSNumber *> *)startPoints
- colorMapSize:(NSInteger)colorMapSize;
-@property(nonatomic, copy) NSArray<FGMPlatformColor *> *colors;
-@property(nonatomic, copy) NSArray<NSNumber *> *startPoints;
-@property(nonatomic, assign) NSInteger colorMapSize;
-@end
-
-/// Pigeon equivalent of the WeightedLatLng class.
-@interface FGMPlatformWeightedLatLng : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithPoint:(FGMPlatformLatLng *)point weight:(double)weight;
-@property(nonatomic, strong) FGMPlatformLatLng *point;
-@property(nonatomic, assign) double weight;
-@end
-
-/// Pigeon equivalent of the InfoWindow class.
-@interface FGMPlatformInfoWindow : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithTitle:(nullable NSString *)title
- snippet:(nullable NSString *)snippet
- anchor:(FGMPlatformPoint *)anchor;
-@property(nonatomic, copy, nullable) NSString *title;
-@property(nonatomic, copy, nullable) NSString *snippet;
-@property(nonatomic, strong) FGMPlatformPoint *anchor;
-@end
-
-/// Pigeon equivalent of Cluster.
-@interface FGMPlatformCluster : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithClusterManagerId:(NSString *)clusterManagerId
- position:(FGMPlatformLatLng *)position
- bounds:(FGMPlatformLatLngBounds *)bounds
- markerIds:(NSArray<NSString *> *)markerIds;
-@property(nonatomic, copy) NSString *clusterManagerId;
-@property(nonatomic, strong) FGMPlatformLatLng *position;
-@property(nonatomic, strong) FGMPlatformLatLngBounds *bounds;
-@property(nonatomic, copy) NSArray<NSString *> *markerIds;
-@end
-
-/// Pigeon equivalent of the ClusterManager class.
-@interface FGMPlatformClusterManager : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithIdentifier:(NSString *)identifier;
-@property(nonatomic, copy) NSString *identifier;
-@end
-
-/// Pigeon equivalent of the Marker class.
-@interface FGMPlatformMarker : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithAlpha:(double)alpha
- anchor:(FGMPlatformPoint *)anchor
- consumeTapEvents:(BOOL)consumeTapEvents
- draggable:(BOOL)draggable
- flat:(BOOL)flat
- icon:(FGMPlatformBitmap *)icon
- infoWindow:(FGMPlatformInfoWindow *)infoWindow
- position:(FGMPlatformLatLng *)position
- rotation:(double)rotation
- visible:(BOOL)visible
- zIndex:(NSInteger)zIndex
- markerId:(NSString *)markerId
- clusterManagerId:(nullable NSString *)clusterManagerId
- collisionBehavior:(nullable FGMPlatformMarkerCollisionBehaviorBox *)collisionBehavior;
-@property(nonatomic, assign) double alpha;
-@property(nonatomic, strong) FGMPlatformPoint *anchor;
-@property(nonatomic, assign) BOOL consumeTapEvents;
-@property(nonatomic, assign) BOOL draggable;
-@property(nonatomic, assign) BOOL flat;
-@property(nonatomic, strong) FGMPlatformBitmap *icon;
-@property(nonatomic, strong) FGMPlatformInfoWindow *infoWindow;
-@property(nonatomic, strong) FGMPlatformLatLng *position;
-@property(nonatomic, assign) double rotation;
-@property(nonatomic, assign) BOOL visible;
-@property(nonatomic, assign) NSInteger zIndex;
-@property(nonatomic, copy) NSString *markerId;
-@property(nonatomic, copy, nullable) NSString *clusterManagerId;
-@property(nonatomic, strong, nullable) FGMPlatformMarkerCollisionBehaviorBox *collisionBehavior;
-@end
-
-/// Pigeon equivalent of the Polygon class.
-@interface FGMPlatformPolygon : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithPolygonId:(NSString *)polygonId
- consumesTapEvents:(BOOL)consumesTapEvents
- fillColor:(FGMPlatformColor *)fillColor
- geodesic:(BOOL)geodesic
- points:(NSArray<FGMPlatformLatLng *> *)points
- holes:(NSArray<NSArray<FGMPlatformLatLng *> *> *)holes
- visible:(BOOL)visible
- strokeColor:(FGMPlatformColor *)strokeColor
- strokeWidth:(NSInteger)strokeWidth
- zIndex:(NSInteger)zIndex;
-@property(nonatomic, copy) NSString *polygonId;
-@property(nonatomic, assign) BOOL consumesTapEvents;
-@property(nonatomic, strong) FGMPlatformColor *fillColor;
-@property(nonatomic, assign) BOOL geodesic;
-@property(nonatomic, copy) NSArray<FGMPlatformLatLng *> *points;
-@property(nonatomic, copy) NSArray<NSArray<FGMPlatformLatLng *> *> *holes;
-@property(nonatomic, assign) BOOL visible;
-@property(nonatomic, strong) FGMPlatformColor *strokeColor;
-@property(nonatomic, assign) NSInteger strokeWidth;
-@property(nonatomic, assign) NSInteger zIndex;
-@end
-
-/// Pigeon equivalent of the Polyline class.
-@interface FGMPlatformPolyline : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithPolylineId:(NSString *)polylineId
- consumesTapEvents:(BOOL)consumesTapEvents
- color:(FGMPlatformColor *)color
- geodesic:(BOOL)geodesic
- jointType:(FGMPlatformJointType)jointType
- patterns:(NSArray<FGMPlatformPatternItem *> *)patterns
- points:(NSArray<FGMPlatformLatLng *> *)points
- visible:(BOOL)visible
- width:(NSInteger)width
- zIndex:(NSInteger)zIndex;
-@property(nonatomic, copy) NSString *polylineId;
-@property(nonatomic, assign) BOOL consumesTapEvents;
-@property(nonatomic, strong) FGMPlatformColor *color;
-@property(nonatomic, assign) BOOL geodesic;
-/// The joint type.
-@property(nonatomic, assign) FGMPlatformJointType jointType;
-/// The pattern data, as a list of pattern items.
-@property(nonatomic, copy) NSArray<FGMPlatformPatternItem *> *patterns;
-@property(nonatomic, copy) NSArray<FGMPlatformLatLng *> *points;
-@property(nonatomic, assign) BOOL visible;
-@property(nonatomic, assign) NSInteger width;
-@property(nonatomic, assign) NSInteger zIndex;
-@end
-
-/// Pigeon equivalent of the PatternItem class.
-@interface FGMPlatformPatternItem : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithType:(FGMPlatformPatternItemType)type length:(nullable NSNumber *)length;
-@property(nonatomic, assign) FGMPlatformPatternItemType type;
-@property(nonatomic, strong, nullable) NSNumber *length;
-@end
-
-/// Pigeon equivalent of the Tile class.
-@interface FGMPlatformTile : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithWidth:(NSInteger)width
- height:(NSInteger)height
- data:(nullable FlutterStandardTypedData *)data;
-@property(nonatomic, assign) NSInteger width;
-@property(nonatomic, assign) NSInteger height;
-@property(nonatomic, strong, nullable) FlutterStandardTypedData *data;
-@end
-
-/// Pigeon equivalent of the TileOverlay class.
-@interface FGMPlatformTileOverlay : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithTileOverlayId:(NSString *)tileOverlayId
- fadeIn:(BOOL)fadeIn
- transparency:(double)transparency
- zIndex:(NSInteger)zIndex
- visible:(BOOL)visible
- tileSize:(NSInteger)tileSize;
-@property(nonatomic, copy) NSString *tileOverlayId;
-@property(nonatomic, assign) BOOL fadeIn;
-@property(nonatomic, assign) double transparency;
-@property(nonatomic, assign) NSInteger zIndex;
-@property(nonatomic, assign) BOOL visible;
-@property(nonatomic, assign) NSInteger tileSize;
-@end
-
-/// Pigeon equivalent of Flutter's EdgeInsets.
-@interface FGMPlatformEdgeInsets : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithTop:(double)top bottom:(double)bottom left:(double)left right:(double)right;
-@property(nonatomic, assign) double top;
-@property(nonatomic, assign) double bottom;
-@property(nonatomic, assign) double left;
-@property(nonatomic, assign) double right;
-@end
-
-/// Pigeon equivalent of LatLng.
-@interface FGMPlatformLatLng : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithLatitude:(double)latitude longitude:(double)longitude;
-@property(nonatomic, assign) double latitude;
-@property(nonatomic, assign) double longitude;
-@end
-
-/// Pigeon equivalent of LatLngBounds.
-@interface FGMPlatformLatLngBounds : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithNortheast:(FGMPlatformLatLng *)northeast
- southwest:(FGMPlatformLatLng *)southwest;
-@property(nonatomic, strong) FGMPlatformLatLng *northeast;
-@property(nonatomic, strong) FGMPlatformLatLng *southwest;
-@end
-
-/// Pigeon equivalent of CameraTargetBounds.
-///
-/// As with the Dart version, it exists to distinguish between not setting a
-/// a target, and having an explicitly unbounded target (null [bounds]).
-@interface FGMPlatformCameraTargetBounds : NSObject
-+ (instancetype)makeWithBounds:(nullable FGMPlatformLatLngBounds *)bounds;
-@property(nonatomic, strong, nullable) FGMPlatformLatLngBounds *bounds;
-@end
-
-/// Pigeon equivalent of the GroundOverlay class.
-@interface FGMPlatformGroundOverlay : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithGroundOverlayId:(NSString *)groundOverlayId
- image:(FGMPlatformBitmap *)image
- position:(nullable FGMPlatformLatLng *)position
- bounds:(nullable FGMPlatformLatLngBounds *)bounds
- anchor:(nullable FGMPlatformPoint *)anchor
- transparency:(double)transparency
- bearing:(double)bearing
- zIndex:(NSInteger)zIndex
- visible:(BOOL)visible
- clickable:(BOOL)clickable
- zoomLevel:(nullable NSNumber *)zoomLevel;
-@property(nonatomic, copy) NSString *groundOverlayId;
-@property(nonatomic, strong) FGMPlatformBitmap *image;
-@property(nonatomic, strong, nullable) FGMPlatformLatLng *position;
-@property(nonatomic, strong, nullable) FGMPlatformLatLngBounds *bounds;
-@property(nonatomic, strong, nullable) FGMPlatformPoint *anchor;
-@property(nonatomic, assign) double transparency;
-@property(nonatomic, assign) double bearing;
-@property(nonatomic, assign) NSInteger zIndex;
-@property(nonatomic, assign) BOOL visible;
-@property(nonatomic, assign) BOOL clickable;
-@property(nonatomic, strong, nullable) NSNumber *zoomLevel;
-@end
-
-/// Information passed to the platform view creation.
-@interface FGMPlatformMapViewCreationParams : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)
- makeWithInitialCameraPosition:(FGMPlatformCameraPosition *)initialCameraPosition
- mapConfiguration:(FGMPlatformMapConfiguration *)mapConfiguration
- initialCircles:(NSArray<FGMPlatformCircle *> *)initialCircles
- initialMarkers:(NSArray<FGMPlatformMarker *> *)initialMarkers
- initialPolygons:(NSArray<FGMPlatformPolygon *> *)initialPolygons
- initialPolylines:(NSArray<FGMPlatformPolyline *> *)initialPolylines
- initialHeatmaps:(NSArray<FGMPlatformHeatmap *> *)initialHeatmaps
- initialTileOverlays:(NSArray<FGMPlatformTileOverlay *> *)initialTileOverlays
- initialClusterManagers:(NSArray<FGMPlatformClusterManager *> *)initialClusterManagers
- initialGroundOverlays:(NSArray<FGMPlatformGroundOverlay *> *)initialGroundOverlays;
-@property(nonatomic, strong) FGMPlatformCameraPosition *initialCameraPosition;
-@property(nonatomic, strong) FGMPlatformMapConfiguration *mapConfiguration;
-@property(nonatomic, copy) NSArray<FGMPlatformCircle *> *initialCircles;
-@property(nonatomic, copy) NSArray<FGMPlatformMarker *> *initialMarkers;
-@property(nonatomic, copy) NSArray<FGMPlatformPolygon *> *initialPolygons;
-@property(nonatomic, copy) NSArray<FGMPlatformPolyline *> *initialPolylines;
-@property(nonatomic, copy) NSArray<FGMPlatformHeatmap *> *initialHeatmaps;
-@property(nonatomic, copy) NSArray<FGMPlatformTileOverlay *> *initialTileOverlays;
-@property(nonatomic, copy) NSArray<FGMPlatformClusterManager *> *initialClusterManagers;
-@property(nonatomic, copy) NSArray<FGMPlatformGroundOverlay *> *initialGroundOverlays;
-@end
-
-/// Pigeon equivalent of MapConfiguration.
-@interface FGMPlatformMapConfiguration : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithCompassEnabled:(nullable NSNumber *)compassEnabled
- cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds
- mapType:(nullable FGMPlatformMapTypeBox *)mapType
- minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference
- rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled
- scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled
- tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled
- trackCameraPosition:(nullable NSNumber *)trackCameraPosition
- zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled
- myLocationEnabled:(nullable NSNumber *)myLocationEnabled
- myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled
- padding:(nullable FGMPlatformEdgeInsets *)padding
- indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled
- trafficEnabled:(nullable NSNumber *)trafficEnabled
- buildingsEnabled:(nullable NSNumber *)buildingsEnabled
- markerType:(FGMPlatformMarkerType)markerType
- mapId:(nullable NSString *)mapId
- style:(nullable NSString *)style;
-@property(nonatomic, strong, nullable) NSNumber *compassEnabled;
-@property(nonatomic, strong, nullable) FGMPlatformCameraTargetBounds *cameraTargetBounds;
-@property(nonatomic, strong, nullable) FGMPlatformMapTypeBox *mapType;
-@property(nonatomic, strong, nullable) FGMPlatformZoomRange *minMaxZoomPreference;
-@property(nonatomic, strong, nullable) NSNumber *rotateGesturesEnabled;
-@property(nonatomic, strong, nullable) NSNumber *scrollGesturesEnabled;
-@property(nonatomic, strong, nullable) NSNumber *tiltGesturesEnabled;
-@property(nonatomic, strong, nullable) NSNumber *trackCameraPosition;
-@property(nonatomic, strong, nullable) NSNumber *zoomGesturesEnabled;
-@property(nonatomic, strong, nullable) NSNumber *myLocationEnabled;
-@property(nonatomic, strong, nullable) NSNumber *myLocationButtonEnabled;
-@property(nonatomic, strong, nullable) FGMPlatformEdgeInsets *padding;
-@property(nonatomic, strong, nullable) NSNumber *indoorViewEnabled;
-@property(nonatomic, strong, nullable) NSNumber *trafficEnabled;
-@property(nonatomic, strong, nullable) NSNumber *buildingsEnabled;
-@property(nonatomic, assign) FGMPlatformMarkerType markerType;
-@property(nonatomic, copy, nullable) NSString *mapId;
-@property(nonatomic, copy, nullable) NSString *style;
-@end
-
-/// Pigeon representation of an x,y coordinate.
-@interface FGMPlatformPoint : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithX:(double)x y:(double)y;
-@property(nonatomic, assign) double x;
-@property(nonatomic, assign) double y;
-@end
-
-/// Pigeon representation of a size.
-@interface FGMPlatformSize : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithWidth:(double)width height:(double)height;
-@property(nonatomic, assign) double width;
-@property(nonatomic, assign) double height;
-@end
-
-/// Pigeon representation of a color.
-@interface FGMPlatformColor : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithRed:(double)red green:(double)green blue:(double)blue alpha:(double)alpha;
-@property(nonatomic, assign) double red;
-@property(nonatomic, assign) double green;
-@property(nonatomic, assign) double blue;
-@property(nonatomic, assign) double alpha;
-@end
-
-/// Pigeon equivalent of GMSTileLayer properties.
-@interface FGMPlatformTileLayer : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithVisible:(BOOL)visible
- fadeIn:(BOOL)fadeIn
- opacity:(double)opacity
- zIndex:(NSInteger)zIndex;
-@property(nonatomic, assign) BOOL visible;
-@property(nonatomic, assign) BOOL fadeIn;
-@property(nonatomic, assign) double opacity;
-@property(nonatomic, assign) NSInteger zIndex;
-@end
-
-/// Pigeon equivalent of MinMaxZoomPreference.
-@interface FGMPlatformZoomRange : NSObject
-+ (instancetype)makeWithMin:(nullable NSNumber *)min max:(nullable NSNumber *)max;
-@property(nonatomic, strong, nullable) NSNumber *min;
-@property(nonatomic, strong, nullable) NSNumber *max;
-@end
-
-/// Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint
-/// types of [BitmapDescriptor], [PlatformBitmap] contains a single field which
-/// may hold the pigeon equivalent type of any of them.
-@interface FGMPlatformBitmap : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithBitmap:(id)bitmap;
-/// One of [PlatformBitmapAssetMap], [PlatformBitmapAsset],
-/// [PlatformBitmapAssetImage], [PlatformBitmapBytesMap],
-/// [PlatformBitmapBytes], or [PlatformBitmapDefaultMarker].
-/// As Pigeon does not currently support data class inheritance, this
-/// approach allows for the different bitmap implementations to be valid
-/// argument and return types of the API methods. See
-/// https://github.com/flutter/flutter/issues/117819.
-@property(nonatomic, strong) id bitmap;
-@end
-
-/// Pigeon equivalent of [DefaultMarker].
-@interface FGMPlatformBitmapDefaultMarker : NSObject
-+ (instancetype)makeWithHue:(nullable NSNumber *)hue;
-@property(nonatomic, strong, nullable) NSNumber *hue;
-@end
-
-/// Pigeon equivalent of [BytesBitmap].
-@interface FGMPlatformBitmapBytes : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData
- size:(nullable FGMPlatformSize *)size;
-@property(nonatomic, strong) FlutterStandardTypedData *byteData;
-@property(nonatomic, strong, nullable) FGMPlatformSize *size;
-@end
-
-/// Pigeon equivalent of [AssetBitmap].
-@interface FGMPlatformBitmapAsset : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithName:(NSString *)name pkg:(nullable NSString *)pkg;
-@property(nonatomic, copy) NSString *name;
-@property(nonatomic, copy, nullable) NSString *pkg;
-@end
-
-/// Pigeon equivalent of [AssetImageBitmap].
-@interface FGMPlatformBitmapAssetImage : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithName:(NSString *)name
- scale:(double)scale
- size:(nullable FGMPlatformSize *)size;
-@property(nonatomic, copy) NSString *name;
-@property(nonatomic, assign) double scale;
-@property(nonatomic, strong, nullable) FGMPlatformSize *size;
-@end
-
-/// Pigeon equivalent of [AssetMapBitmap].
-@interface FGMPlatformBitmapAssetMap : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithAssetName:(NSString *)assetName
- bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling
- imagePixelRatio:(double)imagePixelRatio
- width:(nullable NSNumber *)width
- height:(nullable NSNumber *)height;
-@property(nonatomic, copy) NSString *assetName;
-@property(nonatomic, assign) FGMPlatformMapBitmapScaling bitmapScaling;
-@property(nonatomic, assign) double imagePixelRatio;
-@property(nonatomic, strong, nullable) NSNumber *width;
-@property(nonatomic, strong, nullable) NSNumber *height;
-@end
-
-/// Pigeon equivalent of [BytesMapBitmap].
-@interface FGMPlatformBitmapBytesMap : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData
- bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling
- imagePixelRatio:(double)imagePixelRatio
- width:(nullable NSNumber *)width
- height:(nullable NSNumber *)height;
-@property(nonatomic, strong) FlutterStandardTypedData *byteData;
-@property(nonatomic, assign) FGMPlatformMapBitmapScaling bitmapScaling;
-@property(nonatomic, assign) double imagePixelRatio;
-@property(nonatomic, strong, nullable) NSNumber *width;
-@property(nonatomic, strong, nullable) NSNumber *height;
-@end
-
-/// Pigeon equivalent of [PinConfig].
-@interface FGMPlatformBitmapPinConfig : NSObject
-+ (instancetype)makeWithBackgroundColor:(nullable FGMPlatformColor *)backgroundColor
- borderColor:(nullable FGMPlatformColor *)borderColor
- glyphColor:(nullable FGMPlatformColor *)glyphColor
- glyphTextColor:(nullable FGMPlatformColor *)glyphTextColor
- glyphText:(nullable NSString *)glyphText
- glyphBitmap:(nullable FGMPlatformBitmap *)glyphBitmap;
-@property(nonatomic, strong, nullable) FGMPlatformColor *backgroundColor;
-@property(nonatomic, strong, nullable) FGMPlatformColor *borderColor;
-@property(nonatomic, strong, nullable) FGMPlatformColor *glyphColor;
-@property(nonatomic, strong, nullable) FGMPlatformColor *glyphTextColor;
-@property(nonatomic, copy, nullable) NSString *glyphText;
-@property(nonatomic, strong, nullable) FGMPlatformBitmap *glyphBitmap;
-@end
-
-/// The codec used by all APIs.
-NSObject<FlutterMessageCodec> *FGMGetGoogleMapsFlutterPigeonMessagesCodec(void);
-
-/// Interface for non-test interactions with the native SDK.
-///
-/// For test-only state queries, see [MapsInspectorApi].
-@protocol FGMMapsApi
-/// Returns once the map instance is available.
-- (void)waitForMapWithError:(FlutterError *_Nullable *_Nonnull)error;
-/// Updates the map's configuration options.
-///
-/// Only non-null configuration values will result in updates; options with
-/// null values will remain unchanged.
-- (void)updateWithMapConfiguration:(FGMPlatformMapConfiguration *)configuration
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Updates the set of circles on the map.
-- (void)updateCirclesByAdding:(NSArray<FGMPlatformCircle *> *)toAdd
- changing:(NSArray<FGMPlatformCircle *> *)toChange
- removing:(NSArray<NSString *> *)idsToRemove
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Updates the set of heatmaps on the map.
-- (void)updateHeatmapsByAdding:(NSArray<FGMPlatformHeatmap *> *)toAdd
- changing:(NSArray<FGMPlatformHeatmap *> *)toChange
- removing:(NSArray<NSString *> *)idsToRemove
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Updates the set of custer managers for clusters on the map.
-- (void)updateClusterManagersByAdding:(NSArray<FGMPlatformClusterManager *> *)toAdd
- removing:(NSArray<NSString *> *)idsToRemove
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Updates the set of markers on the map.
-- (void)updateMarkersByAdding:(NSArray<FGMPlatformMarker *> *)toAdd
- changing:(NSArray<FGMPlatformMarker *> *)toChange
- removing:(NSArray<NSString *> *)idsToRemove
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Updates the set of polygonss on the map.
-- (void)updatePolygonsByAdding:(NSArray<FGMPlatformPolygon *> *)toAdd
- changing:(NSArray<FGMPlatformPolygon *> *)toChange
- removing:(NSArray<NSString *> *)idsToRemove
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Updates the set of polylines on the map.
-- (void)updatePolylinesByAdding:(NSArray<FGMPlatformPolyline *> *)toAdd
- changing:(NSArray<FGMPlatformPolyline *> *)toChange
- removing:(NSArray<NSString *> *)idsToRemove
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Updates the set of tile overlays on the map.
-- (void)updateTileOverlaysByAdding:(NSArray<FGMPlatformTileOverlay *> *)toAdd
- changing:(NSArray<FGMPlatformTileOverlay *> *)toChange
- removing:(NSArray<NSString *> *)idsToRemove
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Updates the set of ground overlays on the map.
-- (void)updateGroundOverlaysByAdding:(NSArray<FGMPlatformGroundOverlay *> *)toAdd
- changing:(NSArray<FGMPlatformGroundOverlay *> *)toChange
- removing:(NSArray<NSString *> *)idsToRemove
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Gets the screen coordinate for the given map location.
-///
-/// @return `nil` only when `error != nil`.
-- (nullable FGMPlatformPoint *)screenCoordinatesForLatLng:(FGMPlatformLatLng *)latLng
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Gets the map location for the given screen coordinate.
-///
-/// @return `nil` only when `error != nil`.
-- (nullable FGMPlatformLatLng *)latLngForScreenCoordinate:(FGMPlatformPoint *)screenCoordinate
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Gets the map region currently displayed on the map.
-///
-/// @return `nil` only when `error != nil`.
-- (nullable FGMPlatformLatLngBounds *)visibleMapRegion:(FlutterError *_Nullable *_Nonnull)error;
-/// Moves the camera according to [cameraUpdate] immediately, with no
-/// animation.
-- (void)moveCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Moves the camera according to [cameraUpdate], animating the update using a
-/// duration in milliseconds if provided.
-- (void)animateCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate
- duration:(nullable NSNumber *)durationMilliseconds
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Gets the current map zoom level.
-///
-/// @return `nil` only when `error != nil`.
-- (nullable NSNumber *)currentZoomLevel:(FlutterError *_Nullable *_Nonnull)error;
-/// Show the info window for the marker with the given ID.
-- (void)showInfoWindowForMarkerWithIdentifier:(NSString *)markerId
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Hide the info window for the marker with the given ID.
-- (void)hideInfoWindowForMarkerWithIdentifier:(NSString *)markerId
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Returns true if the marker with the given ID is currently displaying its
-/// info window.
-///
-/// @return `nil` only when `error != nil`.
-- (nullable NSNumber *)
- isShowingInfoWindowForMarkerWithIdentifier:(NSString *)markerId
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Sets the style to the given map style string, where an empty string
-/// indicates that the style should be cleared.
-///
-/// If there was an error setting the style, such as an invalid style string,
-/// returns the error message.
-- (nullable NSString *)setStyle:(NSString *)style error:(FlutterError *_Nullable *_Nonnull)error;
-/// Returns the error string from the last attempt to set the map style, if
-/// any.
-///
-/// This allows checking asynchronously for initial style failures, as there
-/// is no way to return failures from map initialization.
-- (nullable NSString *)lastStyleError:(FlutterError *_Nullable *_Nonnull)error;
-/// Clears the cache of tiles previously requseted from the tile provider.
-- (void)clearTileCacheForOverlayWithIdentifier:(NSString *)tileOverlayId
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Takes a snapshot of the map and returns its image data.
-- (nullable FlutterStandardTypedData *)takeSnapshotWithError:
- (FlutterError *_Nullable *_Nonnull)error;
-/// Returns true if the map supports advanced markers.
-///
-/// @return `nil` only when `error != nil`.
-- (nullable NSNumber *)isAdvancedMarkersAvailable:(FlutterError *_Nullable *_Nonnull)error;
-@end
-
-extern void SetUpFGMMapsApi(id<FlutterBinaryMessenger> binaryMessenger,
- NSObject<FGMMapsApi> *_Nullable api);
-
-extern void SetUpFGMMapsApiWithSuffix(id<FlutterBinaryMessenger> binaryMessenger,
- NSObject<FGMMapsApi> *_Nullable api,
- NSString *messageChannelSuffix);
-
-/// Interface for calls from the native SDK to Dart.
-@interface FGMMapsCallbackApi : NSObject
-- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger;
-- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger
- messageChannelSuffix:(nullable NSString *)messageChannelSuffix;
-/// Called when the map camera starts moving.
-- (void)didStartCameraMoveWithCompletion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when the map camera moves.
-- (void)didMoveCameraToPosition:(FGMPlatformCameraPosition *)cameraPosition
- completion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when the map camera stops moving.
-- (void)didIdleCameraWithCompletion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when the map, not a specifc map object, is tapped.
-- (void)didTapAtPosition:(FGMPlatformLatLng *)position
- completion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when the map, not a specifc map object, is long pressed.
-- (void)didLongPressAtPosition:(FGMPlatformLatLng *)position
- completion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when a marker is tapped.
-- (void)didTapMarkerWithIdentifier:(NSString *)markerId
- completion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when a marker drag starts.
-- (void)didStartDragForMarkerWithIdentifier:(NSString *)markerId
- atPosition:(FGMPlatformLatLng *)position
- completion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when a marker drag updates.
-- (void)didDragMarkerWithIdentifier:(NSString *)markerId
- atPosition:(FGMPlatformLatLng *)position
- completion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when a marker drag ends.
-- (void)didEndDragForMarkerWithIdentifier:(NSString *)markerId
- atPosition:(FGMPlatformLatLng *)position
- completion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when a marker's info window is tapped.
-- (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)markerId
- completion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when a circle is tapped.
-- (void)didTapCircleWithIdentifier:(NSString *)circleId
- completion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when a marker cluster is tapped.
-- (void)didTapCluster:(FGMPlatformCluster *)cluster
- completion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when a polygon is tapped.
-- (void)didTapPolygonWithIdentifier:(NSString *)polygonId
- completion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when a polyline is tapped.
-- (void)didTapPolylineWithIdentifier:(NSString *)polylineId
- completion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when a ground overlay is tapped.
-- (void)didTapGroundOverlayWithIdentifier:(NSString *)groundOverlayId
- completion:(void (^)(FlutterError *_Nullable))completion;
-/// Called to get data for a map tile.
-- (void)tileWithOverlayIdentifier:(NSString *)tileOverlayId
- location:(FGMPlatformPoint *)location
- zoom:(NSInteger)zoom
- completion:(void (^)(FGMPlatformTile *_Nullable,
- FlutterError *_Nullable))completion;
-@end
-
-/// Dummy interface to force generation of the platform view creation params,
-/// which are not used in any Pigeon calls, only the platform view creation
-/// call made internally by Flutter.
-@protocol FGMMapsPlatformViewApi
-- (void)createViewType:(nullable FGMPlatformMapViewCreationParams *)type
- error:(FlutterError *_Nullable *_Nonnull)error;
-@end
-
-extern void SetUpFGMMapsPlatformViewApi(id<FlutterBinaryMessenger> binaryMessenger,
- NSObject<FGMMapsPlatformViewApi> *_Nullable api);
-
-extern void SetUpFGMMapsPlatformViewApiWithSuffix(id<FlutterBinaryMessenger> binaryMessenger,
- NSObject<FGMMapsPlatformViewApi> *_Nullable api,
- NSString *messageChannelSuffix);
-
-/// Inspector API only intended for use in integration tests.
-@protocol FGMMapsInspectorApi
-/// @return `nil` only when `error != nil`.
-- (nullable NSNumber *)areBuildingsEnabledWithError:(FlutterError *_Nullable *_Nonnull)error;
-/// @return `nil` only when `error != nil`.
-- (nullable NSNumber *)areRotateGesturesEnabledWithError:(FlutterError *_Nullable *_Nonnull)error;
-/// @return `nil` only when `error != nil`.
-- (nullable NSNumber *)areScrollGesturesEnabledWithError:(FlutterError *_Nullable *_Nonnull)error;
-/// @return `nil` only when `error != nil`.
-- (nullable NSNumber *)areTiltGesturesEnabledWithError:(FlutterError *_Nullable *_Nonnull)error;
-/// @return `nil` only when `error != nil`.
-- (nullable NSNumber *)areZoomGesturesEnabledWithError:(FlutterError *_Nullable *_Nonnull)error;
-/// @return `nil` only when `error != nil`.
-- (nullable NSNumber *)isCompassEnabledWithError:(FlutterError *_Nullable *_Nonnull)error;
-/// @return `nil` only when `error != nil`.
-- (nullable NSNumber *)isMyLocationButtonEnabledWithError:(FlutterError *_Nullable *_Nonnull)error;
-/// @return `nil` only when `error != nil`.
-- (nullable NSNumber *)isTrafficEnabledWithError:(FlutterError *_Nullable *_Nonnull)error;
-- (nullable FGMPlatformTileLayer *)tileOverlayWithIdentifier:(NSString *)tileOverlayId
- error:
- (FlutterError *_Nullable *_Nonnull)error;
-- (nullable FGMPlatformGroundOverlay *)
- groundOverlayWithIdentifier:(NSString *)groundOverlayId
- error:(FlutterError *_Nullable *_Nonnull)error;
-- (nullable FGMPlatformHeatmap *)heatmapWithIdentifier:(NSString *)heatmapId
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// @return `nil` only when `error != nil`.
-- (nullable FGMPlatformZoomRange *)zoomRange:(FlutterError *_Nullable *_Nonnull)error;
-/// @return `nil` only when `error != nil`.
-- (nullable NSArray<FGMPlatformCluster *> *)
- clustersWithIdentifier:(NSString *)clusterManagerId
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// @return `nil` only when `error != nil`.
-- (nullable FGMPlatformCameraPosition *)cameraPosition:(FlutterError *_Nullable *_Nonnull)error;
-@end
-
-extern void SetUpFGMMapsInspectorApi(id<FlutterBinaryMessenger> binaryMessenger,
- NSObject<FGMMapsInspectorApi> *_Nullable api);
-
-extern void SetUpFGMMapsInspectorApiWithSuffix(id<FlutterBinaryMessenger> binaryMessenger,
- NSObject<FGMMapsInspectorApi> *_Nullable api,
- NSString *messageChannelSuffix);
-
-NS_ASSUME_NONNULL_END
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/lib/src/google_maps_flutter_ios.dart b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/lib/src/google_maps_flutter_ios.dart
index c0c8db0..11df181 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/lib/src/google_maps_flutter_ios.dart
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/lib/src/google_maps_flutter_ios.dart
@@ -714,57 +714,43 @@
switch (update.updateType) {
case CameraUpdateType.newCameraPosition:
update as CameraUpdateNewCameraPosition;
- return PlatformCameraUpdate(
- cameraUpdate: PlatformCameraUpdateNewCameraPosition(
- cameraPosition: _platformCameraPositionFromCameraPosition(update.cameraPosition),
- ),
+ return PlatformCameraUpdateNewCameraPosition(
+ cameraPosition: _platformCameraPositionFromCameraPosition(update.cameraPosition),
);
case CameraUpdateType.newLatLng:
update as CameraUpdateNewLatLng;
- return PlatformCameraUpdate(
- cameraUpdate: PlatformCameraUpdateNewLatLng(
- latLng: _platformLatLngFromLatLng(update.latLng),
- ),
- );
+ return PlatformCameraUpdateNewLatLng(latLng: _platformLatLngFromLatLng(update.latLng));
case CameraUpdateType.newLatLngZoom:
update as CameraUpdateNewLatLngZoom;
- return PlatformCameraUpdate(
- cameraUpdate: PlatformCameraUpdateNewLatLngZoom(
- latLng: _platformLatLngFromLatLng(update.latLng),
- zoom: update.zoom,
- ),
+ return PlatformCameraUpdateNewLatLngZoom(
+ latLng: _platformLatLngFromLatLng(update.latLng),
+ zoom: update.zoom,
);
case CameraUpdateType.newLatLngBounds:
update as CameraUpdateNewLatLngBounds;
- return PlatformCameraUpdate(
- cameraUpdate: PlatformCameraUpdateNewLatLngBounds(
- bounds: _platformLatLngBoundsFromLatLngBounds(update.bounds)!,
- padding: update.padding,
- ),
+ return PlatformCameraUpdateNewLatLngBounds(
+ bounds: _platformLatLngBoundsFromLatLngBounds(update.bounds)!,
+ padding: update.padding,
);
case CameraUpdateType.zoomTo:
update as CameraUpdateZoomTo;
- return PlatformCameraUpdate(cameraUpdate: PlatformCameraUpdateZoomTo(zoom: update.zoom));
+ return PlatformCameraUpdateZoomTo(zoom: update.zoom);
case CameraUpdateType.zoomBy:
update as CameraUpdateZoomBy;
final Offset? focus = update.focus;
- return PlatformCameraUpdate(
- cameraUpdate: PlatformCameraUpdateZoomBy(
- amount: update.amount,
- focus: focus == null ? null : _platformPointFromOffset(focus),
- ),
+ return PlatformCameraUpdateZoomBy(
+ amount: update.amount,
+ focus: focus == null ? null : _platformPointFromOffset(focus),
);
case CameraUpdateType.zoomIn:
update as CameraUpdateZoomIn;
- return PlatformCameraUpdate(cameraUpdate: PlatformCameraUpdateZoom(out: false));
+ return PlatformCameraUpdateZoom(out: false);
case CameraUpdateType.zoomOut:
update as CameraUpdateZoomOut;
- return PlatformCameraUpdate(cameraUpdate: PlatformCameraUpdateZoom(out: true));
+ return PlatformCameraUpdateZoom(out: true);
case CameraUpdateType.scrollBy:
update as CameraUpdateScrollBy;
- return PlatformCameraUpdate(
- cameraUpdate: PlatformCameraUpdateScrollBy(dx: update.dx, dy: update.dy),
- );
+ return PlatformCameraUpdateScrollBy(dx: update.dx, dy: update.dy);
}
}
@@ -816,51 +802,41 @@
static PlatformBitmap platformBitmapFromBitmapDescriptor(BitmapDescriptor bitmap) {
switch (bitmap) {
case final DefaultMarker marker:
- return PlatformBitmap(bitmap: PlatformBitmapDefaultMarker(hue: marker.hue?.toDouble()));
+ return PlatformBitmapDefaultMarker(hue: marker.hue?.toDouble());
// Clients may still use this deprecated format, so it must be supported.
// ignore: deprecated_member_use
case final BytesBitmap bytes:
final Size? size = bytes.size;
- return PlatformBitmap(
- bitmap: PlatformBitmapBytes(
- byteData: bytes.byteData,
- size: (size == null) ? null : _platformSizeFromSize(size),
- ),
+ return PlatformBitmapBytes(
+ byteData: bytes.byteData,
+ size: (size == null) ? null : _platformSizeFromSize(size),
);
case final AssetBitmap asset:
- return PlatformBitmap(
- bitmap: PlatformBitmapAsset(name: asset.name, pkg: asset.package),
- );
+ return PlatformBitmapAsset(name: asset.name, pkg: asset.package);
// Clients may still use this deprecated format, so it must be supported.
// ignore: deprecated_member_use
case final AssetImageBitmap asset:
final Size? size = asset.size;
- return PlatformBitmap(
- bitmap: PlatformBitmapAssetImage(
- name: asset.name,
- scale: asset.scale,
- size: (size == null) ? null : _platformSizeFromSize(size),
- ),
+ return PlatformBitmapAssetImage(
+ name: asset.name,
+ scale: asset.scale,
+ size: (size == null) ? null : _platformSizeFromSize(size),
);
case final AssetMapBitmap asset:
- return PlatformBitmap(
- bitmap: PlatformBitmapAssetMap(
- assetName: asset.assetName,
- bitmapScaling: platformMapBitmapScalingFromScaling(asset.bitmapScaling),
- imagePixelRatio: asset.imagePixelRatio,
- width: asset.width,
- height: asset.height,
- ),
+ return PlatformBitmapAssetMap(
+ assetName: asset.assetName,
+ bitmapScaling: platformMapBitmapScalingFromScaling(asset.bitmapScaling),
+ imagePixelRatio: asset.imagePixelRatio,
+ width: asset.width,
+ height: asset.height,
);
case final BytesMapBitmap bytes:
- return PlatformBitmap(
- bitmap: PlatformBitmapBytesMap(
- byteData: bytes.byteData,
- bitmapScaling: platformMapBitmapScalingFromScaling(bytes.bitmapScaling),
- imagePixelRatio: bytes.imagePixelRatio,
- width: bytes.width,
- height: bytes.height,
- ),
+ return PlatformBitmapBytesMap(
+ byteData: bytes.byteData,
+ bitmapScaling: platformMapBitmapScalingFromScaling(bytes.bitmapScaling),
+ imagePixelRatio: bytes.imagePixelRatio,
+ width: bytes.width,
+ height: bytes.height,
);
case final PinConfig pinConfig:
final PlatformColor? backgroundColor = pinConfig.backgroundColor != null
@@ -871,38 +847,30 @@
: null;
switch (pinConfig.glyph) {
case final CircleGlyph circleGlyph:
- return PlatformBitmap(
- bitmap: PlatformBitmapPinConfig(
- backgroundColor: backgroundColor,
- borderColor: borderColor,
- glyphColor: _platformColorFromColor(circleGlyph.color),
- ),
+ return PlatformBitmapPinConfig(
+ backgroundColor: backgroundColor,
+ borderColor: borderColor,
+ glyphColor: _platformColorFromColor(circleGlyph.color),
);
case final TextGlyph textGlyph:
- return PlatformBitmap(
- bitmap: PlatformBitmapPinConfig(
- backgroundColor: backgroundColor,
- borderColor: borderColor,
- glyphText: textGlyph.text,
- glyphTextColor: textGlyph.textColor != null
- ? _platformColorFromColor(textGlyph.textColor!)
- : null,
- ),
+ return PlatformBitmapPinConfig(
+ backgroundColor: backgroundColor,
+ borderColor: borderColor,
+ glyphText: textGlyph.text,
+ glyphTextColor: textGlyph.textColor != null
+ ? _platformColorFromColor(textGlyph.textColor!)
+ : null,
);
case final BitmapGlyph bitmapGlyph:
- return PlatformBitmap(
- bitmap: PlatformBitmapPinConfig(
- backgroundColor: backgroundColor,
- borderColor: borderColor,
- glyphBitmap: platformBitmapFromBitmapDescriptor(bitmapGlyph.bitmap),
- ),
+ return PlatformBitmapPinConfig(
+ backgroundColor: backgroundColor,
+ borderColor: borderColor,
+ glyphBitmap: platformBitmapFromBitmapDescriptor(bitmapGlyph.bitmap),
);
case null:
- return PlatformBitmap(
- bitmap: PlatformBitmapPinConfig(
- backgroundColor: backgroundColor,
- borderColor: borderColor,
- ),
+ return PlatformBitmapPinConfig(
+ backgroundColor: backgroundColor,
+ borderColor: borderColor,
);
}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/lib/src/messages.g.dart b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/lib/src/messages.g.dart
index ee3002a..0d4c1db 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/lib/src/messages.g.dart
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/lib/src/messages.g.dart
@@ -190,52 +190,10 @@
}
/// Pigeon representation of a CameraUpdate.
-class PlatformCameraUpdate {
- PlatformCameraUpdate({required this.cameraUpdate});
-
- /// This Object must be one of the classes below prefixed with
- /// PlatformCameraUpdate. Each such class represents a different type of
- /// camera update, and each holds a different set of data, preventing the
- /// use of a single unified class.
- Object cameraUpdate;
-
- List<Object?> _toList() {
- return <Object?>[cameraUpdate];
- }
-
- Object encode() {
- return _toList();
- }
-
- static PlatformCameraUpdate decode(Object result) {
- result as List<Object?>;
- return PlatformCameraUpdate(cameraUpdate: result[0]!);
- }
-
- @override
- // ignore: avoid_equals_and_hash_code_on_mutable_classes
- bool operator ==(Object other) {
- if (other is! PlatformCameraUpdate || other.runtimeType != runtimeType) {
- return false;
- }
- if (identical(this, other)) {
- return true;
- }
- return _deepEquals(cameraUpdate, other.cameraUpdate);
- }
-
- @override
- // ignore: avoid_equals_and_hash_code_on_mutable_classes
- int get hashCode => _deepHash(<Object?>[runtimeType, ..._toList()]);
-
- @override
- String toString() {
- return 'PlatformCameraUpdate(cameraUpdate: $cameraUpdate)';
- }
-}
+sealed class PlatformCameraUpdate {}
/// Pigeon equivalent of NewCameraPosition
-class PlatformCameraUpdateNewCameraPosition {
+class PlatformCameraUpdateNewCameraPosition extends PlatformCameraUpdate {
PlatformCameraUpdateNewCameraPosition({required this.cameraPosition});
PlatformCameraPosition cameraPosition;
@@ -278,7 +236,7 @@
}
/// Pigeon equivalent of NewLatLng
-class PlatformCameraUpdateNewLatLng {
+class PlatformCameraUpdateNewLatLng extends PlatformCameraUpdate {
PlatformCameraUpdateNewLatLng({required this.latLng});
PlatformLatLng latLng;
@@ -319,7 +277,7 @@
}
/// Pigeon equivalent of NewLatLngBounds
-class PlatformCameraUpdateNewLatLngBounds {
+class PlatformCameraUpdateNewLatLngBounds extends PlatformCameraUpdate {
PlatformCameraUpdateNewLatLngBounds({required this.bounds, required this.padding});
PlatformLatLngBounds bounds;
@@ -365,7 +323,7 @@
}
/// Pigeon equivalent of NewLatLngZoom
-class PlatformCameraUpdateNewLatLngZoom {
+class PlatformCameraUpdateNewLatLngZoom extends PlatformCameraUpdate {
PlatformCameraUpdateNewLatLngZoom({required this.latLng, required this.zoom});
PlatformLatLng latLng;
@@ -411,7 +369,7 @@
}
/// Pigeon equivalent of ScrollBy
-class PlatformCameraUpdateScrollBy {
+class PlatformCameraUpdateScrollBy extends PlatformCameraUpdate {
PlatformCameraUpdateScrollBy({required this.dx, required this.dy});
double dx;
@@ -454,7 +412,7 @@
}
/// Pigeon equivalent of ZoomBy
-class PlatformCameraUpdateZoomBy {
+class PlatformCameraUpdateZoomBy extends PlatformCameraUpdate {
PlatformCameraUpdateZoomBy({required this.amount, this.focus});
double amount;
@@ -500,7 +458,7 @@
}
/// Pigeon equivalent of ZoomIn/ZoomOut
-class PlatformCameraUpdateZoom {
+class PlatformCameraUpdateZoom extends PlatformCameraUpdate {
PlatformCameraUpdateZoom({required this.out});
bool out;
@@ -541,7 +499,7 @@
}
/// Pigeon equivalent of ZoomTo
-class PlatformCameraUpdateZoomTo {
+class PlatformCameraUpdateZoomTo extends PlatformCameraUpdate {
PlatformCameraUpdateZoomTo({required this.zoom});
double zoom;
@@ -2306,58 +2264,11 @@
}
}
-/// Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint
-/// types of [BitmapDescriptor], [PlatformBitmap] contains a single field which
-/// may hold the pigeon equivalent type of any of them.
-class PlatformBitmap {
- PlatformBitmap({required this.bitmap});
-
- /// One of [PlatformBitmapAssetMap], [PlatformBitmapAsset],
- /// [PlatformBitmapAssetImage], [PlatformBitmapBytesMap],
- /// [PlatformBitmapBytes], or [PlatformBitmapDefaultMarker].
- /// As Pigeon does not currently support data class inheritance, this
- /// approach allows for the different bitmap implementations to be valid
- /// argument and return types of the API methods. See
- /// https://github.com/flutter/flutter/issues/117819.
- Object bitmap;
-
- List<Object?> _toList() {
- return <Object?>[bitmap];
- }
-
- Object encode() {
- return _toList();
- }
-
- static PlatformBitmap decode(Object result) {
- result as List<Object?>;
- return PlatformBitmap(bitmap: result[0]!);
- }
-
- @override
- // ignore: avoid_equals_and_hash_code_on_mutable_classes
- bool operator ==(Object other) {
- if (other is! PlatformBitmap || other.runtimeType != runtimeType) {
- return false;
- }
- if (identical(this, other)) {
- return true;
- }
- return _deepEquals(bitmap, other.bitmap);
- }
-
- @override
- // ignore: avoid_equals_and_hash_code_on_mutable_classes
- int get hashCode => _deepHash(<Object?>[runtimeType, ..._toList()]);
-
- @override
- String toString() {
- return 'PlatformBitmap(bitmap: $bitmap)';
- }
-}
+/// Pigeon equivalent of [BitmapDescriptor].
+sealed class PlatformBitmap {}
/// Pigeon equivalent of [DefaultMarker].
-class PlatformBitmapDefaultMarker {
+class PlatformBitmapDefaultMarker extends PlatformBitmap {
PlatformBitmapDefaultMarker({this.hue});
double? hue;
@@ -2398,7 +2309,7 @@
}
/// Pigeon equivalent of [BytesBitmap].
-class PlatformBitmapBytes {
+class PlatformBitmapBytes extends PlatformBitmap {
PlatformBitmapBytes({required this.byteData, this.size});
Uint8List byteData;
@@ -2441,7 +2352,7 @@
}
/// Pigeon equivalent of [AssetBitmap].
-class PlatformBitmapAsset {
+class PlatformBitmapAsset extends PlatformBitmap {
PlatformBitmapAsset({required this.name, this.pkg});
String name;
@@ -2484,7 +2395,7 @@
}
/// Pigeon equivalent of [AssetImageBitmap].
-class PlatformBitmapAssetImage {
+class PlatformBitmapAssetImage extends PlatformBitmap {
PlatformBitmapAssetImage({required this.name, required this.scale, this.size});
String name;
@@ -2535,7 +2446,7 @@
}
/// Pigeon equivalent of [AssetMapBitmap].
-class PlatformBitmapAssetMap {
+class PlatformBitmapAssetMap extends PlatformBitmap {
PlatformBitmapAssetMap({
required this.assetName,
required this.bitmapScaling,
@@ -2600,7 +2511,7 @@
}
/// Pigeon equivalent of [BytesMapBitmap].
-class PlatformBitmapBytesMap {
+class PlatformBitmapBytesMap extends PlatformBitmap {
PlatformBitmapBytesMap({
required this.byteData,
required this.bitmapScaling,
@@ -2665,7 +2576,7 @@
}
/// Pigeon equivalent of [PinConfig].
-class PlatformBitmapPinConfig {
+class PlatformBitmapPinConfig extends PlatformBitmap {
PlatformBitmapPinConfig({
this.backgroundColor,
this.borderColor,
@@ -2769,131 +2680,125 @@
} else if (value is PlatformCameraPosition) {
buffer.putUint8(135);
writeValue(buffer, value.encode());
- } else if (value is PlatformCameraUpdate) {
+ } else if (value is PlatformCameraUpdateNewCameraPosition) {
buffer.putUint8(136);
writeValue(buffer, value.encode());
- } else if (value is PlatformCameraUpdateNewCameraPosition) {
+ } else if (value is PlatformCameraUpdateNewLatLng) {
buffer.putUint8(137);
writeValue(buffer, value.encode());
- } else if (value is PlatformCameraUpdateNewLatLng) {
+ } else if (value is PlatformCameraUpdateNewLatLngBounds) {
buffer.putUint8(138);
writeValue(buffer, value.encode());
- } else if (value is PlatformCameraUpdateNewLatLngBounds) {
+ } else if (value is PlatformCameraUpdateNewLatLngZoom) {
buffer.putUint8(139);
writeValue(buffer, value.encode());
- } else if (value is PlatformCameraUpdateNewLatLngZoom) {
+ } else if (value is PlatformCameraUpdateScrollBy) {
buffer.putUint8(140);
writeValue(buffer, value.encode());
- } else if (value is PlatformCameraUpdateScrollBy) {
+ } else if (value is PlatformCameraUpdateZoomBy) {
buffer.putUint8(141);
writeValue(buffer, value.encode());
- } else if (value is PlatformCameraUpdateZoomBy) {
+ } else if (value is PlatformCameraUpdateZoom) {
buffer.putUint8(142);
writeValue(buffer, value.encode());
- } else if (value is PlatformCameraUpdateZoom) {
+ } else if (value is PlatformCameraUpdateZoomTo) {
buffer.putUint8(143);
writeValue(buffer, value.encode());
- } else if (value is PlatformCameraUpdateZoomTo) {
+ } else if (value is PlatformCircle) {
buffer.putUint8(144);
writeValue(buffer, value.encode());
- } else if (value is PlatformCircle) {
+ } else if (value is PlatformHeatmap) {
buffer.putUint8(145);
writeValue(buffer, value.encode());
- } else if (value is PlatformHeatmap) {
+ } else if (value is PlatformHeatmapGradient) {
buffer.putUint8(146);
writeValue(buffer, value.encode());
- } else if (value is PlatformHeatmapGradient) {
+ } else if (value is PlatformWeightedLatLng) {
buffer.putUint8(147);
writeValue(buffer, value.encode());
- } else if (value is PlatformWeightedLatLng) {
+ } else if (value is PlatformInfoWindow) {
buffer.putUint8(148);
writeValue(buffer, value.encode());
- } else if (value is PlatformInfoWindow) {
+ } else if (value is PlatformCluster) {
buffer.putUint8(149);
writeValue(buffer, value.encode());
- } else if (value is PlatformCluster) {
+ } else if (value is PlatformClusterManager) {
buffer.putUint8(150);
writeValue(buffer, value.encode());
- } else if (value is PlatformClusterManager) {
+ } else if (value is PlatformMarker) {
buffer.putUint8(151);
writeValue(buffer, value.encode());
- } else if (value is PlatformMarker) {
+ } else if (value is PlatformPolygon) {
buffer.putUint8(152);
writeValue(buffer, value.encode());
- } else if (value is PlatformPolygon) {
+ } else if (value is PlatformPolyline) {
buffer.putUint8(153);
writeValue(buffer, value.encode());
- } else if (value is PlatformPolyline) {
+ } else if (value is PlatformPatternItem) {
buffer.putUint8(154);
writeValue(buffer, value.encode());
- } else if (value is PlatformPatternItem) {
+ } else if (value is PlatformTile) {
buffer.putUint8(155);
writeValue(buffer, value.encode());
- } else if (value is PlatformTile) {
+ } else if (value is PlatformTileOverlay) {
buffer.putUint8(156);
writeValue(buffer, value.encode());
- } else if (value is PlatformTileOverlay) {
+ } else if (value is PlatformEdgeInsets) {
buffer.putUint8(157);
writeValue(buffer, value.encode());
- } else if (value is PlatformEdgeInsets) {
+ } else if (value is PlatformLatLng) {
buffer.putUint8(158);
writeValue(buffer, value.encode());
- } else if (value is PlatformLatLng) {
+ } else if (value is PlatformLatLngBounds) {
buffer.putUint8(159);
writeValue(buffer, value.encode());
- } else if (value is PlatformLatLngBounds) {
+ } else if (value is PlatformCameraTargetBounds) {
buffer.putUint8(160);
writeValue(buffer, value.encode());
- } else if (value is PlatformCameraTargetBounds) {
+ } else if (value is PlatformGroundOverlay) {
buffer.putUint8(161);
writeValue(buffer, value.encode());
- } else if (value is PlatformGroundOverlay) {
+ } else if (value is PlatformMapViewCreationParams) {
buffer.putUint8(162);
writeValue(buffer, value.encode());
- } else if (value is PlatformMapViewCreationParams) {
+ } else if (value is PlatformMapConfiguration) {
buffer.putUint8(163);
writeValue(buffer, value.encode());
- } else if (value is PlatformMapConfiguration) {
+ } else if (value is PlatformPoint) {
buffer.putUint8(164);
writeValue(buffer, value.encode());
- } else if (value is PlatformPoint) {
+ } else if (value is PlatformSize) {
buffer.putUint8(165);
writeValue(buffer, value.encode());
- } else if (value is PlatformSize) {
+ } else if (value is PlatformColor) {
buffer.putUint8(166);
writeValue(buffer, value.encode());
- } else if (value is PlatformColor) {
+ } else if (value is PlatformTileLayer) {
buffer.putUint8(167);
writeValue(buffer, value.encode());
- } else if (value is PlatformTileLayer) {
+ } else if (value is PlatformZoomRange) {
buffer.putUint8(168);
writeValue(buffer, value.encode());
- } else if (value is PlatformZoomRange) {
+ } else if (value is PlatformBitmapDefaultMarker) {
buffer.putUint8(169);
writeValue(buffer, value.encode());
- } else if (value is PlatformBitmap) {
+ } else if (value is PlatformBitmapBytes) {
buffer.putUint8(170);
writeValue(buffer, value.encode());
- } else if (value is PlatformBitmapDefaultMarker) {
+ } else if (value is PlatformBitmapAsset) {
buffer.putUint8(171);
writeValue(buffer, value.encode());
- } else if (value is PlatformBitmapBytes) {
+ } else if (value is PlatformBitmapAssetImage) {
buffer.putUint8(172);
writeValue(buffer, value.encode());
- } else if (value is PlatformBitmapAsset) {
+ } else if (value is PlatformBitmapAssetMap) {
buffer.putUint8(173);
writeValue(buffer, value.encode());
- } else if (value is PlatformBitmapAssetImage) {
+ } else if (value is PlatformBitmapBytesMap) {
buffer.putUint8(174);
writeValue(buffer, value.encode());
- } else if (value is PlatformBitmapAssetMap) {
- buffer.putUint8(175);
- writeValue(buffer, value.encode());
- } else if (value is PlatformBitmapBytesMap) {
- buffer.putUint8(176);
- writeValue(buffer, value.encode());
} else if (value is PlatformBitmapPinConfig) {
- buffer.putUint8(177);
+ buffer.putUint8(175);
writeValue(buffer, value.encode());
} else {
super.writeValue(buffer, value);
@@ -2924,88 +2829,84 @@
case 135:
return PlatformCameraPosition.decode(readValue(buffer)!);
case 136:
- return PlatformCameraUpdate.decode(readValue(buffer)!);
- case 137:
return PlatformCameraUpdateNewCameraPosition.decode(readValue(buffer)!);
- case 138:
+ case 137:
return PlatformCameraUpdateNewLatLng.decode(readValue(buffer)!);
- case 139:
+ case 138:
return PlatformCameraUpdateNewLatLngBounds.decode(readValue(buffer)!);
- case 140:
+ case 139:
return PlatformCameraUpdateNewLatLngZoom.decode(readValue(buffer)!);
- case 141:
+ case 140:
return PlatformCameraUpdateScrollBy.decode(readValue(buffer)!);
- case 142:
+ case 141:
return PlatformCameraUpdateZoomBy.decode(readValue(buffer)!);
- case 143:
+ case 142:
return PlatformCameraUpdateZoom.decode(readValue(buffer)!);
- case 144:
+ case 143:
return PlatformCameraUpdateZoomTo.decode(readValue(buffer)!);
- case 145:
+ case 144:
return PlatformCircle.decode(readValue(buffer)!);
- case 146:
+ case 145:
return PlatformHeatmap.decode(readValue(buffer)!);
- case 147:
+ case 146:
return PlatformHeatmapGradient.decode(readValue(buffer)!);
- case 148:
+ case 147:
return PlatformWeightedLatLng.decode(readValue(buffer)!);
- case 149:
+ case 148:
return PlatformInfoWindow.decode(readValue(buffer)!);
- case 150:
+ case 149:
return PlatformCluster.decode(readValue(buffer)!);
- case 151:
+ case 150:
return PlatformClusterManager.decode(readValue(buffer)!);
- case 152:
+ case 151:
return PlatformMarker.decode(readValue(buffer)!);
- case 153:
+ case 152:
return PlatformPolygon.decode(readValue(buffer)!);
- case 154:
+ case 153:
return PlatformPolyline.decode(readValue(buffer)!);
- case 155:
+ case 154:
return PlatformPatternItem.decode(readValue(buffer)!);
- case 156:
+ case 155:
return PlatformTile.decode(readValue(buffer)!);
- case 157:
+ case 156:
return PlatformTileOverlay.decode(readValue(buffer)!);
- case 158:
+ case 157:
return PlatformEdgeInsets.decode(readValue(buffer)!);
- case 159:
+ case 158:
return PlatformLatLng.decode(readValue(buffer)!);
- case 160:
+ case 159:
return PlatformLatLngBounds.decode(readValue(buffer)!);
- case 161:
+ case 160:
return PlatformCameraTargetBounds.decode(readValue(buffer)!);
- case 162:
+ case 161:
return PlatformGroundOverlay.decode(readValue(buffer)!);
- case 163:
+ case 162:
return PlatformMapViewCreationParams.decode(readValue(buffer)!);
- case 164:
+ case 163:
return PlatformMapConfiguration.decode(readValue(buffer)!);
- case 165:
+ case 164:
return PlatformPoint.decode(readValue(buffer)!);
- case 166:
+ case 165:
return PlatformSize.decode(readValue(buffer)!);
- case 167:
+ case 166:
return PlatformColor.decode(readValue(buffer)!);
- case 168:
+ case 167:
return PlatformTileLayer.decode(readValue(buffer)!);
- case 169:
+ case 168:
return PlatformZoomRange.decode(readValue(buffer)!);
- case 170:
- return PlatformBitmap.decode(readValue(buffer)!);
- case 171:
+ case 169:
return PlatformBitmapDefaultMarker.decode(readValue(buffer)!);
- case 172:
+ case 170:
return PlatformBitmapBytes.decode(readValue(buffer)!);
- case 173:
+ case 171:
return PlatformBitmapAsset.decode(readValue(buffer)!);
- case 174:
+ case 172:
return PlatformBitmapAssetImage.decode(readValue(buffer)!);
- case 175:
+ case 173:
return PlatformBitmapAssetMap.decode(readValue(buffer)!);
- case 176:
+ case 174:
return PlatformBitmapBytesMap.decode(readValue(buffer)!);
- case 177:
+ case 175:
return PlatformBitmapPinConfig.decode(readValue(buffer)!);
default:
return super.readValueOfType(type, buffer);
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/pigeons/messages.dart b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/pigeons/messages.dart
index f1d95e7..3f620b6 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/pigeons/messages.dart
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/pigeons/messages.dart
@@ -7,14 +7,8 @@
@ConfigurePigeon(
PigeonOptions(
dartOut: 'lib/src/messages.g.dart',
- // This uses a different output name to avoid conflicts with the pigeon
- // files in other packages, without having to use full relative paths
- // in #includes (which would make source sharing harder to manage).
- objcHeaderOut:
- 'ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10_objc/include/google_maps_flutter_ios_sdk10_objc/google_maps_flutter_pigeon_messages.g.h',
- objcSourceOut:
- 'ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10_objc/google_maps_flutter_pigeon_messages.g.m',
- objcOptions: ObjcOptions(prefix: 'FGM'),
+ swiftOut:
+ 'ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10/Messages.g.swift',
copyrightHeader: 'pigeons/copyright.txt',
// Use the base package name so that the generated code can be shared
// across the implementation copies.
@@ -40,66 +34,56 @@
}
/// Pigeon representation of a CameraUpdate.
-class PlatformCameraUpdate {
- PlatformCameraUpdate(this.cameraUpdate);
-
- /// This Object must be one of the classes below prefixed with
- /// PlatformCameraUpdate. Each such class represents a different type of
- /// camera update, and each holds a different set of data, preventing the
- /// use of a single unified class.
- // Pigeon does not support inheritance, which prevents a more strict type
- // bound. See https://github.com/flutter/flutter/issues/117819.
- final Object cameraUpdate;
-}
+sealed class PlatformCameraUpdate {}
/// Pigeon equivalent of NewCameraPosition
-class PlatformCameraUpdateNewCameraPosition {
+class PlatformCameraUpdateNewCameraPosition extends PlatformCameraUpdate {
PlatformCameraUpdateNewCameraPosition(this.cameraPosition);
final PlatformCameraPosition cameraPosition;
}
/// Pigeon equivalent of NewLatLng
-class PlatformCameraUpdateNewLatLng {
+class PlatformCameraUpdateNewLatLng extends PlatformCameraUpdate {
PlatformCameraUpdateNewLatLng(this.latLng);
final PlatformLatLng latLng;
}
/// Pigeon equivalent of NewLatLngBounds
-class PlatformCameraUpdateNewLatLngBounds {
+class PlatformCameraUpdateNewLatLngBounds extends PlatformCameraUpdate {
PlatformCameraUpdateNewLatLngBounds(this.bounds, this.padding);
final PlatformLatLngBounds bounds;
final double padding;
}
/// Pigeon equivalent of NewLatLngZoom
-class PlatformCameraUpdateNewLatLngZoom {
+class PlatformCameraUpdateNewLatLngZoom extends PlatformCameraUpdate {
PlatformCameraUpdateNewLatLngZoom(this.latLng, this.zoom);
final PlatformLatLng latLng;
final double zoom;
}
/// Pigeon equivalent of ScrollBy
-class PlatformCameraUpdateScrollBy {
+class PlatformCameraUpdateScrollBy extends PlatformCameraUpdate {
PlatformCameraUpdateScrollBy(this.dx, this.dy);
final double dx;
final double dy;
}
/// Pigeon equivalent of ZoomBy
-class PlatformCameraUpdateZoomBy {
+class PlatformCameraUpdateZoomBy extends PlatformCameraUpdate {
PlatformCameraUpdateZoomBy(this.amount, [this.focus]);
final double amount;
final PlatformPoint? focus;
}
/// Pigeon equivalent of ZoomIn/ZoomOut
-class PlatformCameraUpdateZoom {
+class PlatformCameraUpdateZoom extends PlatformCameraUpdate {
PlatformCameraUpdateZoom(this.out);
final bool out;
}
/// Pigeon equivalent of ZoomTo
-class PlatformCameraUpdateZoomTo {
+class PlatformCameraUpdateZoomTo extends PlatformCameraUpdate {
PlatformCameraUpdateZoomTo(this.zoom);
final double zoom;
}
@@ -541,31 +525,18 @@
final double? max;
}
-/// Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint
-/// types of [BitmapDescriptor], [PlatformBitmap] contains a single field which
-/// may hold the pigeon equivalent type of any of them.
-class PlatformBitmap {
- PlatformBitmap({required this.bitmap});
-
- /// One of [PlatformBitmapAssetMap], [PlatformBitmapAsset],
- /// [PlatformBitmapAssetImage], [PlatformBitmapBytesMap],
- /// [PlatformBitmapBytes], or [PlatformBitmapDefaultMarker].
- /// As Pigeon does not currently support data class inheritance, this
- /// approach allows for the different bitmap implementations to be valid
- /// argument and return types of the API methods. See
- /// https://github.com/flutter/flutter/issues/117819.
- final Object bitmap;
-}
+/// Pigeon equivalent of [BitmapDescriptor].
+sealed class PlatformBitmap {}
/// Pigeon equivalent of [DefaultMarker].
-class PlatformBitmapDefaultMarker {
+class PlatformBitmapDefaultMarker extends PlatformBitmap {
PlatformBitmapDefaultMarker({this.hue});
final double? hue;
}
/// Pigeon equivalent of [BytesBitmap].
-class PlatformBitmapBytes {
+class PlatformBitmapBytes extends PlatformBitmap {
PlatformBitmapBytes({required this.byteData, this.size});
final Uint8List byteData;
@@ -573,7 +544,7 @@
}
/// Pigeon equivalent of [AssetBitmap].
-class PlatformBitmapAsset {
+class PlatformBitmapAsset extends PlatformBitmap {
PlatformBitmapAsset({required this.name, this.pkg});
final String name;
@@ -581,7 +552,7 @@
}
/// Pigeon equivalent of [AssetImageBitmap].
-class PlatformBitmapAssetImage {
+class PlatformBitmapAssetImage extends PlatformBitmap {
PlatformBitmapAssetImage({required this.name, required this.scale, this.size});
final String name;
final double scale;
@@ -589,7 +560,7 @@
}
/// Pigeon equivalent of [AssetMapBitmap].
-class PlatformBitmapAssetMap {
+class PlatformBitmapAssetMap extends PlatformBitmap {
PlatformBitmapAssetMap({
required this.assetName,
required this.bitmapScaling,
@@ -605,7 +576,7 @@
}
/// Pigeon equivalent of [BytesMapBitmap].
-class PlatformBitmapBytesMap {
+class PlatformBitmapBytesMap extends PlatformBitmap {
PlatformBitmapBytesMap({
required this.byteData,
required this.bitmapScaling,
@@ -624,7 +595,7 @@
enum PlatformMapBitmapScaling { auto, none }
/// Pigeon equivalent of [PinConfig].
-class PlatformBitmapPinConfig {
+class PlatformBitmapPinConfig extends PlatformBitmap {
PlatformBitmapPinConfig({
required this.backgroundColor,
required this.borderColor,
@@ -655,11 +626,11 @@
///
/// Only non-null configuration values will result in updates; options with
/// null values will remain unchanged.
- @ObjCSelector('updateWithMapConfiguration:')
+ @SwiftFunction('updateWithMapConfiguration(_:)')
void updateMapConfiguration(PlatformMapConfiguration configuration);
/// Updates the set of circles on the map.
- @ObjCSelector('updateCirclesByAdding:changing:removing:')
+ @SwiftFunction('updateCircles(adding:changing:removing:)')
void updateCircles(
List<PlatformCircle> toAdd,
List<PlatformCircle> toChange,
@@ -667,7 +638,7 @@
);
/// Updates the set of heatmaps on the map.
- @ObjCSelector('updateHeatmapsByAdding:changing:removing:')
+ @SwiftFunction('updateHeatmaps(adding:changing:removing:)')
void updateHeatmaps(
List<PlatformHeatmap> toAdd,
List<PlatformHeatmap> toChange,
@@ -675,11 +646,11 @@
);
/// Updates the set of custer managers for clusters on the map.
- @ObjCSelector('updateClusterManagersByAdding:removing:')
+ @SwiftFunction('updateClusterManagers(adding:removing:)')
void updateClusterManagers(List<PlatformClusterManager> toAdd, List<String> idsToRemove);
/// Updates the set of markers on the map.
- @ObjCSelector('updateMarkersByAdding:changing:removing:')
+ @SwiftFunction('updateMarkers(adding:changing:removing:)')
void updateMarkers(
List<PlatformMarker> toAdd,
List<PlatformMarker> toChange,
@@ -687,7 +658,7 @@
);
/// Updates the set of polygonss on the map.
- @ObjCSelector('updatePolygonsByAdding:changing:removing:')
+ @SwiftFunction('updatePolygons(adding:changing:removing:)')
void updatePolygons(
List<PlatformPolygon> toAdd,
List<PlatformPolygon> toChange,
@@ -695,7 +666,7 @@
);
/// Updates the set of polylines on the map.
- @ObjCSelector('updatePolylinesByAdding:changing:removing:')
+ @SwiftFunction('updatePolylines(adding:changing:removing:)')
void updatePolylines(
List<PlatformPolyline> toAdd,
List<PlatformPolyline> toChange,
@@ -703,7 +674,7 @@
);
/// Updates the set of tile overlays on the map.
- @ObjCSelector('updateTileOverlaysByAdding:changing:removing:')
+ @SwiftFunction('updateTileOverlays(adding:changing:removing:)')
void updateTileOverlays(
List<PlatformTileOverlay> toAdd,
List<PlatformTileOverlay> toChange,
@@ -711,7 +682,7 @@
);
/// Updates the set of ground overlays on the map.
- @ObjCSelector('updateGroundOverlaysByAdding:changing:removing:')
+ @SwiftFunction('updateGroundOverlays(adding:changing:removing:)')
void updateGroundOverlays(
List<PlatformGroundOverlay> toAdd,
List<PlatformGroundOverlay> toChange,
@@ -719,42 +690,42 @@
);
/// Gets the screen coordinate for the given map location.
- @ObjCSelector('screenCoordinatesForLatLng:')
+ @SwiftFunction('screenCoordinates(for:)')
PlatformPoint getScreenCoordinate(PlatformLatLng latLng);
/// Gets the map location for the given screen coordinate.
- @ObjCSelector('latLngForScreenCoordinate:')
+ @SwiftFunction('latLng(for:)')
PlatformLatLng getLatLng(PlatformPoint screenCoordinate);
/// Gets the map region currently displayed on the map.
- @ObjCSelector('visibleMapRegion')
+ @SwiftFunction('visibleMapRegion()')
PlatformLatLngBounds getVisibleRegion();
/// Moves the camera according to [cameraUpdate] immediately, with no
/// animation.
- @ObjCSelector('moveCameraWithUpdate:')
+ @SwiftFunction('moveCamera(_:)')
void moveCamera(PlatformCameraUpdate cameraUpdate);
/// Moves the camera according to [cameraUpdate], animating the update using a
/// duration in milliseconds if provided.
- @ObjCSelector('animateCameraWithUpdate:duration:')
+ @SwiftFunction('animateCamera(_:duration:)')
void animateCamera(PlatformCameraUpdate cameraUpdate, int? durationMilliseconds);
/// Gets the current map zoom level.
- @ObjCSelector('currentZoomLevel')
+ @SwiftFunction('zoomLevel()')
double getZoomLevel();
/// Show the info window for the marker with the given ID.
- @ObjCSelector('showInfoWindowForMarkerWithIdentifier:')
+ @SwiftFunction('showInfoWindowForMarker(withIdentifier:)')
void showInfoWindow(String markerId);
/// Hide the info window for the marker with the given ID.
- @ObjCSelector('hideInfoWindowForMarkerWithIdentifier:')
+ @SwiftFunction('hideInfoWindowForMarker(withIdentifier:)')
void hideInfoWindow(String markerId);
/// Returns true if the marker with the given ID is currently displaying its
/// info window.
- @ObjCSelector('isShowingInfoWindowForMarkerWithIdentifier:')
+ @SwiftFunction('isShowingInfoWindowForMarker(withIdentifier:)')
bool isInfoWindowShown(String markerId);
/// Sets the style to the given map style string, where an empty string
@@ -762,7 +733,7 @@
///
/// If there was an error setting the style, such as an invalid style string,
/// returns the error message.
- @ObjCSelector('setStyle:')
+ @SwiftFunction('setStyle(_:)')
String? setStyle(String style);
/// Returns the error string from the last attempt to set the map style, if
@@ -770,18 +741,18 @@
///
/// This allows checking asynchronously for initial style failures, as there
/// is no way to return failures from map initialization.
- @ObjCSelector('lastStyleError')
+ @SwiftFunction('lastStyleError()')
String? getLastStyleError();
/// Clears the cache of tiles previously requseted from the tile provider.
- @ObjCSelector('clearTileCacheForOverlayWithIdentifier:')
+ @SwiftFunction('clearTileCacheForOverlay(withIdentifier:)')
void clearTileCache(String tileOverlayId);
/// Takes a snapshot of the map and returns its image data.
Uint8List? takeSnapshot();
/// Returns true if the map supports advanced markers.
- @ObjCSelector('isAdvancedMarkersAvailable')
+ @SwiftFunction('isAdvancedMarkersAvailable()')
bool isAdvancedMarkersAvailable();
}
@@ -789,68 +760,68 @@
@FlutterApi()
abstract class MapsCallbackApi {
/// Called when the map camera starts moving.
- @ObjCSelector('didStartCameraMoveWithCompletion')
+ @SwiftFunction('didStartCameraMove()')
void onCameraMoveStarted();
/// Called when the map camera moves.
- @ObjCSelector('didMoveCameraToPosition:')
+ @SwiftFunction('didMoveCamera(to:)')
void onCameraMove(PlatformCameraPosition cameraPosition);
/// Called when the map camera stops moving.
- @ObjCSelector('didIdleCameraWithCompletion')
+ @SwiftFunction('didIdleCamera()')
void onCameraIdle();
/// Called when the map, not a specifc map object, is tapped.
- @ObjCSelector('didTapAtPosition:')
+ @SwiftFunction('didTap(at:)')
void onTap(PlatformLatLng position);
/// Called when the map, not a specifc map object, is long pressed.
- @ObjCSelector('didLongPressAtPosition:')
+ @SwiftFunction('didLongPress(at:)')
void onLongPress(PlatformLatLng position);
/// Called when a marker is tapped.
- @ObjCSelector('didTapMarkerWithIdentifier:')
+ @SwiftFunction('didTapMarker(withIdentifier:)')
void onMarkerTap(String markerId);
/// Called when a marker drag starts.
- @ObjCSelector('didStartDragForMarkerWithIdentifier:atPosition:')
+ @SwiftFunction('didStartDragForMarker(withIdentifier:at:)')
void onMarkerDragStart(String markerId, PlatformLatLng position);
/// Called when a marker drag updates.
- @ObjCSelector('didDragMarkerWithIdentifier:atPosition:')
+ @SwiftFunction('didDragMarker(withIdentifier:at:)')
void onMarkerDrag(String markerId, PlatformLatLng position);
/// Called when a marker drag ends.
- @ObjCSelector('didEndDragForMarkerWithIdentifier:atPosition:')
+ @SwiftFunction('didEndDragForMarker(withIdentifier:at:)')
void onMarkerDragEnd(String markerId, PlatformLatLng position);
/// Called when a marker's info window is tapped.
- @ObjCSelector('didTapInfoWindowOfMarkerWithIdentifier:')
+ @SwiftFunction('didTapInfoWindowOfMarker(withIdentifier:)')
void onInfoWindowTap(String markerId);
/// Called when a circle is tapped.
- @ObjCSelector('didTapCircleWithIdentifier:')
+ @SwiftFunction('didTapCircle(withIdentifier:)')
void onCircleTap(String circleId);
/// Called when a marker cluster is tapped.
- @ObjCSelector('didTapCluster:')
+ @SwiftFunction('didTapCluster(_:)')
void onClusterTap(PlatformCluster cluster);
/// Called when a polygon is tapped.
- @ObjCSelector('didTapPolygonWithIdentifier:')
+ @SwiftFunction('didTapPolygon(withIdentifier:)')
void onPolygonTap(String polygonId);
/// Called when a polyline is tapped.
- @ObjCSelector('didTapPolylineWithIdentifier:')
+ @SwiftFunction('didTapPolyline(withIdentifier:)')
void onPolylineTap(String polylineId);
/// Called when a ground overlay is tapped.
- @ObjCSelector('didTapGroundOverlayWithIdentifier:')
+ @SwiftFunction('didTapGroundOverlay(withIdentifier:)')
void onGroundOverlayTap(String groundOverlayId);
/// Called to get data for a map tile.
@async
- @ObjCSelector('tileWithOverlayIdentifier:location:zoom:')
+ @SwiftFunction('tile(withOverlayIdentifier:location:zoom:)')
PlatformTile getTileOverlayTile(String tileOverlayId, PlatformPoint location, int zoom);
}
@@ -874,16 +845,16 @@
bool isCompassEnabled();
bool isMyLocationButtonEnabled();
bool isTrafficEnabled();
- @ObjCSelector('tileOverlayWithIdentifier:')
+ @SwiftFunction('tileOverlay(withIdentifier:)')
PlatformTileLayer? getTileOverlayInfo(String tileOverlayId);
- @ObjCSelector('groundOverlayWithIdentifier:')
+ @SwiftFunction('groundOverlay(withIdentifier:)')
PlatformGroundOverlay? getGroundOverlayInfo(String groundOverlayId);
- @ObjCSelector('heatmapWithIdentifier:')
+ @SwiftFunction('heatmap(withIdentifier:)')
PlatformHeatmap? getHeatmapInfo(String heatmapId);
- @ObjCSelector('zoomRange')
+ @SwiftFunction('zoomRange()')
PlatformZoomRange getZoomRange();
- @ObjCSelector('clustersWithIdentifier:')
+ @SwiftFunction('clusters(withIdentifier:)')
List<PlatformCluster> getClusters(String clusterManagerId);
- @ObjCSelector('cameraPosition')
+ @SwiftFunction('cameraPosition()')
PlatformCameraPosition getCameraPosition();
}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/pubspec.yaml
index 387b927..541f534 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/pubspec.yaml
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/pubspec.yaml
@@ -2,7 +2,7 @@
description: iOS implementation of the google_maps_flutter plugin using Google Maps SDK 10.
repository: https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter_ios_sdk10
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22
-version: 2.18.11
+version: 2.18.12
environment:
sdk: ^3.10.0
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/test/google_maps_flutter_ios_test.dart b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/test/google_maps_flutter_ios_test.dart
index da996d1..6d21a3e 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/test/google_maps_flutter_ios_test.dart
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/test/google_maps_flutter_ios_test.dart
@@ -115,7 +115,7 @@
final VerificationResult verification = verify(api.moveCamera(captureAny));
final passedUpdate = verification.captured[0] as PlatformCameraUpdate;
- final scroll = passedUpdate.cameraUpdate as PlatformCameraUpdateScrollBy;
+ final scroll = passedUpdate as PlatformCameraUpdateScrollBy;
update as CameraUpdateScrollBy;
expect(scroll.dx, update.dx);
expect(scroll.dy, update.dy);
@@ -130,7 +130,7 @@
final VerificationResult verification = verify(api.animateCamera(captureAny, captureAny));
final passedUpdate = verification.captured[0] as PlatformCameraUpdate;
- final scroll = passedUpdate.cameraUpdate as PlatformCameraUpdateScrollBy;
+ final scroll = passedUpdate as PlatformCameraUpdateScrollBy;
update as CameraUpdateScrollBy;
expect(scroll.dx, update.dx);
expect(scroll.dy, update.dy);
@@ -148,7 +148,7 @@
final VerificationResult verification = verify(api.animateCamera(captureAny, captureAny));
final passedUpdate = verification.captured[0] as PlatformCameraUpdate;
- final scroll = passedUpdate.cameraUpdate as PlatformCameraUpdateScrollBy;
+ final scroll = passedUpdate as PlatformCameraUpdateScrollBy;
update as CameraUpdateScrollBy;
expect(scroll.dx, update.dx);
expect(scroll.dy, update.dy);
@@ -415,8 +415,8 @@
expect(firstChanged.draggable, object2new.draggable);
expect(firstChanged.flat, object2new.flat);
expect(
- firstChanged.icon.bitmap.runtimeType,
- GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(object2new.icon).bitmap.runtimeType,
+ firstChanged.icon.runtimeType,
+ GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(object2new.icon).runtimeType,
);
expect(firstChanged.infoWindow.title, object2new.infoWindow.title);
expect(firstChanged.infoWindow.snippet, object2new.infoWindow.snippet);
@@ -441,8 +441,8 @@
expect(firstAdded.draggable, object3.draggable);
expect(firstAdded.flat, object3.flat);
expect(
- firstAdded.icon.bitmap.runtimeType,
- GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(object3.icon).bitmap.runtimeType,
+ firstAdded.icon.runtimeType,
+ GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(object3.icon).runtimeType,
);
expect(firstAdded.infoWindow.title, object3.infoWindow.title);
expect(firstAdded.infoWindow.snippet, object3.infoWindow.snippet);
@@ -500,8 +500,8 @@
expect(firstChanged.draggable, object2new.draggable);
expect(firstChanged.flat, object2new.flat);
expect(
- firstChanged.icon.bitmap.runtimeType,
- GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(object2new.icon).bitmap.runtimeType,
+ firstChanged.icon.runtimeType,
+ GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(object2new.icon).runtimeType,
);
expect(firstChanged.infoWindow.title, object2new.infoWindow.title);
expect(firstChanged.infoWindow.snippet, object2new.infoWindow.snippet);
@@ -532,8 +532,8 @@
expect(firstAdded.draggable, object3.draggable);
expect(firstAdded.flat, object3.flat);
expect(
- firstAdded.icon.bitmap.runtimeType,
- GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(object3.icon).bitmap.runtimeType,
+ firstAdded.icon.runtimeType,
+ GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(object3.icon).runtimeType,
);
expect(firstAdded.infoWindow.title, object3.infoWindow.title);
expect(firstAdded.infoWindow.snippet, object3.infoWindow.snippet);
@@ -789,10 +789,8 @@
expect(firstChanged.zoomLevel, object2new.zoomLevel);
expect(firstChanged.transparency, object2new.transparency);
expect(
- firstChanged.image.bitmap.runtimeType,
- GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(
- object2new.image,
- ).bitmap.runtimeType,
+ firstChanged.image.runtimeType,
+ GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(object2new.image).runtimeType,
);
}
// Object three should be added.
@@ -814,8 +812,8 @@
expect(firstAdded.zoomLevel, object3.zoomLevel);
expect(firstAdded.transparency, object3.transparency);
expect(
- firstAdded.image.bitmap.runtimeType,
- GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(object3.image).bitmap.runtimeType,
+ firstAdded.image.runtimeType,
+ GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(object3.image).runtimeType,
);
}
});
@@ -997,7 +995,7 @@
final VerificationResult verification = verify(api.moveCamera(captureAny));
final passedUpdate = verification.captured[0] as PlatformCameraUpdate;
- final typedUpdate = passedUpdate.cameraUpdate as PlatformCameraUpdateNewCameraPosition;
+ final typedUpdate = passedUpdate as PlatformCameraUpdateNewCameraPosition;
update as CameraUpdateNewCameraPosition;
expect(typedUpdate.cameraPosition.target.latitude, update.cameraPosition.target.latitude);
expect(typedUpdate.cameraPosition.target.longitude, update.cameraPosition.target.longitude);
@@ -1013,7 +1011,7 @@
final VerificationResult verification = verify(api.moveCamera(captureAny));
final passedUpdate = verification.captured[0] as PlatformCameraUpdate;
- final typedUpdate = passedUpdate.cameraUpdate as PlatformCameraUpdateNewLatLng;
+ final typedUpdate = passedUpdate as PlatformCameraUpdateNewLatLng;
update as CameraUpdateNewLatLng;
expect(typedUpdate.latLng.latitude, update.latLng.latitude);
expect(typedUpdate.latLng.longitude, update.latLng.longitude);
@@ -1032,7 +1030,7 @@
final VerificationResult verification = verify(api.moveCamera(captureAny));
final passedUpdate = verification.captured[0] as PlatformCameraUpdate;
- final typedUpdate = passedUpdate.cameraUpdate as PlatformCameraUpdateNewLatLngBounds;
+ final typedUpdate = passedUpdate as PlatformCameraUpdateNewLatLngBounds;
update as CameraUpdateNewLatLngBounds;
expect(typedUpdate.bounds.northeast.latitude, update.bounds.northeast.latitude);
expect(typedUpdate.bounds.northeast.longitude, update.bounds.northeast.longitude);
@@ -1051,7 +1049,7 @@
final VerificationResult verification = verify(api.moveCamera(captureAny));
final passedUpdate = verification.captured[0] as PlatformCameraUpdate;
- final typedUpdate = passedUpdate.cameraUpdate as PlatformCameraUpdateNewLatLngZoom;
+ final typedUpdate = passedUpdate as PlatformCameraUpdateNewLatLngZoom;
update as CameraUpdateNewLatLngZoom;
expect(typedUpdate.latLng.latitude, update.latLng.latitude);
expect(typedUpdate.latLng.longitude, update.latLng.longitude);
@@ -1068,7 +1066,7 @@
final VerificationResult verification = verify(api.moveCamera(captureAny));
final passedUpdate = verification.captured[0] as PlatformCameraUpdate;
- final typedUpdate = passedUpdate.cameraUpdate as PlatformCameraUpdateZoomBy;
+ final typedUpdate = passedUpdate as PlatformCameraUpdateZoomBy;
update as CameraUpdateZoomBy;
expect(typedUpdate.focus?.x, update.focus?.dx);
expect(typedUpdate.focus?.y, update.focus?.dy);
@@ -1084,7 +1082,7 @@
final VerificationResult verification = verify(api.moveCamera(captureAny));
final passedUpdate = verification.captured[0] as PlatformCameraUpdate;
- final typedUpdate = passedUpdate.cameraUpdate as PlatformCameraUpdateZoomTo;
+ final typedUpdate = passedUpdate as PlatformCameraUpdateZoomTo;
update as CameraUpdateZoomTo;
expect(typedUpdate.zoom, update.zoom);
});
@@ -1098,7 +1096,7 @@
final VerificationResult verification = verify(api.moveCamera(captureAny));
final passedUpdate = verification.captured[0] as PlatformCameraUpdate;
- final typedUpdate = passedUpdate.cameraUpdate as PlatformCameraUpdateZoom;
+ final typedUpdate = passedUpdate as PlatformCameraUpdateZoom;
expect(typedUpdate.out, false);
});
@@ -1111,7 +1109,7 @@
final VerificationResult verification = verify(api.moveCamera(captureAny));
final passedUpdate = verification.captured[0] as PlatformCameraUpdate;
- final typedUpdate = passedUpdate.cameraUpdate as PlatformCameraUpdateZoom;
+ final typedUpdate = passedUpdate as PlatformCameraUpdateZoom;
expect(typedUpdate.out, true);
});
@@ -1131,8 +1129,8 @@
final PlatformBitmap platformBitmap = GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(
bitmap,
);
- expect(platformBitmap.bitmap, isA<PlatformBitmapDefaultMarker>());
- final typedBitmap = platformBitmap.bitmap as PlatformBitmapDefaultMarker;
+ expect(platformBitmap, isA<PlatformBitmapDefaultMarker>());
+ final typedBitmap = platformBitmap as PlatformBitmapDefaultMarker;
expect(typedBitmap.hue, 10.0);
});
@@ -1147,8 +1145,8 @@
final PlatformBitmap platformBitmap = GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(
bitmap,
);
- expect(platformBitmap.bitmap, isA<PlatformBitmapBytesMap>());
- final typedBitmap = platformBitmap.bitmap as PlatformBitmapBytesMap;
+ expect(platformBitmap, isA<PlatformBitmapBytesMap>());
+ final typedBitmap = platformBitmap as PlatformBitmapBytesMap;
expect(typedBitmap.byteData, data);
expect(typedBitmap.bitmapScaling, PlatformMapBitmapScaling.auto);
expect(typedBitmap.imagePixelRatio, 2.0);
@@ -1162,8 +1160,8 @@
final PlatformBitmap platformBitmap = GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(
bitmap,
);
- expect(platformBitmap.bitmap, isA<PlatformBitmapAssetMap>());
- final typedBitmap = platformBitmap.bitmap as PlatformBitmapAssetMap;
+ expect(platformBitmap, isA<PlatformBitmapAssetMap>());
+ final typedBitmap = platformBitmap as PlatformBitmapAssetMap;
expect(typedBitmap.assetName, assetName);
expect(typedBitmap.bitmapScaling, PlatformMapBitmapScaling.auto);
expect(typedBitmap.imagePixelRatio, 2.0);
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/tool/unshared_source_files.dart b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/tool/unshared_source_files.dart
index fb0eab0..8660b7e 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/tool/unshared_source_files.dart
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk10/tool/unshared_source_files.dart
@@ -12,6 +12,4 @@
'test/package_specific_test_import.dart',
// Each package will have its own list.
'tool/unshared_source_files.dart',
- // Unshared due to https://github.com/flutter/flutter/issues/183441.
- 'ios/google_maps_flutter_ios_sdk10/Sources/google_maps_flutter_ios_sdk10_objc/include/google_maps_flutter_ios_sdk10_objc/GoogleMapsUtilsTrampoline.h',
];
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/CHANGELOG.md
index 8918af1..3fcd7de 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/CHANGELOG.md
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 2.18.13
+
+* Converts remaining Objective-C code to Swift.
+
## 2.18.12
* Converts heatmap controller and data conversion to Swift.
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/CircleControllerTests.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/CircleControllerTests.swift
index b65e958..cbf7133 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/CircleControllerTests.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/CircleControllerTests.swift
@@ -4,7 +4,6 @@
import GoogleMaps
import Testing
-import google_maps_flutter_ios_sdk9_objc
@testable import google_maps_flutter_ios_sdk9
@@ -14,14 +13,14 @@
let circle = PropertyOrderValidatingCircle()
CircleController.update(
circle,
- from: FGMPlatformCircle.make(
- withConsumeTapEvents: false,
- fill: FGMPlatformColor.make(withRed: 0, green: 0, blue: 0, alpha: 0),
- stroke: FGMPlatformColor.make(withRed: 0, green: 0, blue: 0, alpha: 0),
+ from: PlatformCircle(
+ consumeTapEvents: false,
+ fillColor: PlatformColor(red: 0, green: 0, blue: 0, alpha: 0),
+ strokeColor: PlatformColor(red: 0, green: 0, blue: 0, alpha: 0),
visible: true,
strokeWidth: 0,
zIndex: 0,
- center: FGMPlatformLatLng.make(withLatitude: 0, longitude: 0),
+ center: PlatformLatLng(latitude: 0, longitude: 0),
radius: 10,
circleId: "circle"
),
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/ClusterManagersControllerTests.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/ClusterManagersControllerTests.swift
index c28a6f1..3e60aba 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/ClusterManagersControllerTests.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/ClusterManagersControllerTests.swift
@@ -5,7 +5,6 @@
import Flutter
import GoogleMaps
import Testing
-import google_maps_flutter_ios_sdk9_objc
@testable import google_maps_flutter_ios_sdk9
@@ -36,7 +35,7 @@
// Add cluster managers.
let clusterManagerId = "cm"
- let clusterManagerToAdd = FGMPlatformClusterManager.make(withIdentifier: clusterManagerId)
+ let clusterManagerToAdd = PlatformClusterManager(identifier: clusterManagerId)
clusterManagersController.add([clusterManagerToAdd])
// Verify that cluster managers are available
@@ -47,18 +46,16 @@
let markerId1 = "m1"
let markerId2 = "m2"
- let zeroPoint = FGMPlatformPoint.makeWith(x: 0, y: 0)
- let zeroLatLng = FGMPlatformLatLng.make(withLatitude: 0, longitude: 0)
- let bitmap = FGMPlatformBitmap.make(
- withBitmap: FGMPlatformBitmapDefaultMarker.make(withHue: 0)
- )
- let infoWindow = FGMPlatformInfoWindow.make(
- withTitle: "Info",
+ let zeroPoint = PlatformPoint(x: 0, y: 0)
+ let zeroLatLng = PlatformLatLng(latitude: 0, longitude: 0)
+ let bitmap = PlatformBitmapDefaultMarker(hue: 0)
+ let infoWindow = PlatformInfoWindow(
+ title: "Info",
snippet: nil,
anchor: zeroPoint
)
- let marker1 = FGMPlatformMarker.make(
- withAlpha: 1,
+ let marker1 = PlatformMarker(
+ alpha: 1,
anchor: zeroPoint,
consumeTapEvents: false,
draggable: false,
@@ -73,8 +70,8 @@
clusterManagerId: clusterManagerId,
collisionBehavior: nil
)
- let marker2 = FGMPlatformMarker.make(
- withAlpha: 1,
+ let marker2 = PlatformMarker(
+ alpha: 1,
anchor: zeroPoint,
consumeTapEvents: false,
draggable: false,
@@ -96,11 +93,7 @@
clusterManagersController.invokeClusteringForEachClusterManager()
// Verify that the markers were added to the cluster manager
- var error: FlutterError? = nil
- let clusters1 = try #require(
- clusterManagersController.clusters(withIdentifier: clusterManagerId, error: &error)
- )
- #expect(error == nil)
+ let clusters1 = try clusterManagersController.clusters(withIdentifier: clusterManagerId)
let targetCluster = try #require(
clusters1.first(where: { $0.clusterManagerId == clusterManagerId })
)
@@ -111,11 +104,7 @@
markersController.removeMarkers(withIdentifiers: [markerId2])
// Verify that the marker2 is removed from the clusterManager
- error = nil
- let clusters2 = try #require(
- clusterManagersController.clusters(withIdentifier: clusterManagerId, error: &error)
- )
- #expect(error == nil)
+ let clusters2 = try clusterManagersController.clusters(withIdentifier: clusterManagerId)
let targetCluster2 = try #require(
clusters2.first(where: { $0.clusterManagerId == clusterManagerId })
)
@@ -125,11 +114,7 @@
markersController.removeMarkers(withIdentifiers: [markerId1])
// Verify that all markers are removed from clusterManager
- error = nil
- let clusters3 = try #require(
- clusterManagersController.clusters(withIdentifier: clusterManagerId, error: &error)
- )
- #expect(error == nil)
+ let clusters3 = try clusterManagersController.clusters(withIdentifier: clusterManagerId)
#expect(clusters3.count == 0)
// Remove cluster manager
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/ConversionsUtilsTests.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/ConversionsUtilsTests.swift
index b6970b5..b0af0c1 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/ConversionsUtilsTests.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/ConversionsUtilsTests.swift
@@ -4,7 +4,6 @@
import GoogleMaps
import Testing
-import google_maps_flutter_ios_sdk9_objc
@testable import google_maps_flutter_ios_sdk9
@@ -15,8 +14,8 @@
let platformGreen: CGFloat = 2 / 255.0
let platformBlue: CGFloat = 3 / 255.0
let platformAlpha: CGFloat = 4 / 255.0
- let color = FGMPlatformColor.make(
- withRed: platformRed,
+ let color = PlatformColor(
+ red: platformRed,
green: platformGreen,
blue: platformBlue,
alpha: platformAlpha
@@ -39,7 +38,7 @@
let blue: CGFloat = 3 / 255.0
let alpha: CGFloat = 4 / 255.0
let color = UIColor(red: red, green: green, blue: blue, alpha: alpha)
- let platformColor = FGMPlatformColor.make(from: color)
+ let platformColor = PlatformColor.make(from: color)
#expect(abs(red - platformColor.red) <= CGFloat.ulpOfOne)
#expect(abs(green - platformColor.green) <= CGFloat.ulpOfOne)
#expect(abs(blue - platformColor.blue) <= CGFloat.ulpOfOne)
@@ -47,7 +46,7 @@
}
@Test func pointFromLatLong() {
- let latlong = FGMPlatformLatLng.make(withLatitude: 1, longitude: 2)
+ let latlong = PlatformLatLng(latitude: 1, longitude: 2)
let location = latlong.toCLLocationCoordinate2D()
#expect(location.latitude == 1)
#expect(location.longitude == 2)
@@ -60,7 +59,7 @@
bearing: 3.0,
viewingAngle: 75.0
)
- let pigeonPosition = FGMPlatformCameraPosition.make(from: position)
+ let pigeonPosition = PlatformCameraPosition.make(from: position)
#expect(abs(pigeonPosition.target.latitude - position.target.latitude) <= Double.ulpOfOne)
#expect(abs(pigeonPosition.target.longitude - position.target.longitude) <= Double.ulpOfOne)
#expect(abs(Float(pigeonPosition.zoom) - position.zoom) <= Float.ulpOfOne)
@@ -70,7 +69,7 @@
@Test func pigeonPointForGCPoint() {
let point = CGPoint(x: 10, y: 20)
- let pigeonPoint = FGMPlatformPoint.make(from: point)
+ let pigeonPoint = PlatformPoint.make(from: point)
#expect(abs(pigeonPoint.x - Double(point.x)) <= Double.ulpOfOne)
#expect(abs(pigeonPoint.y - Double(point.y)) <= Double.ulpOfOne)
}
@@ -80,7 +79,7 @@
coordinate: CLLocationCoordinate2D(latitude: 10, longitude: 20),
coordinate: CLLocationCoordinate2D(latitude: 30, longitude: 40)
)
- let pigeonBounds = FGMPlatformLatLngBounds.make(from: bounds)
+ let pigeonBounds = PlatformLatLngBounds.make(from: bounds)
#expect(abs(pigeonBounds.southwest.latitude - bounds.southWest.latitude) <= Double.ulpOfOne)
#expect(abs(pigeonBounds.southwest.longitude - bounds.southWest.longitude) <= Double.ulpOfOne)
#expect(abs(pigeonBounds.northeast.latitude - bounds.northEast.latitude) <= Double.ulpOfOne)
@@ -88,9 +87,9 @@
}
@Test func getCameraPostionForPigeonCameraPosition() {
- let pigeonCameraPosition = FGMPlatformCameraPosition.make(
- withBearing: 1.0,
- target: FGMPlatformLatLng.make(withLatitude: 2.0, longitude: 3.0),
+ let pigeonCameraPosition = PlatformCameraPosition(
+ bearing: 1.0,
+ target: PlatformLatLng(latitude: 2.0, longitude: 3.0),
tilt: 4.0,
zoom: 5.0
)
@@ -108,7 +107,7 @@
}
@Test func cgPointForPigeonPoint() {
- let pigeonPoint = FGMPlatformPoint.makeWith(x: 1.0, y: 2.0)
+ let pigeonPoint = PlatformPoint(x: 1.0, y: 2.0)
let point = pigeonPoint.toCGPoint()
@@ -117,9 +116,9 @@
}
@Test func coordinateBoundsFromLatLongs() {
- let pigeonBounds = FGMPlatformLatLngBounds.make(
- withNortheast: FGMPlatformLatLng.make(withLatitude: 3, longitude: 4),
- southwest: FGMPlatformLatLng.make(withLatitude: 1, longitude: 2)
+ let pigeonBounds = PlatformLatLngBounds(
+ northeast: PlatformLatLng(latitude: 3, longitude: 4),
+ southwest: PlatformLatLng(latitude: 1, longitude: 2)
)
let bounds = pigeonBounds.toGMSCoordinateBounds()
@@ -132,25 +131,25 @@
}
@Test func mapViewTypeFromPigeonType() {
- #expect(GMSMapViewType.normal == FGMPlatformMapType.normal.gmsMapViewType)
- #expect(GMSMapViewType.satellite == FGMPlatformMapType.satellite.gmsMapViewType)
- #expect(GMSMapViewType.terrain == FGMPlatformMapType.terrain.gmsMapViewType)
- #expect(GMSMapViewType.hybrid == FGMPlatformMapType.hybrid.gmsMapViewType)
- #expect(GMSMapViewType.none == FGMPlatformMapType.none.gmsMapViewType)
+ #expect(GMSMapViewType.normal == PlatformMapType.normal.gmsMapViewType)
+ #expect(GMSMapViewType.satellite == PlatformMapType.satellite.gmsMapViewType)
+ #expect(GMSMapViewType.terrain == PlatformMapType.terrain.gmsMapViewType)
+ #expect(GMSMapViewType.hybrid == PlatformMapType.hybrid.gmsMapViewType)
+ #expect(GMSMapViewType.none == PlatformMapType.none.gmsMapViewType)
}
@Test func cameraUpdateFromNewCameraPosition() {
- let newPositionUpdate = FGMPlatformCameraUpdateNewCameraPosition.make(
- with: FGMPlatformCameraPosition.make(
- withBearing: 4,
- target: FGMPlatformLatLng.make(withLatitude: 1, longitude: 2),
+ let platformUpdate = PlatformCameraUpdateNewCameraPosition(
+ cameraPosition: PlatformCameraPosition(
+ bearing: 4,
+ target: PlatformLatLng(latitude: 1, longitude: 2),
tilt: 5,
zoom: 3
)
)
- _ = FGMPlatformCameraUpdate.make(withCameraUpdate: newPositionUpdate).toGMSCameraUpdate()
+ _ = platformUpdate.toGMSCameraUpdate()
// GMSCameraUpdate is not inspectable, so this test just ensures that the codepath
- // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that
+ // doesn't throw. toGMSCameraUpdate is simple enough that
// injecting a wrapper would not meaningfully improve test coverage, since the non-test
// implementation would be about as complex as the conversion function itself.
}
@@ -158,32 +157,32 @@
@Test func cameraUpdateFromNewLatLong() {
let lat: Double = 1
let lng: Double = 2
- let platformUpdate = FGMPlatformCameraUpdateNewLatLng.make(
- with: FGMPlatformLatLng.make(withLatitude: lat, longitude: lng)
+ let platformUpdate = PlatformCameraUpdateNewLatLng(
+ latLng: PlatformLatLng(latitude: lat, longitude: lng)
)
- _ = FGMPlatformCameraUpdate.make(withCameraUpdate: platformUpdate).toGMSCameraUpdate()
+ _ = platformUpdate.toGMSCameraUpdate()
// GMSCameraUpdate is not inspectable, so this test just ensures that the codepath
- // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that
+ // doesn't throw. toGMSCameraUpdate is simple enough that
// injecting a wrapper would not meaningfully improve test coverage, since the non-test
// implementation would be about as complex as the conversion function itself.
}
@Test func cameraUpdateFromNewLatLngBounds() {
- let pigeonBounds = FGMPlatformLatLngBounds.make(
- withNortheast: FGMPlatformLatLng.make(withLatitude: 1, longitude: 2),
- southwest: FGMPlatformLatLng.make(withLatitude: 3, longitude: 4)
+ let pigeonBounds = PlatformLatLngBounds(
+ northeast: PlatformLatLng(latitude: 1, longitude: 2),
+ southwest: PlatformLatLng(latitude: 3, longitude: 4)
)
let bounds = pigeonBounds.toGMSCoordinateBounds()
let padding: Double = 20
- let platformUpdate = FGMPlatformCameraUpdateNewLatLngBounds.make(
- with: FGMPlatformLatLngBounds.make(from: bounds),
+ let platformUpdate = PlatformCameraUpdateNewLatLngBounds(
+ bounds: PlatformLatLngBounds.make(from: bounds),
padding: padding
)
- _ = FGMPlatformCameraUpdate.make(withCameraUpdate: platformUpdate).toGMSCameraUpdate()
+ _ = platformUpdate.toGMSCameraUpdate()
// GMSCameraUpdate is not inspectable, so this test just ensures that the codepath
- // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that
+ // doesn't throw. toGMSCameraUpdate is simple enough that
// injecting a wrapper would not meaningfully improve test coverage, since the non-test
// implementation would be about as complex as the conversion function itself.
}
@@ -192,14 +191,14 @@
let lat: Double = 1
let lng: Double = 2
let zoom: Double = 3
- let platformUpdate = FGMPlatformCameraUpdateNewLatLngZoom.make(
- with: FGMPlatformLatLng.make(withLatitude: lat, longitude: lng),
+ let platformUpdate = PlatformCameraUpdateNewLatLngZoom(
+ latLng: PlatformLatLng(latitude: lat, longitude: lng),
zoom: zoom
)
- _ = FGMPlatformCameraUpdate.make(withCameraUpdate: platformUpdate).toGMSCameraUpdate()
+ _ = platformUpdate.toGMSCameraUpdate()
// GMSCameraUpdate is not inspectable, so this test just ensures that the codepath
- // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that
+ // doesn't throw. toGMSCameraUpdate is simple enough that
// injecting a wrapper would not meaningfully improve test coverage, since the non-test
// implementation would be about as complex as the conversion function itself.
}
@@ -207,22 +206,22 @@
@Test func cameraUpdateFromScrollBy() {
let x: Double = 1
let y: Double = 2
- let platformUpdate = FGMPlatformCameraUpdateScrollBy.make(withDx: x, dy: y)
+ let platformUpdate = PlatformCameraUpdateScrollBy(dx: x, dy: y)
- _ = FGMPlatformCameraUpdate.make(withCameraUpdate: platformUpdate).toGMSCameraUpdate()
+ _ = platformUpdate.toGMSCameraUpdate()
// GMSCameraUpdate is not inspectable, so this test just ensures that the codepath
- // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that
+ // doesn't throw. toGMSCameraUpdate is simple enough that
// injecting a wrapper would not meaningfully improve test coverage, since the non-test
// implementation would be about as complex as the conversion function itself.
}
@Test func cameraUpdateFromZoomBy() {
let zoom: Double = 1
- let platformUpdateNoPoint = FGMPlatformCameraUpdateZoomBy.make(withAmount: zoom, focus: nil)
+ let platformUpdateNoPoint = PlatformCameraUpdateZoomBy(amount: zoom, focus: nil)
- _ = FGMPlatformCameraUpdate.make(withCameraUpdate: platformUpdateNoPoint).toGMSCameraUpdate()
+ _ = platformUpdateNoPoint.toGMSCameraUpdate()
// GMSCameraUpdate is not inspectable, so this test just ensures that the codepath
- // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that
+ // doesn't throw. toGMSCameraUpdate is simple enough that
// injecting a wrapper would not meaningfully improve test coverage, since the non-test
// implementation would be about as complex as the conversion function itself.
}
@@ -231,51 +230,48 @@
let zoom: Double = 1
let x: Double = 2
let y: Double = 3
- let platformUpdate = FGMPlatformCameraUpdateZoomBy.make(
- withAmount: zoom,
- focus: FGMPlatformPoint.makeWith(x: x, y: y)
- )
+ let platformUpdate = PlatformCameraUpdateZoomBy(amount: zoom, focus: PlatformPoint(x: x, y: y))
- _ = FGMPlatformCameraUpdate.make(withCameraUpdate: platformUpdate).toGMSCameraUpdate()
+ _ = platformUpdate.toGMSCameraUpdate()
// GMSCameraUpdate is not inspectable, so this test just ensures that the codepath
- // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that
+ // doesn't throw. toGMSCameraUpdate is simple enough that
// injecting a wrapper would not meaningfully improve test coverage, since the non-test
// implementation would be about as complex as the conversion function itself.
}
@Test func cameraUpdateFromZoomIn() {
- let platformUpdate = FGMPlatformCameraUpdateZoom.make(withOut: false)
+ let platformUpdate = PlatformCameraUpdateZoom(out: false)
- _ = FGMPlatformCameraUpdate.make(withCameraUpdate: platformUpdate).toGMSCameraUpdate()
+ _ = platformUpdate.toGMSCameraUpdate()
// GMSCameraUpdate is not inspectable, so this test just ensures that the codepath
- // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that
+ // doesn't throw. toGMSCameraUpdate is simple enough that
// injecting a wrapper would not meaningfully improve test coverage, since the non-test
// implementation would be about as complex as the conversion function itself.
}
@Test func cameraUpdateFromZoomOut() {
- let platformUpdate = FGMPlatformCameraUpdateZoom.make(withOut: true)
+ let platformUpdate = PlatformCameraUpdateZoom(out: true)
- _ = FGMPlatformCameraUpdate.make(withCameraUpdate: platformUpdate).toGMSCameraUpdate()
+ _ = platformUpdate.toGMSCameraUpdate()
// GMSCameraUpdate is not inspectable, so this test just ensures that the codepath
- // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that
+ // doesn't throw. toGMSCameraUpdate is simple enough that
// injecting a wrapper would not meaningfully improve test coverage, since the non-test
// implementation would be about as complex as the conversion function itself.
}
@Test func cameraUpdateFromZoomTo() {
let zoom: Double = 1
- let platformUpdate = FGMPlatformCameraUpdateZoomTo.make(withZoom: zoom)
+ let platformUpdate = PlatformCameraUpdateZoomTo(zoom: zoom)
- _ = FGMPlatformCameraUpdate.make(withCameraUpdate: platformUpdate).toGMSCameraUpdate()
+ _ = platformUpdate.toGMSCameraUpdate()
// GMSCameraUpdate is not inspectable, so this test just ensures that the codepath
- // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that
+ // doesn't throw. toGMSCameraUpdate is simple enough that
// injecting a wrapper would not meaningfully improve test coverage, since the non-test
// implementation would be about as complex as the conversion function itself.
}
@Test func strokeStyleFromPattern() {
- let pattern = FGMPlatformPatternItem.make(with: .dash, length: 1)
+ let pattern = PlatformPatternItem(type: .dash, length: 1)
let strokeColor = UIColor.red
_ = pattern.gmsStrokeStyle(strokeColor: strokeColor)
@@ -285,7 +281,7 @@
@Test func nonNullLengthFromPatternItem() {
let length: Double = 6.4
- let pattern = FGMPlatformPatternItem.make(with: .gap, length: length as NSNumber)
+ let pattern = PlatformPatternItem(type: .gap, length: length)
let spanLength = pattern.gmsStyleSpanLength()
@@ -293,7 +289,7 @@
}
@Test func nullLengthFromPatternItem() {
- let pattern = FGMPlatformPatternItem.make(with: .dot, length: nil)
+ let pattern = PlatformPatternItem(type: .dot, length: nil)
let spanLength = pattern.gmsStyleSpanLength()
@@ -302,8 +298,8 @@
@Test func weightedLatLngFromPlatformWeightedLatLng() {
let intensity: Double = 3.0
- let data = FGMPlatformWeightedLatLng.make(
- withPoint: FGMPlatformLatLng.make(withLatitude: 10, longitude: 20),
+ let data = PlatformWeightedLatLng(
+ point: PlatformLatLng(latitude: 10, longitude: 20),
weight: intensity
)
@@ -318,17 +314,17 @@
let platformBlue: Double = 0.3
let platformAlpha: Double = 0.4
let colorMapSize: Int = 200
- let platformGradient = FGMPlatformHeatmapGradient.make(
- with: [
- FGMPlatformColor.make(
- withRed: platformRed,
+ let platformGradient = PlatformHeatmapGradient(
+ colors: [
+ PlatformColor(
+ red: platformRed,
green: platformGreen,
blue: platformBlue,
alpha: platformAlpha
)
],
- startPoints: [startPoint as NSNumber],
- colorMapSize: colorMapSize
+ startPoints: [startPoint],
+ colorMapSize: Int64(colorMapSize)
)
let gradient = platformGradient.toGMUGradient()
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/ExtractIconFromDataTests.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/ExtractIconFromDataTests.swift
index b9e05e9..1f52c70 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/ExtractIconFromDataTests.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/ExtractIconFromDataTests.swift
@@ -4,7 +4,6 @@
import Flutter
import Testing
-import google_maps_flutter_ios_sdk9_objc
@testable import google_maps_flutter_ios_sdk9
@@ -15,8 +14,8 @@
let assetName = "fakeImageName"
let assetProvider = TestAssetProvider(image: testImage, forAssetName: assetName, package: nil)
- let bitmap = FGMPlatformBitmapAssetMap.make(
- withAssetName: assetName,
+ let bitmap = PlatformBitmapAssetMap(
+ assetName: assetName,
bitmapScaling: .auto,
imagePixelRatio: 1,
width: nil,
@@ -25,10 +24,7 @@
let screenScale: CGFloat = 3.0
- let resultImage = FGMPlatformBitmap.make(withBitmap: bitmap).createIcon(
- assetProvider: assetProvider,
- screenScale: screenScale
- )
+ let resultImage = bitmap.createIcon(assetProvider: assetProvider, screenScale: screenScale)
#expect(resultImage != nil)
#expect(resultImage?.scale == 1.0)
@@ -42,8 +38,8 @@
let assetName = "fakeImageName"
let assetProvider = TestAssetProvider(image: testImage, forAssetName: assetName, package: nil)
- let bitmap = FGMPlatformBitmapAssetMap.make(
- withAssetName: assetName,
+ let bitmap = PlatformBitmapAssetMap(
+ assetName: assetName,
bitmapScaling: .auto,
imagePixelRatio: 10,
width: nil,
@@ -52,10 +48,7 @@
let screenScale: CGFloat = 3.0
- let resultImage = FGMPlatformBitmap.make(withBitmap: bitmap).createIcon(
- assetProvider: assetProvider,
- screenScale: screenScale
- )
+ let resultImage = bitmap.createIcon(assetProvider: assetProvider, screenScale: screenScale)
#expect(resultImage != nil)
#expect(resultImage?.scale == 10)
@@ -71,20 +64,17 @@
let assetProvider = TestAssetProvider(image: testImage, forAssetName: assetName, package: nil)
let width: CGFloat = 15.0
- let bitmap = FGMPlatformBitmapAssetMap.make(
- withAssetName: assetName,
+ let bitmap = PlatformBitmapAssetMap(
+ assetName: assetName,
bitmapScaling: .auto,
imagePixelRatio: 1,
- width: width as NSNumber,
+ width: width,
height: nil
)
let screenScale: CGFloat = 3.0
- let resultImage = FGMPlatformBitmap.make(withBitmap: bitmap).createIcon(
- assetProvider: assetProvider,
- screenScale: screenScale
- )
+ let resultImage = bitmap.createIcon(assetProvider: assetProvider, screenScale: screenScale)
#expect(resultImage != nil)
#expect(testImage.scale == 1.0)
@@ -105,20 +95,17 @@
let width: CGFloat = 15.0
let height: CGFloat = 45.0
- let bitmap = FGMPlatformBitmapAssetMap.make(
- withAssetName: assetName,
+ let bitmap = PlatformBitmapAssetMap(
+ assetName: assetName,
bitmapScaling: .auto,
imagePixelRatio: 1,
- width: width as NSNumber,
- height: height as NSNumber
+ width: width,
+ height: height
)
let screenScale: CGFloat = 3.0
- let resultImage = FGMPlatformBitmap.make(withBitmap: bitmap).createIcon(
- assetProvider: assetProvider,
- screenScale: screenScale
- )
+ let resultImage = bitmap.createIcon(assetProvider: assetProvider, screenScale: screenScale)
#expect(resultImage != nil)
#expect(resultImage?.scale == screenScale)
#expect(resultImage?.size.width == width)
@@ -131,8 +118,8 @@
let assetName = "fakeImageName"
let assetProvider = TestAssetProvider(image: testImage, forAssetName: assetName, package: nil)
- let bitmap = FGMPlatformBitmapAssetMap.make(
- withAssetName: assetName,
+ let bitmap = PlatformBitmapAssetMap(
+ assetName: assetName,
bitmapScaling: .none,
imagePixelRatio: 1,
width: nil,
@@ -141,10 +128,7 @@
let screenScale: CGFloat = 3.0
- let resultImage = FGMPlatformBitmap.make(withBitmap: bitmap).createIcon(
- assetProvider: assetProvider,
- screenScale: screenScale
- )
+ let resultImage = bitmap.createIcon(assetProvider: assetProvider, screenScale: screenScale)
#expect(resultImage != nil)
#expect(resultImage?.scale == 1.0)
@@ -157,8 +141,8 @@
let pngData = try #require(testImage.pngData())
let typedData = FlutterStandardTypedData(bytes: pngData)
- let bitmap = FGMPlatformBitmapBytesMap.make(
- withByteData: typedData,
+ let bitmap = PlatformBitmapBytesMap(
+ byteData: typedData,
bitmapScaling: .auto,
imagePixelRatio: 1,
width: nil,
@@ -167,7 +151,7 @@
let screenScale: CGFloat = 3.0
- let resultImage = FGMPlatformBitmap.make(withBitmap: bitmap).createIcon(
+ let resultImage = bitmap.createIcon(
assetProvider: TestAssetProvider(),
screenScale: screenScale
)
@@ -183,8 +167,8 @@
let pngData = try #require(testImage.pngData())
let typedData = FlutterStandardTypedData(bytes: pngData)
- let bitmap = FGMPlatformBitmapBytesMap.make(
- withByteData: typedData,
+ let bitmap = PlatformBitmapBytesMap(
+ byteData: typedData,
bitmapScaling: .auto,
imagePixelRatio: 10,
width: nil,
@@ -193,7 +177,7 @@
let screenScale: CGFloat = 3.0
- let resultImage = FGMPlatformBitmap.make(withBitmap: bitmap).createIcon(
+ let resultImage = bitmap.createIcon(
assetProvider: TestAssetProvider(),
screenScale: screenScale
)
@@ -210,17 +194,17 @@
let width: CGFloat = 15.0
let height: CGFloat = 15.0
let typedData = FlutterStandardTypedData(bytes: pngData)
- let bitmap = FGMPlatformBitmapBytesMap.make(
- withByteData: typedData,
+ let bitmap = PlatformBitmapBytesMap(
+ byteData: typedData,
bitmapScaling: .auto,
imagePixelRatio: 1,
- width: width as NSNumber,
- height: height as NSNumber
+ width: width,
+ height: height
)
let screenScale: CGFloat = 3.0
- let resultImage = FGMPlatformBitmap.make(withBitmap: bitmap).createIcon(
+ let resultImage = bitmap.createIcon(
assetProvider: TestAssetProvider(),
screenScale: screenScale
)
@@ -244,17 +228,17 @@
let width: CGFloat = 15.0
let height: CGFloat = 45.0
let typedData = FlutterStandardTypedData(bytes: pngData)
- let bitmap = FGMPlatformBitmapBytesMap.make(
- withByteData: typedData,
+ let bitmap = PlatformBitmapBytesMap(
+ byteData: typedData,
bitmapScaling: .auto,
imagePixelRatio: 1,
- width: width as NSNumber,
- height: height as NSNumber
+ width: width,
+ height: height
)
let screenScale: CGFloat = 3.0
- let resultImage = FGMPlatformBitmap.make(withBitmap: bitmap).createIcon(
+ let resultImage = bitmap.createIcon(
assetProvider: TestAssetProvider(),
screenScale: screenScale
)
@@ -269,8 +253,8 @@
let pngData = try #require(testImage.pngData())
let typedData = FlutterStandardTypedData(bytes: pngData)
- let bitmap = FGMPlatformBitmapBytesMap.make(
- withByteData: typedData,
+ let bitmap = PlatformBitmapBytesMap(
+ byteData: typedData,
bitmapScaling: .none,
imagePixelRatio: 1,
width: nil,
@@ -279,7 +263,7 @@
let screenScale: CGFloat = 3.0
- let resultImage = FGMPlatformBitmap.make(withBitmap: bitmap).createIcon(
+ let resultImage = bitmap.createIcon(
assetProvider: TestAssetProvider(),
screenScale: screenScale
)
@@ -294,12 +278,12 @@
@Test func extractIconFromPinConfigWithGlyphColor() {
let assetProvider = TestAssetProvider()
- let backgroundColor = FGMPlatformColor.make(withRed: 0.0, green: 1.0, blue: 1.0, alpha: 1.0)
- let borderColor = FGMPlatformColor.make(withRed: 1.0, green: 0.0, blue: 1.0, alpha: 1.0)
- let glyphColor = FGMPlatformColor.make(withRed: 0.1, green: 0.2, blue: 0.3, alpha: 1.0)
+ let backgroundColor = PlatformColor(red: 0.0, green: 1.0, blue: 1.0, alpha: 1.0)
+ let borderColor = PlatformColor(red: 1.0, green: 0.0, blue: 1.0, alpha: 1.0)
+ let glyphColor = PlatformColor(red: 0.1, green: 0.2, blue: 0.3, alpha: 1.0)
- let pinConfig = FGMPlatformBitmapPinConfig.make(
- withBackgroundColor: backgroundColor,
+ let pinConfig = PlatformBitmapPinConfig(
+ backgroundColor: backgroundColor,
borderColor: borderColor,
glyphColor: glyphColor,
glyphTextColor: nil,
@@ -309,10 +293,7 @@
let screenScale: CGFloat = 3.0
- let resultImage = FGMPlatformBitmap.make(withBitmap: pinConfig).createIcon(
- assetProvider: assetProvider,
- screenScale: screenScale
- )
+ let resultImage = pinConfig.createIcon(assetProvider: assetProvider, screenScale: screenScale)
// PinConfig may return nil on old Google Maps SDK versions (<=8.4.0).
// Also, due to a Google Maps SDK issue (https://issuetracker.google.com/issues/370536110),
@@ -324,10 +305,10 @@
@Test func extractIconFromPinConfigWithGlyphText() {
let assetProvider = TestAssetProvider()
- let glyphTextColor = FGMPlatformColor.make(withRed: 1.0, green: 1.0, blue: 1.0, alpha: 1.0)
+ let glyphTextColor = PlatformColor(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0)
- let pinConfig = FGMPlatformBitmapPinConfig.make(
- withBackgroundColor: nil,
+ let pinConfig = PlatformBitmapPinConfig(
+ backgroundColor: nil,
borderColor: nil,
glyphColor: nil,
glyphTextColor: glyphTextColor,
@@ -337,10 +318,7 @@
let screenScale: CGFloat = 3.0
- let resultImage = FGMPlatformBitmap.make(withBitmap: pinConfig).createIcon(
- assetProvider: assetProvider,
- screenScale: screenScale
- )
+ let resultImage = pinConfig.createIcon(assetProvider: assetProvider, screenScale: screenScale)
// PinConfig returns nil on iOS versions without GMSPinImageOptions support (< iOS 16.0).
// On simulators, GMSPinImage may also return a zero-dimension image. Both cases are acceptable
@@ -355,33 +333,29 @@
let assetName = "fakeImageNameKey"
let assetProvider = TestAssetProvider(image: testImage, forAssetName: assetName, package: nil)
- let assetBitmap = FGMPlatformBitmapAssetMap.make(
- withAssetName: assetName,
+ let assetBitmap = PlatformBitmapAssetMap(
+ assetName: assetName,
bitmapScaling: .auto,
imagePixelRatio: 1,
width: nil,
height: nil
)
- let glyphBitmap = FGMPlatformBitmap.make(withBitmap: assetBitmap)
- let backgroundColor = FGMPlatformColor.make(withRed: 1.0, green: 1.0, blue: 1.0, alpha: 1.0)
- let borderColor = FGMPlatformColor.make(withRed: 0.0, green: 0.0, blue: 0.0, alpha: 1.0)
+ let backgroundColor = PlatformColor(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0)
+ let borderColor = PlatformColor(red: 0.0, green: 0.0, blue: 0.0, alpha: 1.0)
- let pinConfig = FGMPlatformBitmapPinConfig.make(
- withBackgroundColor: backgroundColor,
+ let pinConfig = PlatformBitmapPinConfig(
+ backgroundColor: backgroundColor,
borderColor: borderColor,
glyphColor: nil,
glyphTextColor: nil,
glyphText: nil,
- glyphBitmap: glyphBitmap
+ glyphBitmap: assetBitmap
)
let screenScale: CGFloat = 3.0
- let resultImage = FGMPlatformBitmap.make(withBitmap: pinConfig).createIcon(
- assetProvider: assetProvider,
- screenScale: screenScale
- )
+ let resultImage = pinConfig.createIcon(assetProvider: assetProvider, screenScale: screenScale)
// PinConfig returns nil on iOS versions without GMSPinImageOptions support (< iOS 16.0).
// On simulators, GMSPinImage may also return a zero-dimension image. Both cases are acceptable
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/GoogleMapsTests.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/GoogleMapsTests.swift
index 5268b22..189a00f 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/GoogleMapsTests.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/GoogleMapsTests.swift
@@ -5,11 +5,10 @@
import Flutter
import GoogleMaps
import Testing
-import google_maps_flutter_ios_sdk9_objc
@testable import google_maps_flutter_ios_sdk9
-class MockCATransaction: NSObject, FGMCATransactionProtocol {
+class MockCATransaction: MapAnimationCATransactionProtocol {
var beginCalled = false
var commitCalled = false
var animationDuration: CFTimeInterval = 0.0
@@ -129,12 +128,9 @@
let mockTransactionWrapper = MockCATransaction()
controller.callHandler.transactionWrapper = mockTransactionWrapper
- let zoomTo = FGMPlatformCameraUpdateZoomTo.make(withZoom: 10.0)
- let cameraUpdate = FGMPlatformCameraUpdate.make(withCameraUpdate: zoomTo)
- var error: FlutterError? = nil
+ let zoomTo = PlatformCameraUpdateZoomTo(zoom: 10.0)
- controller.callHandler.animateCamera(with: cameraUpdate, duration: nil, error: &error)
- #expect(error == nil)
+ try controller.callHandler.animateCamera(zoomTo, duration: nil)
#expect(mapView.didAnimateCamera)
#expect(!mockTransactionWrapper.beginCalled)
#expect(!mockTransactionWrapper.commitCalled)
@@ -161,21 +157,14 @@
let mockTransactionWrapper = MockCATransaction()
controller.callHandler.transactionWrapper = mockTransactionWrapper
- let zoomTo = FGMPlatformCameraUpdateZoomTo.make(withZoom: 10.0)
- let cameraUpdate = FGMPlatformCameraUpdate.make(withCameraUpdate: zoomTo)
- var error: FlutterError? = nil
+ let zoomTo = PlatformCameraUpdateZoomTo(zoom: 10.0)
- let durationMilliseconds: NSNumber = 100
- controller.callHandler.animateCamera(
- with: cameraUpdate,
- duration: durationMilliseconds,
- error: &error
- )
- #expect(error == nil)
+ let durationMilliseconds: Int64 = 100
+ try controller.callHandler.animateCamera(zoomTo, duration: durationMilliseconds)
#expect(mapView.didAnimateCamera)
#expect(mockTransactionWrapper.beginCalled)
#expect(mockTransactionWrapper.commitCalled)
- #expect(mockTransactionWrapper.animationDuration == durationMilliseconds.doubleValue / 1000)
+ #expect(mockTransactionWrapper.animationDuration == Double(durationMilliseconds) / 1000)
}
@Test func inspectorAPICameraPosition() throws {
@@ -201,9 +190,7 @@
let inspector = MapInspector(messenger: binaryMessenger, pigeonSuffix: "0")
inspector.controller = controller
- var error: FlutterError? = nil
- let cameraPosition = try #require(inspector.cameraPosition(&error))
- #expect(error == nil)
+ let cameraPosition = try inspector.cameraPosition()
#expect(cameraPosition.target.latitude == initialCameraPosition.target.latitude)
#expect(cameraPosition.target.longitude == initialCameraPosition.target.longitude)
@@ -212,16 +199,16 @@
/// Creates an empty creation parameters object for tests where the values don't matter, just that
/// there's a valid object to pass in.
- private func emptyCreationParameters() -> FGMPlatformMapViewCreationParams {
- return FGMPlatformMapViewCreationParams.make(
- withInitialCameraPosition: FGMPlatformCameraPosition.make(
- withBearing: 0.0,
- target: FGMPlatformLatLng.make(withLatitude: 0.0, longitude: 0.0),
+ private func emptyCreationParameters() -> PlatformMapViewCreationParams {
+ return PlatformMapViewCreationParams(
+ initialCameraPosition: PlatformCameraPosition(
+ bearing: 0.0,
+ target: PlatformLatLng(latitude: 0.0, longitude: 0.0),
tilt: 0.0,
zoom: 0.0
),
- mapConfiguration: FGMPlatformMapConfiguration.make(
- withCompassEnabled: nil,
+ mapConfiguration: PlatformMapConfiguration(
+ compassEnabled: nil,
cameraTargetBounds: nil,
mapType: nil,
minMaxZoomPreference: nil,
@@ -267,6 +254,7 @@
#expect(mapView.frameObserverCount == 1)
+ withExtendedLifetime(controller) {}
// Deallocate the controller
controller = nil
@@ -288,8 +276,8 @@
#expect(controller.styleError != nil)
// Update config without style
- let config = FGMPlatformMapConfiguration.make(
- withCompassEnabled: true,
+ let config = PlatformMapConfiguration(
+ compassEnabled: true,
cameraTargetBounds: nil,
mapType: nil,
minMaxZoomPreference: nil,
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/GroundOverlayControllerTests.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/GroundOverlayControllerTests.swift
index 8223f32..f5f528e 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/GroundOverlayControllerTests.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/GroundOverlayControllerTests.swift
@@ -4,7 +4,6 @@
import GoogleMaps
import Testing
-import google_maps_flutter_ios_sdk9_objc
@testable import google_maps_flutter_ios_sdk9
@@ -76,18 +75,16 @@
let (groundOverlayController, mapView) =
try GroundOverlayControllerTests.groundOverlayControllerWithPositionWithMockedMap()
- let position = FGMPlatformLatLng.make(withLatitude: 52.4816, longitude: 3.1791)
+ let position = PlatformLatLng(latitude: 52.4816, longitude: 3.1791)
- let bitmap = FGMPlatformBitmap.make(
- withBitmap: FGMPlatformBitmapDefaultMarker.make(withHue: 0)
- )
+ let bitmap = PlatformBitmapDefaultMarker(hue: 0)
- let platformGroundOverlay = FGMPlatformGroundOverlay.make(
- withGroundOverlayId: "id_1",
+ let platformGroundOverlay = PlatformGroundOverlay(
+ groundOverlayId: "id_1",
image: bitmap,
position: position,
bounds: nil,
- anchor: FGMPlatformPoint.makeWith(x: 0.5, y: 0.5),
+ anchor: PlatformPoint(x: 0.5, y: 0.5),
transparency: 0.5,
bearing: 65.0,
zIndex: 2,
@@ -116,7 +113,7 @@
#expect(abs(groundOverlayController.groundOverlay.anchor.y - 0.5) <= Double.ulpOfOne)
#expect(groundOverlayController.groundOverlay.zIndex == Int32(platformGroundOverlay.zIndex))
- let convertedPlatformGroundOverlay = FGMPlatformGroundOverlay.make(
+ let convertedPlatformGroundOverlay = PlatformGroundOverlay.make(
from: groundOverlayController.groundOverlay,
overlayId: "id_1",
isCreatedWithBounds: false,
@@ -128,7 +125,7 @@
#expect(
abs(convertedPlatformGroundOverlay.position!.longitude - position.longitude)
<= Double.ulpOfOne)
- #expect(convertedPlatformGroundOverlay.zoomLevel!.doubleValue == 14.0)
+ #expect(convertedPlatformGroundOverlay.zoomLevel == 14.0)
#expect(convertedPlatformGroundOverlay.transparency == platformGroundOverlay.transparency)
#expect(convertedPlatformGroundOverlay.bearing == platformGroundOverlay.bearing)
#expect(abs(convertedPlatformGroundOverlay.anchor!.x - 0.5) <= Double.ulpOfOne)
@@ -141,21 +138,19 @@
let (groundOverlayController, mapView) =
try GroundOverlayControllerTests.groundOverlayControllerWithBoundsWithMockedMap()
- let bounds = FGMPlatformLatLngBounds.make(
- withNortheast: FGMPlatformLatLng.make(withLatitude: 54.4816, longitude: 5.1791),
- southwest: FGMPlatformLatLng.make(withLatitude: 52.4816, longitude: 3.1791)
+ let bounds = PlatformLatLngBounds(
+ northeast: PlatformLatLng(latitude: 54.4816, longitude: 5.1791),
+ southwest: PlatformLatLng(latitude: 52.4816, longitude: 3.1791)
)
- let bitmap = FGMPlatformBitmap.make(
- withBitmap: FGMPlatformBitmapDefaultMarker.make(withHue: 0)
- )
+ let bitmap = PlatformBitmapDefaultMarker(hue: 0)
- let platformGroundOverlay = FGMPlatformGroundOverlay.make(
- withGroundOverlayId: "id_1",
+ let platformGroundOverlay = PlatformGroundOverlay(
+ groundOverlayId: "id_1",
image: bitmap,
position: nil,
bounds: bounds,
- anchor: FGMPlatformPoint.makeWith(x: 0.5, y: 0.5),
+ anchor: PlatformPoint(x: 0.5, y: 0.5),
transparency: 0.5,
bearing: 65.0,
zIndex: 2,
@@ -183,7 +178,7 @@
#expect(abs(groundOverlayController.groundOverlay.anchor.y - 0.5) <= Double.ulpOfOne)
#expect(groundOverlayController.groundOverlay.zIndex == Int32(platformGroundOverlay.zIndex))
- let convertedPlatformGroundOverlay = FGMPlatformGroundOverlay.make(
+ let convertedPlatformGroundOverlay = PlatformGroundOverlay.make(
from: groundOverlayController.groundOverlay,
overlayId: "id_1",
isCreatedWithBounds: true,
@@ -214,17 +209,15 @@
let groundOverlay = PropertyOrderValidatingGroundOverlay()
GroundOverlayController.update(
groundOverlay,
- from: FGMPlatformGroundOverlay.make(
- withGroundOverlayId: "groundOverlay",
- image: FGMPlatformBitmap.make(
- withBitmap: FGMPlatformBitmapDefaultMarker.make(withHue: 0)
+ from: PlatformGroundOverlay(
+ groundOverlayId: "groundOverlay",
+ image: PlatformBitmapDefaultMarker(hue: 0),
+ position: PlatformLatLng(latitude: 0, longitude: 0),
+ bounds: PlatformLatLngBounds(
+ northeast: PlatformLatLng(latitude: 54.4816, longitude: 5.1791),
+ southwest: PlatformLatLng(latitude: 52.4816, longitude: 3.1791)
),
- position: FGMPlatformLatLng.make(withLatitude: 0, longitude: 0),
- bounds: FGMPlatformLatLngBounds.make(
- withNortheast: FGMPlatformLatLng.make(withLatitude: 54.4816, longitude: 5.1791),
- southwest: FGMPlatformLatLng.make(withLatitude: 52.4816, longitude: 3.1791)
- ),
- anchor: FGMPlatformPoint.makeWith(x: 0.5, y: 0.5),
+ anchor: PlatformPoint(x: 0.5, y: 0.5),
transparency: 0.5,
bearing: 65.0,
zIndex: 2,
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/HeatmapControllerTests.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/HeatmapControllerTests.swift
index bbfe98e..6fa4380 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/HeatmapControllerTests.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/HeatmapControllerTests.swift
@@ -5,7 +5,6 @@
import GoogleMaps
import GoogleMapsUtils
import Testing
-import google_maps_flutter_ios_sdk9_objc
@testable import google_maps_flutter_ios_sdk9
@@ -13,25 +12,25 @@
@Test func updateHeatmapSetsVisibilityLast() {
let heatmap = PropertyOrderValidatingHeatmap()
- let gradient = FGMPlatformHeatmapGradient.make(
- with: [
- FGMPlatformColor.make(withRed: 0, green: 0, blue: 0, alpha: 0),
- FGMPlatformColor.make(withRed: 1.0, green: 1.0, blue: 1.0, alpha: 1.0),
+ let gradient = PlatformHeatmapGradient(
+ colors: [
+ PlatformColor(red: 0, green: 0, blue: 0, alpha: 0),
+ PlatformColor(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0),
],
- startPoints: [0 as NSNumber, 1 as NSNumber],
+ startPoints: [0, 1],
colorMapSize: 256
)
HeatmapController.update(
heatmap,
- from: FGMPlatformHeatmap.make(
- withHeatmapId: "heatmap",
+ from: PlatformHeatmap(
+ heatmapId: "heatmap",
data: [
- FGMPlatformWeightedLatLng.make(
- withPoint: FGMPlatformLatLng.make(withLatitude: 5.0, longitude: 5.0),
+ PlatformWeightedLatLng(
+ point: PlatformLatLng(latitude: 5.0, longitude: 5.0),
weight: 0.5
),
- FGMPlatformWeightedLatLng.make(
- withPoint: FGMPlatformLatLng.make(withLatitude: 10.0, longitude: 10.0),
+ PlatformWeightedLatLng(
+ point: PlatformLatLng(latitude: 10.0, longitude: 10.0),
weight: 0.75
),
],
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/MarkerControllerTests.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/MarkerControllerTests.swift
index 6cff56b..717407e 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/MarkerControllerTests.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/MarkerControllerTests.swift
@@ -4,7 +4,6 @@
import GoogleMaps
import Testing
-import google_maps_flutter_ios_sdk9_objc
@testable import google_maps_flutter_ios_sdk9
@@ -18,12 +17,12 @@
return PartiallyMockedMapView(options: mapViewOptions)
}
- /// Returns a FGMMarkersController instance instantiated with the given map view.
+ /// Returns a MarkersController instance instantiated with the given map view.
///
/// The mapView should outlive the controller, as the controller keeps a weak reference to it.
func markersController(
withMapView mapView: GMSMapView,
- eventDelegate: NSObject & FGMMapEventDelegate
+ eventDelegate: MapEventDelegate
) -> MarkersController {
return MarkersController(
mapView: mapView,
@@ -34,8 +33,8 @@
)
}
- func placeholderBitmap() -> FGMPlatformBitmap {
- return FGMPlatformBitmap.make(withBitmap: FGMPlatformBitmapDefaultMarker.make(withHue: 0))
+ func placeholderBitmap() -> PlatformBitmap {
+ return PlatformBitmapDefaultMarker(hue: 0)
}
@Test func setsMarkerNumericProperties() throws {
@@ -48,23 +47,23 @@
let anchorY = 2.718
let alpha = 0.4
let rotation = 90.0
- let zIndex = 3
+ let zIndex: Int64 = 3
let latitude = 10.0
let longitude = 20.0
controller.add([
- FGMPlatformMarker.make(
- withAlpha: alpha,
- anchor: FGMPlatformPoint.makeWith(x: anchorX, y: anchorY),
+ PlatformMarker(
+ alpha: alpha,
+ anchor: PlatformPoint(x: anchorX, y: anchorY),
consumeTapEvents: true,
draggable: true,
flat: true,
icon: placeholderBitmap(),
- infoWindow: FGMPlatformInfoWindow.make(
- withTitle: "info title",
+ infoWindow: PlatformInfoWindow(
+ title: "info title",
snippet: "info snippet",
- anchor: FGMPlatformPoint.makeWith(x: 0, y: 0)
+ anchor: PlatformPoint(x: 0, y: 0)
),
- position: FGMPlatformLatLng.make(withLatitude: latitude, longitude: longitude),
+ position: PlatformLatLng(latitude: latitude, longitude: longitude),
rotation: rotation,
visible: true,
zIndex: zIndex,
@@ -94,19 +93,19 @@
let markerIdentifier = "marker"
controller.add([
- FGMPlatformMarker.make(
- withAlpha: 1.0,
- anchor: FGMPlatformPoint.makeWith(x: 0, y: 0),
+ PlatformMarker(
+ alpha: 1.0,
+ anchor: PlatformPoint(x: 0, y: 0),
consumeTapEvents: false,
draggable: true,
flat: false,
icon: placeholderBitmap(),
- infoWindow: FGMPlatformInfoWindow.make(
- withTitle: "info title",
+ infoWindow: PlatformInfoWindow(
+ title: "info title",
snippet: "info snippet",
- anchor: FGMPlatformPoint.makeWith(x: 0, y: 0)
+ anchor: PlatformPoint(x: 0, y: 0)
),
- position: FGMPlatformLatLng.make(withLatitude: 0.0, longitude: 0.0),
+ position: PlatformLatLng(latitude: 0.0, longitude: 0.0),
rotation: 0,
visible: false,
zIndex: 0,
@@ -131,19 +130,19 @@
let markerIdentifier = "marker"
controller.add([
- FGMPlatformMarker.make(
- withAlpha: 1.0,
- anchor: FGMPlatformPoint.makeWith(x: 0, y: 0),
+ PlatformMarker(
+ alpha: 1.0,
+ anchor: PlatformPoint(x: 0, y: 0),
consumeTapEvents: false,
draggable: false,
flat: true,
icon: placeholderBitmap(),
- infoWindow: FGMPlatformInfoWindow.make(
- withTitle: "info title",
+ infoWindow: PlatformInfoWindow(
+ title: "info title",
snippet: "info snippet",
- anchor: FGMPlatformPoint.makeWith(x: 0, y: 0)
+ anchor: PlatformPoint(x: 0, y: 0)
),
- position: FGMPlatformLatLng.make(withLatitude: 0.0, longitude: 0.0),
+ position: PlatformLatLng(latitude: 0.0, longitude: 0.0),
rotation: 0,
visible: false,
zIndex: 0,
@@ -168,19 +167,19 @@
let markerIdentifier = "marker"
controller.add([
- FGMPlatformMarker.make(
- withAlpha: 1.0,
- anchor: FGMPlatformPoint.makeWith(x: 0, y: 0),
+ PlatformMarker(
+ alpha: 1.0,
+ anchor: PlatformPoint(x: 0, y: 0),
consumeTapEvents: false,
draggable: false,
flat: false,
icon: placeholderBitmap(),
- infoWindow: FGMPlatformInfoWindow.make(
- withTitle: "info title",
+ infoWindow: PlatformInfoWindow(
+ title: "info title",
snippet: "info snippet",
- anchor: FGMPlatformPoint.makeWith(x: 0, y: 0)
+ anchor: PlatformPoint(x: 0, y: 0)
),
- position: FGMPlatformLatLng.make(withLatitude: 0.0, longitude: 0.0),
+ position: PlatformLatLng(latitude: 0.0, longitude: 0.0),
rotation: 0,
visible: true,
zIndex: 0,
@@ -208,19 +207,19 @@
let anchorX = 3.14
let anchorY = 2.718
controller.add([
- FGMPlatformMarker.make(
- withAlpha: 1.0,
- anchor: FGMPlatformPoint.makeWith(x: 0, y: 0),
+ PlatformMarker(
+ alpha: 1.0,
+ anchor: PlatformPoint(x: 0, y: 0),
consumeTapEvents: true,
draggable: true,
flat: true,
icon: placeholderBitmap(),
- infoWindow: FGMPlatformInfoWindow.make(
- withTitle: title,
+ infoWindow: PlatformInfoWindow(
+ title: title,
snippet: snippet,
- anchor: FGMPlatformPoint.makeWith(x: anchorX, y: anchorY)
+ anchor: PlatformPoint(x: anchorX, y: anchorY)
),
- position: FGMPlatformLatLng.make(withLatitude: 0, longitude: 0),
+ position: PlatformLatLng(latitude: 0, longitude: 0),
rotation: 0,
visible: true,
zIndex: 0,
@@ -242,24 +241,22 @@
@Test func updateMarkerSetsVisibilityLast() {
let marker = PropertyOrderValidatingAdvancedMarker()
- let collisionBehavior = FGMPlatformMarkerCollisionBehaviorBox(
- value: .requiredAndHidesOptional
- )
+ let collisionBehavior = PlatformMarkerCollisionBehavior.requiredAndHidesOptional
MarkerController.update(
marker,
- from: FGMPlatformMarker.make(
- withAlpha: 1.0,
- anchor: FGMPlatformPoint.makeWith(x: 0, y: 0),
+ from: PlatformMarker(
+ alpha: 1.0,
+ anchor: PlatformPoint(x: 0, y: 0),
consumeTapEvents: true,
draggable: true,
flat: true,
icon: placeholderBitmap(),
- infoWindow: FGMPlatformInfoWindow.make(
- withTitle: "info title",
+ infoWindow: PlatformInfoWindow(
+ title: "info title",
snippet: "info snippet",
- anchor: FGMPlatformPoint.makeWith(x: 0, y: 0)
+ anchor: PlatformPoint(x: 0, y: 0)
),
- position: FGMPlatformLatLng.make(withLatitude: 0, longitude: 0),
+ position: PlatformLatLng(latitude: 0, longitude: 0),
rotation: 0,
visible: true,
zIndex: 0,
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/PolygonControllerTests.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/PolygonControllerTests.swift
index 4ce8f46..fb14690 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/PolygonControllerTests.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/PolygonControllerTests.swift
@@ -4,7 +4,6 @@
import GoogleMaps
import Testing
-import google_maps_flutter_ios_sdk9_objc
@testable import google_maps_flutter_ios_sdk9
@@ -14,15 +13,15 @@
let polygon = PropertyOrderValidatingPolygon()
PolygonController.update(
polygon,
- from: FGMPlatformPolygon.make(
- withPolygonId: "polygon",
+ from: PlatformPolygon(
+ polygonId: "polygon",
consumesTapEvents: false,
- fill: FGMPlatformColor.make(withRed: 0, green: 0, blue: 0, alpha: 0),
+ fillColor: PlatformColor(red: 0, green: 0, blue: 0, alpha: 0),
geodesic: false,
points: [],
holes: [],
visible: true,
- stroke: FGMPlatformColor.make(withRed: 0, green: 0, blue: 0, alpha: 0),
+ strokeColor: PlatformColor(red: 0, green: 0, blue: 0, alpha: 0),
strokeWidth: 0,
zIndex: 0
),
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/PolylineControllerTests.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/PolylineControllerTests.swift
index 6012e3d..d0df052 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/PolylineControllerTests.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/PolylineControllerTests.swift
@@ -4,7 +4,6 @@
import GoogleMaps
import Testing
-import google_maps_flutter_ios_sdk9_objc
@testable import google_maps_flutter_ios_sdk9
@@ -13,15 +12,15 @@
@Test func patternsSetSpans() {
let mapView = PolylineControllerTests.mapView()
- let polyline = FGMPlatformPolyline.make(
- withPolylineId: "polyline_id_0",
+ let polyline = PlatformPolyline(
+ polylineId: "polyline_id_0",
consumesTapEvents: false,
- color: FGMPlatformColor.make(withRed: 0, green: 0, blue: 0, alpha: 0),
+ color: PlatformColor(red: 0, green: 0, blue: 0, alpha: 0),
geodesic: false,
jointType: .round,
patterns: [
- FGMPlatformPatternItem.make(with: .dot, length: 10),
- FGMPlatformPatternItem.make(with: .dash, length: 10),
+ PlatformPatternItem(type: .dot, length: 10),
+ PlatformPatternItem(type: .dash, length: 10),
],
points: PolylineControllerTests.polylinePoints(),
visible: true,
@@ -46,10 +45,10 @@
let polyline = PropertyOrderValidatingPolyline()
PolylineController.update(
polyline,
- from: FGMPlatformPolyline.make(
- withPolylineId: "polyline",
+ from: PlatformPolyline(
+ polylineId: "polyline",
consumesTapEvents: false,
- color: FGMPlatformColor.make(withRed: 0, green: 0, blue: 0, alpha: 0),
+ color: PlatformColor(red: 0, green: 0, blue: 0, alpha: 0),
geodesic: false,
jointType: .round,
patterns: [],
@@ -72,12 +71,12 @@
}
/// Returns a set of points to use for tests that need a valid but arbitrary line.
- static func polylinePoints() -> [FGMPlatformLatLng] {
+ static func polylinePoints() -> [PlatformLatLng] {
return [
- FGMPlatformLatLng.make(withLatitude: 52.4816, longitude: -3.1791),
- FGMPlatformLatLng.make(withLatitude: 54.043, longitude: -2.9925),
- FGMPlatformLatLng.make(withLatitude: 54.1396, longitude: -4.2739),
- FGMPlatformLatLng.make(withLatitude: 53.4153, longitude: -4.0829),
+ PlatformLatLng(latitude: 52.4816, longitude: -3.1791),
+ PlatformLatLng(latitude: 54.043, longitude: -2.9925),
+ PlatformLatLng(latitude: 54.1396, longitude: -4.2739),
+ PlatformLatLng(latitude: 53.4153, longitude: -4.0829),
]
}
}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/TestUtils/TestAssetProvider.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/TestUtils/TestAssetProvider.swift
index 97720ed..d2e5307 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/TestUtils/TestAssetProvider.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/TestUtils/TestAssetProvider.swift
@@ -3,11 +3,11 @@
// found in the LICENSE file.
import UIKit
-import google_maps_flutter_ios_sdk9
-import google_maps_flutter_ios_sdk9_objc
-/// Fake implementation of FGMAssetProvider for unit tests.
-class TestAssetProvider: NSObject, FGMAssetProvider {
+@testable import google_maps_flutter_ios_sdk9
+
+/// Fake implementation of AssetProvider for unit tests.
+class TestAssetProvider: AssetProvider {
private let image: UIImage?
private let assetName: String?
private let package: String?
@@ -25,14 +25,12 @@
self.image = image
self.assetName = assetName
self.package = package
- super.init()
}
- override init() {
+ init() {
self.image = nil
self.assetName = nil
self.package = nil
- super.init()
}
func lookupKey(forAsset asset: String) -> String? {
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/TestUtils/TestMapEventHandler.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/TestUtils/TestMapEventHandler.swift
index 5dec204..fbb253b 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/TestUtils/TestMapEventHandler.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/TestUtils/TestMapEventHandler.swift
@@ -3,41 +3,114 @@
// found in the LICENSE file.
import Foundation
-import google_maps_flutter_ios_sdk9
-import google_maps_flutter_ios_sdk9_objc
-/// Fake implementation of FGMMapEventDelegate for unit tests.
-class TestMapEventHandler: NSObject, FGMMapEventDelegate {
- func didStartCameraMove() {}
+@testable import google_maps_flutter_ios_sdk9
- func didMoveCamera(to cameraPosition: FGMPlatformCameraPosition) {}
+/// Fake implementation of MapEventDelegate for unit tests.
+class TestMapEventHandler: MapEventDelegate {
+ func didStartCameraMove(completion: @escaping (Result<Void, PigeonError>) -> Void) {}
- func didIdleCamera() {}
-
- func didTap(atPosition position: FGMPlatformLatLng) {}
-
- func didLongPress(atPosition position: FGMPlatformLatLng) {}
-
- func didTapMarker(withIdentifier markerId: String) {}
-
- func didStartDragForMarker(
- withIdentifier markerId: String, atPosition position: FGMPlatformLatLng
+ func didMoveCamera(
+ to cameraPositionArg: PlatformCameraPosition,
+ completion:
+ @escaping (
+ Result<Void, PigeonError>
+ ) -> Void
) {}
- func didDragMarker(withIdentifier markerId: String, atPosition position: FGMPlatformLatLng) {}
+ func didIdleCamera(completion: @escaping (Result<Void, PigeonError>) -> Void) {}
- func didEndDragForMarker(withIdentifier markerId: String, atPosition position: FGMPlatformLatLng)
- {}
+ func didTap(
+ at positionArg: PlatformLatLng,
+ completion:
+ @escaping (
+ Result<Void, PigeonError>
+ ) -> Void
+ ) {}
- func didTapInfoWindowOfMarker(withIdentifier markerId: String) {}
+ func didLongPress(
+ at positionArg: PlatformLatLng,
+ completion:
+ @escaping (
+ Result<Void, PigeonError>
+ ) -> Void
+ ) {}
- func didTapCircle(withIdentifier circleId: String) {}
+ func didTapMarker(
+ withIdentifier markerIdArg: String,
+ completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {}
- func didTap(_ cluster: FGMPlatformCluster) {}
+ func didStartDragForMarker(
+ withIdentifier markerIdArg: String,
+ at positionArg: PlatformLatLng,
+ completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {}
- func didTapPolygon(withIdentifier polygonId: String) {}
+ func didDragMarker(
+ withIdentifier markerIdArg: String,
+ at positionArg: PlatformLatLng,
+ completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {}
- func didTapPolyline(withIdentifier polylineId: String) {}
+ func didEndDragForMarker(
+ withIdentifier markerIdArg: String,
+ at positionArg: PlatformLatLng,
+ completion:
+ @escaping (
+ Result<Void, PigeonError>
+ ) -> Void
+ ) {}
- func didTapGroundOverlay(withIdentifier groundOverlayId: String) {}
+ func didTapInfoWindowOfMarker(
+ withIdentifier markerIdArg: String,
+ completion:
+ @escaping (
+ Result<Void, PigeonError>
+ ) -> Void
+ ) {}
+
+ func didTapCircle(
+ withIdentifier circleIdArg: String,
+ completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {}
+
+ func didTapCluster(
+ _ clusterArg: PlatformCluster,
+ completion:
+ @escaping (
+ Result<Void, PigeonError>
+ ) -> Void
+ ) {}
+
+ func didTapPolygon(
+ withIdentifier polygonIdArg: String,
+ completion:
+ @escaping (
+ Result<Void, PigeonError>
+ ) -> Void
+ ) {}
+
+ func didTapPolyline(
+ withIdentifier polylineIdArg: String,
+ completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {}
+
+ func didTapGroundOverlay(
+ withIdentifier groundOverlayIdArg: String,
+ completion:
+ @escaping (
+ Result<Void, PigeonError>
+ ) -> Void
+ ) {}
+
+ func tile(
+ withOverlayIdentifier tileOverlayIdArg: String,
+ location locationArg: PlatformPoint,
+ zoom zoomArg: Int64,
+ completion:
+ @escaping (
+ Result<PlatformTile, PigeonError>
+ ) -> Void
+ ) {}
}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/TileOverlayControllerTests.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/TileOverlayControllerTests.swift
index 2f44cbf..37f4932 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/TileOverlayControllerTests.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/TileOverlayControllerTests.swift
@@ -4,7 +4,6 @@
import GoogleMaps
import Testing
-import google_maps_flutter_ios_sdk9_objc
@testable import google_maps_flutter_ios_sdk9
@@ -14,8 +13,8 @@
let tileLayer = PropertyOrderValidatingTileLayer()
TileOverlayController.update(
tileLayer,
- from: FGMPlatformTileOverlay.make(
- withTileOverlayId: "overlay",
+ from: PlatformTileOverlay(
+ tileOverlayId: "overlay",
fadeIn: false,
transparency: 0.5,
zIndex: 0,
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/TileProviderControllerTests.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/TileProviderControllerTests.swift
index d17866f..88d3931 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/TileProviderControllerTests.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/example/ios/RunnerTests/TileProviderControllerTests.swift
@@ -5,7 +5,6 @@
import Flutter
import GoogleMaps
import Testing
-import google_maps_flutter_ios_sdk9_objc
@testable import google_maps_flutter_ios_sdk9
@@ -18,19 +17,18 @@
// A tile provider that expects a single call to
// tileWithOverlayIdentifier:location:zoom:completion: on the main thread,
// and then confirms it.
-class TestTileProvider: NSObject, TileProviderDelegate {
+class TestTileProvider: TileProviderDelegate {
var onTileCalled: () -> Void
init(onTileCalled: @escaping () -> Void) {
self.onTileCalled = onTileCalled
- super.init()
}
func tile(
withOverlayIdentifier tileOverlayId: String,
- location: FGMPlatformPoint,
- zoom: Int,
- completion: @escaping (FGMPlatformTile?, FlutterError?) -> Void
+ location: PlatformPoint,
+ zoom: Int64,
+ completion: @escaping (Result<PlatformTile, PigeonError>) -> Void
) {
#expect(Thread.isMainThread)
onTileCalled()
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9.podspec b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9.podspec
index b4e7b8a..7bb0a41 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9.podspec
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9.podspec
@@ -14,8 +14,7 @@
s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' }
s.source = { :http => 'https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter_ios_sdk9' }
s.documentation_url = 'https://pub.dev/packages/google_maps_flutter_ios_sdk9'
- s.source_files = 'google_maps_flutter_ios_sdk9/Sources/**/*.{h,m,swift}'
- s.public_header_files = 'google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9_objc/include/**/*.h'
+ s.source_files = 'google_maps_flutter_ios_sdk9/Sources/**/*.swift'
s.dependency 'Flutter'
s.dependency 'GoogleMaps', '~> 9.2'
# Google-Maps-iOS-Utils 6.0 and 6.1.0 support GoogleMaps 9.x. The next release
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Package.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Package.swift
index 959d55e..555493f 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Package.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Package.swift
@@ -24,7 +24,6 @@
.target(
name: "google_maps_flutter_ios_sdk9",
dependencies: [
- "google_maps_flutter_ios_sdk9_objc",
.product(
name: "GoogleMapsUtils",
package: "google-maps-ios-utils"
@@ -37,22 +36,6 @@
resources: [
.process("Resources")
]
- ),
- .target(
- name: "google_maps_flutter_ios_sdk9_objc",
- dependencies: [
- .product(
- name: "GoogleMapsUtils",
- package: "google-maps-ios-utils"
- ),
- .product(
- name: "GoogleMaps",
- package: "ios-maps-sdk"
- ),
- ],
- cSettings: [
- .headerSearchPath("include/google_maps_flutter_ios_sdk9_objc")
- ]
- ),
+ )
]
)
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/AssetProvider.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/AssetProvider.swift
new file mode 100644
index 0000000..cf4a2a9
--- /dev/null
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/AssetProvider.swift
@@ -0,0 +1,36 @@
+// Copyright 2013 The Flutter Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+import UIKit
+
+/// Protocol for looking up Flutter assets and resolving them to images.
+///
+/// This is used to allow testing with mock assets without mocking the entire
+/// Flutter plugin registrar and UIImage class.
+protocol AssetProvider {
+ /// Returns the key for the given asset.
+ ///
+ /// Wraps the FlutterPluginRegistrar method of the same name.
+ ///
+ /// @param asset The name of the asset.
+ /// @return The key for the asset, or nil if not found.
+ func lookupKey(forAsset asset: String) -> String?
+
+ /// Returns the key for the given asset from the given package.
+ ///
+ /// Wraps the FlutterPluginRegistrar method of the same name.
+ ///
+ /// @param asset The name of the asset.
+ /// @param package The name of the package to load the asset from.
+ /// @return The key for the asset, or nil if not found.
+ func lookupKey(forAsset asset: String, fromPackage package: String) -> String?
+
+ /// Returns the image for the given named asset.
+ ///
+ /// Wraps the UIImage method of the same name.
+ ///
+ /// @param name The name of the image asset or file.
+ /// @return The image, or nil if not found.
+ func imageNamed(_ name: String) -> UIImage?
+}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/CircleController.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/CircleController.swift
index cec0abb..f9870af 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/CircleController.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/CircleController.swift
@@ -4,20 +4,15 @@
import GoogleMaps
-#if canImport(google_maps_flutter_ios_sdk9_objc)
- import google_maps_flutter_ios_sdk9_objc
-#endif
-
/// Defines circle controllable by Flutter.
-class CircleController: NSObject {
+class CircleController {
let circle: GMSCircle
private weak var mapView: GMSMapView?
- init(circle: FGMPlatformCircle, mapView: GMSMapView) {
+ init(circle: PlatformCircle, mapView: GMSMapView) {
self.circle = GMSCircle()
self.mapView = mapView
self.circle.userData = [circle.circleId]
- super.init()
CircleController.update(self.circle, from: circle, with: mapView)
}
@@ -25,20 +20,20 @@
circle.map = nil
}
- /// Updates the controller's circle with the properties from a FGMPlatformCircle.
+ /// Updates the controller's circle with the properties from a PlatformCircle.
///
/// Setting the circle to visible will set its map to the given mapView.
- func update(from platformCircle: FGMPlatformCircle) {
+ func update(from platformCircle: PlatformCircle) {
if let mapView = mapView {
CircleController.update(circle, from: platformCircle, with: mapView)
}
}
- /// Updates the given GMSCircle with the properties from a FGMPlatformCircle.
+ /// Updates the given GMSCircle with the properties from a PlatformCircle.
///
/// Setting the circle to visible will set its map to the given mapView.
static func update(
- _ circle: GMSCircle, from platformCircle: FGMPlatformCircle, with mapView: GMSMapView
+ _ circle: GMSCircle, from platformCircle: PlatformCircle, with mapView: GMSMapView
) {
circle.isTappable = platformCircle.consumeTapEvents
circle.zIndex = Int32(platformCircle.zIndex)
@@ -53,25 +48,24 @@
}
}
-class CirclesController: NSObject {
- private weak var eventDelegate: FGMMapEventDelegate?
+class CirclesController {
+ private weak var eventDelegate: MapEventDelegate?
private weak var mapView: GMSMapView?
private var circleIdToController: [String: CircleController] = [:]
- init(mapView: GMSMapView, eventDelegate: FGMMapEventDelegate) {
+ init(mapView: GMSMapView, eventDelegate: MapEventDelegate) {
self.mapView = mapView
self.eventDelegate = eventDelegate
- super.init()
}
- func add(_ circles: [FGMPlatformCircle]) {
+ func add(_ circles: [PlatformCircle]) {
guard let mapView = mapView else { return }
for circle in circles {
circleIdToController[circle.circleId] = CircleController(circle: circle, mapView: mapView)
}
}
- func change(_ circles: [FGMPlatformCircle]) {
+ func change(_ circles: [PlatformCircle]) {
for circle in circles {
circleIdToController[circle.circleId]?.update(from: circle)
}
@@ -92,7 +86,7 @@
func didTapCircle(withIdentifier identifier: String) {
if hasCircle(withIdentifier: identifier) {
- eventDelegate?.didTapCircle(withIdentifier: identifier)
+ eventDelegate?.didTapCircle(withIdentifier: identifier) { _ in }
}
}
}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/ClusterManagersController.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/ClusterManagersController.swift
index 5c6fea5..6c8bc4a 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/ClusterManagersController.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/ClusterManagersController.swift
@@ -4,24 +4,20 @@
import Flutter
import GoogleMaps
-
-#if canImport(google_maps_flutter_ios_sdk9_objc)
- import google_maps_flutter_ios_sdk9_objc
-#endif
+import GoogleMapsUtils
/// A controller that manages all of the cluster managers on a map.
-class ClusterManagersController: NSObject {
+class ClusterManagersController {
private var clusterManagerIdentifierToManagers: [String: GMUClusterManager] = [:]
- private weak var eventDelegate: FGMMapEventDelegate?
+ private weak var eventDelegate: MapEventDelegate?
private weak var mapView: GMSMapView?
- init(mapView: GMSMapView, eventDelegate: FGMMapEventDelegate) {
+ init(mapView: GMSMapView, eventDelegate: MapEventDelegate) {
self.mapView = mapView
self.eventDelegate = eventDelegate
- super.init()
}
- func add(_ clusterManagersToAdd: [FGMPlatformClusterManager]) {
+ func add(_ clusterManagersToAdd: [PlatformClusterManager]) {
for clusterManager in clusterManagersToAdd {
addClusterManager(clusterManager.identifier)
}
@@ -56,17 +52,13 @@
clusterManagerIdentifierToManagers.values.forEach({ $0.cluster() })
}
- func clusters(
- withIdentifier identifier: String,
- error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) -> [FGMPlatformCluster]? {
+ func clusters(withIdentifier identifier: String) throws -> [PlatformCluster] {
guard let clusterManager = clusterManagerIdentifierToManagers[identifier] else {
- error.pointee = FlutterError(
+ throw PigeonError(
code: "Invalid clusterManagerId",
message: "getClusters called with invalid clusterManagerId",
details: "clusterManagerId was: '\(identifier)'"
)
- return nil
}
guard let mapView = mapView else { return [] }
@@ -74,14 +66,14 @@
// https://github.com/googlemaps/google-maps-ios-utils/blob/0e7ed81f1bbd9d29e4529c40ae39b0791b0a0eb8/src/Clustering/GMUClusterManager.m#L94.
let integralZoom = floorf(Float(mapView.camera.zoom) + 0.5)
let clusters = clusterManager.algorithm.clusters(atZoom: integralZoom)
- return clusters.map { FGMPlatformCluster.make(from: $0, clusterManagerIdentifier: identifier) }
+ return clusters.map { PlatformCluster.make(from: $0, clusterManagerIdentifier: identifier) }
}
func didTap(_ cluster: GMUStaticCluster) {
guard let clusterManagerId = clusterManagerIdentifier(for: cluster) else { return }
- let platformCluster = FGMPlatformCluster.make(
+ let platformCluster = PlatformCluster.make(
from: cluster, clusterManagerIdentifier: clusterManagerId)
- eventDelegate?.didTap(platformCluster)
+ eventDelegate?.didTapCluster(platformCluster) { _ in }
}
/// Returns the cluster manager identifier for given cluster.
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/ConversionUtils.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/ConversionUtils.swift
index 751cfee..0fcd1be 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/ConversionUtils.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/ConversionUtils.swift
@@ -6,14 +6,10 @@
import GoogleMaps
import GoogleMapsUtils
-#if canImport(google_maps_flutter_ios_sdk9_objc)
- import google_maps_flutter_ios_sdk9_objc
-#endif
-
-extension FGMPlatformPoint {
+extension PlatformPoint {
/// Converts a CGPoint to its Pigeon equivalent.
- static func make(from point: CGPoint) -> FGMPlatformPoint {
- return FGMPlatformPoint.makeWith(x: point.x, y: point.y)
+ static func make(from point: CGPoint) -> PlatformPoint {
+ return PlatformPoint(x: point.x, y: point.y)
}
/// Returns the equivalent CGPoint.
@@ -22,11 +18,10 @@
}
}
-extension FGMPlatformLatLng {
+extension PlatformLatLng {
/// Converts a CLLocationCoordinate2D to its Pigeon representation.
- static func make(from coordinate: CLLocationCoordinate2D) -> FGMPlatformLatLng {
- return FGMPlatformLatLng.make(
- withLatitude: coordinate.latitude, longitude: coordinate.longitude)
+ static func make(from coordinate: CLLocationCoordinate2D) -> PlatformLatLng {
+ return PlatformLatLng(latitude: coordinate.latitude, longitude: coordinate.longitude)
}
/// Returns the equivalent CLLocationCoordinate2D.
@@ -35,12 +30,12 @@
}
}
-extension FGMPlatformLatLngBounds {
+extension PlatformLatLngBounds {
/// Converts a GMSCoordinateBounds to its Pigeon representation.
- static func make(from bounds: GMSCoordinateBounds) -> FGMPlatformLatLngBounds {
- return FGMPlatformLatLngBounds.make(
- withNortheast: FGMPlatformLatLng.make(from: bounds.northEast),
- southwest: FGMPlatformLatLng.make(from: bounds.southWest)
+ static func make(from bounds: GMSCoordinateBounds) -> PlatformLatLngBounds {
+ return PlatformLatLngBounds(
+ northeast: PlatformLatLng.make(from: bounds.northEast),
+ southwest: PlatformLatLng.make(from: bounds.southWest)
)
}
@@ -53,12 +48,12 @@
}
}
-extension FGMPlatformCameraPosition {
+extension PlatformCameraPosition {
/// Converts a GMSCameraPosition to its Pigeon representation.
- static func make(from position: GMSCameraPosition) -> FGMPlatformCameraPosition {
- return FGMPlatformCameraPosition.make(
- withBearing: position.bearing,
- target: FGMPlatformLatLng.make(from: position.target),
+ static func make(from position: GMSCameraPosition) -> PlatformCameraPosition {
+ return PlatformCameraPosition(
+ bearing: position.bearing,
+ target: PlatformLatLng.make(from: position.target),
tilt: position.viewingAngle,
zoom: Double(position.zoom)
)
@@ -84,7 +79,7 @@
return path
}
-extension FGMPlatformMapType {
+extension PlatformMapType {
/// The corresponding GMSMapViewType.
var gmsMapViewType: GMSMapViewType {
switch self {
@@ -98,7 +93,7 @@
}
}
-extension FGMPlatformMarkerCollisionBehavior {
+extension PlatformMarkerCollisionBehavior {
/// The corresponding GMSCollisionBehavior.
var gmsCollisionBehavior: GMSCollisionBehavior {
switch self {
@@ -114,40 +109,39 @@
}
}
-extension FGMPlatformGroundOverlay {
+extension PlatformGroundOverlay {
/// Converts a GMSGroundOverlay to its Pigeon representation.
static func make(
from groundOverlay: GMSGroundOverlay,
overlayId: String,
isCreatedWithBounds: Bool,
- zoomLevel: NSNumber?
- ) -> FGMPlatformGroundOverlay {
- let placeholderImage = FGMPlatformBitmap.make(
- withBitmap: FGMPlatformBitmapDefaultMarker.make(withHue: nil))
+ zoomLevel: Double?
+ ) -> PlatformGroundOverlay {
+ let placeholderImage = PlatformBitmapDefaultMarker(hue: nil)
if isCreatedWithBounds, let bounds = groundOverlay.bounds {
- return FGMPlatformGroundOverlay.make(
- withGroundOverlayId: overlayId,
+ return PlatformGroundOverlay(
+ groundOverlayId: overlayId,
image: placeholderImage,
position: nil,
- bounds: FGMPlatformLatLngBounds.make(from: bounds),
- anchor: FGMPlatformPoint.make(from: groundOverlay.anchor),
+ bounds: PlatformLatLngBounds.make(from: bounds),
+ anchor: PlatformPoint.make(from: groundOverlay.anchor),
transparency: 1.0 - Double(groundOverlay.opacity),
bearing: groundOverlay.bearing,
- zIndex: Int(groundOverlay.zIndex),
+ zIndex: Int64(groundOverlay.zIndex),
visible: groundOverlay.map != nil,
clickable: groundOverlay.isTappable,
zoomLevel: zoomLevel
)
} else {
- return FGMPlatformGroundOverlay.make(
- withGroundOverlayId: overlayId,
+ return PlatformGroundOverlay(
+ groundOverlayId: overlayId,
image: placeholderImage,
- position: FGMPlatformLatLng.make(from: groundOverlay.position),
+ position: PlatformLatLng.make(from: groundOverlay.position),
bounds: nil,
- anchor: FGMPlatformPoint.make(from: groundOverlay.anchor),
+ anchor: PlatformPoint.make(from: groundOverlay.anchor),
transparency: 1.0 - Double(groundOverlay.opacity),
bearing: groundOverlay.bearing,
- zIndex: Int(groundOverlay.zIndex),
+ zIndex: Int64(groundOverlay.zIndex),
visible: groundOverlay.map != nil,
clickable: groundOverlay.isTappable,
zoomLevel: zoomLevel
@@ -156,14 +150,14 @@
}
}
-extension FGMPlatformHeatmapGradient {
+extension PlatformHeatmapGradient {
/// Converts a GMUGradient to its Pigeon representation.
- static func make(from gradient: GMUGradient) -> FGMPlatformHeatmapGradient {
- let colors = gradient.colors.map { FGMPlatformColor.make(from: $0) }
- return FGMPlatformHeatmapGradient.make(
- with: colors,
- startPoints: gradient.startPoints,
- colorMapSize: Int(gradient.mapSize)
+ static func make(from gradient: GMUGradient) -> PlatformHeatmapGradient {
+ let colors = gradient.colors.map { PlatformColor.make(from: $0) }
+ return PlatformHeatmapGradient(
+ colors: colors,
+ startPoints: gradient.startPoints.map { $0.doubleValue },
+ colorMapSize: Int64(gradient.mapSize)
)
}
@@ -172,18 +166,18 @@
let colors = colors.map { $0.toUIColor() }
return GMUGradient(
colors: colors,
- startPoints: startPoints,
+ startPoints: startPoints.map { $0 as NSNumber },
colorMapSize: UInt(colorMapSize)
)
}
}
-extension FGMPlatformWeightedLatLng {
+extension PlatformWeightedLatLng {
/// Converts a GMUWeightedLatLng to its Pigeon representation.
- static func make(from weightedLatLng: GMUWeightedLatLng) -> FGMPlatformWeightedLatLng {
+ static func make(from weightedLatLng: GMUWeightedLatLng) -> PlatformWeightedLatLng {
let point = GMSMapPoint(x: weightedLatLng.point().x, y: weightedLatLng.point().y)
- return FGMPlatformWeightedLatLng.make(
- withPoint: FGMPlatformLatLng.make(from: GMSUnproject(point)),
+ return PlatformWeightedLatLng(
+ point: PlatformLatLng.make(from: GMSUnproject(point)),
weight: Double(weightedLatLng.intensity)
)
}
@@ -194,36 +188,35 @@
}
}
-extension FGMPlatformCameraUpdate {
+extension PlatformCameraUpdate {
/// Creates a GMSCameraUpdate from its Pigeon equivalent.
func toGMSCameraUpdate() -> GMSCameraUpdate? {
- // See note in messages.dart for why this is so loosely typed.
- switch cameraUpdate {
- case let newCameraPosition as FGMPlatformCameraUpdateNewCameraPosition:
+ switch self {
+ case let newCameraPosition as PlatformCameraUpdateNewCameraPosition:
return GMSCameraUpdate.setCamera(newCameraPosition.cameraPosition.toGMSCameraPosition())
- case let newLatLng as FGMPlatformCameraUpdateNewLatLng:
+ case let newLatLng as PlatformCameraUpdateNewLatLng:
return GMSCameraUpdate.setTarget(newLatLng.latLng.toCLLocationCoordinate2D())
- case let newLatLngBounds as FGMPlatformCameraUpdateNewLatLngBounds:
+ case let newLatLngBounds as PlatformCameraUpdateNewLatLngBounds:
return GMSCameraUpdate.fit(
newLatLngBounds.bounds.toGMSCoordinateBounds(),
withPadding: CGFloat(newLatLngBounds.padding)
)
- case let newLatLngZoom as FGMPlatformCameraUpdateNewLatLngZoom:
+ case let newLatLngZoom as PlatformCameraUpdateNewLatLngZoom:
return GMSCameraUpdate.setTarget(
newLatLngZoom.latLng.toCLLocationCoordinate2D(),
zoom: Float(newLatLngZoom.zoom)
)
- case let scrollBy as FGMPlatformCameraUpdateScrollBy:
+ case let scrollBy as PlatformCameraUpdateScrollBy:
return GMSCameraUpdate.scrollBy(x: scrollBy.dx, y: scrollBy.dy)
- case let zoomBy as FGMPlatformCameraUpdateZoomBy:
+ case let zoomBy as PlatformCameraUpdateZoomBy:
if let focus = zoomBy.focus {
return GMSCameraUpdate.zoom(by: Float(zoomBy.amount), at: focus.toCGPoint())
} else {
return GMSCameraUpdate.zoom(by: Float(zoomBy.amount))
}
- case let zoom as FGMPlatformCameraUpdateZoom:
+ case let zoom as PlatformCameraUpdateZoom:
return zoom.out ? GMSCameraUpdate.zoomOut() : GMSCameraUpdate.zoomIn()
- case let zoomTo as FGMPlatformCameraUpdateZoomTo:
+ case let zoomTo as PlatformCameraUpdateZoomTo:
return GMSCameraUpdate.zoom(to: Float(zoomTo.zoom))
default:
return nil
@@ -231,16 +224,16 @@
}
}
-extension FGMPlatformColor {
+extension PlatformColor {
/// Converts a UIColor to its Pigeon representation.
- static func make(from color: UIColor) -> FGMPlatformColor {
+ static func make(from color: UIColor) -> PlatformColor {
var red: CGFloat = 0
var green: CGFloat = 0
var blue: CGFloat = 0
var alpha: CGFloat = 0
color.getRed(&red, green: &green, blue: &blue, alpha: &alpha)
- return FGMPlatformColor.make(
- withRed: Double(red), green: Double(green), blue: Double(blue), alpha: Double(alpha))
+ return PlatformColor(
+ red: Double(red), green: Double(green), blue: Double(blue), alpha: Double(alpha))
}
/// Returns the equivalent UIColor.
@@ -249,7 +242,7 @@
}
}
-extension FGMPlatformPatternItem {
+extension PlatformPatternItem {
/// The GMSStrokeStyle expression of this pattern, using the given stroke color.
func gmsStrokeStyle(strokeColor: UIColor) -> GMSStrokeStyle {
let color = type == .gap ? UIColor.clear : strokeColor
@@ -258,16 +251,16 @@
/// The span length for this pattern, in the form expected by GMSStyleSpans.
func gmsStyleSpanLength() -> NSNumber {
- return length ?? 0
+ return (length ?? 0) as NSNumber
}
}
-extension FGMPlatformCluster {
+extension PlatformCluster {
/// Converts a GMUCluster to its Pigeon representation.
static func make(
from cluster: GMUCluster,
clusterManagerIdentifier: String
- ) -> FGMPlatformCluster {
+ ) -> PlatformCluster {
var bounds = GMSCoordinateBounds()
for item in cluster.items {
bounds = bounds.includingCoordinate(item.position)
@@ -277,10 +270,10 @@
markerIdentifierFromMarker($0)
}
- return FGMPlatformCluster.make(
- withClusterManagerId: clusterManagerIdentifier,
- position: FGMPlatformLatLng.make(from: cluster.position),
- bounds: FGMPlatformLatLngBounds.make(from: bounds),
+ return PlatformCluster(
+ clusterManagerId: clusterManagerIdentifier,
+ position: PlatformLatLng.make(from: cluster.position),
+ bounds: PlatformLatLngBounds.make(from: bounds),
markerIds: markerIds
)
}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/GoogleMapController.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/GoogleMapController.swift
index 0694926..9bb1c8a 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/GoogleMapController.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/GoogleMapController.swift
@@ -6,17 +6,40 @@
import GoogleMaps
import GoogleMapsUtils
-#if canImport(google_maps_flutter_ios_sdk9_objc)
- import google_maps_flutter_ios_sdk9_objc
-#endif
+/// Protocol for CATransaction to allow mocking in tests.
+protocol MapAnimationCATransactionProtocol {
+ func begin()
+ func commit()
+ func setAnimationDuration(_ duration: CFTimeInterval)
+}
-/// Non-test implementation of FGMAssetProvider, wrapping a Flutter plugin registrar.
-class DefaultAssetProvider: NSObject, FGMAssetProvider {
+/// Add the AnyObject-required protocol to MapsCallbackApi to allow it to be passed to sub-controllers.
+extension MapsCallbackApi: MapEventDelegate {}
+
+/// Add TileProviderDelegate to avoid needing to pass the entire API surface to TileOverlayController.
+extension MapsCallbackApi: TileProviderDelegate {}
+
+/// Non-test implementation of MapAnimationCATransactionProtocol.
+class DefaultMapAnimationCATransaction: MapAnimationCATransactionProtocol {
+ func begin() {
+ CATransaction.begin()
+ }
+
+ func commit() {
+ CATransaction.commit()
+ }
+
+ func setAnimationDuration(_ duration: CFTimeInterval) {
+ CATransaction.setAnimationDuration(duration)
+ }
+}
+
+/// Non-test implementation of AssetProvider, wrapping a Flutter plugin registrar.
+class DefaultAssetProvider: AssetProvider {
weak var registrar: FlutterPluginRegistrar?
init(registrar: FlutterPluginRegistrar) {
self.registrar = registrar
- super.init()
}
func lookupKey(forAsset asset: String) -> String? {
@@ -32,92 +55,15 @@
}
}
-/// Non-test implementation of FGMMapEventDelegate, wrapping a FGMMapsCallbackApi instance.
-class DefaultMapEventHandler: NSObject, FGMMapEventDelegate {
- let callbackHandler: FGMMapsCallbackApi
-
- init(callbackHandler: FGMMapsCallbackApi) {
- self.callbackHandler = callbackHandler
- super.init()
- }
-
- func didStartCameraMove() {
- callbackHandler.didStartCameraMove { _ in }
- }
-
- func didMoveCamera(to cameraPosition: FGMPlatformCameraPosition) {
- callbackHandler.didMoveCamera(to: cameraPosition) { _ in }
- }
-
- func didIdleCamera() {
- callbackHandler.didIdleCamera { _ in }
- }
-
- func didTap(atPosition position: FGMPlatformLatLng) {
- callbackHandler.didTap(atPosition: position) { _ in }
- }
-
- func didLongPress(atPosition position: FGMPlatformLatLng) {
- callbackHandler.didLongPress(atPosition: position) { _ in }
- }
-
- func didTapMarker(withIdentifier markerId: String) {
- callbackHandler.didTapMarker(withIdentifier: markerId) { _ in }
- }
-
- func didStartDragForMarker(
- withIdentifier markerId: String, atPosition position: FGMPlatformLatLng
- ) {
- callbackHandler.didStartDragForMarker(withIdentifier: markerId, atPosition: position) { _ in }
- }
-
- func didDragMarker(withIdentifier markerId: String, atPosition position: FGMPlatformLatLng) {
- callbackHandler.didDragMarker(withIdentifier: markerId, atPosition: position) { _ in }
- }
-
- func didEndDragForMarker(withIdentifier markerId: String, atPosition position: FGMPlatformLatLng)
- {
- callbackHandler.didEndDragForMarker(withIdentifier: markerId, atPosition: position) { _ in }
- }
-
- func didTapInfoWindowOfMarker(withIdentifier markerId: String) {
- callbackHandler.didTapInfoWindowOfMarker(withIdentifier: markerId) { _ in }
- }
-
- func didTapCircle(withIdentifier circleId: String) {
- callbackHandler.didTapCircle(withIdentifier: circleId) { _ in }
- }
-
- func didTap(_ cluster: FGMPlatformCluster) {
- callbackHandler.didTap(cluster) { _ in }
- }
-
- func didTapPolygon(withIdentifier polygonId: String) {
- callbackHandler.didTapPolygon(withIdentifier: polygonId) { _ in }
- }
-
- func didTapPolyline(withIdentifier polylineId: String) {
- callbackHandler.didTapPolyline(withIdentifier: polylineId) { _ in }
- }
-
- func didTapGroundOverlay(withIdentifier groundOverlayId: String) {
- callbackHandler.didTapGroundOverlay(withIdentifier: groundOverlayId) { _ in }
- }
-}
-
public class GoogleMapController: NSObject, GMSMapViewDelegate, FlutterPlatformView {
/// The Google Maps SDK map view managed by this controller.
let mapView: GMSMapView
/// The Pigeon callback API implementation, used to send events to the Dart side.
- let dartCallbackHandler: FGMMapsCallbackApi
- /// The map SDK event handler, which routes events to the Dart callback handler.
- let mapEventHandler: DefaultMapEventHandler
+ let dartCallbackHandler: MapsCallbackApi
/// The main Pigeon API implementation, separate to avoid lifetime extension.
let callHandler: MapCallHandler
/// The inspector API implementation, separate to avoid lifetime extension.
let inspector: MapInspector
- /// A shim to pass tile requests to `dartCallbackHandler`. This is a separate object to avoid init ordering issues.
- private let tileProvider: ConcreteTileProvider
/// Whether to send notifications about camera position changes to Dart.
var trackCameraPosition = false
@@ -140,10 +86,10 @@
/// that the observer is removed before the controller is deallocated.
private var isObservingFrame = false
- public convenience init(
+ convenience init(
frame: CGRect,
viewIdentifier viewId: Int64,
- creationParameters: FGMPlatformMapViewCreationParams,
+ creationParameters: PlatformMapViewCreationParams,
registrar: FlutterPluginRegistrar
) {
let camera = creationParameters.initialCameraPosition.toGMSCameraPosition()
@@ -167,8 +113,8 @@
init(
mapView: GMSMapView,
viewIdentifier viewId: Int64,
- creationParameters: FGMPlatformMapViewCreationParams,
- assetProvider: FGMAssetProvider,
+ creationParameters: PlatformMapViewCreationParams,
+ assetProvider: AssetProvider,
binaryMessenger: FlutterBinaryMessenger
) {
self.mapView = mapView
@@ -183,52 +129,49 @@
styleError = errorString
}
if let trackCameraPosition = creationParameters.mapConfiguration.trackCameraPosition {
- self.trackCameraPosition = trackCameraPosition.boolValue
+ self.trackCameraPosition = trackCameraPosition
}
// End duplicate code.
let pigeonSuffix = String(format: "%lld", viewId)
- dartCallbackHandler = FGMMapsCallbackApi(
+ dartCallbackHandler = MapsCallbackApi(
binaryMessenger: binaryMessenger,
messageChannelSuffix: pigeonSuffix
)
- mapEventHandler = DefaultMapEventHandler(callbackHandler: dartCallbackHandler)
-
let markerType = creationParameters.mapConfiguration.markerType
clusterManagersController = ClusterManagersController(
mapView: mapView,
- eventDelegate: mapEventHandler
+ eventDelegate: dartCallbackHandler
)
markersController = MarkersController(
mapView: mapView,
- eventDelegate: mapEventHandler,
+ eventDelegate: dartCallbackHandler,
clusterManagersController: clusterManagersController,
assetProvider: assetProvider,
markerType: markerType
)
polygonsController = PolygonsController(
mapView: mapView,
- eventDelegate: mapEventHandler
+ eventDelegate: dartCallbackHandler
)
polylinesController = PolylinesController(
mapView: mapView,
- eventDelegate: mapEventHandler
+ eventDelegate: dartCallbackHandler
)
circlesController = CirclesController(
mapView: mapView,
- eventDelegate: mapEventHandler
+ eventDelegate: dartCallbackHandler
)
heatmapsController = HeatmapsController(mapView: mapView)
- tileProvider = ConcreteTileProvider(dartCallbackHandler: dartCallbackHandler)
tileOverlaysController = TileOverlaysController(
mapView: mapView,
- tileProvider: tileProvider
+ tileProvider: dartCallbackHandler
)
groundOverlaysController = GroundOverlaysController(
mapView: mapView,
- eventDelegate: mapEventHandler,
+ eventDelegate: dartCallbackHandler,
assetProvider: assetProvider
)
@@ -253,9 +196,17 @@
super.init()
callHandler.controller = self
- SetUpFGMMapsApiWithSuffix(binaryMessenger, callHandler, pigeonSuffix)
+ MapsApiSetup.setUp(
+ binaryMessenger: binaryMessenger,
+ api: callHandler,
+ messageChannelSuffix: pigeonSuffix
+ )
inspector.controller = self
- SetUpFGMMapsInspectorApiWithSuffix(binaryMessenger, inspector, pigeonSuffix)
+ MapsInspectorApiSetup.setUp(
+ binaryMessenger: binaryMessenger,
+ api: inspector,
+ messageChannelSuffix: pigeonSuffix
+ )
mapView.delegate = self
isObservingFrame = true
@@ -269,8 +220,15 @@
if isObservingFrame {
mapView.removeObserver(self, forKeyPath: "frame")
}
- SetUpFGMMapsApiWithSuffix(callHandler.messenger, nil, callHandler.pigeonSuffix)
- SetUpFGMMapsInspectorApiWithSuffix(inspector.messenger, nil, inspector.pigeonSuffix)
+ MapsApiSetup.setUp(
+ binaryMessenger: callHandler.messenger,
+ api: nil,
+ messageChannelSuffix: callHandler.pigeonSuffix
+ )
+ MapsInspectorApiSetup.setUp(
+ binaryMessenger: inspector.messenger,
+ api: nil,
+ messageChannelSuffix: inspector.pigeonSuffix)
}
public func view() -> UIView {
@@ -355,17 +313,17 @@
// MARK: - GMSMapViewDelegate methods
public func mapView(_ mapView: GMSMapView, willMove gesture: Bool) {
- mapEventHandler.didStartCameraMove()
+ dartCallbackHandler.didStartCameraMove { _ in }
}
public func mapView(_ mapView: GMSMapView, didChange position: GMSCameraPosition) {
if trackCameraPosition {
- mapEventHandler.didMoveCamera(to: FGMPlatformCameraPosition.make(from: position))
+ dartCallbackHandler.didMoveCamera(to: PlatformCameraPosition.make(from: position)) { _ in }
}
}
public func mapView(_ mapView: GMSMapView, idleAt position: GMSCameraPosition) {
- mapEventHandler.didIdleCamera()
+ dartCallbackHandler.didIdleCamera { _ in }
}
public func mapView(_ mapView: GMSMapView, didTap marker: GMSMarker) -> Bool {
@@ -421,14 +379,14 @@
}
public func mapView(_ mapView: GMSMapView, didTapAt coordinate: CLLocationCoordinate2D) {
- mapEventHandler.didTap(atPosition: FGMPlatformLatLng.make(from: coordinate))
+ dartCallbackHandler.didTap(at: PlatformLatLng.make(from: coordinate)) { _ in }
}
public func mapView(_ mapView: GMSMapView, didLongPressAt coordinate: CLLocationCoordinate2D) {
- mapEventHandler.didLongPress(atPosition: FGMPlatformLatLng.make(from: coordinate))
+ dartCallbackHandler.didLongPress(at: PlatformLatLng.make(from: coordinate)) { _ in }
}
- func interpretMapConfiguration(_ config: FGMPlatformMapConfiguration) {
+ func interpretMapConfiguration(_ config: PlatformMapConfiguration) {
// Any changes here must also be made to the `init` method above. See the comment there for
// details.
let (styleUpdateAttempted, errorString) = GoogleMapController.updateMapView(
@@ -437,7 +395,7 @@
styleError = errorString
}
if let trackCameraPosition = config.trackCameraPosition {
- self.trackCameraPosition = trackCameraPosition.boolValue
+ self.trackCameraPosition = trackCameraPosition
}
}
@@ -447,7 +405,7 @@
/// describing any error interpreting the style in `config`. If the boolean is true, the error
/// string should be stored in `styleError` for later access.
static func updateMapView(
- _ mapView: GMSMapView, fromConfiguration config: FGMPlatformMapConfiguration
+ _ mapView: GMSMapView, fromConfiguration config: PlatformMapConfiguration
) -> (Bool, String?) {
if let cameraTargetBounds = config.cameraTargetBounds {
if let bounds = cameraTargetBounds.bounds {
@@ -457,23 +415,23 @@
}
}
if let compassEnabled = config.compassEnabled {
- mapView.settings.compassButton = compassEnabled.boolValue
+ mapView.settings.compassButton = compassEnabled
}
if let indoorEnabled = config.indoorViewEnabled {
- mapView.isIndoorEnabled = indoorEnabled.boolValue
+ mapView.isIndoorEnabled = indoorEnabled
}
if let trafficEnabled = config.trafficEnabled {
- mapView.isTrafficEnabled = trafficEnabled.boolValue
+ mapView.isTrafficEnabled = trafficEnabled
}
if let buildingsEnabled = config.buildingsEnabled {
- mapView.isBuildingsEnabled = buildingsEnabled.boolValue
+ mapView.isBuildingsEnabled = buildingsEnabled
}
if let mapType = config.mapType {
- mapView.mapType = mapType.value.gmsMapViewType
+ mapView.mapType = mapType.gmsMapViewType
}
if let zoomData = config.minMaxZoomPreference {
- let minZoom = zoomData.min?.floatValue ?? kGMSMinZoomLevel
- let maxZoom = zoomData.max?.floatValue ?? kGMSMaxZoomLevel
+ let minZoom = zoomData.min.map { Float($0) } ?? kGMSMinZoomLevel
+ let maxZoom = zoomData.max.map { Float($0) } ?? kGMSMaxZoomLevel
mapView.setMinZoom(minZoom, maxZoom: maxZoom)
}
if let padding = config.padding {
@@ -485,22 +443,22 @@
)
}
if let rotateGesturesEnabled = config.rotateGesturesEnabled {
- mapView.settings.rotateGestures = rotateGesturesEnabled.boolValue
+ mapView.settings.rotateGestures = rotateGesturesEnabled
}
if let scrollGesturesEnabled = config.scrollGesturesEnabled {
- mapView.settings.scrollGestures = scrollGesturesEnabled.boolValue
+ mapView.settings.scrollGestures = scrollGesturesEnabled
}
if let tiltGesturesEnabled = config.tiltGesturesEnabled {
- mapView.settings.tiltGestures = tiltGesturesEnabled.boolValue
+ mapView.settings.tiltGestures = tiltGesturesEnabled
}
if let zoomGesturesEnabled = config.zoomGesturesEnabled {
- mapView.settings.zoomGestures = zoomGesturesEnabled.boolValue
+ mapView.settings.zoomGestures = zoomGesturesEnabled
}
if let myLocationEnabled = config.myLocationEnabled {
- mapView.isMyLocationEnabled = myLocationEnabled.boolValue
+ mapView.isMyLocationEnabled = myLocationEnabled
}
if let myLocationButtonEnabled = config.myLocationButtonEnabled {
- mapView.settings.myLocationButton = myLocationButtonEnabled.boolValue
+ mapView.settings.myLocationButton = myLocationButtonEnabled
}
if let mapStyle = config.style {
let (style, errorString) = GoogleMapController.parseMapStyle(mapStyle)
@@ -513,36 +471,11 @@
}
}
-// TODO(stuartmorgan): Remove this in favor of an extension to add FGMTileProviderDelegate to
-// the Pigeon Flutter API object once this plugin has switched to Swift Pigeon generation
-// (adjusting the protocol to match the Swift version of the signature).
-private class ConcreteTileProvider: NSObject, TileProviderDelegate {
- let handler: FGMMapsCallbackApi
-
- init(dartCallbackHandler: FGMMapsCallbackApi) {
- handler = dartCallbackHandler
- }
-
- public func tile(
- withOverlayIdentifier tileOverlayId: String,
- location: FGMPlatformPoint,
- zoom: Int,
- completion: @escaping (FGMPlatformTile?, FlutterError?) -> Void
- ) {
- handler.tile(
- withOverlayIdentifier: tileOverlayId,
- location: location,
- zoom: zoom,
- completion: completion
- )
- }
-}
-
-class MapCallHandler: NSObject, FGMMapsApi {
+class MapCallHandler: MapsApi {
weak var controller: GoogleMapController?
let messenger: FlutterBinaryMessenger
let pigeonSuffix: String
- var transactionWrapper: FGMCATransactionProtocol
+ var transactionWrapper: MapAnimationCATransactionProtocol
init(
messenger: FlutterBinaryMessenger,
@@ -550,17 +483,17 @@
) {
self.messenger = messenger
self.pigeonSuffix = suffix
- self.transactionWrapper = FGMCATransactionWrapper()
- super.init()
+ self.transactionWrapper = DefaultMapAnimationCATransaction()
}
- func waitForMapWithError(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>) {
+ func waitForMap() {
// No-op; this call just ensures synchronization with the platform thread.
}
func updateCircles(
- byAdding toAdd: [FGMPlatformCircle], changing toChange: [FGMPlatformCircle],
- removing idsToRemove: [String], error: AutoreleasingUnsafeMutablePointer<FlutterError?>
+ adding toAdd: [PlatformCircle],
+ changing toChange: [PlatformCircle],
+ removing idsToRemove: [String]
) {
controller?.circlesController.add(toAdd)
controller?.circlesController.change(toChange)
@@ -568,24 +501,23 @@
}
func updateHeatmaps(
- byAdding toAdd: [FGMPlatformHeatmap], changing toChange: [FGMPlatformHeatmap],
- removing idsToRemove: [String], error: AutoreleasingUnsafeMutablePointer<FlutterError?>
+ adding toAdd: [PlatformHeatmap],
+ changing toChange: [PlatformHeatmap],
+ removing idsToRemove: [String]
) {
controller?.heatmapsController.add(toAdd)
controller?.heatmapsController.change(toChange)
controller?.heatmapsController.removeHeatmaps(withIdentifiers: idsToRemove)
}
- func update(
- with configuration: FGMPlatformMapConfiguration,
- error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) {
+ func updateWithMapConfiguration(_ configuration: PlatformMapConfiguration) {
controller?.interpretMapConfiguration(configuration)
}
func updateMarkers(
- byAdding toAdd: [FGMPlatformMarker], changing toChange: [FGMPlatformMarker],
- removing idsToRemove: [String], error: AutoreleasingUnsafeMutablePointer<FlutterError?>
+ adding toAdd: [PlatformMarker],
+ changing toChange: [PlatformMarker],
+ removing idsToRemove: [String]
) {
controller?.markersController.add(toAdd)
controller?.markersController.change(toChange)
@@ -595,16 +527,17 @@
}
func updateClusterManagers(
- byAdding toAdd: [FGMPlatformClusterManager], removing idsToRemove: [String],
- error: AutoreleasingUnsafeMutablePointer<FlutterError?>
+ adding toAdd: [PlatformClusterManager],
+ removing idsToRemove: [String]
) {
controller?.clusterManagersController.add(toAdd)
controller?.clusterManagersController.removeClusterManagers(withIdentifiers: idsToRemove)
}
func updatePolygons(
- byAdding toAdd: [FGMPlatformPolygon], changing toChange: [FGMPlatformPolygon],
- removing idsToRemove: [String], error: AutoreleasingUnsafeMutablePointer<FlutterError?>
+ adding toAdd: [PlatformPolygon],
+ changing toChange: [PlatformPolygon],
+ removing idsToRemove: [String]
) {
controller?.polygonsController.add(toAdd)
controller?.polygonsController.change(toChange)
@@ -612,8 +545,9 @@
}
func updatePolylines(
- byAdding toAdd: [FGMPlatformPolyline], changing toChange: [FGMPlatformPolyline],
- removing idsToRemove: [String], error: AutoreleasingUnsafeMutablePointer<FlutterError?>
+ adding toAdd: [PlatformPolyline],
+ changing toChange: [PlatformPolyline],
+ removing idsToRemove: [String]
) {
controller?.polylinesController.add(toAdd)
controller?.polylinesController.change(toChange)
@@ -621,8 +555,9 @@
}
func updateTileOverlays(
- byAdding toAdd: [FGMPlatformTileOverlay], changing toChange: [FGMPlatformTileOverlay],
- removing idsToRemove: [String], error: AutoreleasingUnsafeMutablePointer<FlutterError?>
+ adding toAdd: [PlatformTileOverlay],
+ changing toChange: [PlatformTileOverlay],
+ removing idsToRemove: [String]
) {
controller?.tileOverlaysController.add(toAdd)
controller?.tileOverlaysController.change(toChange)
@@ -630,150 +565,128 @@
}
func updateGroundOverlays(
- byAdding toAdd: [FGMPlatformGroundOverlay], changing toChange: [FGMPlatformGroundOverlay],
- removing idsToRemove: [String], error: AutoreleasingUnsafeMutablePointer<FlutterError?>
+ adding toAdd: [PlatformGroundOverlay],
+ changing toChange: [PlatformGroundOverlay],
+ removing idsToRemove: [String]
) {
controller?.groundOverlaysController.add(toAdd)
controller?.groundOverlaysController.change(toChange)
controller?.groundOverlaysController.removeGroundOverlays(withIdentifiers: idsToRemove)
}
- func latLng(
- forScreenCoordinate screenCoordinate: FGMPlatformPoint,
- error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) -> FGMPlatformLatLng? {
+ func latLng(for screenCoordinate: PlatformPoint) throws -> PlatformLatLng {
guard let mapView = controller?.mapView else {
- error.pointee = FlutterError(
+ throw PigeonError(
code: "GoogleMap uninitialized",
message: "getLatLng called prior to map initialization",
details: nil
)
- return nil
}
let point = screenCoordinate.toCGPoint()
let latlng = mapView.projection.coordinate(for: point)
- return FGMPlatformLatLng.make(from: latlng)
+ return PlatformLatLng.make(from: latlng)
}
- func screenCoordinates(
- for latLng: FGMPlatformLatLng, error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) -> FGMPlatformPoint? {
+ func screenCoordinates(for latLng: PlatformLatLng) throws -> PlatformPoint {
guard let mapView = controller?.mapView else {
- error.pointee = FlutterError(
+ throw PigeonError(
code: "GoogleMap uninitialized",
message: "getScreenCoordinate called prior to map initialization",
details: nil
)
- return nil
}
let location = latLng.toCLLocationCoordinate2D()
let point = mapView.projection.point(for: location)
- return FGMPlatformPoint.make(from: point)
+ return PlatformPoint.make(from: point)
}
- func visibleMapRegion(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>)
- -> FGMPlatformLatLngBounds?
- {
+ func visibleMapRegion() throws -> PlatformLatLngBounds {
guard let mapView = controller?.mapView else {
- error.pointee = FlutterError(
+ throw PigeonError(
code: "GoogleMap uninitialized",
message: "getVisibleRegion called prior to map initialization",
details: nil
)
- return nil
}
let visibleRegion = mapView.projection.visibleRegion()
let bounds = GMSCoordinateBounds(region: visibleRegion)
- return FGMPlatformLatLngBounds.make(from: bounds)
+ return PlatformLatLngBounds.make(from: bounds)
}
- func moveCamera(
- with cameraUpdate: FGMPlatformCameraUpdate,
- error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) {
+ func moveCamera(_ cameraUpdate: PlatformCameraUpdate) throws {
guard let update = cameraUpdate.toGMSCameraUpdate() else {
- error.pointee = FlutterError(
+ throw PigeonError(
code: "Invalid update",
message: "Unrecognized camera update",
details: nil
)
- return
}
controller?.mapView.moveCamera(update)
}
func animateCamera(
- with cameraUpdate: FGMPlatformCameraUpdate, duration durationMilliseconds: NSNumber?,
- error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) {
+ _ cameraUpdate: PlatformCameraUpdate,
+ duration durationMilliseconds: Int64?
+ ) throws {
guard let update = cameraUpdate.toGMSCameraUpdate() else {
- error.pointee = FlutterError(
+ throw PigeonError(
code: "Invalid update",
message: "Unrecognized camera update",
details: nil
)
- return
}
let transaction = durationMilliseconds != nil ? transactionWrapper : nil
transaction?.begin()
if let duration = durationMilliseconds {
- transaction?.setAnimationDuration(duration.doubleValue / 1000.0)
+ transaction?.setAnimationDuration(Double(duration) / 1000.0)
}
controller?.mapView.animate(with: update)
transaction?.commit()
}
- func currentZoomLevel(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>) -> NSNumber? {
+ func zoomLevel() throws -> Double {
guard let mapView = controller?.mapView else {
- return nil
+ throw PigeonError(
+ code: "GoogleMap uninitialized",
+ message: "getZoomLevel called prior to map initialization",
+ details: nil
+ )
}
- return NSNumber(value: mapView.camera.zoom)
+ return Double(mapView.camera.zoom)
}
- func showInfoWindowForMarker(
- withIdentifier markerId: String, error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) {
- controller?.markersController.showMarkerInfoWindow(withIdentifier: markerId, error: error)
+ func showInfoWindowForMarker(withIdentifier markerId: String) throws {
+ try controller?.markersController.showMarkerInfoWindow(withIdentifier: markerId)
}
- func hideInfoWindowForMarker(
- withIdentifier markerId: String, error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) {
- controller?.markersController.hideMarkerInfoWindow(withIdentifier: markerId, error: error)
+ func hideInfoWindowForMarker(withIdentifier markerId: String) throws {
+ try controller?.markersController.hideMarkerInfoWindow(withIdentifier: markerId)
}
- func isShowingInfoWindowForMarker(
- withIdentifier markerId: String, error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) -> NSNumber? {
- return controller?.markersController.isInfoWindowShownForMarker(
- withIdentifier: markerId, error: error)
+ func isShowingInfoWindowForMarker(withIdentifier markerId: String) throws -> Bool {
+ return try controller?.markersController.isInfoWindowShownForMarker(withIdentifier: markerId)
+ ?? false
}
- func setStyle(_ style: String, error: AutoreleasingUnsafeMutablePointer<FlutterError?>) -> String?
- {
+ func setStyle(_ style: String) -> String? {
return controller?.setMapStyle(style)
}
- func lastStyleError(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>) -> String? {
+ func lastStyleError() -> String? {
return controller?.styleError
}
- func clearTileCacheForOverlay(
- withIdentifier tileOverlayId: String, error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) {
+ func clearTileCacheForOverlay(withIdentifier tileOverlayId: String) {
controller?.tileOverlaysController.clearTileCache(withIdentifier: tileOverlayId)
}
- func takeSnapshotWithError(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>)
- -> FlutterStandardTypedData?
- {
+ func takeSnapshot() throws -> FlutterStandardTypedData? {
guard let mapView = controller?.mapView else {
- error.pointee = FlutterError(
+ throw PigeonError(
code: "GoogleMap uninitialized",
message: "takeSnapshot called prior to map initialization",
details: nil
)
- return nil
}
let renderer = UIGraphicsImageRenderer(size: mapView.bounds.size)
let image = renderer.image { context in
@@ -785,17 +698,12 @@
return nil
}
- func isAdvancedMarkersAvailable(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>)
- -> NSNumber?
- {
- guard let mapView = controller?.mapView else {
- return false
- }
- return NSNumber(value: mapView.mapCapabilities.contains(.advancedMarkers))
+ func isAdvancedMarkersAvailable() -> Bool {
+ return controller?.mapView.mapCapabilities.contains(.advancedMarkers) ?? false
}
}
-class MapInspector: NSObject, FGMMapsInspectorApi {
+class MapInspector: MapsInspectorApi {
weak var controller: GoogleMapController?
let messenger: FlutterBinaryMessenger
let pigeonSuffix: String
@@ -806,134 +714,87 @@
) {
self.messenger = messenger
self.pigeonSuffix = suffix
- super.init()
}
- func areBuildingsEnabledWithError(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>)
- -> NSNumber?
- {
- guard let mapView = controller?.mapView else {
- return nil
- }
- return NSNumber(value: mapView.isBuildingsEnabled)
+ func areBuildingsEnabled() -> Bool {
+ return controller?.mapView.isBuildingsEnabled ?? false
}
- func areRotateGesturesEnabledWithError(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>)
- -> NSNumber?
- {
- guard let mapView = controller?.mapView else {
- return nil
- }
- return NSNumber(value: mapView.settings.rotateGestures)
+ func areRotateGesturesEnabled() -> Bool {
+ return controller?.mapView.settings.rotateGestures ?? false
}
- func areScrollGesturesEnabledWithError(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>)
- -> NSNumber?
- {
- guard let mapView = controller?.mapView else {
- return nil
- }
- return NSNumber(value: mapView.settings.scrollGestures)
+ func areScrollGesturesEnabled() -> Bool {
+ return controller?.mapView.settings.scrollGestures ?? false
}
- func areTiltGesturesEnabledWithError(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>)
- -> NSNumber?
- {
- guard let mapView = controller?.mapView else {
- return nil
- }
- return NSNumber(value: mapView.settings.tiltGestures)
+ func areTiltGesturesEnabled() -> Bool {
+ return controller?.mapView.settings.tiltGestures ?? false
}
- func areZoomGesturesEnabledWithError(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>)
- -> NSNumber?
- {
- guard let mapView = controller?.mapView else {
- return nil
- }
- return NSNumber(value: mapView.settings.zoomGestures)
+ func areZoomGesturesEnabled() -> Bool {
+ return controller?.mapView.settings.zoomGestures ?? false
}
- func tileOverlay(
- withIdentifier tileOverlayId: String, error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) -> FGMPlatformTileLayer? {
+ func isCompassEnabled() -> Bool {
+ return controller?.mapView.settings.compassButton ?? false
+ }
+
+ func isMyLocationButtonEnabled() -> Bool {
+ return controller?.mapView.settings.myLocationButton ?? false
+ }
+
+ func isTrafficEnabled() -> Bool {
+ return controller?.mapView.isTrafficEnabled ?? false
+ }
+
+ func tileOverlay(withIdentifier tileOverlayId: String) -> PlatformTileLayer? {
guard let controller = controller,
let layer = controller.tileOverlaysController.tileOverlay(withIdentifier: tileOverlayId)?
.layer
else {
return nil
}
- return FGMPlatformTileLayer.make(
- withVisible: layer.map != nil,
+ return PlatformTileLayer(
+ visible: layer.map != nil,
fadeIn: layer.fadeIn,
opacity: Double(layer.opacity),
- zIndex: Int(layer.zIndex)
+ zIndex: Int64(layer.zIndex)
)
}
- func heatmap(
- withIdentifier heatmapId: String, error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) -> FGMPlatformHeatmap? {
+ func heatmap(withIdentifier heatmapId: String) -> PlatformHeatmap? {
return controller?.heatmapsController.heatmap(withIdentifier: heatmapId)
}
- func clusters(
- withIdentifier clusterManagerId: String, error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) -> [FGMPlatformCluster]? {
- return controller?.clusterManagersController.clusters(
- withIdentifier: clusterManagerId, error: error)
+ func clusters(withIdentifier clusterManagerId: String) throws -> [PlatformCluster] {
+ return try controller?.clusterManagersController.clusters(withIdentifier: clusterManagerId)
+ ?? []
}
- func isCompassEnabledWithError(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>)
- -> NSNumber?
- {
+ func zoomRange() throws -> PlatformZoomRange {
guard let mapView = controller?.mapView else {
- return nil
+ throw PigeonError(
+ code: "GoogleMap uninitialized",
+ message: "zoomRange called prior to map initialization",
+ details: nil
+ )
}
- return NSNumber(value: mapView.settings.compassButton)
+ return PlatformZoomRange(min: Double(mapView.minZoom), max: Double(mapView.maxZoom))
}
- func isMyLocationButtonEnabledWithError(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>)
- -> NSNumber?
- {
- guard let mapView = controller?.mapView else {
- return nil
- }
- return NSNumber(value: mapView.settings.myLocationButton)
- }
-
- func isTrafficEnabledWithError(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>)
- -> NSNumber?
- {
- guard let mapView = controller?.mapView else {
- return nil
- }
- return NSNumber(value: mapView.isTrafficEnabled)
- }
-
- func zoomRange(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>) -> FGMPlatformZoomRange?
- {
- guard let mapView = controller?.mapView else {
- return nil
- }
- return FGMPlatformZoomRange.make(
- withMin: NSNumber(value: mapView.minZoom),
- max: NSNumber(value: mapView.maxZoom)
- )
- }
-
- func groundOverlay(
- withIdentifier groundOverlayId: String, error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) -> FGMPlatformGroundOverlay? {
+ func groundOverlay(withIdentifier groundOverlayId: String) -> PlatformGroundOverlay? {
return controller?.groundOverlaysController.groundOverlay(withIdentifier: groundOverlayId)
}
- func cameraPosition(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>)
- -> FGMPlatformCameraPosition?
- {
+ func cameraPosition() throws -> PlatformCameraPosition {
guard let mapView = controller?.mapView else {
- return nil
+ throw PigeonError(
+ code: "GoogleMap uninitialized",
+ message: "cameraPosition called prior to map initialization",
+ details: nil
+ )
}
- return FGMPlatformCameraPosition.make(from: mapView.camera)
+ return PlatformCameraPosition.make(from: mapView.camera)
}
}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/GoogleMapFactory.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/GoogleMapFactory.swift
index bbd27c2..5e263d2 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/GoogleMapFactory.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/GoogleMapFactory.swift
@@ -5,10 +5,6 @@
import Flutter
import GoogleMaps
-#if canImport(google_maps_flutter_ios_sdk9_objc)
- import google_maps_flutter_ios_sdk9_objc
-#endif
-
class GoogleMapFactory: NSObject, FlutterPlatformViewFactory {
weak var registrar: FlutterPluginRegistrar?
static var sharedMapServices = GMSServices.sharedServices()
@@ -25,10 +21,10 @@
return GoogleMapController(
frame: frame, viewIdentifier: viewId,
- creationParameters: args as! FGMPlatformMapViewCreationParams, registrar: registrar!)
+ creationParameters: args as! PlatformMapViewCreationParams, registrar: registrar!)
}
func createArgsCodec() -> any FlutterMessageCodec & NSObjectProtocol {
- return FGMGetGoogleMapsFlutterPigeonMessagesCodec()
+ return MessagesPigeonCodec.shared
}
}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/GroundOverlayController.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/GroundOverlayController.swift
index 32a7c16..58fc283 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/GroundOverlayController.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/GroundOverlayController.swift
@@ -3,18 +3,15 @@
// found in the LICENSE file.
import GoogleMaps
+import GoogleMapsUtils
import UIKit
-#if canImport(google_maps_flutter_ios_sdk9_objc)
- import google_maps_flutter_ios_sdk9_objc
-#endif
-
/// Controller of a single ground overlay on the map.
-class GroundOverlayController: NSObject {
+class GroundOverlayController {
let groundOverlay: GMSGroundOverlay
private weak var mapView: GMSMapView?
let createdWithBounds: Bool
- var zoomLevel: NSNumber?
+ var zoomLevel: Double?
init(
groundOverlay: GMSGroundOverlay, identifier: String, mapView: GMSMapView,
@@ -24,18 +21,18 @@
self.mapView = mapView
self.groundOverlay.userData = [identifier]
self.createdWithBounds = isCreatedWithBounds
- super.init()
}
func removeGroundOverlay() {
groundOverlay.map = nil
}
- /// Updates the controller's ground overlay with the properties from a FGMPlatformGroundOverlay.
+ /// Updates the controller's ground overlay with the properties from a PlatformGroundOverlay.
///
/// Setting the ground overlay to visible will set its map to the controller's mapView.
func update(
- from platformGroundOverlay: FGMPlatformGroundOverlay, assetProvider: FGMAssetProvider,
+ from platformGroundOverlay: PlatformGroundOverlay,
+ assetProvider: AssetProvider,
screenScale: CGFloat
) {
if let mapView = mapView {
@@ -50,14 +47,14 @@
}
}
- /// Updates the given GMSGroundOverlay with the properties from a FGMPlatformGroundOverlay.
+ /// Updates the given GMSGroundOverlay with the properties from a PlatformGroundOverlay.
///
/// Setting the ground overlay to visible will set its map to the given mapView.
static func update(
_ groundOverlay: GMSGroundOverlay,
- from platformGroundOverlay: FGMPlatformGroundOverlay,
+ from platformGroundOverlay: PlatformGroundOverlay,
mapView: GMSMapView,
- assetProvider: FGMAssetProvider,
+ assetProvider: AssetProvider,
screenScale: CGFloat,
usingBounds useBounds: Bool
) {
@@ -100,20 +97,19 @@
}
/// Controller of multiple ground overlays on the map.
-class GroundOverlaysController: NSObject {
+class GroundOverlaysController {
private var groundOverlayControllerByIdentifier: [String: GroundOverlayController] = [:]
- private weak var eventDelegate: FGMMapEventDelegate?
- private let assetProvider: FGMAssetProvider
+ private weak var eventDelegate: MapEventDelegate?
+ private let assetProvider: AssetProvider
private weak var mapView: GMSMapView?
- init(mapView: GMSMapView, eventDelegate: FGMMapEventDelegate, assetProvider: FGMAssetProvider) {
+ init(mapView: GMSMapView, eventDelegate: MapEventDelegate, assetProvider: AssetProvider) {
self.mapView = mapView
self.eventDelegate = eventDelegate
self.assetProvider = assetProvider
- super.init()
}
- func add(_ groundOverlaysToAdd: [FGMPlatformGroundOverlay]) {
+ func add(_ groundOverlaysToAdd: [PlatformGroundOverlay]) {
guard let mapView = mapView else { return }
let screenScale = getScreenScale()
for groundOverlay in groundOverlaysToAdd {
@@ -135,7 +131,7 @@
),
// The actual icon will be set in the update() call below.
icon: nil,
- zoomLevel: CGFloat(zoomLevel.doubleValue)
+ zoomLevel: CGFloat(zoomLevel)
)
} else {
isCreatedWithBounds = true
@@ -178,7 +174,7 @@
}
}
- func change(_ groundOverlaysToChange: [FGMPlatformGroundOverlay]) {
+ func change(_ groundOverlaysToChange: [PlatformGroundOverlay]) {
let screenScale = getScreenScale()
for groundOverlay in groundOverlaysToChange {
let identifier = groundOverlay.groundOverlayId
@@ -201,7 +197,7 @@
func didTapGroundOverlay(withIdentifier identifier: String) {
if hasGroundOverlays(withIdentifier: identifier) {
- eventDelegate?.didTapGroundOverlay(withIdentifier: identifier)
+ eventDelegate?.didTapGroundOverlay(withIdentifier: identifier) { _ in }
}
}
@@ -219,11 +215,11 @@
return mapView?.traitCollection.displayScale ?? 1.0
}
- func groundOverlay(withIdentifier identifier: String) -> FGMPlatformGroundOverlay? {
+ func groundOverlay(withIdentifier identifier: String) -> PlatformGroundOverlay? {
guard let controller = groundOverlayControllerByIdentifier[identifier] else {
return nil
}
- return FGMPlatformGroundOverlay.make(
+ return PlatformGroundOverlay.make(
from: controller.groundOverlay,
overlayId: identifier,
isCreatedWithBounds: controller.createdWithBounds,
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/HeatmapController.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/HeatmapController.swift
index 1015884..78be4c5 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/HeatmapController.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/HeatmapController.swift
@@ -3,20 +3,16 @@
// found in the LICENSE file.
import GoogleMaps
-
-#if canImport(google_maps_flutter_ios_sdk9_objc)
- import google_maps_flutter_ios_sdk9_objc
-#endif
+import GoogleMapsUtils
/// Controller of a single Heatmap on the map.
-class HeatmapController: NSObject {
+class HeatmapController {
let heatmapTileLayer: GMUHeatmapTileLayer
private weak var mapView: GMSMapView?
- init(heatmap: FGMPlatformHeatmap, tileLayer: GMUHeatmapTileLayer, mapView: GMSMapView) {
+ init(heatmap: PlatformHeatmap, tileLayer: GMUHeatmapTileLayer, mapView: GMSMapView) {
self.heatmapTileLayer = tileLayer
self.mapView = mapView
- super.init()
HeatmapController.update(tileLayer, from: heatmap, mapView: mapView)
}
@@ -28,7 +24,7 @@
heatmapTileLayer.clearTileCache()
}
- func update(from platformHeatmap: FGMPlatformHeatmap) {
+ func update(from platformHeatmap: PlatformHeatmap) {
if let mapView = mapView {
HeatmapController.update(heatmapTileLayer, from: platformHeatmap, mapView: mapView)
}
@@ -39,10 +35,10 @@
/// Setting the heatmap to visible will set its map to the given mapView.
static func update(
_ heatmapTileLayer: GMUHeatmapTileLayer,
- from platformHeatmap: FGMPlatformHeatmap,
+ from platformHeatmap: PlatformHeatmap,
mapView: GMSMapView
) {
- heatmapTileLayer.weightedData = platformHeatmap.data.map({ $0.toGMUWeightedLatLng() })
+ heatmapTileLayer.weightedData = platformHeatmap.data.map { $0.toGMUWeightedLatLng() }
if let gradient = platformHeatmap.gradient {
heatmapTileLayer.gradient = gradient.toGMUGradient()
}
@@ -58,16 +54,15 @@
}
/// Controller of multiple Heatmaps on the map.
-class HeatmapsController: NSObject {
+class HeatmapsController {
private var heatmapIdToController: [String: HeatmapController] = [:]
private weak var mapView: GMSMapView?
init(mapView: GMSMapView) {
self.mapView = mapView
- super.init()
}
- func add(_ heatmapsToAdd: [FGMPlatformHeatmap]) {
+ func add(_ heatmapsToAdd: [PlatformHeatmap]) {
guard let mapView = mapView else { return }
for heatmap in heatmapsToAdd {
let heatmapTileLayer = GMUHeatmapTileLayer()
@@ -80,7 +75,7 @@
}
}
- func change(_ heatmapsToChange: [FGMPlatformHeatmap]) {
+ func change(_ heatmapsToChange: [PlatformHeatmap]) {
for heatmap in heatmapsToChange {
if let controller = heatmapIdToController[heatmap.heatmapId] {
controller.update(from: heatmap)
@@ -102,17 +97,17 @@
return heatmapIdToController[identifier] != nil
}
- func heatmap(withIdentifier identifier: String) -> FGMPlatformHeatmap? {
+ func heatmap(withIdentifier identifier: String) -> PlatformHeatmap? {
guard let controller = heatmapIdToController[identifier] else { return nil }
let heatmap = controller.heatmapTileLayer
- return FGMPlatformHeatmap.make(
- withHeatmapId: identifier,
- data: heatmap.weightedData.map { FGMPlatformWeightedLatLng.make(from: $0) },
- gradient: FGMPlatformHeatmapGradient.make(from: heatmap.gradient),
+ return PlatformHeatmap(
+ heatmapId: identifier,
+ data: heatmap.weightedData.map { PlatformWeightedLatLng.make(from: $0) },
+ gradient: PlatformHeatmapGradient.make(from: heatmap.gradient),
opacity: Double(heatmap.opacity),
- radius: Int(heatmap.radius),
- minimumZoomIntensity: Int(heatmap.minimumZoomIntensity),
- maximumZoomIntensity: Int(heatmap.maximumZoomIntensity)
+ radius: Int64(heatmap.radius),
+ minimumZoomIntensity: Int64(heatmap.minimumZoomIntensity),
+ maximumZoomIntensity: Int64(heatmap.maximumZoomIntensity)
)
}
}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/ImageUtils.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/ImageUtils.swift
index 25ad7c1..de6a479 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/ImageUtils.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/ImageUtils.swift
@@ -6,32 +6,25 @@
import GoogleMaps
import UIKit
-#if canImport(google_maps_flutter_ios_sdk9_objc)
- import google_maps_flutter_ios_sdk9_objc
-#endif
-
-extension FGMPlatformBitmap {
+extension PlatformBitmap {
/// Creates a UIImage from the Pigeon bitmap representation, suitable for use as a marker icon.
func createIcon(
- assetProvider: FGMAssetProvider,
+ assetProvider: AssetProvider,
screenScale: CGFloat
) -> UIImage? {
assert(screenScale > 0, "Screen scale must be greater than 0")
var image: UIImage?
- // See comment in messages.dart for why this is so loosely typed. See also
- // https://github.com/flutter/flutter/issues/117819.
- switch bitmap {
- case let bitmap as FGMPlatformBitmapDefaultMarker:
- let hue = bitmap.hue?.doubleValue ?? 0
+ switch self {
+ case let bitmap as PlatformBitmapDefaultMarker:
image = GMSMarker.markerImage(
with: UIColor(
- hue: CGFloat(hue) / 360.0,
+ hue: CGFloat(bitmap.hue ?? 0) / 360.0,
saturation: 1.0,
brightness: 0.7,
alpha: 1.0))
- case let bitmap as FGMPlatformBitmapAsset:
+ case let bitmap as PlatformBitmapAsset:
// Deprecated: This message handling for 'fromAsset' has been replaced by 'asset'.
// Refer to the flutter google_maps_flutter_platform_interface package for details.
if let pkg = bitmap.pkg {
@@ -43,7 +36,7 @@
image = assetProvider.imageNamed(key)
}
}
- case let bitmap as FGMPlatformBitmapAssetImage:
+ case let bitmap as PlatformBitmapAssetImage:
// Deprecated: This message handling for 'fromAssetImage' has been replaced by 'asset'.
// Refer to the flutter google_maps_flutter_platform_interface package for details.
if let key = assetProvider.lookupKey(forAsset: bitmap.name) {
@@ -51,11 +44,11 @@
image = scaledImage(assetImage, scale: bitmap.scale)
}
}
- case let bitmap as FGMPlatformBitmapBytes:
+ case let bitmap as PlatformBitmapBytes:
// Deprecated: This message handling for 'fromBytes' has been replaced by 'bytes'.
// Refer to the flutter google_maps_flutter_platform_interface package for details.
image = UIImage(data: bitmap.byteData.data, scale: screenScale)
- case let bitmap as FGMPlatformBitmapAssetMap:
+ case let bitmap as PlatformBitmapAssetMap:
if let key = assetProvider.lookupKey(forAsset: bitmap.assetName) {
image = assetProvider.imageNamed(key)
}
@@ -69,7 +62,7 @@
image = scaledImage(currentImage, scale: CGFloat(bitmap.imagePixelRatio))
}
}
- case let bitmap as FGMPlatformBitmapBytesMap:
+ case let bitmap as PlatformBitmapBytesMap:
let bytes = bitmap.byteData
image = UIImage(data: bytes.data, scale: screenScale)
if let currentImage = image {
@@ -88,7 +81,7 @@
image = UIImage(data: bytes.data)
}
}
- case let bitmap as FGMPlatformBitmapPinConfig:
+ case let bitmap as PlatformBitmapPinConfig:
let options = GMSPinImageOptions()
if let backgroundColor = bitmap.backgroundColor {
options.backgroundColor = backgroundColor.toUIColor()
@@ -209,16 +202,16 @@
/// widht and height are not given.
private func scaledImage(
_ image: UIImage,
- width: NSNumber?,
- height: NSNumber?,
+ width: Double?,
+ height: Double?,
screenScale: CGFloat
) -> UIImage {
if width == nil && height == nil {
return image
}
- let targetWidth = width == nil ? image.size.width : CGFloat(width!.doubleValue)
- let targetHeight = height == nil ? image.size.height : CGFloat(height!.doubleValue)
+ let targetWidth = width ?? image.size.width
+ let targetHeight = height ?? image.size.height
var calculatedWidth = targetWidth
var calculatedHeight = targetHeight
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/MapEventDelegate.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/MapEventDelegate.swift
new file mode 100644
index 0000000..7f0b53c
--- /dev/null
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/MapEventDelegate.swift
@@ -0,0 +1,12 @@
+// Copyright 2013 The Flutter Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#if canImport(google_maps_flutter_ios_sdk9_objc)
+ import google_maps_flutter_ios_sdk9_objc
+#endif
+
+/// Delegate for map callbacks that need Dart handling.
+///
+/// This exists to add AnyObject to the requirements, so that references to it can be weak.
+protocol MapEventDelegate: AnyObject, MapsCallbackApiProtocol {}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/MarkerController.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/MarkerController.swift
index c9c5a6f..8ca280b 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/MarkerController.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/MarkerController.swift
@@ -6,12 +6,8 @@
import GoogleMaps
import UIKit
-#if canImport(google_maps_flutter_ios_sdk9_objc)
- import google_maps_flutter_ios_sdk9_objc
-#endif
-
/// Defines marker controllable by Flutter.
-class MarkerController: NSObject {
+class MarkerController {
let marker: GMSMarker
private weak var mapView: GMSMapView?
private(set) var consumeTapEvents: Bool = false
@@ -22,7 +18,6 @@
self.marker = marker
self.markerIdentifier = markerIdentifier
self.mapView = mapView
- super.init()
}
func showInfoWindow() {
@@ -43,12 +38,12 @@
marker.map = nil
}
- /// Updates the controller's marker with the properties from a FGMPlatformMarker.
+ /// Updates the controller's marker with the properties from a PlatformMarker.
///
/// Setting the marker to visible will set its map to the controller's mapView.
func update(
- from platformMarker: FGMPlatformMarker,
- assetProvider: FGMAssetProvider,
+ from platformMarker: PlatformMarker,
+ assetProvider: AssetProvider,
screenScale: CGFloat
) {
clusterManagerIdentifier = platformMarker.clusterManagerId
@@ -71,14 +66,14 @@
)
}
- /// Updates the given GMSMarker with the properties from a FGMPlatformMarker.
+ /// Updates the given GMSMarker with the properties from a PlatformMarker.
///
/// Setting the marker to visible will set its map to the given mapView.
static func update(
_ marker: GMSMarker,
- from platformMarker: FGMPlatformMarker,
+ from platformMarker: PlatformMarker,
mapView: GMSMapView?,
- assetProvider: FGMAssetProvider,
+ assetProvider: AssetProvider,
screenScale: CGFloat,
usingOpacityForVisibility useOpacityForVisibility: Bool
) {
@@ -102,7 +97,7 @@
if let advancedMarker = marker as? GMSAdvancedMarker,
let collisionBehaviorValue = platformMarker.collisionBehavior
{
- advancedMarker.collisionBehavior = collisionBehaviorValue.value.gmsCollisionBehavior
+ advancedMarker.collisionBehavior = collisionBehaviorValue.gmsCollisionBehavior
}
// This must be done last, to avoid visual flickers of default property values.
@@ -116,36 +111,35 @@
}
/// Controller of multiple markers on the map.
-class MarkersController: NSObject {
+class MarkersController {
private(set) var markerIdentifierToController: [String: MarkerController] = [:]
- private weak var eventDelegate: FGMMapEventDelegate?
+ private weak var eventDelegate: MapEventDelegate?
private weak var clusterManagersController: ClusterManagersController?
- private let assetProvider: FGMAssetProvider
+ private let assetProvider: AssetProvider
private weak var mapView: GMSMapView?
- private let markerType: FGMPlatformMarkerType
+ private let markerType: PlatformMarkerType
init(
mapView: GMSMapView,
- eventDelegate: FGMMapEventDelegate,
+ eventDelegate: MapEventDelegate,
clusterManagersController: ClusterManagersController?,
- assetProvider: FGMAssetProvider,
- markerType: FGMPlatformMarkerType
+ assetProvider: AssetProvider,
+ markerType: PlatformMarkerType
) {
self.mapView = mapView
self.eventDelegate = eventDelegate
self.clusterManagersController = clusterManagersController
self.assetProvider = assetProvider
self.markerType = markerType
- super.init()
}
- func add(_ markersToAdd: [FGMPlatformMarker]) {
+ func add(_ markersToAdd: [PlatformMarker]) {
for marker in markersToAdd {
addMarker(marker)
}
}
- private func addMarker(_ markerToAdd: FGMPlatformMarker) {
+ private func addMarker(_ markerToAdd: PlatformMarker) {
guard let mapView = mapView else { return }
let position = markerToAdd.position.toCLLocationCoordinate2D()
let markerIdentifier = markerToAdd.markerId
@@ -175,13 +169,13 @@
markerIdentifierToController[markerIdentifier] = controller
}
- func change(_ markersToChange: [FGMPlatformMarker]) {
+ func change(_ markersToChange: [PlatformMarker]) {
for marker in markersToChange {
changeMarker(marker)
}
}
- private func changeMarker(_ markerToChange: FGMPlatformMarker) {
+ private func changeMarker(_ markerToChange: PlatformMarker) {
let markerIdentifier = markerToChange.markerId
guard let controller = markerIdentifierToController[markerIdentifier] else { return }
@@ -223,7 +217,7 @@
func didTapMarker(withIdentifier identifier: String) -> Bool {
guard let controller = markerIdentifierToController[identifier] else { return false }
- eventDelegate?.didTapMarker(withIdentifier: identifier)
+ eventDelegate?.didTapMarker(withIdentifier: identifier) { _ in }
return controller.consumeTapEvents
}
@@ -231,76 +225,63 @@
guard markerIdentifierToController[identifier] != nil else { return }
eventDelegate?.didStartDragForMarker(
withIdentifier: identifier,
- atPosition: FGMPlatformLatLng.make(from: location)
- )
+ at: PlatformLatLng.make(from: location)
+ ) { _ in }
}
func didDragMarker(withIdentifier identifier: String, location: CLLocationCoordinate2D) {
guard markerIdentifierToController[identifier] != nil else { return }
eventDelegate?.didDragMarker(
withIdentifier: identifier,
- atPosition: FGMPlatformLatLng.make(from: location)
- )
+ at: PlatformLatLng.make(from: location)
+ ) { _ in }
}
func didEndDraggingMarker(withIdentifier identifier: String, location: CLLocationCoordinate2D) {
guard markerIdentifierToController[identifier] != nil else { return }
eventDelegate?.didEndDragForMarker(
withIdentifier: identifier,
- atPosition: FGMPlatformLatLng.make(from: location)
- )
+ at: PlatformLatLng.make(from: location)
+ ) { _ in }
}
func didTapInfoWindowOfMarker(withIdentifier identifier: String) {
if markerIdentifierToController[identifier] != nil {
- eventDelegate?.didTapInfoWindowOfMarker(withIdentifier: identifier)
+ eventDelegate?.didTapInfoWindowOfMarker(withIdentifier: identifier) { _ in }
}
}
- func showMarkerInfoWindow(
- withIdentifier identifier: String,
- error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) {
- if let controller = markerIdentifierToController[identifier] {
- controller.showInfoWindow()
- } else {
- error.pointee = FlutterError(
+ func showMarkerInfoWindow(withIdentifier identifier: String) throws {
+ guard let controller = markerIdentifierToController[identifier] else {
+ throw PigeonError(
code: "Invalid markerId",
message: "showInfoWindow called with invalid markerId",
details: nil
)
}
+ controller.showInfoWindow()
}
- func hideMarkerInfoWindow(
- withIdentifier identifier: String,
- error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) {
- if let controller = markerIdentifierToController[identifier] {
- controller.hideInfoWindow()
- } else {
- error.pointee = FlutterError(
+ func hideMarkerInfoWindow(withIdentifier identifier: String) throws {
+ guard let controller = markerIdentifierToController[identifier] else {
+ throw PigeonError(
code: "Invalid markerId",
message: "hideInfoWindow called with invalid markerId",
details: nil
)
}
+ controller.hideInfoWindow()
}
- func isInfoWindowShownForMarker(
- withIdentifier identifier: String,
- error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) -> NSNumber? {
- if let controller = markerIdentifierToController[identifier] {
- return NSNumber(value: controller.isInfoWindowShown())
- } else {
- error.pointee = FlutterError(
+ func isInfoWindowShownForMarker(withIdentifier identifier: String) throws -> Bool {
+ guard let controller = markerIdentifierToController[identifier] else {
+ throw PigeonError(
code: "Invalid markerId",
message: "isInfoWindowShown called with invalid markerId",
details: nil
)
- return nil
}
+ return controller.isInfoWindowShown()
}
func getScreenScale() -> CGFloat {
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/Messages.g.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/Messages.g.swift
new file mode 100644
index 0000000..76dd15c
--- /dev/null
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/Messages.g.swift
@@ -0,0 +1,4174 @@
+// Copyright 2013 The Flutter Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+// Autogenerated from Pigeon (v27.3.2), do not edit directly.
+// See also: https://pub.dev/packages/pigeon
+
+import Foundation
+
+#if os(iOS)
+ import Flutter
+#elseif os(macOS)
+ import FlutterMacOS
+#else
+ #error("Unsupported platform.")
+#endif
+
+/// Error class for passing custom error details to Dart side.
+final class PigeonError: Error {
+ let code: String
+ let message: String?
+ let details: Sendable?
+
+ init(code: String, message: String?, details: Sendable?) {
+ self.code = code
+ self.message = message
+ self.details = details
+ }
+
+ var localizedDescription: String {
+ return
+ "PigeonError(code: \(code), message: \(message ?? "<nil>"), details: \(details ?? "<nil>")"
+ }
+}
+
+private func wrapResult(_ result: Any?) -> [Any?] {
+ return [result]
+}
+
+private func wrapError(_ error: Any) -> [Any?] {
+ if let pigeonError = error as? PigeonError {
+ return [
+ pigeonError.code,
+ pigeonError.message,
+ pigeonError.details,
+ ]
+ }
+ if let flutterError = error as? FlutterError {
+ return [
+ flutterError.code,
+ flutterError.message,
+ flutterError.details,
+ ]
+ }
+ return [
+ "\(error)",
+ "\(Swift.type(of: error))",
+ "Stacktrace: \(Thread.callStackSymbols)",
+ ]
+}
+
+private func createConnectionError(withChannelName channelName: String) -> PigeonError {
+ return PigeonError(
+ code: "channel-error", message: "Unable to establish connection on channel: '\(channelName)'.",
+ details: "")
+}
+
+enum MessagesPigeonInternal {
+ static func isNullish(_ value: Any?) -> Bool {
+ guard let innerValue = value else {
+ return true
+ }
+
+ if case Optional<Any>.some(Optional<Any>.none) = value {
+ return true
+ }
+
+ return innerValue is NSNull
+ }
+ static func doubleEquals(_ lhs: Double, _ rhs: Double) -> Bool {
+ return (lhs.isNaN && rhs.isNaN) || lhs == rhs
+ }
+
+ static func doubleHash(_ value: Double, _ hasher: inout Hasher) {
+ if value.isNaN {
+ hasher.combine(0x7FF8_0000_0000_0000)
+ } else {
+ // Normalize -0.0 to 0.0
+ hasher.combine(value == 0 ? 0 : value)
+ }
+ }
+
+ static func deepEquals(_ lhs: Any?, _ rhs: Any?) -> Bool {
+ let cleanLhs = nilOrValue(lhs) as Any?
+ let cleanRhs = nilOrValue(rhs) as Any?
+ switch (cleanLhs, cleanRhs) {
+ case (nil, nil):
+ return true
+
+ case (nil, _), (_, nil):
+ return false
+
+ case (let lhs as AnyObject, let rhs as AnyObject) where lhs === rhs:
+ return true
+
+ case is (Void, Void):
+ return true
+
+ case (let lhsArray, let rhsArray) as ([Any?], [Any?]):
+ guard lhsArray.count == rhsArray.count else { return false }
+ for (index, element) in lhsArray.enumerated() {
+ if !deepEquals(element, rhsArray[index]) {
+ return false
+ }
+ }
+ return true
+
+ case (let lhsArray, let rhsArray) as ([Double], [Double]):
+ guard lhsArray.count == rhsArray.count else { return false }
+ for (index, element) in lhsArray.enumerated() {
+ if !doubleEquals(element, rhsArray[index]) {
+ return false
+ }
+ }
+ return true
+
+ case (let lhsDictionary, let rhsDictionary) as ([AnyHashable: Any?], [AnyHashable: Any?]):
+ guard lhsDictionary.count == rhsDictionary.count else { return false }
+ for (lhsKey, lhsValue) in lhsDictionary {
+ var found = false
+ for (rhsKey, rhsValue) in rhsDictionary {
+ if deepEquals(lhsKey, rhsKey) {
+ if deepEquals(lhsValue, rhsValue) {
+ found = true
+ break
+ } else {
+ return false
+ }
+ }
+ }
+ if !found { return false }
+ }
+ return true
+
+ case (let lhs as Double, let rhs as Double):
+ return doubleEquals(lhs, rhs)
+
+ case (let lhsHashable, let rhsHashable) as (AnyHashable, AnyHashable):
+ return lhsHashable == rhsHashable
+
+ default:
+ return false
+ }
+ }
+
+ static func deepHash(value: Any?, hasher: inout Hasher) {
+ let cleanValue = nilOrValue(value) as Any?
+ if let cleanValue = cleanValue {
+ if let doubleValue = cleanValue as? Double {
+ doubleHash(doubleValue, &hasher)
+ } else if let valueList = cleanValue as? [Any?] {
+ for item in valueList {
+ deepHash(value: item, hasher: &hasher)
+ }
+ } else if let valueList = cleanValue as? [Double] {
+ for item in valueList {
+ doubleHash(item, &hasher)
+ }
+ } else if let valueDict = cleanValue as? [AnyHashable: Any?] {
+ var result = 0
+ for (key, value) in valueDict {
+ var entryKeyHasher = Hasher()
+ deepHash(value: key, hasher: &entryKeyHasher)
+ var entryValueHasher = Hasher()
+ deepHash(value: value, hasher: &entryValueHasher)
+ result = result &+ ((entryKeyHasher.finalize() &* 31) ^ entryValueHasher.finalize())
+ }
+ hasher.combine(result)
+ } else if let hashableValue = cleanValue as? AnyHashable {
+ hasher.combine(hashableValue)
+ } else {
+ hasher.combine(String(describing: cleanValue))
+ }
+ } else {
+ hasher.combine(0)
+ }
+ }
+
+}
+
+private func nilOrValue<T>(_ value: Any?) -> T? {
+ if value is NSNull { return nil }
+ return value as! T?
+}
+
+/// Pigeon equivalent of MapType
+enum PlatformMapType: Int, CaseIterable {
+ case none = 0
+ case normal = 1
+ case satellite = 2
+ case terrain = 3
+ case hybrid = 4
+}
+
+/// Pigeon equivalent of the MarkerCollisionBehavior enum.
+enum PlatformMarkerCollisionBehavior: Int, CaseIterable {
+ case requiredDisplay = 0
+ case optionalAndHidesLowerPriority = 1
+ case requiredAndHidesOptional = 2
+}
+
+/// Join types for polyline joints.
+enum PlatformJointType: Int, CaseIterable {
+ case mitered = 0
+ case bevel = 1
+ case round = 2
+}
+
+/// Enumeration of possible types for PatternItem.
+enum PlatformPatternItemType: Int, CaseIterable {
+ case dot = 0
+ case dash = 1
+ case gap = 2
+}
+
+enum PlatformMarkerType: Int, CaseIterable {
+ case marker = 0
+ case advancedMarker = 1
+}
+
+/// Pigeon equivalent of [MapBitmapScaling].
+enum PlatformMapBitmapScaling: Int, CaseIterable {
+ case auto = 0
+ case none = 1
+}
+
+/// Pigeon representatation of a CameraPosition.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformCameraPosition: Hashable, CustomStringConvertible {
+ var bearing: Double
+ var target: PlatformLatLng
+ var tilt: Double
+ var zoom: Double
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformCameraPosition? {
+ let bearing = pigeonVar_list[0] as! Double
+ let target = pigeonVar_list[1] as! PlatformLatLng
+ let tilt = pigeonVar_list[2] as! Double
+ let zoom = pigeonVar_list[3] as! Double
+
+ return PlatformCameraPosition(
+ bearing: bearing,
+ target: target,
+ tilt: tilt,
+ zoom: zoom
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ bearing,
+ target,
+ tilt,
+ zoom,
+ ]
+ }
+ static func == (lhs: PlatformCameraPosition, rhs: PlatformCameraPosition) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.bearing, rhs.bearing)
+ && MessagesPigeonInternal.deepEquals(lhs.target, rhs.target)
+ && MessagesPigeonInternal.deepEquals(lhs.tilt, rhs.tilt)
+ && MessagesPigeonInternal.deepEquals(lhs.zoom, rhs.zoom)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformCameraPosition")
+ MessagesPigeonInternal.deepHash(value: bearing, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: target, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: tilt, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: zoom, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformCameraPosition(bearing: \(String(describing: bearing)), target: \(String(describing: target)), tilt: \(String(describing: tilt)), zoom: \(String(describing: zoom)))"
+ }
+}
+
+/// Pigeon representation of a CameraUpdate.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+/// This protocol should not be extended by any user class outside of the generated file.
+protocol PlatformCameraUpdate {
+
+}
+
+/// Pigeon equivalent of NewCameraPosition
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformCameraUpdateNewCameraPosition: PlatformCameraUpdate {
+ var cameraPosition: PlatformCameraPosition
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformCameraUpdateNewCameraPosition? {
+ let cameraPosition = pigeonVar_list[0] as! PlatformCameraPosition
+
+ return PlatformCameraUpdateNewCameraPosition(
+ cameraPosition: cameraPosition
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ cameraPosition
+ ]
+ }
+ static func == (
+ lhs: PlatformCameraUpdateNewCameraPosition, rhs: PlatformCameraUpdateNewCameraPosition
+ ) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.cameraPosition, rhs.cameraPosition)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformCameraUpdateNewCameraPosition")
+ MessagesPigeonInternal.deepHash(value: cameraPosition, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformCameraUpdateNewCameraPosition(cameraPosition: \(String(describing: cameraPosition)))"
+ }
+}
+
+/// Pigeon equivalent of NewLatLng
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformCameraUpdateNewLatLng: PlatformCameraUpdate {
+ var latLng: PlatformLatLng
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformCameraUpdateNewLatLng? {
+ let latLng = pigeonVar_list[0] as! PlatformLatLng
+
+ return PlatformCameraUpdateNewLatLng(
+ latLng: latLng
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ latLng
+ ]
+ }
+ static func == (lhs: PlatformCameraUpdateNewLatLng, rhs: PlatformCameraUpdateNewLatLng) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.latLng, rhs.latLng)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformCameraUpdateNewLatLng")
+ MessagesPigeonInternal.deepHash(value: latLng, hasher: &hasher)
+ }
+
+ public var description: String {
+ return "PlatformCameraUpdateNewLatLng(latLng: \(String(describing: latLng)))"
+ }
+}
+
+/// Pigeon equivalent of NewLatLngBounds
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformCameraUpdateNewLatLngBounds: PlatformCameraUpdate {
+ var bounds: PlatformLatLngBounds
+ var padding: Double
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformCameraUpdateNewLatLngBounds? {
+ let bounds = pigeonVar_list[0] as! PlatformLatLngBounds
+ let padding = pigeonVar_list[1] as! Double
+
+ return PlatformCameraUpdateNewLatLngBounds(
+ bounds: bounds,
+ padding: padding
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ bounds,
+ padding,
+ ]
+ }
+ static func == (
+ lhs: PlatformCameraUpdateNewLatLngBounds, rhs: PlatformCameraUpdateNewLatLngBounds
+ ) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.bounds, rhs.bounds)
+ && MessagesPigeonInternal.deepEquals(lhs.padding, rhs.padding)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformCameraUpdateNewLatLngBounds")
+ MessagesPigeonInternal.deepHash(value: bounds, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: padding, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformCameraUpdateNewLatLngBounds(bounds: \(String(describing: bounds)), padding: \(String(describing: padding)))"
+ }
+}
+
+/// Pigeon equivalent of NewLatLngZoom
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformCameraUpdateNewLatLngZoom: PlatformCameraUpdate {
+ var latLng: PlatformLatLng
+ var zoom: Double
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformCameraUpdateNewLatLngZoom? {
+ let latLng = pigeonVar_list[0] as! PlatformLatLng
+ let zoom = pigeonVar_list[1] as! Double
+
+ return PlatformCameraUpdateNewLatLngZoom(
+ latLng: latLng,
+ zoom: zoom
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ latLng,
+ zoom,
+ ]
+ }
+ static func == (lhs: PlatformCameraUpdateNewLatLngZoom, rhs: PlatformCameraUpdateNewLatLngZoom)
+ -> Bool
+ {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.latLng, rhs.latLng)
+ && MessagesPigeonInternal.deepEquals(lhs.zoom, rhs.zoom)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformCameraUpdateNewLatLngZoom")
+ MessagesPigeonInternal.deepHash(value: latLng, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: zoom, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformCameraUpdateNewLatLngZoom(latLng: \(String(describing: latLng)), zoom: \(String(describing: zoom)))"
+ }
+}
+
+/// Pigeon equivalent of ScrollBy
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformCameraUpdateScrollBy: PlatformCameraUpdate {
+ var dx: Double
+ var dy: Double
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformCameraUpdateScrollBy? {
+ let dx = pigeonVar_list[0] as! Double
+ let dy = pigeonVar_list[1] as! Double
+
+ return PlatformCameraUpdateScrollBy(
+ dx: dx,
+ dy: dy
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ dx,
+ dy,
+ ]
+ }
+ static func == (lhs: PlatformCameraUpdateScrollBy, rhs: PlatformCameraUpdateScrollBy) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.dx, rhs.dx)
+ && MessagesPigeonInternal.deepEquals(lhs.dy, rhs.dy)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformCameraUpdateScrollBy")
+ MessagesPigeonInternal.deepHash(value: dx, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: dy, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformCameraUpdateScrollBy(dx: \(String(describing: dx)), dy: \(String(describing: dy)))"
+ }
+}
+
+/// Pigeon equivalent of ZoomBy
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformCameraUpdateZoomBy: PlatformCameraUpdate {
+ var amount: Double
+ var focus: PlatformPoint? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformCameraUpdateZoomBy? {
+ let amount = pigeonVar_list[0] as! Double
+ let focus: PlatformPoint? = nilOrValue(pigeonVar_list[1])
+
+ return PlatformCameraUpdateZoomBy(
+ amount: amount,
+ focus: focus
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ amount,
+ focus,
+ ]
+ }
+ static func == (lhs: PlatformCameraUpdateZoomBy, rhs: PlatformCameraUpdateZoomBy) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.amount, rhs.amount)
+ && MessagesPigeonInternal.deepEquals(lhs.focus, rhs.focus)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformCameraUpdateZoomBy")
+ MessagesPigeonInternal.deepHash(value: amount, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: focus, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformCameraUpdateZoomBy(amount: \(String(describing: amount)), focus: \(String(describing: focus)))"
+ }
+}
+
+/// Pigeon equivalent of ZoomIn/ZoomOut
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformCameraUpdateZoom: PlatformCameraUpdate {
+ var out: Bool
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformCameraUpdateZoom? {
+ let out = pigeonVar_list[0] as! Bool
+
+ return PlatformCameraUpdateZoom(
+ out: out
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ out
+ ]
+ }
+ static func == (lhs: PlatformCameraUpdateZoom, rhs: PlatformCameraUpdateZoom) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.out, rhs.out)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformCameraUpdateZoom")
+ MessagesPigeonInternal.deepHash(value: out, hasher: &hasher)
+ }
+
+ public var description: String {
+ return "PlatformCameraUpdateZoom(out: \(String(describing: out)))"
+ }
+}
+
+/// Pigeon equivalent of ZoomTo
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformCameraUpdateZoomTo: PlatformCameraUpdate {
+ var zoom: Double
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformCameraUpdateZoomTo? {
+ let zoom = pigeonVar_list[0] as! Double
+
+ return PlatformCameraUpdateZoomTo(
+ zoom: zoom
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ zoom
+ ]
+ }
+ static func == (lhs: PlatformCameraUpdateZoomTo, rhs: PlatformCameraUpdateZoomTo) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.zoom, rhs.zoom)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformCameraUpdateZoomTo")
+ MessagesPigeonInternal.deepHash(value: zoom, hasher: &hasher)
+ }
+
+ public var description: String {
+ return "PlatformCameraUpdateZoomTo(zoom: \(String(describing: zoom)))"
+ }
+}
+
+/// Pigeon equivalent of the Circle class.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformCircle: Hashable, CustomStringConvertible {
+ var consumeTapEvents: Bool
+ var fillColor: PlatformColor
+ var strokeColor: PlatformColor
+ var visible: Bool
+ var strokeWidth: Int64
+ var zIndex: Double
+ var center: PlatformLatLng
+ var radius: Double
+ var circleId: String
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformCircle? {
+ let consumeTapEvents = pigeonVar_list[0] as! Bool
+ let fillColor = pigeonVar_list[1] as! PlatformColor
+ let strokeColor = pigeonVar_list[2] as! PlatformColor
+ let visible = pigeonVar_list[3] as! Bool
+ let strokeWidth = pigeonVar_list[4] as! Int64
+ let zIndex = pigeonVar_list[5] as! Double
+ let center = pigeonVar_list[6] as! PlatformLatLng
+ let radius = pigeonVar_list[7] as! Double
+ let circleId = pigeonVar_list[8] as! String
+
+ return PlatformCircle(
+ consumeTapEvents: consumeTapEvents,
+ fillColor: fillColor,
+ strokeColor: strokeColor,
+ visible: visible,
+ strokeWidth: strokeWidth,
+ zIndex: zIndex,
+ center: center,
+ radius: radius,
+ circleId: circleId
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ consumeTapEvents,
+ fillColor,
+ strokeColor,
+ visible,
+ strokeWidth,
+ zIndex,
+ center,
+ radius,
+ circleId,
+ ]
+ }
+ static func == (lhs: PlatformCircle, rhs: PlatformCircle) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.consumeTapEvents, rhs.consumeTapEvents)
+ && MessagesPigeonInternal.deepEquals(lhs.fillColor, rhs.fillColor)
+ && MessagesPigeonInternal.deepEquals(lhs.strokeColor, rhs.strokeColor)
+ && MessagesPigeonInternal.deepEquals(lhs.visible, rhs.visible)
+ && MessagesPigeonInternal.deepEquals(lhs.strokeWidth, rhs.strokeWidth)
+ && MessagesPigeonInternal.deepEquals(lhs.zIndex, rhs.zIndex)
+ && MessagesPigeonInternal.deepEquals(lhs.center, rhs.center)
+ && MessagesPigeonInternal.deepEquals(lhs.radius, rhs.radius)
+ && MessagesPigeonInternal.deepEquals(lhs.circleId, rhs.circleId)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformCircle")
+ MessagesPigeonInternal.deepHash(value: consumeTapEvents, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: fillColor, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: strokeColor, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: visible, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: strokeWidth, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: zIndex, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: center, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: radius, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: circleId, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformCircle(consumeTapEvents: \(String(describing: consumeTapEvents)), fillColor: \(String(describing: fillColor)), strokeColor: \(String(describing: strokeColor)), visible: \(String(describing: visible)), strokeWidth: \(String(describing: strokeWidth)), zIndex: \(String(describing: zIndex)), center: \(String(describing: center)), radius: \(String(describing: radius)), circleId: \(String(describing: circleId)))"
+ }
+}
+
+/// Pigeon equivalent of the Heatmap class.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformHeatmap: Hashable, CustomStringConvertible {
+ var heatmapId: String
+ var data: [PlatformWeightedLatLng]
+ var gradient: PlatformHeatmapGradient? = nil
+ var opacity: Double
+ var radius: Int64
+ var minimumZoomIntensity: Int64
+ var maximumZoomIntensity: Int64
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformHeatmap? {
+ let heatmapId = pigeonVar_list[0] as! String
+ let data = pigeonVar_list[1] as! [PlatformWeightedLatLng]
+ let gradient: PlatformHeatmapGradient? = nilOrValue(pigeonVar_list[2])
+ let opacity = pigeonVar_list[3] as! Double
+ let radius = pigeonVar_list[4] as! Int64
+ let minimumZoomIntensity = pigeonVar_list[5] as! Int64
+ let maximumZoomIntensity = pigeonVar_list[6] as! Int64
+
+ return PlatformHeatmap(
+ heatmapId: heatmapId,
+ data: data,
+ gradient: gradient,
+ opacity: opacity,
+ radius: radius,
+ minimumZoomIntensity: minimumZoomIntensity,
+ maximumZoomIntensity: maximumZoomIntensity
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ heatmapId,
+ data,
+ gradient,
+ opacity,
+ radius,
+ minimumZoomIntensity,
+ maximumZoomIntensity,
+ ]
+ }
+ static func == (lhs: PlatformHeatmap, rhs: PlatformHeatmap) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.heatmapId, rhs.heatmapId)
+ && MessagesPigeonInternal.deepEquals(lhs.data, rhs.data)
+ && MessagesPigeonInternal.deepEquals(lhs.gradient, rhs.gradient)
+ && MessagesPigeonInternal.deepEquals(lhs.opacity, rhs.opacity)
+ && MessagesPigeonInternal.deepEquals(lhs.radius, rhs.radius)
+ && MessagesPigeonInternal.deepEquals(lhs.minimumZoomIntensity, rhs.minimumZoomIntensity)
+ && MessagesPigeonInternal.deepEquals(lhs.maximumZoomIntensity, rhs.maximumZoomIntensity)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformHeatmap")
+ MessagesPigeonInternal.deepHash(value: heatmapId, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: data, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: gradient, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: opacity, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: radius, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: minimumZoomIntensity, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: maximumZoomIntensity, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformHeatmap(heatmapId: \(String(describing: heatmapId)), data: \(String(describing: data)), gradient: \(String(describing: gradient)), opacity: \(String(describing: opacity)), radius: \(String(describing: radius)), minimumZoomIntensity: \(String(describing: minimumZoomIntensity)), maximumZoomIntensity: \(String(describing: maximumZoomIntensity)))"
+ }
+}
+
+/// Pigeon equivalent of the HeatmapGradient class.
+///
+/// The GMUGradient structure is slightly different from HeatmapGradient, so
+/// this matches the iOS API so that conversion can be done on the Dart side
+/// where the structures are easier to work with.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformHeatmapGradient: Hashable, CustomStringConvertible {
+ var colors: [PlatformColor]
+ var startPoints: [Double]
+ var colorMapSize: Int64
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformHeatmapGradient? {
+ let colors = pigeonVar_list[0] as! [PlatformColor]
+ let startPoints = pigeonVar_list[1] as! [Double]
+ let colorMapSize = pigeonVar_list[2] as! Int64
+
+ return PlatformHeatmapGradient(
+ colors: colors,
+ startPoints: startPoints,
+ colorMapSize: colorMapSize
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ colors,
+ startPoints,
+ colorMapSize,
+ ]
+ }
+ static func == (lhs: PlatformHeatmapGradient, rhs: PlatformHeatmapGradient) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.colors, rhs.colors)
+ && MessagesPigeonInternal.deepEquals(lhs.startPoints, rhs.startPoints)
+ && MessagesPigeonInternal.deepEquals(lhs.colorMapSize, rhs.colorMapSize)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformHeatmapGradient")
+ MessagesPigeonInternal.deepHash(value: colors, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: startPoints, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: colorMapSize, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformHeatmapGradient(colors: \(String(describing: colors)), startPoints: \(String(describing: startPoints)), colorMapSize: \(String(describing: colorMapSize)))"
+ }
+}
+
+/// Pigeon equivalent of the WeightedLatLng class.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformWeightedLatLng: Hashable, CustomStringConvertible {
+ var point: PlatformLatLng
+ var weight: Double
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformWeightedLatLng? {
+ let point = pigeonVar_list[0] as! PlatformLatLng
+ let weight = pigeonVar_list[1] as! Double
+
+ return PlatformWeightedLatLng(
+ point: point,
+ weight: weight
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ point,
+ weight,
+ ]
+ }
+ static func == (lhs: PlatformWeightedLatLng, rhs: PlatformWeightedLatLng) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.point, rhs.point)
+ && MessagesPigeonInternal.deepEquals(lhs.weight, rhs.weight)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformWeightedLatLng")
+ MessagesPigeonInternal.deepHash(value: point, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: weight, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformWeightedLatLng(point: \(String(describing: point)), weight: \(String(describing: weight)))"
+ }
+}
+
+/// Pigeon equivalent of the InfoWindow class.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformInfoWindow: Hashable, CustomStringConvertible {
+ var title: String? = nil
+ var snippet: String? = nil
+ var anchor: PlatformPoint
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformInfoWindow? {
+ let title: String? = nilOrValue(pigeonVar_list[0])
+ let snippet: String? = nilOrValue(pigeonVar_list[1])
+ let anchor = pigeonVar_list[2] as! PlatformPoint
+
+ return PlatformInfoWindow(
+ title: title,
+ snippet: snippet,
+ anchor: anchor
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ title,
+ snippet,
+ anchor,
+ ]
+ }
+ static func == (lhs: PlatformInfoWindow, rhs: PlatformInfoWindow) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.title, rhs.title)
+ && MessagesPigeonInternal.deepEquals(lhs.snippet, rhs.snippet)
+ && MessagesPigeonInternal.deepEquals(lhs.anchor, rhs.anchor)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformInfoWindow")
+ MessagesPigeonInternal.deepHash(value: title, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: snippet, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: anchor, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformInfoWindow(title: \(String(describing: title)), snippet: \(String(describing: snippet)), anchor: \(String(describing: anchor)))"
+ }
+}
+
+/// Pigeon equivalent of Cluster.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformCluster: Hashable, CustomStringConvertible {
+ var clusterManagerId: String
+ var position: PlatformLatLng
+ var bounds: PlatformLatLngBounds
+ var markerIds: [String]
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformCluster? {
+ let clusterManagerId = pigeonVar_list[0] as! String
+ let position = pigeonVar_list[1] as! PlatformLatLng
+ let bounds = pigeonVar_list[2] as! PlatformLatLngBounds
+ let markerIds = pigeonVar_list[3] as! [String]
+
+ return PlatformCluster(
+ clusterManagerId: clusterManagerId,
+ position: position,
+ bounds: bounds,
+ markerIds: markerIds
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ clusterManagerId,
+ position,
+ bounds,
+ markerIds,
+ ]
+ }
+ static func == (lhs: PlatformCluster, rhs: PlatformCluster) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.clusterManagerId, rhs.clusterManagerId)
+ && MessagesPigeonInternal.deepEquals(lhs.position, rhs.position)
+ && MessagesPigeonInternal.deepEquals(lhs.bounds, rhs.bounds)
+ && MessagesPigeonInternal.deepEquals(lhs.markerIds, rhs.markerIds)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformCluster")
+ MessagesPigeonInternal.deepHash(value: clusterManagerId, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: position, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: bounds, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: markerIds, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformCluster(clusterManagerId: \(String(describing: clusterManagerId)), position: \(String(describing: position)), bounds: \(String(describing: bounds)), markerIds: \(String(describing: markerIds)))"
+ }
+}
+
+/// Pigeon equivalent of the ClusterManager class.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformClusterManager: Hashable, CustomStringConvertible {
+ var identifier: String
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformClusterManager? {
+ let identifier = pigeonVar_list[0] as! String
+
+ return PlatformClusterManager(
+ identifier: identifier
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ identifier
+ ]
+ }
+ static func == (lhs: PlatformClusterManager, rhs: PlatformClusterManager) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.identifier, rhs.identifier)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformClusterManager")
+ MessagesPigeonInternal.deepHash(value: identifier, hasher: &hasher)
+ }
+
+ public var description: String {
+ return "PlatformClusterManager(identifier: \(String(describing: identifier)))"
+ }
+}
+
+/// Pigeon equivalent of the Marker class.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformMarker: Hashable, CustomStringConvertible {
+ var alpha: Double
+ var anchor: PlatformPoint
+ var consumeTapEvents: Bool
+ var draggable: Bool
+ var flat: Bool
+ var icon: PlatformBitmap
+ var infoWindow: PlatformInfoWindow
+ var position: PlatformLatLng
+ var rotation: Double
+ var visible: Bool
+ var zIndex: Int64
+ var markerId: String
+ var clusterManagerId: String? = nil
+ var collisionBehavior: PlatformMarkerCollisionBehavior? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformMarker? {
+ let alpha = pigeonVar_list[0] as! Double
+ let anchor = pigeonVar_list[1] as! PlatformPoint
+ let consumeTapEvents = pigeonVar_list[2] as! Bool
+ let draggable = pigeonVar_list[3] as! Bool
+ let flat = pigeonVar_list[4] as! Bool
+ let icon = pigeonVar_list[5] as! PlatformBitmap
+ let infoWindow = pigeonVar_list[6] as! PlatformInfoWindow
+ let position = pigeonVar_list[7] as! PlatformLatLng
+ let rotation = pigeonVar_list[8] as! Double
+ let visible = pigeonVar_list[9] as! Bool
+ let zIndex = pigeonVar_list[10] as! Int64
+ let markerId = pigeonVar_list[11] as! String
+ let clusterManagerId: String? = nilOrValue(pigeonVar_list[12])
+ let collisionBehavior: PlatformMarkerCollisionBehavior? = nilOrValue(pigeonVar_list[13])
+
+ return PlatformMarker(
+ alpha: alpha,
+ anchor: anchor,
+ consumeTapEvents: consumeTapEvents,
+ draggable: draggable,
+ flat: flat,
+ icon: icon,
+ infoWindow: infoWindow,
+ position: position,
+ rotation: rotation,
+ visible: visible,
+ zIndex: zIndex,
+ markerId: markerId,
+ clusterManagerId: clusterManagerId,
+ collisionBehavior: collisionBehavior
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ alpha,
+ anchor,
+ consumeTapEvents,
+ draggable,
+ flat,
+ icon,
+ infoWindow,
+ position,
+ rotation,
+ visible,
+ zIndex,
+ markerId,
+ clusterManagerId,
+ collisionBehavior,
+ ]
+ }
+ static func == (lhs: PlatformMarker, rhs: PlatformMarker) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.alpha, rhs.alpha)
+ && MessagesPigeonInternal.deepEquals(lhs.anchor, rhs.anchor)
+ && MessagesPigeonInternal.deepEquals(lhs.consumeTapEvents, rhs.consumeTapEvents)
+ && MessagesPigeonInternal.deepEquals(lhs.draggable, rhs.draggable)
+ && MessagesPigeonInternal.deepEquals(lhs.flat, rhs.flat)
+ && MessagesPigeonInternal.deepEquals(lhs.icon, rhs.icon)
+ && MessagesPigeonInternal.deepEquals(lhs.infoWindow, rhs.infoWindow)
+ && MessagesPigeonInternal.deepEquals(lhs.position, rhs.position)
+ && MessagesPigeonInternal.deepEquals(lhs.rotation, rhs.rotation)
+ && MessagesPigeonInternal.deepEquals(lhs.visible, rhs.visible)
+ && MessagesPigeonInternal.deepEquals(lhs.zIndex, rhs.zIndex)
+ && MessagesPigeonInternal.deepEquals(lhs.markerId, rhs.markerId)
+ && MessagesPigeonInternal.deepEquals(lhs.clusterManagerId, rhs.clusterManagerId)
+ && MessagesPigeonInternal.deepEquals(lhs.collisionBehavior, rhs.collisionBehavior)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformMarker")
+ MessagesPigeonInternal.deepHash(value: alpha, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: anchor, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: consumeTapEvents, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: draggable, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: flat, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: icon, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: infoWindow, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: position, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: rotation, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: visible, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: zIndex, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: markerId, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: clusterManagerId, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: collisionBehavior, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformMarker(alpha: \(String(describing: alpha)), anchor: \(String(describing: anchor)), consumeTapEvents: \(String(describing: consumeTapEvents)), draggable: \(String(describing: draggable)), flat: \(String(describing: flat)), icon: \(String(describing: icon)), infoWindow: \(String(describing: infoWindow)), position: \(String(describing: position)), rotation: \(String(describing: rotation)), visible: \(String(describing: visible)), zIndex: \(String(describing: zIndex)), markerId: \(String(describing: markerId)), clusterManagerId: \(String(describing: clusterManagerId)), collisionBehavior: \(String(describing: collisionBehavior)))"
+ }
+}
+
+/// Pigeon equivalent of the Polygon class.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformPolygon: Hashable, CustomStringConvertible {
+ var polygonId: String
+ var consumesTapEvents: Bool
+ var fillColor: PlatformColor
+ var geodesic: Bool
+ var points: [PlatformLatLng]
+ var holes: [[PlatformLatLng]]
+ var visible: Bool
+ var strokeColor: PlatformColor
+ var strokeWidth: Int64
+ var zIndex: Int64
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformPolygon? {
+ let polygonId = pigeonVar_list[0] as! String
+ let consumesTapEvents = pigeonVar_list[1] as! Bool
+ let fillColor = pigeonVar_list[2] as! PlatformColor
+ let geodesic = pigeonVar_list[3] as! Bool
+ let points = pigeonVar_list[4] as! [PlatformLatLng]
+ let holes = pigeonVar_list[5] as! [[PlatformLatLng]]
+ let visible = pigeonVar_list[6] as! Bool
+ let strokeColor = pigeonVar_list[7] as! PlatformColor
+ let strokeWidth = pigeonVar_list[8] as! Int64
+ let zIndex = pigeonVar_list[9] as! Int64
+
+ return PlatformPolygon(
+ polygonId: polygonId,
+ consumesTapEvents: consumesTapEvents,
+ fillColor: fillColor,
+ geodesic: geodesic,
+ points: points,
+ holes: holes,
+ visible: visible,
+ strokeColor: strokeColor,
+ strokeWidth: strokeWidth,
+ zIndex: zIndex
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ polygonId,
+ consumesTapEvents,
+ fillColor,
+ geodesic,
+ points,
+ holes,
+ visible,
+ strokeColor,
+ strokeWidth,
+ zIndex,
+ ]
+ }
+ static func == (lhs: PlatformPolygon, rhs: PlatformPolygon) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.polygonId, rhs.polygonId)
+ && MessagesPigeonInternal.deepEquals(lhs.consumesTapEvents, rhs.consumesTapEvents)
+ && MessagesPigeonInternal.deepEquals(lhs.fillColor, rhs.fillColor)
+ && MessagesPigeonInternal.deepEquals(lhs.geodesic, rhs.geodesic)
+ && MessagesPigeonInternal.deepEquals(lhs.points, rhs.points)
+ && MessagesPigeonInternal.deepEquals(lhs.holes, rhs.holes)
+ && MessagesPigeonInternal.deepEquals(lhs.visible, rhs.visible)
+ && MessagesPigeonInternal.deepEquals(lhs.strokeColor, rhs.strokeColor)
+ && MessagesPigeonInternal.deepEquals(lhs.strokeWidth, rhs.strokeWidth)
+ && MessagesPigeonInternal.deepEquals(lhs.zIndex, rhs.zIndex)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformPolygon")
+ MessagesPigeonInternal.deepHash(value: polygonId, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: consumesTapEvents, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: fillColor, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: geodesic, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: points, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: holes, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: visible, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: strokeColor, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: strokeWidth, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: zIndex, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformPolygon(polygonId: \(String(describing: polygonId)), consumesTapEvents: \(String(describing: consumesTapEvents)), fillColor: \(String(describing: fillColor)), geodesic: \(String(describing: geodesic)), points: \(String(describing: points)), holes: \(String(describing: holes)), visible: \(String(describing: visible)), strokeColor: \(String(describing: strokeColor)), strokeWidth: \(String(describing: strokeWidth)), zIndex: \(String(describing: zIndex)))"
+ }
+}
+
+/// Pigeon equivalent of the Polyline class.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformPolyline: Hashable, CustomStringConvertible {
+ var polylineId: String
+ var consumesTapEvents: Bool
+ var color: PlatformColor
+ var geodesic: Bool
+ /// The joint type.
+ var jointType: PlatformJointType
+ /// The pattern data, as a list of pattern items.
+ var patterns: [PlatformPatternItem]
+ var points: [PlatformLatLng]
+ var visible: Bool
+ var width: Int64
+ var zIndex: Int64
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformPolyline? {
+ let polylineId = pigeonVar_list[0] as! String
+ let consumesTapEvents = pigeonVar_list[1] as! Bool
+ let color = pigeonVar_list[2] as! PlatformColor
+ let geodesic = pigeonVar_list[3] as! Bool
+ let jointType = pigeonVar_list[4] as! PlatformJointType
+ let patterns = pigeonVar_list[5] as! [PlatformPatternItem]
+ let points = pigeonVar_list[6] as! [PlatformLatLng]
+ let visible = pigeonVar_list[7] as! Bool
+ let width = pigeonVar_list[8] as! Int64
+ let zIndex = pigeonVar_list[9] as! Int64
+
+ return PlatformPolyline(
+ polylineId: polylineId,
+ consumesTapEvents: consumesTapEvents,
+ color: color,
+ geodesic: geodesic,
+ jointType: jointType,
+ patterns: patterns,
+ points: points,
+ visible: visible,
+ width: width,
+ zIndex: zIndex
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ polylineId,
+ consumesTapEvents,
+ color,
+ geodesic,
+ jointType,
+ patterns,
+ points,
+ visible,
+ width,
+ zIndex,
+ ]
+ }
+ static func == (lhs: PlatformPolyline, rhs: PlatformPolyline) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.polylineId, rhs.polylineId)
+ && MessagesPigeonInternal.deepEquals(lhs.consumesTapEvents, rhs.consumesTapEvents)
+ && MessagesPigeonInternal.deepEquals(lhs.color, rhs.color)
+ && MessagesPigeonInternal.deepEquals(lhs.geodesic, rhs.geodesic)
+ && MessagesPigeonInternal.deepEquals(lhs.jointType, rhs.jointType)
+ && MessagesPigeonInternal.deepEquals(lhs.patterns, rhs.patterns)
+ && MessagesPigeonInternal.deepEquals(lhs.points, rhs.points)
+ && MessagesPigeonInternal.deepEquals(lhs.visible, rhs.visible)
+ && MessagesPigeonInternal.deepEquals(lhs.width, rhs.width)
+ && MessagesPigeonInternal.deepEquals(lhs.zIndex, rhs.zIndex)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformPolyline")
+ MessagesPigeonInternal.deepHash(value: polylineId, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: consumesTapEvents, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: color, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: geodesic, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: jointType, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: patterns, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: points, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: visible, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: width, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: zIndex, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformPolyline(polylineId: \(String(describing: polylineId)), consumesTapEvents: \(String(describing: consumesTapEvents)), color: \(String(describing: color)), geodesic: \(String(describing: geodesic)), jointType: \(String(describing: jointType)), patterns: \(String(describing: patterns)), points: \(String(describing: points)), visible: \(String(describing: visible)), width: \(String(describing: width)), zIndex: \(String(describing: zIndex)))"
+ }
+}
+
+/// Pigeon equivalent of the PatternItem class.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformPatternItem: Hashable, CustomStringConvertible {
+ var type: PlatformPatternItemType
+ var length: Double? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformPatternItem? {
+ let type = pigeonVar_list[0] as! PlatformPatternItemType
+ let length: Double? = nilOrValue(pigeonVar_list[1])
+
+ return PlatformPatternItem(
+ type: type,
+ length: length
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ type,
+ length,
+ ]
+ }
+ static func == (lhs: PlatformPatternItem, rhs: PlatformPatternItem) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.type, rhs.type)
+ && MessagesPigeonInternal.deepEquals(lhs.length, rhs.length)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformPatternItem")
+ MessagesPigeonInternal.deepHash(value: type, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: length, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformPatternItem(type: \(String(describing: type)), length: \(String(describing: length)))"
+ }
+}
+
+/// Pigeon equivalent of the Tile class.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformTile: Hashable, CustomStringConvertible {
+ var width: Int64
+ var height: Int64
+ var data: FlutterStandardTypedData? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformTile? {
+ let width = pigeonVar_list[0] as! Int64
+ let height = pigeonVar_list[1] as! Int64
+ let data: FlutterStandardTypedData? = nilOrValue(pigeonVar_list[2])
+
+ return PlatformTile(
+ width: width,
+ height: height,
+ data: data
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ width,
+ height,
+ data,
+ ]
+ }
+ static func == (lhs: PlatformTile, rhs: PlatformTile) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.width, rhs.width)
+ && MessagesPigeonInternal.deepEquals(lhs.height, rhs.height)
+ && MessagesPigeonInternal.deepEquals(lhs.data, rhs.data)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformTile")
+ MessagesPigeonInternal.deepHash(value: width, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: height, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: data, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformTile(width: \(String(describing: width)), height: \(String(describing: height)), data: \(String(describing: data)))"
+ }
+}
+
+/// Pigeon equivalent of the TileOverlay class.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformTileOverlay: Hashable, CustomStringConvertible {
+ var tileOverlayId: String
+ var fadeIn: Bool
+ var transparency: Double
+ var zIndex: Int64
+ var visible: Bool
+ var tileSize: Int64
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformTileOverlay? {
+ let tileOverlayId = pigeonVar_list[0] as! String
+ let fadeIn = pigeonVar_list[1] as! Bool
+ let transparency = pigeonVar_list[2] as! Double
+ let zIndex = pigeonVar_list[3] as! Int64
+ let visible = pigeonVar_list[4] as! Bool
+ let tileSize = pigeonVar_list[5] as! Int64
+
+ return PlatformTileOverlay(
+ tileOverlayId: tileOverlayId,
+ fadeIn: fadeIn,
+ transparency: transparency,
+ zIndex: zIndex,
+ visible: visible,
+ tileSize: tileSize
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ tileOverlayId,
+ fadeIn,
+ transparency,
+ zIndex,
+ visible,
+ tileSize,
+ ]
+ }
+ static func == (lhs: PlatformTileOverlay, rhs: PlatformTileOverlay) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.tileOverlayId, rhs.tileOverlayId)
+ && MessagesPigeonInternal.deepEquals(lhs.fadeIn, rhs.fadeIn)
+ && MessagesPigeonInternal.deepEquals(lhs.transparency, rhs.transparency)
+ && MessagesPigeonInternal.deepEquals(lhs.zIndex, rhs.zIndex)
+ && MessagesPigeonInternal.deepEquals(lhs.visible, rhs.visible)
+ && MessagesPigeonInternal.deepEquals(lhs.tileSize, rhs.tileSize)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformTileOverlay")
+ MessagesPigeonInternal.deepHash(value: tileOverlayId, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: fadeIn, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: transparency, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: zIndex, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: visible, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: tileSize, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformTileOverlay(tileOverlayId: \(String(describing: tileOverlayId)), fadeIn: \(String(describing: fadeIn)), transparency: \(String(describing: transparency)), zIndex: \(String(describing: zIndex)), visible: \(String(describing: visible)), tileSize: \(String(describing: tileSize)))"
+ }
+}
+
+/// Pigeon equivalent of Flutter's EdgeInsets.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformEdgeInsets: Hashable, CustomStringConvertible {
+ var top: Double
+ var bottom: Double
+ var left: Double
+ var right: Double
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformEdgeInsets? {
+ let top = pigeonVar_list[0] as! Double
+ let bottom = pigeonVar_list[1] as! Double
+ let left = pigeonVar_list[2] as! Double
+ let right = pigeonVar_list[3] as! Double
+
+ return PlatformEdgeInsets(
+ top: top,
+ bottom: bottom,
+ left: left,
+ right: right
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ top,
+ bottom,
+ left,
+ right,
+ ]
+ }
+ static func == (lhs: PlatformEdgeInsets, rhs: PlatformEdgeInsets) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.top, rhs.top)
+ && MessagesPigeonInternal.deepEquals(lhs.bottom, rhs.bottom)
+ && MessagesPigeonInternal.deepEquals(lhs.left, rhs.left)
+ && MessagesPigeonInternal.deepEquals(lhs.right, rhs.right)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformEdgeInsets")
+ MessagesPigeonInternal.deepHash(value: top, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: bottom, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: left, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: right, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformEdgeInsets(top: \(String(describing: top)), bottom: \(String(describing: bottom)), left: \(String(describing: left)), right: \(String(describing: right)))"
+ }
+}
+
+/// Pigeon equivalent of LatLng.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformLatLng: Hashable, CustomStringConvertible {
+ var latitude: Double
+ var longitude: Double
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformLatLng? {
+ let latitude = pigeonVar_list[0] as! Double
+ let longitude = pigeonVar_list[1] as! Double
+
+ return PlatformLatLng(
+ latitude: latitude,
+ longitude: longitude
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ latitude,
+ longitude,
+ ]
+ }
+ static func == (lhs: PlatformLatLng, rhs: PlatformLatLng) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.latitude, rhs.latitude)
+ && MessagesPigeonInternal.deepEquals(lhs.longitude, rhs.longitude)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformLatLng")
+ MessagesPigeonInternal.deepHash(value: latitude, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: longitude, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformLatLng(latitude: \(String(describing: latitude)), longitude: \(String(describing: longitude)))"
+ }
+}
+
+/// Pigeon equivalent of LatLngBounds.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformLatLngBounds: Hashable, CustomStringConvertible {
+ var northeast: PlatformLatLng
+ var southwest: PlatformLatLng
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformLatLngBounds? {
+ let northeast = pigeonVar_list[0] as! PlatformLatLng
+ let southwest = pigeonVar_list[1] as! PlatformLatLng
+
+ return PlatformLatLngBounds(
+ northeast: northeast,
+ southwest: southwest
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ northeast,
+ southwest,
+ ]
+ }
+ static func == (lhs: PlatformLatLngBounds, rhs: PlatformLatLngBounds) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.northeast, rhs.northeast)
+ && MessagesPigeonInternal.deepEquals(lhs.southwest, rhs.southwest)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformLatLngBounds")
+ MessagesPigeonInternal.deepHash(value: northeast, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: southwest, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformLatLngBounds(northeast: \(String(describing: northeast)), southwest: \(String(describing: southwest)))"
+ }
+}
+
+/// Pigeon equivalent of CameraTargetBounds.
+///
+/// As with the Dart version, it exists to distinguish between not setting a
+/// a target, and having an explicitly unbounded target (null [bounds]).
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformCameraTargetBounds: Hashable, CustomStringConvertible {
+ var bounds: PlatformLatLngBounds? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformCameraTargetBounds? {
+ let bounds: PlatformLatLngBounds? = nilOrValue(pigeonVar_list[0])
+
+ return PlatformCameraTargetBounds(
+ bounds: bounds
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ bounds
+ ]
+ }
+ static func == (lhs: PlatformCameraTargetBounds, rhs: PlatformCameraTargetBounds) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.bounds, rhs.bounds)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformCameraTargetBounds")
+ MessagesPigeonInternal.deepHash(value: bounds, hasher: &hasher)
+ }
+
+ public var description: String {
+ return "PlatformCameraTargetBounds(bounds: \(String(describing: bounds)))"
+ }
+}
+
+/// Pigeon equivalent of the GroundOverlay class.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformGroundOverlay: Hashable, CustomStringConvertible {
+ var groundOverlayId: String
+ var image: PlatformBitmap
+ var position: PlatformLatLng? = nil
+ var bounds: PlatformLatLngBounds? = nil
+ var anchor: PlatformPoint? = nil
+ var transparency: Double
+ var bearing: Double
+ var zIndex: Int64
+ var visible: Bool
+ var clickable: Bool
+ var zoomLevel: Double? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformGroundOverlay? {
+ let groundOverlayId = pigeonVar_list[0] as! String
+ let image = pigeonVar_list[1] as! PlatformBitmap
+ let position: PlatformLatLng? = nilOrValue(pigeonVar_list[2])
+ let bounds: PlatformLatLngBounds? = nilOrValue(pigeonVar_list[3])
+ let anchor: PlatformPoint? = nilOrValue(pigeonVar_list[4])
+ let transparency = pigeonVar_list[5] as! Double
+ let bearing = pigeonVar_list[6] as! Double
+ let zIndex = pigeonVar_list[7] as! Int64
+ let visible = pigeonVar_list[8] as! Bool
+ let clickable = pigeonVar_list[9] as! Bool
+ let zoomLevel: Double? = nilOrValue(pigeonVar_list[10])
+
+ return PlatformGroundOverlay(
+ groundOverlayId: groundOverlayId,
+ image: image,
+ position: position,
+ bounds: bounds,
+ anchor: anchor,
+ transparency: transparency,
+ bearing: bearing,
+ zIndex: zIndex,
+ visible: visible,
+ clickable: clickable,
+ zoomLevel: zoomLevel
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ groundOverlayId,
+ image,
+ position,
+ bounds,
+ anchor,
+ transparency,
+ bearing,
+ zIndex,
+ visible,
+ clickable,
+ zoomLevel,
+ ]
+ }
+ static func == (lhs: PlatformGroundOverlay, rhs: PlatformGroundOverlay) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.groundOverlayId, rhs.groundOverlayId)
+ && MessagesPigeonInternal.deepEquals(lhs.image, rhs.image)
+ && MessagesPigeonInternal.deepEquals(lhs.position, rhs.position)
+ && MessagesPigeonInternal.deepEquals(lhs.bounds, rhs.bounds)
+ && MessagesPigeonInternal.deepEquals(lhs.anchor, rhs.anchor)
+ && MessagesPigeonInternal.deepEquals(lhs.transparency, rhs.transparency)
+ && MessagesPigeonInternal.deepEquals(lhs.bearing, rhs.bearing)
+ && MessagesPigeonInternal.deepEquals(lhs.zIndex, rhs.zIndex)
+ && MessagesPigeonInternal.deepEquals(lhs.visible, rhs.visible)
+ && MessagesPigeonInternal.deepEquals(lhs.clickable, rhs.clickable)
+ && MessagesPigeonInternal.deepEquals(lhs.zoomLevel, rhs.zoomLevel)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformGroundOverlay")
+ MessagesPigeonInternal.deepHash(value: groundOverlayId, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: image, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: position, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: bounds, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: anchor, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: transparency, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: bearing, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: zIndex, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: visible, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: clickable, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: zoomLevel, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformGroundOverlay(groundOverlayId: \(String(describing: groundOverlayId)), image: \(String(describing: image)), position: \(String(describing: position)), bounds: \(String(describing: bounds)), anchor: \(String(describing: anchor)), transparency: \(String(describing: transparency)), bearing: \(String(describing: bearing)), zIndex: \(String(describing: zIndex)), visible: \(String(describing: visible)), clickable: \(String(describing: clickable)), zoomLevel: \(String(describing: zoomLevel)))"
+ }
+}
+
+/// Information passed to the platform view creation.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformMapViewCreationParams: Hashable, CustomStringConvertible {
+ var initialCameraPosition: PlatformCameraPosition
+ var mapConfiguration: PlatformMapConfiguration
+ var initialCircles: [PlatformCircle]
+ var initialMarkers: [PlatformMarker]
+ var initialPolygons: [PlatformPolygon]
+ var initialPolylines: [PlatformPolyline]
+ var initialHeatmaps: [PlatformHeatmap]
+ var initialTileOverlays: [PlatformTileOverlay]
+ var initialClusterManagers: [PlatformClusterManager]
+ var initialGroundOverlays: [PlatformGroundOverlay]
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformMapViewCreationParams? {
+ let initialCameraPosition = pigeonVar_list[0] as! PlatformCameraPosition
+ let mapConfiguration = pigeonVar_list[1] as! PlatformMapConfiguration
+ let initialCircles = pigeonVar_list[2] as! [PlatformCircle]
+ let initialMarkers = pigeonVar_list[3] as! [PlatformMarker]
+ let initialPolygons = pigeonVar_list[4] as! [PlatformPolygon]
+ let initialPolylines = pigeonVar_list[5] as! [PlatformPolyline]
+ let initialHeatmaps = pigeonVar_list[6] as! [PlatformHeatmap]
+ let initialTileOverlays = pigeonVar_list[7] as! [PlatformTileOverlay]
+ let initialClusterManagers = pigeonVar_list[8] as! [PlatformClusterManager]
+ let initialGroundOverlays = pigeonVar_list[9] as! [PlatformGroundOverlay]
+
+ return PlatformMapViewCreationParams(
+ initialCameraPosition: initialCameraPosition,
+ mapConfiguration: mapConfiguration,
+ initialCircles: initialCircles,
+ initialMarkers: initialMarkers,
+ initialPolygons: initialPolygons,
+ initialPolylines: initialPolylines,
+ initialHeatmaps: initialHeatmaps,
+ initialTileOverlays: initialTileOverlays,
+ initialClusterManagers: initialClusterManagers,
+ initialGroundOverlays: initialGroundOverlays
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ initialCameraPosition,
+ mapConfiguration,
+ initialCircles,
+ initialMarkers,
+ initialPolygons,
+ initialPolylines,
+ initialHeatmaps,
+ initialTileOverlays,
+ initialClusterManagers,
+ initialGroundOverlays,
+ ]
+ }
+ static func == (lhs: PlatformMapViewCreationParams, rhs: PlatformMapViewCreationParams) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.initialCameraPosition, rhs.initialCameraPosition)
+ && MessagesPigeonInternal.deepEquals(lhs.mapConfiguration, rhs.mapConfiguration)
+ && MessagesPigeonInternal.deepEquals(lhs.initialCircles, rhs.initialCircles)
+ && MessagesPigeonInternal.deepEquals(lhs.initialMarkers, rhs.initialMarkers)
+ && MessagesPigeonInternal.deepEquals(lhs.initialPolygons, rhs.initialPolygons)
+ && MessagesPigeonInternal.deepEquals(lhs.initialPolylines, rhs.initialPolylines)
+ && MessagesPigeonInternal.deepEquals(lhs.initialHeatmaps, rhs.initialHeatmaps)
+ && MessagesPigeonInternal.deepEquals(lhs.initialTileOverlays, rhs.initialTileOverlays)
+ && MessagesPigeonInternal.deepEquals(lhs.initialClusterManagers, rhs.initialClusterManagers)
+ && MessagesPigeonInternal.deepEquals(lhs.initialGroundOverlays, rhs.initialGroundOverlays)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformMapViewCreationParams")
+ MessagesPigeonInternal.deepHash(value: initialCameraPosition, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: mapConfiguration, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: initialCircles, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: initialMarkers, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: initialPolygons, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: initialPolylines, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: initialHeatmaps, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: initialTileOverlays, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: initialClusterManagers, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: initialGroundOverlays, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformMapViewCreationParams(initialCameraPosition: \(String(describing: initialCameraPosition)), mapConfiguration: \(String(describing: mapConfiguration)), initialCircles: \(String(describing: initialCircles)), initialMarkers: \(String(describing: initialMarkers)), initialPolygons: \(String(describing: initialPolygons)), initialPolylines: \(String(describing: initialPolylines)), initialHeatmaps: \(String(describing: initialHeatmaps)), initialTileOverlays: \(String(describing: initialTileOverlays)), initialClusterManagers: \(String(describing: initialClusterManagers)), initialGroundOverlays: \(String(describing: initialGroundOverlays)))"
+ }
+}
+
+/// Pigeon equivalent of MapConfiguration.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformMapConfiguration: Hashable, CustomStringConvertible {
+ var compassEnabled: Bool? = nil
+ var cameraTargetBounds: PlatformCameraTargetBounds? = nil
+ var mapType: PlatformMapType? = nil
+ var minMaxZoomPreference: PlatformZoomRange? = nil
+ var rotateGesturesEnabled: Bool? = nil
+ var scrollGesturesEnabled: Bool? = nil
+ var tiltGesturesEnabled: Bool? = nil
+ var trackCameraPosition: Bool? = nil
+ var zoomGesturesEnabled: Bool? = nil
+ var myLocationEnabled: Bool? = nil
+ var myLocationButtonEnabled: Bool? = nil
+ var padding: PlatformEdgeInsets? = nil
+ var indoorViewEnabled: Bool? = nil
+ var trafficEnabled: Bool? = nil
+ var buildingsEnabled: Bool? = nil
+ var markerType: PlatformMarkerType
+ var mapId: String? = nil
+ var style: String? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformMapConfiguration? {
+ let compassEnabled: Bool? = nilOrValue(pigeonVar_list[0])
+ let cameraTargetBounds: PlatformCameraTargetBounds? = nilOrValue(pigeonVar_list[1])
+ let mapType: PlatformMapType? = nilOrValue(pigeonVar_list[2])
+ let minMaxZoomPreference: PlatformZoomRange? = nilOrValue(pigeonVar_list[3])
+ let rotateGesturesEnabled: Bool? = nilOrValue(pigeonVar_list[4])
+ let scrollGesturesEnabled: Bool? = nilOrValue(pigeonVar_list[5])
+ let tiltGesturesEnabled: Bool? = nilOrValue(pigeonVar_list[6])
+ let trackCameraPosition: Bool? = nilOrValue(pigeonVar_list[7])
+ let zoomGesturesEnabled: Bool? = nilOrValue(pigeonVar_list[8])
+ let myLocationEnabled: Bool? = nilOrValue(pigeonVar_list[9])
+ let myLocationButtonEnabled: Bool? = nilOrValue(pigeonVar_list[10])
+ let padding: PlatformEdgeInsets? = nilOrValue(pigeonVar_list[11])
+ let indoorViewEnabled: Bool? = nilOrValue(pigeonVar_list[12])
+ let trafficEnabled: Bool? = nilOrValue(pigeonVar_list[13])
+ let buildingsEnabled: Bool? = nilOrValue(pigeonVar_list[14])
+ let markerType = pigeonVar_list[15] as! PlatformMarkerType
+ let mapId: String? = nilOrValue(pigeonVar_list[16])
+ let style: String? = nilOrValue(pigeonVar_list[17])
+
+ return PlatformMapConfiguration(
+ compassEnabled: compassEnabled,
+ cameraTargetBounds: cameraTargetBounds,
+ mapType: mapType,
+ minMaxZoomPreference: minMaxZoomPreference,
+ rotateGesturesEnabled: rotateGesturesEnabled,
+ scrollGesturesEnabled: scrollGesturesEnabled,
+ tiltGesturesEnabled: tiltGesturesEnabled,
+ trackCameraPosition: trackCameraPosition,
+ zoomGesturesEnabled: zoomGesturesEnabled,
+ myLocationEnabled: myLocationEnabled,
+ myLocationButtonEnabled: myLocationButtonEnabled,
+ padding: padding,
+ indoorViewEnabled: indoorViewEnabled,
+ trafficEnabled: trafficEnabled,
+ buildingsEnabled: buildingsEnabled,
+ markerType: markerType,
+ mapId: mapId,
+ style: style
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ compassEnabled,
+ cameraTargetBounds,
+ mapType,
+ minMaxZoomPreference,
+ rotateGesturesEnabled,
+ scrollGesturesEnabled,
+ tiltGesturesEnabled,
+ trackCameraPosition,
+ zoomGesturesEnabled,
+ myLocationEnabled,
+ myLocationButtonEnabled,
+ padding,
+ indoorViewEnabled,
+ trafficEnabled,
+ buildingsEnabled,
+ markerType,
+ mapId,
+ style,
+ ]
+ }
+ static func == (lhs: PlatformMapConfiguration, rhs: PlatformMapConfiguration) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.compassEnabled, rhs.compassEnabled)
+ && MessagesPigeonInternal.deepEquals(lhs.cameraTargetBounds, rhs.cameraTargetBounds)
+ && MessagesPigeonInternal.deepEquals(lhs.mapType, rhs.mapType)
+ && MessagesPigeonInternal.deepEquals(lhs.minMaxZoomPreference, rhs.minMaxZoomPreference)
+ && MessagesPigeonInternal.deepEquals(lhs.rotateGesturesEnabled, rhs.rotateGesturesEnabled)
+ && MessagesPigeonInternal.deepEquals(lhs.scrollGesturesEnabled, rhs.scrollGesturesEnabled)
+ && MessagesPigeonInternal.deepEquals(lhs.tiltGesturesEnabled, rhs.tiltGesturesEnabled)
+ && MessagesPigeonInternal.deepEquals(lhs.trackCameraPosition, rhs.trackCameraPosition)
+ && MessagesPigeonInternal.deepEquals(lhs.zoomGesturesEnabled, rhs.zoomGesturesEnabled)
+ && MessagesPigeonInternal.deepEquals(lhs.myLocationEnabled, rhs.myLocationEnabled)
+ && MessagesPigeonInternal.deepEquals(lhs.myLocationButtonEnabled, rhs.myLocationButtonEnabled)
+ && MessagesPigeonInternal.deepEquals(lhs.padding, rhs.padding)
+ && MessagesPigeonInternal.deepEquals(lhs.indoorViewEnabled, rhs.indoorViewEnabled)
+ && MessagesPigeonInternal.deepEquals(lhs.trafficEnabled, rhs.trafficEnabled)
+ && MessagesPigeonInternal.deepEquals(lhs.buildingsEnabled, rhs.buildingsEnabled)
+ && MessagesPigeonInternal.deepEquals(lhs.markerType, rhs.markerType)
+ && MessagesPigeonInternal.deepEquals(lhs.mapId, rhs.mapId)
+ && MessagesPigeonInternal.deepEquals(lhs.style, rhs.style)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformMapConfiguration")
+ MessagesPigeonInternal.deepHash(value: compassEnabled, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: cameraTargetBounds, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: mapType, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: minMaxZoomPreference, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: rotateGesturesEnabled, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: scrollGesturesEnabled, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: tiltGesturesEnabled, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: trackCameraPosition, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: zoomGesturesEnabled, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: myLocationEnabled, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: myLocationButtonEnabled, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: padding, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: indoorViewEnabled, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: trafficEnabled, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: buildingsEnabled, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: markerType, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: mapId, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: style, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformMapConfiguration(compassEnabled: \(String(describing: compassEnabled)), cameraTargetBounds: \(String(describing: cameraTargetBounds)), mapType: \(String(describing: mapType)), minMaxZoomPreference: \(String(describing: minMaxZoomPreference)), rotateGesturesEnabled: \(String(describing: rotateGesturesEnabled)), scrollGesturesEnabled: \(String(describing: scrollGesturesEnabled)), tiltGesturesEnabled: \(String(describing: tiltGesturesEnabled)), trackCameraPosition: \(String(describing: trackCameraPosition)), zoomGesturesEnabled: \(String(describing: zoomGesturesEnabled)), myLocationEnabled: \(String(describing: myLocationEnabled)), myLocationButtonEnabled: \(String(describing: myLocationButtonEnabled)), padding: \(String(describing: padding)), indoorViewEnabled: \(String(describing: indoorViewEnabled)), trafficEnabled: \(String(describing: trafficEnabled)), buildingsEnabled: \(String(describing: buildingsEnabled)), markerType: \(String(describing: markerType)), mapId: \(String(describing: mapId)), style: \(String(describing: style)))"
+ }
+}
+
+/// Pigeon representation of an x,y coordinate.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformPoint: Hashable, CustomStringConvertible {
+ var x: Double
+ var y: Double
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformPoint? {
+ let x = pigeonVar_list[0] as! Double
+ let y = pigeonVar_list[1] as! Double
+
+ return PlatformPoint(
+ x: x,
+ y: y
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ x,
+ y,
+ ]
+ }
+ static func == (lhs: PlatformPoint, rhs: PlatformPoint) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.x, rhs.x)
+ && MessagesPigeonInternal.deepEquals(lhs.y, rhs.y)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformPoint")
+ MessagesPigeonInternal.deepHash(value: x, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: y, hasher: &hasher)
+ }
+
+ public var description: String {
+ return "PlatformPoint(x: \(String(describing: x)), y: \(String(describing: y)))"
+ }
+}
+
+/// Pigeon representation of a size.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformSize: Hashable, CustomStringConvertible {
+ var width: Double
+ var height: Double
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformSize? {
+ let width = pigeonVar_list[0] as! Double
+ let height = pigeonVar_list[1] as! Double
+
+ return PlatformSize(
+ width: width,
+ height: height
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ width,
+ height,
+ ]
+ }
+ static func == (lhs: PlatformSize, rhs: PlatformSize) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.width, rhs.width)
+ && MessagesPigeonInternal.deepEquals(lhs.height, rhs.height)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformSize")
+ MessagesPigeonInternal.deepHash(value: width, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: height, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformSize(width: \(String(describing: width)), height: \(String(describing: height)))"
+ }
+}
+
+/// Pigeon representation of a color.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformColor: Hashable, CustomStringConvertible {
+ var red: Double
+ var green: Double
+ var blue: Double
+ var alpha: Double
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformColor? {
+ let red = pigeonVar_list[0] as! Double
+ let green = pigeonVar_list[1] as! Double
+ let blue = pigeonVar_list[2] as! Double
+ let alpha = pigeonVar_list[3] as! Double
+
+ return PlatformColor(
+ red: red,
+ green: green,
+ blue: blue,
+ alpha: alpha
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ red,
+ green,
+ blue,
+ alpha,
+ ]
+ }
+ static func == (lhs: PlatformColor, rhs: PlatformColor) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.red, rhs.red)
+ && MessagesPigeonInternal.deepEquals(lhs.green, rhs.green)
+ && MessagesPigeonInternal.deepEquals(lhs.blue, rhs.blue)
+ && MessagesPigeonInternal.deepEquals(lhs.alpha, rhs.alpha)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformColor")
+ MessagesPigeonInternal.deepHash(value: red, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: green, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: blue, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: alpha, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformColor(red: \(String(describing: red)), green: \(String(describing: green)), blue: \(String(describing: blue)), alpha: \(String(describing: alpha)))"
+ }
+}
+
+/// Pigeon equivalent of GMSTileLayer properties.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformTileLayer: Hashable, CustomStringConvertible {
+ var visible: Bool
+ var fadeIn: Bool
+ var opacity: Double
+ var zIndex: Int64
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformTileLayer? {
+ let visible = pigeonVar_list[0] as! Bool
+ let fadeIn = pigeonVar_list[1] as! Bool
+ let opacity = pigeonVar_list[2] as! Double
+ let zIndex = pigeonVar_list[3] as! Int64
+
+ return PlatformTileLayer(
+ visible: visible,
+ fadeIn: fadeIn,
+ opacity: opacity,
+ zIndex: zIndex
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ visible,
+ fadeIn,
+ opacity,
+ zIndex,
+ ]
+ }
+ static func == (lhs: PlatformTileLayer, rhs: PlatformTileLayer) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.visible, rhs.visible)
+ && MessagesPigeonInternal.deepEquals(lhs.fadeIn, rhs.fadeIn)
+ && MessagesPigeonInternal.deepEquals(lhs.opacity, rhs.opacity)
+ && MessagesPigeonInternal.deepEquals(lhs.zIndex, rhs.zIndex)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformTileLayer")
+ MessagesPigeonInternal.deepHash(value: visible, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: fadeIn, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: opacity, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: zIndex, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformTileLayer(visible: \(String(describing: visible)), fadeIn: \(String(describing: fadeIn)), opacity: \(String(describing: opacity)), zIndex: \(String(describing: zIndex)))"
+ }
+}
+
+/// Pigeon equivalent of MinMaxZoomPreference.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformZoomRange: Hashable, CustomStringConvertible {
+ var min: Double? = nil
+ var max: Double? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformZoomRange? {
+ let min: Double? = nilOrValue(pigeonVar_list[0])
+ let max: Double? = nilOrValue(pigeonVar_list[1])
+
+ return PlatformZoomRange(
+ min: min,
+ max: max
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ min,
+ max,
+ ]
+ }
+ static func == (lhs: PlatformZoomRange, rhs: PlatformZoomRange) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.min, rhs.min)
+ && MessagesPigeonInternal.deepEquals(lhs.max, rhs.max)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformZoomRange")
+ MessagesPigeonInternal.deepHash(value: min, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: max, hasher: &hasher)
+ }
+
+ public var description: String {
+ return "PlatformZoomRange(min: \(String(describing: min)), max: \(String(describing: max)))"
+ }
+}
+
+/// Pigeon equivalent of [BitmapDescriptor].
+///
+/// Generated class from Pigeon that represents data sent in messages.
+/// This protocol should not be extended by any user class outside of the generated file.
+protocol PlatformBitmap {
+
+}
+
+/// Pigeon equivalent of [DefaultMarker].
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformBitmapDefaultMarker: PlatformBitmap {
+ var hue: Double? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformBitmapDefaultMarker? {
+ let hue: Double? = nilOrValue(pigeonVar_list[0])
+
+ return PlatformBitmapDefaultMarker(
+ hue: hue
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ hue
+ ]
+ }
+ static func == (lhs: PlatformBitmapDefaultMarker, rhs: PlatformBitmapDefaultMarker) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.hue, rhs.hue)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformBitmapDefaultMarker")
+ MessagesPigeonInternal.deepHash(value: hue, hasher: &hasher)
+ }
+
+ public var description: String {
+ return "PlatformBitmapDefaultMarker(hue: \(String(describing: hue)))"
+ }
+}
+
+/// Pigeon equivalent of [BytesBitmap].
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformBitmapBytes: PlatformBitmap {
+ var byteData: FlutterStandardTypedData
+ var size: PlatformSize? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformBitmapBytes? {
+ let byteData = pigeonVar_list[0] as! FlutterStandardTypedData
+ let size: PlatformSize? = nilOrValue(pigeonVar_list[1])
+
+ return PlatformBitmapBytes(
+ byteData: byteData,
+ size: size
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ byteData,
+ size,
+ ]
+ }
+ static func == (lhs: PlatformBitmapBytes, rhs: PlatformBitmapBytes) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.byteData, rhs.byteData)
+ && MessagesPigeonInternal.deepEquals(lhs.size, rhs.size)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformBitmapBytes")
+ MessagesPigeonInternal.deepHash(value: byteData, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: size, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformBitmapBytes(byteData: \(String(describing: byteData)), size: \(String(describing: size)))"
+ }
+}
+
+/// Pigeon equivalent of [AssetBitmap].
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformBitmapAsset: PlatformBitmap {
+ var name: String
+ var pkg: String? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformBitmapAsset? {
+ let name = pigeonVar_list[0] as! String
+ let pkg: String? = nilOrValue(pigeonVar_list[1])
+
+ return PlatformBitmapAsset(
+ name: name,
+ pkg: pkg
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ name,
+ pkg,
+ ]
+ }
+ static func == (lhs: PlatformBitmapAsset, rhs: PlatformBitmapAsset) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.name, rhs.name)
+ && MessagesPigeonInternal.deepEquals(lhs.pkg, rhs.pkg)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformBitmapAsset")
+ MessagesPigeonInternal.deepHash(value: name, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: pkg, hasher: &hasher)
+ }
+
+ public var description: String {
+ return "PlatformBitmapAsset(name: \(String(describing: name)), pkg: \(String(describing: pkg)))"
+ }
+}
+
+/// Pigeon equivalent of [AssetImageBitmap].
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformBitmapAssetImage: PlatformBitmap {
+ var name: String
+ var scale: Double
+ var size: PlatformSize? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformBitmapAssetImage? {
+ let name = pigeonVar_list[0] as! String
+ let scale = pigeonVar_list[1] as! Double
+ let size: PlatformSize? = nilOrValue(pigeonVar_list[2])
+
+ return PlatformBitmapAssetImage(
+ name: name,
+ scale: scale,
+ size: size
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ name,
+ scale,
+ size,
+ ]
+ }
+ static func == (lhs: PlatformBitmapAssetImage, rhs: PlatformBitmapAssetImage) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.name, rhs.name)
+ && MessagesPigeonInternal.deepEquals(lhs.scale, rhs.scale)
+ && MessagesPigeonInternal.deepEquals(lhs.size, rhs.size)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformBitmapAssetImage")
+ MessagesPigeonInternal.deepHash(value: name, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: scale, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: size, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformBitmapAssetImage(name: \(String(describing: name)), scale: \(String(describing: scale)), size: \(String(describing: size)))"
+ }
+}
+
+/// Pigeon equivalent of [AssetMapBitmap].
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformBitmapAssetMap: PlatformBitmap {
+ var assetName: String
+ var bitmapScaling: PlatformMapBitmapScaling
+ var imagePixelRatio: Double
+ var width: Double? = nil
+ var height: Double? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformBitmapAssetMap? {
+ let assetName = pigeonVar_list[0] as! String
+ let bitmapScaling = pigeonVar_list[1] as! PlatformMapBitmapScaling
+ let imagePixelRatio = pigeonVar_list[2] as! Double
+ let width: Double? = nilOrValue(pigeonVar_list[3])
+ let height: Double? = nilOrValue(pigeonVar_list[4])
+
+ return PlatformBitmapAssetMap(
+ assetName: assetName,
+ bitmapScaling: bitmapScaling,
+ imagePixelRatio: imagePixelRatio,
+ width: width,
+ height: height
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ assetName,
+ bitmapScaling,
+ imagePixelRatio,
+ width,
+ height,
+ ]
+ }
+ static func == (lhs: PlatformBitmapAssetMap, rhs: PlatformBitmapAssetMap) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.assetName, rhs.assetName)
+ && MessagesPigeonInternal.deepEquals(lhs.bitmapScaling, rhs.bitmapScaling)
+ && MessagesPigeonInternal.deepEquals(lhs.imagePixelRatio, rhs.imagePixelRatio)
+ && MessagesPigeonInternal.deepEquals(lhs.width, rhs.width)
+ && MessagesPigeonInternal.deepEquals(lhs.height, rhs.height)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformBitmapAssetMap")
+ MessagesPigeonInternal.deepHash(value: assetName, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: bitmapScaling, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: imagePixelRatio, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: width, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: height, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformBitmapAssetMap(assetName: \(String(describing: assetName)), bitmapScaling: \(String(describing: bitmapScaling)), imagePixelRatio: \(String(describing: imagePixelRatio)), width: \(String(describing: width)), height: \(String(describing: height)))"
+ }
+}
+
+/// Pigeon equivalent of [BytesMapBitmap].
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformBitmapBytesMap: PlatformBitmap {
+ var byteData: FlutterStandardTypedData
+ var bitmapScaling: PlatformMapBitmapScaling
+ var imagePixelRatio: Double
+ var width: Double? = nil
+ var height: Double? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformBitmapBytesMap? {
+ let byteData = pigeonVar_list[0] as! FlutterStandardTypedData
+ let bitmapScaling = pigeonVar_list[1] as! PlatformMapBitmapScaling
+ let imagePixelRatio = pigeonVar_list[2] as! Double
+ let width: Double? = nilOrValue(pigeonVar_list[3])
+ let height: Double? = nilOrValue(pigeonVar_list[4])
+
+ return PlatformBitmapBytesMap(
+ byteData: byteData,
+ bitmapScaling: bitmapScaling,
+ imagePixelRatio: imagePixelRatio,
+ width: width,
+ height: height
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ byteData,
+ bitmapScaling,
+ imagePixelRatio,
+ width,
+ height,
+ ]
+ }
+ static func == (lhs: PlatformBitmapBytesMap, rhs: PlatformBitmapBytesMap) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.byteData, rhs.byteData)
+ && MessagesPigeonInternal.deepEquals(lhs.bitmapScaling, rhs.bitmapScaling)
+ && MessagesPigeonInternal.deepEquals(lhs.imagePixelRatio, rhs.imagePixelRatio)
+ && MessagesPigeonInternal.deepEquals(lhs.width, rhs.width)
+ && MessagesPigeonInternal.deepEquals(lhs.height, rhs.height)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformBitmapBytesMap")
+ MessagesPigeonInternal.deepHash(value: byteData, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: bitmapScaling, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: imagePixelRatio, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: width, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: height, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformBitmapBytesMap(byteData: \(String(describing: byteData)), bitmapScaling: \(String(describing: bitmapScaling)), imagePixelRatio: \(String(describing: imagePixelRatio)), width: \(String(describing: width)), height: \(String(describing: height)))"
+ }
+}
+
+/// Pigeon equivalent of [PinConfig].
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformBitmapPinConfig: PlatformBitmap {
+ var backgroundColor: PlatformColor? = nil
+ var borderColor: PlatformColor? = nil
+ var glyphColor: PlatformColor? = nil
+ var glyphTextColor: PlatformColor? = nil
+ var glyphText: String? = nil
+ var glyphBitmap: PlatformBitmap? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformBitmapPinConfig? {
+ let backgroundColor: PlatformColor? = nilOrValue(pigeonVar_list[0])
+ let borderColor: PlatformColor? = nilOrValue(pigeonVar_list[1])
+ let glyphColor: PlatformColor? = nilOrValue(pigeonVar_list[2])
+ let glyphTextColor: PlatformColor? = nilOrValue(pigeonVar_list[3])
+ let glyphText: String? = nilOrValue(pigeonVar_list[4])
+ let glyphBitmap: PlatformBitmap? = nilOrValue(pigeonVar_list[5])
+
+ return PlatformBitmapPinConfig(
+ backgroundColor: backgroundColor,
+ borderColor: borderColor,
+ glyphColor: glyphColor,
+ glyphTextColor: glyphTextColor,
+ glyphText: glyphText,
+ glyphBitmap: glyphBitmap
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ backgroundColor,
+ borderColor,
+ glyphColor,
+ glyphTextColor,
+ glyphText,
+ glyphBitmap,
+ ]
+ }
+ static func == (lhs: PlatformBitmapPinConfig, rhs: PlatformBitmapPinConfig) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.backgroundColor, rhs.backgroundColor)
+ && MessagesPigeonInternal.deepEquals(lhs.borderColor, rhs.borderColor)
+ && MessagesPigeonInternal.deepEquals(lhs.glyphColor, rhs.glyphColor)
+ && MessagesPigeonInternal.deepEquals(lhs.glyphTextColor, rhs.glyphTextColor)
+ && MessagesPigeonInternal.deepEquals(lhs.glyphText, rhs.glyphText)
+ && MessagesPigeonInternal.deepEquals(lhs.glyphBitmap, rhs.glyphBitmap)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformBitmapPinConfig")
+ MessagesPigeonInternal.deepHash(value: backgroundColor, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: borderColor, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: glyphColor, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: glyphTextColor, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: glyphText, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: glyphBitmap, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformBitmapPinConfig(backgroundColor: \(String(describing: backgroundColor)), borderColor: \(String(describing: borderColor)), glyphColor: \(String(describing: glyphColor)), glyphTextColor: \(String(describing: glyphTextColor)), glyphText: \(String(describing: glyphText)), glyphBitmap: \(String(describing: glyphBitmap)))"
+ }
+}
+
+private class MessagesPigeonCodecReader: FlutterStandardReader {
+ override func readValue(ofType type: UInt8) -> Any? {
+ switch type {
+ case 129:
+ let enumResultAsInt: Int? = nilOrValue(self.readValue() as! Int?)
+ if let enumResultAsInt = enumResultAsInt {
+ return PlatformMapType(rawValue: enumResultAsInt)
+ }
+ return nil
+ case 130:
+ let enumResultAsInt: Int? = nilOrValue(self.readValue() as! Int?)
+ if let enumResultAsInt = enumResultAsInt {
+ return PlatformMarkerCollisionBehavior(rawValue: enumResultAsInt)
+ }
+ return nil
+ case 131:
+ let enumResultAsInt: Int? = nilOrValue(self.readValue() as! Int?)
+ if let enumResultAsInt = enumResultAsInt {
+ return PlatformJointType(rawValue: enumResultAsInt)
+ }
+ return nil
+ case 132:
+ let enumResultAsInt: Int? = nilOrValue(self.readValue() as! Int?)
+ if let enumResultAsInt = enumResultAsInt {
+ return PlatformPatternItemType(rawValue: enumResultAsInt)
+ }
+ return nil
+ case 133:
+ let enumResultAsInt: Int? = nilOrValue(self.readValue() as! Int?)
+ if let enumResultAsInt = enumResultAsInt {
+ return PlatformMarkerType(rawValue: enumResultAsInt)
+ }
+ return nil
+ case 134:
+ let enumResultAsInt: Int? = nilOrValue(self.readValue() as! Int?)
+ if let enumResultAsInt = enumResultAsInt {
+ return PlatformMapBitmapScaling(rawValue: enumResultAsInt)
+ }
+ return nil
+ case 135:
+ return PlatformCameraPosition.fromList(self.readValue() as! [Any?])
+ case 136:
+ return PlatformCameraUpdateNewCameraPosition.fromList(self.readValue() as! [Any?])
+ case 137:
+ return PlatformCameraUpdateNewLatLng.fromList(self.readValue() as! [Any?])
+ case 138:
+ return PlatformCameraUpdateNewLatLngBounds.fromList(self.readValue() as! [Any?])
+ case 139:
+ return PlatformCameraUpdateNewLatLngZoom.fromList(self.readValue() as! [Any?])
+ case 140:
+ return PlatformCameraUpdateScrollBy.fromList(self.readValue() as! [Any?])
+ case 141:
+ return PlatformCameraUpdateZoomBy.fromList(self.readValue() as! [Any?])
+ case 142:
+ return PlatformCameraUpdateZoom.fromList(self.readValue() as! [Any?])
+ case 143:
+ return PlatformCameraUpdateZoomTo.fromList(self.readValue() as! [Any?])
+ case 144:
+ return PlatformCircle.fromList(self.readValue() as! [Any?])
+ case 145:
+ return PlatformHeatmap.fromList(self.readValue() as! [Any?])
+ case 146:
+ return PlatformHeatmapGradient.fromList(self.readValue() as! [Any?])
+ case 147:
+ return PlatformWeightedLatLng.fromList(self.readValue() as! [Any?])
+ case 148:
+ return PlatformInfoWindow.fromList(self.readValue() as! [Any?])
+ case 149:
+ return PlatformCluster.fromList(self.readValue() as! [Any?])
+ case 150:
+ return PlatformClusterManager.fromList(self.readValue() as! [Any?])
+ case 151:
+ return PlatformMarker.fromList(self.readValue() as! [Any?])
+ case 152:
+ return PlatformPolygon.fromList(self.readValue() as! [Any?])
+ case 153:
+ return PlatformPolyline.fromList(self.readValue() as! [Any?])
+ case 154:
+ return PlatformPatternItem.fromList(self.readValue() as! [Any?])
+ case 155:
+ return PlatformTile.fromList(self.readValue() as! [Any?])
+ case 156:
+ return PlatformTileOverlay.fromList(self.readValue() as! [Any?])
+ case 157:
+ return PlatformEdgeInsets.fromList(self.readValue() as! [Any?])
+ case 158:
+ return PlatformLatLng.fromList(self.readValue() as! [Any?])
+ case 159:
+ return PlatformLatLngBounds.fromList(self.readValue() as! [Any?])
+ case 160:
+ return PlatformCameraTargetBounds.fromList(self.readValue() as! [Any?])
+ case 161:
+ return PlatformGroundOverlay.fromList(self.readValue() as! [Any?])
+ case 162:
+ return PlatformMapViewCreationParams.fromList(self.readValue() as! [Any?])
+ case 163:
+ return PlatformMapConfiguration.fromList(self.readValue() as! [Any?])
+ case 164:
+ return PlatformPoint.fromList(self.readValue() as! [Any?])
+ case 165:
+ return PlatformSize.fromList(self.readValue() as! [Any?])
+ case 166:
+ return PlatformColor.fromList(self.readValue() as! [Any?])
+ case 167:
+ return PlatformTileLayer.fromList(self.readValue() as! [Any?])
+ case 168:
+ return PlatformZoomRange.fromList(self.readValue() as! [Any?])
+ case 169:
+ return PlatformBitmapDefaultMarker.fromList(self.readValue() as! [Any?])
+ case 170:
+ return PlatformBitmapBytes.fromList(self.readValue() as! [Any?])
+ case 171:
+ return PlatformBitmapAsset.fromList(self.readValue() as! [Any?])
+ case 172:
+ return PlatformBitmapAssetImage.fromList(self.readValue() as! [Any?])
+ case 173:
+ return PlatformBitmapAssetMap.fromList(self.readValue() as! [Any?])
+ case 174:
+ return PlatformBitmapBytesMap.fromList(self.readValue() as! [Any?])
+ case 175:
+ return PlatformBitmapPinConfig.fromList(self.readValue() as! [Any?])
+ default:
+ return super.readValue(ofType: type)
+ }
+ }
+}
+
+private class MessagesPigeonCodecWriter: FlutterStandardWriter {
+ override func writeValue(_ value: Any) {
+ if let value = value as? PlatformMapType {
+ super.writeByte(129)
+ super.writeValue(value.rawValue)
+ } else if let value = value as? PlatformMarkerCollisionBehavior {
+ super.writeByte(130)
+ super.writeValue(value.rawValue)
+ } else if let value = value as? PlatformJointType {
+ super.writeByte(131)
+ super.writeValue(value.rawValue)
+ } else if let value = value as? PlatformPatternItemType {
+ super.writeByte(132)
+ super.writeValue(value.rawValue)
+ } else if let value = value as? PlatformMarkerType {
+ super.writeByte(133)
+ super.writeValue(value.rawValue)
+ } else if let value = value as? PlatformMapBitmapScaling {
+ super.writeByte(134)
+ super.writeValue(value.rawValue)
+ } else if let value = value as? PlatformCameraPosition {
+ super.writeByte(135)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformCameraUpdateNewCameraPosition {
+ super.writeByte(136)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformCameraUpdateNewLatLng {
+ super.writeByte(137)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformCameraUpdateNewLatLngBounds {
+ super.writeByte(138)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformCameraUpdateNewLatLngZoom {
+ super.writeByte(139)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformCameraUpdateScrollBy {
+ super.writeByte(140)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformCameraUpdateZoomBy {
+ super.writeByte(141)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformCameraUpdateZoom {
+ super.writeByte(142)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformCameraUpdateZoomTo {
+ super.writeByte(143)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformCircle {
+ super.writeByte(144)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformHeatmap {
+ super.writeByte(145)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformHeatmapGradient {
+ super.writeByte(146)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformWeightedLatLng {
+ super.writeByte(147)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformInfoWindow {
+ super.writeByte(148)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformCluster {
+ super.writeByte(149)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformClusterManager {
+ super.writeByte(150)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformMarker {
+ super.writeByte(151)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformPolygon {
+ super.writeByte(152)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformPolyline {
+ super.writeByte(153)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformPatternItem {
+ super.writeByte(154)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformTile {
+ super.writeByte(155)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformTileOverlay {
+ super.writeByte(156)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformEdgeInsets {
+ super.writeByte(157)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformLatLng {
+ super.writeByte(158)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformLatLngBounds {
+ super.writeByte(159)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformCameraTargetBounds {
+ super.writeByte(160)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformGroundOverlay {
+ super.writeByte(161)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformMapViewCreationParams {
+ super.writeByte(162)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformMapConfiguration {
+ super.writeByte(163)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformPoint {
+ super.writeByte(164)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformSize {
+ super.writeByte(165)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformColor {
+ super.writeByte(166)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformTileLayer {
+ super.writeByte(167)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformZoomRange {
+ super.writeByte(168)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformBitmapDefaultMarker {
+ super.writeByte(169)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformBitmapBytes {
+ super.writeByte(170)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformBitmapAsset {
+ super.writeByte(171)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformBitmapAssetImage {
+ super.writeByte(172)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformBitmapAssetMap {
+ super.writeByte(173)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformBitmapBytesMap {
+ super.writeByte(174)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformBitmapPinConfig {
+ super.writeByte(175)
+ super.writeValue(value.toList())
+ } else {
+ super.writeValue(value)
+ }
+ }
+}
+
+private class MessagesPigeonCodecReaderWriter: FlutterStandardReaderWriter {
+ override func reader(with data: Data) -> FlutterStandardReader {
+ return MessagesPigeonCodecReader(data: data)
+ }
+
+ override func writer(with data: NSMutableData) -> FlutterStandardWriter {
+ return MessagesPigeonCodecWriter(data: data)
+ }
+}
+
+class MessagesPigeonCodec: FlutterStandardMessageCodec, @unchecked Sendable {
+ static let shared = MessagesPigeonCodec(readerWriter: MessagesPigeonCodecReaderWriter())
+}
+
+/// Interface for non-test interactions with the native SDK.
+///
+/// For test-only state queries, see [MapsInspectorApi].
+///
+/// Generated protocol from Pigeon that represents a handler of messages from Flutter.
+protocol MapsApi {
+ /// Returns once the map instance is available.
+ func waitForMap() throws
+ /// Updates the map's configuration options.
+ ///
+ /// Only non-null configuration values will result in updates; options with
+ /// null values will remain unchanged.
+ func updateWithMapConfiguration(_ configuration: PlatformMapConfiguration) throws
+ /// Updates the set of circles on the map.
+ func updateCircles(
+ adding toAdd: [PlatformCircle], changing toChange: [PlatformCircle],
+ removing idsToRemove: [String]) throws
+ /// Updates the set of heatmaps on the map.
+ func updateHeatmaps(
+ adding toAdd: [PlatformHeatmap], changing toChange: [PlatformHeatmap],
+ removing idsToRemove: [String]) throws
+ /// Updates the set of custer managers for clusters on the map.
+ func updateClusterManagers(adding toAdd: [PlatformClusterManager], removing idsToRemove: [String])
+ throws
+ /// Updates the set of markers on the map.
+ func updateMarkers(
+ adding toAdd: [PlatformMarker], changing toChange: [PlatformMarker],
+ removing idsToRemove: [String]) throws
+ /// Updates the set of polygonss on the map.
+ func updatePolygons(
+ adding toAdd: [PlatformPolygon], changing toChange: [PlatformPolygon],
+ removing idsToRemove: [String]) throws
+ /// Updates the set of polylines on the map.
+ func updatePolylines(
+ adding toAdd: [PlatformPolyline], changing toChange: [PlatformPolyline],
+ removing idsToRemove: [String]) throws
+ /// Updates the set of tile overlays on the map.
+ func updateTileOverlays(
+ adding toAdd: [PlatformTileOverlay], changing toChange: [PlatformTileOverlay],
+ removing idsToRemove: [String]) throws
+ /// Updates the set of ground overlays on the map.
+ func updateGroundOverlays(
+ adding toAdd: [PlatformGroundOverlay], changing toChange: [PlatformGroundOverlay],
+ removing idsToRemove: [String]) throws
+ /// Gets the screen coordinate for the given map location.
+ func screenCoordinates(for latLng: PlatformLatLng) throws -> PlatformPoint
+ /// Gets the map location for the given screen coordinate.
+ func latLng(for screenCoordinate: PlatformPoint) throws -> PlatformLatLng
+ /// Gets the map region currently displayed on the map.
+ func visibleMapRegion() throws -> PlatformLatLngBounds
+ /// Moves the camera according to [cameraUpdate] immediately, with no
+ /// animation.
+ func moveCamera(_ cameraUpdate: PlatformCameraUpdate) throws
+ /// Moves the camera according to [cameraUpdate], animating the update using a
+ /// duration in milliseconds if provided.
+ func animateCamera(_ cameraUpdate: PlatformCameraUpdate, duration durationMilliseconds: Int64?)
+ throws
+ /// Gets the current map zoom level.
+ func zoomLevel() throws -> Double
+ /// Show the info window for the marker with the given ID.
+ func showInfoWindowForMarker(withIdentifier markerId: String) throws
+ /// Hide the info window for the marker with the given ID.
+ func hideInfoWindowForMarker(withIdentifier markerId: String) throws
+ /// Returns true if the marker with the given ID is currently displaying its
+ /// info window.
+ func isShowingInfoWindowForMarker(withIdentifier markerId: String) throws -> Bool
+ /// Sets the style to the given map style string, where an empty string
+ /// indicates that the style should be cleared.
+ ///
+ /// If there was an error setting the style, such as an invalid style string,
+ /// returns the error message.
+ func setStyle(_ style: String) throws -> String?
+ /// Returns the error string from the last attempt to set the map style, if
+ /// any.
+ ///
+ /// This allows checking asynchronously for initial style failures, as there
+ /// is no way to return failures from map initialization.
+ func lastStyleError() throws -> String?
+ /// Clears the cache of tiles previously requseted from the tile provider.
+ func clearTileCacheForOverlay(withIdentifier tileOverlayId: String) throws
+ /// Takes a snapshot of the map and returns its image data.
+ func takeSnapshot() throws -> FlutterStandardTypedData?
+ /// Returns true if the map supports advanced markers.
+ func isAdvancedMarkersAvailable() throws -> Bool
+}
+
+/// Generated setup class from Pigeon to handle messages through the `binaryMessenger`.
+class MapsApiSetup {
+ static var codec: FlutterStandardMessageCodec { MessagesPigeonCodec.shared }
+ /// Sets up an instance of `MapsApi` to handle messages through the `binaryMessenger`.
+ static func setUp(
+ binaryMessenger: FlutterBinaryMessenger, api: MapsApi?, messageChannelSuffix: String = ""
+ ) {
+ let channelSuffix = messageChannelSuffix.count > 0 ? ".\(messageChannelSuffix)" : ""
+ /// Returns once the map instance is available.
+ let waitForMapChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.waitForMap\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ waitForMapChannel.setMessageHandler { _, reply in
+ do {
+ try api.waitForMap()
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ waitForMapChannel.setMessageHandler(nil)
+ }
+ /// Updates the map's configuration options.
+ ///
+ /// Only non-null configuration values will result in updates; options with
+ /// null values will remain unchanged.
+ let updateMapConfigurationChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMapConfiguration\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ updateMapConfigurationChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let configurationArg = args[0] as! PlatformMapConfiguration
+ do {
+ try api.updateWithMapConfiguration(configurationArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ updateMapConfigurationChannel.setMessageHandler(nil)
+ }
+ /// Updates the set of circles on the map.
+ let updateCirclesChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateCircles\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ updateCirclesChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let toAddArg = args[0] as! [PlatformCircle]
+ let toChangeArg = args[1] as! [PlatformCircle]
+ let idsToRemoveArg = args[2] as! [String]
+ do {
+ try api.updateCircles(adding: toAddArg, changing: toChangeArg, removing: idsToRemoveArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ updateCirclesChannel.setMessageHandler(nil)
+ }
+ /// Updates the set of heatmaps on the map.
+ let updateHeatmapsChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateHeatmaps\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ updateHeatmapsChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let toAddArg = args[0] as! [PlatformHeatmap]
+ let toChangeArg = args[1] as! [PlatformHeatmap]
+ let idsToRemoveArg = args[2] as! [String]
+ do {
+ try api.updateHeatmaps(adding: toAddArg, changing: toChangeArg, removing: idsToRemoveArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ updateHeatmapsChannel.setMessageHandler(nil)
+ }
+ /// Updates the set of custer managers for clusters on the map.
+ let updateClusterManagersChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateClusterManagers\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ updateClusterManagersChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let toAddArg = args[0] as! [PlatformClusterManager]
+ let idsToRemoveArg = args[1] as! [String]
+ do {
+ try api.updateClusterManagers(adding: toAddArg, removing: idsToRemoveArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ updateClusterManagersChannel.setMessageHandler(nil)
+ }
+ /// Updates the set of markers on the map.
+ let updateMarkersChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMarkers\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ updateMarkersChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let toAddArg = args[0] as! [PlatformMarker]
+ let toChangeArg = args[1] as! [PlatformMarker]
+ let idsToRemoveArg = args[2] as! [String]
+ do {
+ try api.updateMarkers(adding: toAddArg, changing: toChangeArg, removing: idsToRemoveArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ updateMarkersChannel.setMessageHandler(nil)
+ }
+ /// Updates the set of polygonss on the map.
+ let updatePolygonsChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolygons\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ updatePolygonsChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let toAddArg = args[0] as! [PlatformPolygon]
+ let toChangeArg = args[1] as! [PlatformPolygon]
+ let idsToRemoveArg = args[2] as! [String]
+ do {
+ try api.updatePolygons(adding: toAddArg, changing: toChangeArg, removing: idsToRemoveArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ updatePolygonsChannel.setMessageHandler(nil)
+ }
+ /// Updates the set of polylines on the map.
+ let updatePolylinesChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolylines\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ updatePolylinesChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let toAddArg = args[0] as! [PlatformPolyline]
+ let toChangeArg = args[1] as! [PlatformPolyline]
+ let idsToRemoveArg = args[2] as! [String]
+ do {
+ try api.updatePolylines(adding: toAddArg, changing: toChangeArg, removing: idsToRemoveArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ updatePolylinesChannel.setMessageHandler(nil)
+ }
+ /// Updates the set of tile overlays on the map.
+ let updateTileOverlaysChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateTileOverlays\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ updateTileOverlaysChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let toAddArg = args[0] as! [PlatformTileOverlay]
+ let toChangeArg = args[1] as! [PlatformTileOverlay]
+ let idsToRemoveArg = args[2] as! [String]
+ do {
+ try api.updateTileOverlays(
+ adding: toAddArg, changing: toChangeArg, removing: idsToRemoveArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ updateTileOverlaysChannel.setMessageHandler(nil)
+ }
+ /// Updates the set of ground overlays on the map.
+ let updateGroundOverlaysChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateGroundOverlays\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ updateGroundOverlaysChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let toAddArg = args[0] as! [PlatformGroundOverlay]
+ let toChangeArg = args[1] as! [PlatformGroundOverlay]
+ let idsToRemoveArg = args[2] as! [String]
+ do {
+ try api.updateGroundOverlays(
+ adding: toAddArg, changing: toChangeArg, removing: idsToRemoveArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ updateGroundOverlaysChannel.setMessageHandler(nil)
+ }
+ /// Gets the screen coordinate for the given map location.
+ let getScreenCoordinateChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getScreenCoordinate\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ getScreenCoordinateChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let latLngArg = args[0] as! PlatformLatLng
+ do {
+ let result = try api.screenCoordinates(for: latLngArg)
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ getScreenCoordinateChannel.setMessageHandler(nil)
+ }
+ /// Gets the map location for the given screen coordinate.
+ let getLatLngChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLatLng\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ getLatLngChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let screenCoordinateArg = args[0] as! PlatformPoint
+ do {
+ let result = try api.latLng(for: screenCoordinateArg)
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ getLatLngChannel.setMessageHandler(nil)
+ }
+ /// Gets the map region currently displayed on the map.
+ let getVisibleRegionChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getVisibleRegion\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ getVisibleRegionChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.visibleMapRegion()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ getVisibleRegionChannel.setMessageHandler(nil)
+ }
+ /// Moves the camera according to [cameraUpdate] immediately, with no
+ /// animation.
+ let moveCameraChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.moveCamera\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ moveCameraChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let cameraUpdateArg = args[0] as! PlatformCameraUpdate
+ do {
+ try api.moveCamera(cameraUpdateArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ moveCameraChannel.setMessageHandler(nil)
+ }
+ /// Moves the camera according to [cameraUpdate], animating the update using a
+ /// duration in milliseconds if provided.
+ let animateCameraChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.animateCamera\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ animateCameraChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let cameraUpdateArg = args[0] as! PlatformCameraUpdate
+ let durationMillisecondsArg: Int64? = nilOrValue(args[1])
+ do {
+ try api.animateCamera(cameraUpdateArg, duration: durationMillisecondsArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ animateCameraChannel.setMessageHandler(nil)
+ }
+ /// Gets the current map zoom level.
+ let getZoomLevelChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getZoomLevel\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ getZoomLevelChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.zoomLevel()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ getZoomLevelChannel.setMessageHandler(nil)
+ }
+ /// Show the info window for the marker with the given ID.
+ let showInfoWindowChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.showInfoWindow\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ showInfoWindowChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let markerIdArg = args[0] as! String
+ do {
+ try api.showInfoWindowForMarker(withIdentifier: markerIdArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ showInfoWindowChannel.setMessageHandler(nil)
+ }
+ /// Hide the info window for the marker with the given ID.
+ let hideInfoWindowChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.hideInfoWindow\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ hideInfoWindowChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let markerIdArg = args[0] as! String
+ do {
+ try api.hideInfoWindowForMarker(withIdentifier: markerIdArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ hideInfoWindowChannel.setMessageHandler(nil)
+ }
+ /// Returns true if the marker with the given ID is currently displaying its
+ /// info window.
+ let isInfoWindowShownChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isInfoWindowShown\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ isInfoWindowShownChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let markerIdArg = args[0] as! String
+ do {
+ let result = try api.isShowingInfoWindowForMarker(withIdentifier: markerIdArg)
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ isInfoWindowShownChannel.setMessageHandler(nil)
+ }
+ /// Sets the style to the given map style string, where an empty string
+ /// indicates that the style should be cleared.
+ ///
+ /// If there was an error setting the style, such as an invalid style string,
+ /// returns the error message.
+ let setStyleChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.setStyle\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ setStyleChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let styleArg = args[0] as! String
+ do {
+ let result = try api.setStyle(styleArg)
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ setStyleChannel.setMessageHandler(nil)
+ }
+ /// Returns the error string from the last attempt to set the map style, if
+ /// any.
+ ///
+ /// This allows checking asynchronously for initial style failures, as there
+ /// is no way to return failures from map initialization.
+ let getLastStyleErrorChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLastStyleError\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ getLastStyleErrorChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.lastStyleError()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ getLastStyleErrorChannel.setMessageHandler(nil)
+ }
+ /// Clears the cache of tiles previously requseted from the tile provider.
+ let clearTileCacheChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.clearTileCache\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ clearTileCacheChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let tileOverlayIdArg = args[0] as! String
+ do {
+ try api.clearTileCacheForOverlay(withIdentifier: tileOverlayIdArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ clearTileCacheChannel.setMessageHandler(nil)
+ }
+ /// Takes a snapshot of the map and returns its image data.
+ let takeSnapshotChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.takeSnapshot\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ takeSnapshotChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.takeSnapshot()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ takeSnapshotChannel.setMessageHandler(nil)
+ }
+ /// Returns true if the map supports advanced markers.
+ let isAdvancedMarkersAvailableChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isAdvancedMarkersAvailable\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ isAdvancedMarkersAvailableChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.isAdvancedMarkersAvailable()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ isAdvancedMarkersAvailableChannel.setMessageHandler(nil)
+ }
+ }
+}
+
+/// Interface for calls from the native SDK to Dart.
+///
+/// Generated protocol from Pigeon that represents Flutter messages that can be called from Swift.
+protocol MapsCallbackApiProtocol {
+ /// Called when the map camera starts moving.
+ func didStartCameraMove(completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when the map camera moves.
+ func didMoveCamera(
+ to cameraPositionArg: PlatformCameraPosition,
+ completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when the map camera stops moving.
+ func didIdleCamera(completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when the map, not a specifc map object, is tapped.
+ func didTap(
+ at positionArg: PlatformLatLng, completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when the map, not a specifc map object, is long pressed.
+ func didLongPress(
+ at positionArg: PlatformLatLng, completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when a marker is tapped.
+ func didTapMarker(
+ withIdentifier markerIdArg: String, completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when a marker drag starts.
+ func didStartDragForMarker(
+ withIdentifier markerIdArg: String, at positionArg: PlatformLatLng,
+ completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when a marker drag updates.
+ func didDragMarker(
+ withIdentifier markerIdArg: String, at positionArg: PlatformLatLng,
+ completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when a marker drag ends.
+ func didEndDragForMarker(
+ withIdentifier markerIdArg: String, at positionArg: PlatformLatLng,
+ completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when a marker's info window is tapped.
+ func didTapInfoWindowOfMarker(
+ withIdentifier markerIdArg: String, completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when a circle is tapped.
+ func didTapCircle(
+ withIdentifier circleIdArg: String, completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when a marker cluster is tapped.
+ func didTapCluster(
+ _ clusterArg: PlatformCluster, completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when a polygon is tapped.
+ func didTapPolygon(
+ withIdentifier polygonIdArg: String, completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when a polyline is tapped.
+ func didTapPolyline(
+ withIdentifier polylineIdArg: String, completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when a ground overlay is tapped.
+ func didTapGroundOverlay(
+ withIdentifier groundOverlayIdArg: String,
+ completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called to get data for a map tile.
+ func tile(
+ withOverlayIdentifier tileOverlayIdArg: String, location locationArg: PlatformPoint,
+ zoom zoomArg: Int64, completion: @escaping (Result<PlatformTile, PigeonError>) -> Void)
+}
+class MapsCallbackApi: MapsCallbackApiProtocol {
+ private let binaryMessenger: FlutterBinaryMessenger
+ private let messageChannelSuffix: String
+ init(binaryMessenger: FlutterBinaryMessenger, messageChannelSuffix: String = "") {
+ self.binaryMessenger = binaryMessenger
+ self.messageChannelSuffix = messageChannelSuffix.count > 0 ? ".\(messageChannelSuffix)" : ""
+ }
+ var codec: MessagesPigeonCodec {
+ return MessagesPigeonCodec.shared
+ }
+ /// Called when the map camera starts moving.
+ func didStartCameraMove(completion: @escaping (Result<Void, PigeonError>) -> Void) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMoveStarted\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage(nil) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when the map camera moves.
+ func didMoveCamera(
+ to cameraPositionArg: PlatformCameraPosition,
+ completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([cameraPositionArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when the map camera stops moving.
+ func didIdleCamera(completion: @escaping (Result<Void, PigeonError>) -> Void) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraIdle\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage(nil) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when the map, not a specifc map object, is tapped.
+ func didTap(
+ at positionArg: PlatformLatLng, completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([positionArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when the map, not a specifc map object, is long pressed.
+ func didLongPress(
+ at positionArg: PlatformLatLng, completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([positionArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when a marker is tapped.
+ func didTapMarker(
+ withIdentifier markerIdArg: String, completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([markerIdArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when a marker drag starts.
+ func didStartDragForMarker(
+ withIdentifier markerIdArg: String, at positionArg: PlatformLatLng,
+ completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([markerIdArg, positionArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when a marker drag updates.
+ func didDragMarker(
+ withIdentifier markerIdArg: String, at positionArg: PlatformLatLng,
+ completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([markerIdArg, positionArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when a marker drag ends.
+ func didEndDragForMarker(
+ withIdentifier markerIdArg: String, at positionArg: PlatformLatLng,
+ completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([markerIdArg, positionArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when a marker's info window is tapped.
+ func didTapInfoWindowOfMarker(
+ withIdentifier markerIdArg: String, completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([markerIdArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when a circle is tapped.
+ func didTapCircle(
+ withIdentifier circleIdArg: String, completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([circleIdArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when a marker cluster is tapped.
+ func didTapCluster(
+ _ clusterArg: PlatformCluster, completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([clusterArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when a polygon is tapped.
+ func didTapPolygon(
+ withIdentifier polygonIdArg: String, completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([polygonIdArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when a polyline is tapped.
+ func didTapPolyline(
+ withIdentifier polylineIdArg: String, completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([polylineIdArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when a ground overlay is tapped.
+ func didTapGroundOverlay(
+ withIdentifier groundOverlayIdArg: String,
+ completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([groundOverlayIdArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called to get data for a map tile.
+ func tile(
+ withOverlayIdentifier tileOverlayIdArg: String, location locationArg: PlatformPoint,
+ zoom zoomArg: Int64, completion: @escaping (Result<PlatformTile, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([tileOverlayIdArg, locationArg, zoomArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else if listResponse[0] == nil {
+ completion(
+ .failure(
+ PigeonError(
+ code: "null-error",
+ message: "Flutter api returned null value for non-null return value.", details: "")))
+ } else {
+ let result = listResponse[0] as! PlatformTile
+ completion(.success(result))
+ }
+ }
+ }
+}
+/// Dummy interface to force generation of the platform view creation params,
+/// which are not used in any Pigeon calls, only the platform view creation
+/// call made internally by Flutter.
+///
+/// Generated protocol from Pigeon that represents a handler of messages from Flutter.
+protocol MapsPlatformViewApi {
+ func createView(type: PlatformMapViewCreationParams?) throws
+}
+
+/// Generated setup class from Pigeon to handle messages through the `binaryMessenger`.
+class MapsPlatformViewApiSetup {
+ static var codec: FlutterStandardMessageCodec { MessagesPigeonCodec.shared }
+ /// Sets up an instance of `MapsPlatformViewApi` to handle messages through the `binaryMessenger`.
+ static func setUp(
+ binaryMessenger: FlutterBinaryMessenger, api: MapsPlatformViewApi?,
+ messageChannelSuffix: String = ""
+ ) {
+ let channelSuffix = messageChannelSuffix.count > 0 ? ".\(messageChannelSuffix)" : ""
+ let createViewChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsPlatformViewApi.createView\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ createViewChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let typeArg: PlatformMapViewCreationParams? = nilOrValue(args[0])
+ do {
+ try api.createView(type: typeArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ createViewChannel.setMessageHandler(nil)
+ }
+ }
+}
+/// Inspector API only intended for use in integration tests.
+///
+/// Generated protocol from Pigeon that represents a handler of messages from Flutter.
+protocol MapsInspectorApi {
+ func areBuildingsEnabled() throws -> Bool
+ func areRotateGesturesEnabled() throws -> Bool
+ func areScrollGesturesEnabled() throws -> Bool
+ func areTiltGesturesEnabled() throws -> Bool
+ func areZoomGesturesEnabled() throws -> Bool
+ func isCompassEnabled() throws -> Bool
+ func isMyLocationButtonEnabled() throws -> Bool
+ func isTrafficEnabled() throws -> Bool
+ func tileOverlay(withIdentifier tileOverlayId: String) throws -> PlatformTileLayer?
+ func groundOverlay(withIdentifier groundOverlayId: String) throws -> PlatformGroundOverlay?
+ func heatmap(withIdentifier heatmapId: String) throws -> PlatformHeatmap?
+ func zoomRange() throws -> PlatformZoomRange
+ func clusters(withIdentifier clusterManagerId: String) throws -> [PlatformCluster]
+ func cameraPosition() throws -> PlatformCameraPosition
+}
+
+/// Generated setup class from Pigeon to handle messages through the `binaryMessenger`.
+class MapsInspectorApiSetup {
+ static var codec: FlutterStandardMessageCodec { MessagesPigeonCodec.shared }
+ /// Sets up an instance of `MapsInspectorApi` to handle messages through the `binaryMessenger`.
+ static func setUp(
+ binaryMessenger: FlutterBinaryMessenger, api: MapsInspectorApi?,
+ messageChannelSuffix: String = ""
+ ) {
+ let channelSuffix = messageChannelSuffix.count > 0 ? ".\(messageChannelSuffix)" : ""
+ let areBuildingsEnabledChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areBuildingsEnabled\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ areBuildingsEnabledChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.areBuildingsEnabled()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ areBuildingsEnabledChannel.setMessageHandler(nil)
+ }
+ let areRotateGesturesEnabledChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areRotateGesturesEnabled\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ areRotateGesturesEnabledChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.areRotateGesturesEnabled()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ areRotateGesturesEnabledChannel.setMessageHandler(nil)
+ }
+ let areScrollGesturesEnabledChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areScrollGesturesEnabled\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ areScrollGesturesEnabledChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.areScrollGesturesEnabled()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ areScrollGesturesEnabledChannel.setMessageHandler(nil)
+ }
+ let areTiltGesturesEnabledChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areTiltGesturesEnabled\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ areTiltGesturesEnabledChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.areTiltGesturesEnabled()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ areTiltGesturesEnabledChannel.setMessageHandler(nil)
+ }
+ let areZoomGesturesEnabledChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areZoomGesturesEnabled\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ areZoomGesturesEnabledChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.areZoomGesturesEnabled()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ areZoomGesturesEnabledChannel.setMessageHandler(nil)
+ }
+ let isCompassEnabledChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isCompassEnabled\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ isCompassEnabledChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.isCompassEnabled()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ isCompassEnabledChannel.setMessageHandler(nil)
+ }
+ let isMyLocationButtonEnabledChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isMyLocationButtonEnabled\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ isMyLocationButtonEnabledChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.isMyLocationButtonEnabled()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ isMyLocationButtonEnabledChannel.setMessageHandler(nil)
+ }
+ let isTrafficEnabledChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isTrafficEnabled\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ isTrafficEnabledChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.isTrafficEnabled()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ isTrafficEnabledChannel.setMessageHandler(nil)
+ }
+ let getTileOverlayInfoChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getTileOverlayInfo\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ getTileOverlayInfoChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let tileOverlayIdArg = args[0] as! String
+ do {
+ let result = try api.tileOverlay(withIdentifier: tileOverlayIdArg)
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ getTileOverlayInfoChannel.setMessageHandler(nil)
+ }
+ let getGroundOverlayInfoChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getGroundOverlayInfo\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ getGroundOverlayInfoChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let groundOverlayIdArg = args[0] as! String
+ do {
+ let result = try api.groundOverlay(withIdentifier: groundOverlayIdArg)
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ getGroundOverlayInfoChannel.setMessageHandler(nil)
+ }
+ let getHeatmapInfoChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getHeatmapInfo\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ getHeatmapInfoChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let heatmapIdArg = args[0] as! String
+ do {
+ let result = try api.heatmap(withIdentifier: heatmapIdArg)
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ getHeatmapInfoChannel.setMessageHandler(nil)
+ }
+ let getZoomRangeChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getZoomRange\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ getZoomRangeChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.zoomRange()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ getZoomRangeChannel.setMessageHandler(nil)
+ }
+ let getClustersChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getClusters\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ getClustersChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let clusterManagerIdArg = args[0] as! String
+ do {
+ let result = try api.clusters(withIdentifier: clusterManagerIdArg)
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ getClustersChannel.setMessageHandler(nil)
+ }
+ let getCameraPositionChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getCameraPosition\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ getCameraPositionChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.cameraPosition()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ getCameraPositionChannel.setMessageHandler(nil)
+ }
+ }
+}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/PolygonController.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/PolygonController.swift
index a24da0f..2677978 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/PolygonController.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/PolygonController.swift
@@ -4,12 +4,8 @@
import GoogleMaps
-#if canImport(google_maps_flutter_ios_sdk9_objc)
- import google_maps_flutter_ios_sdk9_objc
-#endif
-
/// Defines polygon controllable by Flutter.
-class PolygonController: NSObject {
+class PolygonController {
let polygon: GMSPolygon
private weak var mapView: GMSMapView?
@@ -17,33 +13,34 @@
self.polygon = GMSPolygon()
self.mapView = mapView
self.polygon.userData = [identifier]
- super.init()
}
func removePolygon() {
polygon.map = nil
}
- /// Updates the controller's polygon with the properties from a FGMPlatformPolygon.
+ /// Updates the controller's polygon with the properties from a PlatformPolygon.
///
/// Setting the polygon to visible will set its map to the controller's mapView.
- func update(from platformPolygon: FGMPlatformPolygon) {
+ func update(from platformPolygon: PlatformPolygon) {
if let mapView = mapView {
PolygonController.update(polygon, from: platformPolygon, with: mapView)
}
}
- /// Updates the given GMSPolygon with the properties from a FGMPlatformPolygon.
+ /// Updates the given GMSPolygon with the properties from a PlatformPolygon.
///
/// Setting the polygon to visible will set its map to the given mapView.
static func update(
- _ polygon: GMSPolygon, from platformPolygon: FGMPlatformPolygon, with mapView: GMSMapView
+ _ polygon: GMSPolygon,
+ from platformPolygon: PlatformPolygon,
+ with mapView: GMSMapView
) {
polygon.isTappable = platformPolygon.consumesTapEvents
polygon.zIndex = Int32(platformPolygon.zIndex)
- polygon.path = makePath(from: platformPolygon.points.map({ $0.toCLLocationCoordinate2D() }))
+ polygon.path = makePath(from: platformPolygon.points.map { $0.toCLLocationCoordinate2D() })
polygon.holes = platformPolygon.holes.map {
- makePath(from: $0.map({ $0.toCLLocationCoordinate2D() }))
+ makePath(from: $0.map { $0.toCLLocationCoordinate2D() })
}
polygon.fillColor = platformPolygon.fillColor.toUIColor()
polygon.strokeColor = platformPolygon.strokeColor.toUIColor()
@@ -54,18 +51,17 @@
}
}
-class PolygonsController: NSObject {
+class PolygonsController {
private var polygonIdentifierToController: [String: PolygonController] = [:]
- private weak var eventDelegate: FGMMapEventDelegate?
+ private weak var eventDelegate: MapEventDelegate?
private weak var mapView: GMSMapView?
- init(mapView: GMSMapView, eventDelegate: FGMMapEventDelegate) {
+ init(mapView: GMSMapView, eventDelegate: MapEventDelegate) {
self.mapView = mapView
self.eventDelegate = eventDelegate
- super.init()
}
- func add(_ polygons: [FGMPlatformPolygon]) {
+ func add(_ polygons: [PlatformPolygon]) {
guard let mapView = mapView else { return }
for polygon in polygons {
let identifier = polygon.polygonId
@@ -77,7 +73,7 @@
}
}
- func change(_ polygons: [FGMPlatformPolygon]) {
+ func change(_ polygons: [PlatformPolygon]) {
for polygon in polygons {
let identifier = polygon.polygonId
polygonIdentifierToController[identifier]?.update(from: polygon)
@@ -95,7 +91,7 @@
func didTapPolygon(withIdentifier identifier: String) {
if hasPolygon(withIdentifier: identifier) {
- eventDelegate?.didTapPolygon(withIdentifier: identifier)
+ eventDelegate?.didTapPolygon(withIdentifier: identifier) { _ in }
}
}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/PolylineController.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/PolylineController.swift
index 77116a5..51c198f 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/PolylineController.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/PolylineController.swift
@@ -4,12 +4,8 @@
import GoogleMaps
-#if canImport(google_maps_flutter_ios_sdk9_objc)
- import google_maps_flutter_ios_sdk9_objc
-#endif
-
/// Defines polyline controllable by Flutter.
-class PolylineController: NSObject {
+class PolylineController {
let polyline: GMSPolyline
private weak var mapView: GMSMapView?
@@ -17,31 +13,32 @@
self.polyline = GMSPolyline()
self.mapView = mapView
self.polyline.userData = [identifier]
- super.init()
}
func removePolyline() {
polyline.map = nil
}
- /// Updates the controller's polyline with the properties from a FGMPlatformPolyline.
+ /// Updates the controller's polyline with the properties from a PlatformPolyline.
///
/// Setting the polyline to visible will set its map to the controller's mapView.
- func update(from platformPolyline: FGMPlatformPolyline) {
+ func update(from platformPolyline: PlatformPolyline) {
if let mapView = mapView {
PolylineController.update(polyline, from: platformPolyline, with: mapView)
}
}
- /// Updates the given GMSPolyline with the properties from a FGMPlatformPolyline.
+ /// Updates the given GMSPolyline with the properties from a PlatformPolyline.
///
/// Setting the polyline to visible will set its map to the given mapView.
static func update(
- _ polyline: GMSPolyline, from platformPolyline: FGMPlatformPolyline, with mapView: GMSMapView
+ _ polyline: GMSPolyline,
+ from platformPolyline: PlatformPolyline,
+ with mapView: GMSMapView
) {
polyline.isTappable = platformPolyline.consumesTapEvents
polyline.zIndex = Int32(platformPolyline.zIndex)
- let gmsPath = makePath(from: platformPolyline.points.map({ $0.toCLLocationCoordinate2D() }))
+ let gmsPath = makePath(from: platformPolyline.points.map { $0.toCLLocationCoordinate2D() })
polyline.path = gmsPath
let strokeColor = platformPolyline.color.toUIColor()
polyline.strokeColor = strokeColor
@@ -59,18 +56,17 @@
}
}
-class PolylinesController: NSObject {
+class PolylinesController {
private var polylineIdentifierToController: [String: PolylineController] = [:]
- private weak var eventDelegate: FGMMapEventDelegate?
+ private weak var eventDelegate: MapEventDelegate?
private weak var mapView: GMSMapView?
- init(mapView: GMSMapView, eventDelegate: FGMMapEventDelegate) {
+ init(mapView: GMSMapView, eventDelegate: MapEventDelegate) {
self.mapView = mapView
self.eventDelegate = eventDelegate
- super.init()
}
- func add(_ polylines: [FGMPlatformPolyline]) {
+ func add(_ polylines: [PlatformPolyline]) {
guard let mapView = mapView else { return }
for polyline in polylines {
let identifier = polyline.polylineId
@@ -82,7 +78,7 @@
}
}
- func change(_ polylines: [FGMPlatformPolyline]) {
+ func change(_ polylines: [PlatformPolyline]) {
for polyline in polylines {
let identifier = polyline.polylineId
polylineIdentifierToController[identifier]?.update(from: polyline)
@@ -100,7 +96,7 @@
func didTapPolyline(withIdentifier identifier: String) {
if hasPolyline(withIdentifier: identifier) {
- eventDelegate?.didTapPolyline(withIdentifier: identifier)
+ eventDelegate?.didTapPolyline(withIdentifier: identifier) { _ in }
}
}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/TileOverlayController.swift b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/TileOverlayController.swift
index 5f8dc38..3dc37d4 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/TileOverlayController.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/TileOverlayController.swift
@@ -6,31 +6,24 @@
import GoogleMaps
import UIKit
-#if canImport(google_maps_flutter_ios_sdk9_objc)
- import google_maps_flutter_ios_sdk9_objc
-#endif
-
/// Protocol for requesting tiles from the Dart side.
-// TODO(stuartmorgan): Adjust this to match the Swift API once the Pigeon
-// generation is switched to Swift.
protocol TileProviderDelegate: AnyObject {
func tile(
withOverlayIdentifier tileOverlayId: String,
- location: FGMPlatformPoint,
- zoom: Int,
- completion: @escaping (FGMPlatformTile?, FlutterError?) -> Void
+ location: PlatformPoint,
+ zoom: Int64,
+ completion: @escaping (Result<PlatformTile, PigeonError>) -> Void
)
}
/// Controller of a single tile overlay on the map.
-class TileOverlayController: NSObject {
+class TileOverlayController {
let layer: GMSTileLayer
private weak var mapView: GMSMapView?
- init(tileOverlay: FGMPlatformTileOverlay, tileLayer: GMSTileLayer, mapView: GMSMapView) {
+ init(tileOverlay: PlatformTileOverlay, tileLayer: GMSTileLayer, mapView: GMSMapView) {
self.layer = tileLayer
self.mapView = mapView
- super.init()
TileOverlayController.update(tileLayer, from: tileOverlay, with: mapView)
}
@@ -42,21 +35,21 @@
layer.clearTileCache()
}
- /// Updates the controller's tile overlay with the properties from a FGMPlatformTileOverlay.
+ /// Updates the controller's tile overlay with the properties from a PlatformTileOverlay.
///
/// Setting the tile overlay to visible will set its map to the controller's mapView.
- func update(from overlay: FGMPlatformTileOverlay) {
+ func update(from overlay: PlatformTileOverlay) {
if let mapView = mapView {
TileOverlayController.update(layer, from: overlay, with: mapView)
}
}
- /// Updates the given GMSTileLayer with the properties from a FGMPlatformTileOverlay.
+ /// Updates the given GMSTileLayer with the properties from a PlatformTileOverlay.
///
/// Setting the tile overlay to visible will set its map to the given mapView.
static func update(
_ tileLayer: GMSTileLayer,
- from platformOverlay: FGMPlatformTileOverlay,
+ from platformOverlay: PlatformTileOverlay,
with mapView: GMSMapView
) {
tileLayer.opacity = Float(1.0 - platformOverlay.transparency)
@@ -121,21 +114,20 @@
}
tileProviderDelegate.tile(
withOverlayIdentifier: self.tileOverlayIdentifier,
- location: FGMPlatformPoint.makeWith(x: Double(x), y: Double(y)),
- zoom: Int(zoom)
- ) { [weak self] tile, error in
+ location: PlatformPoint(x: Double(x), y: Double(y)),
+ zoom: Int64(zoom)
+ ) { [weak self] result in
guard let self = self else {
receiver.receiveTileWith(x: x, y: y, zoom: zoom, image: kGMSTileLayerNoTile)
return
}
- let typedData = tile?.data
- let tileImage: UIImage
- if let data = typedData?.data {
- tileImage = self.handleResultTile(UIImage(data: data)) ?? kGMSTileLayerNoTile
- } else {
- tileImage = kGMSTileLayerNoTile
- }
- if let error = error {
+ var tileImage = kGMSTileLayerNoTile
+ switch result {
+ case .success(let tile):
+ if let data = tile.data?.data {
+ tileImage = self.handleResultTile(UIImage(data: data)) ?? kGMSTileLayerNoTile
+ }
+ case .failure(let error):
NSLog(
"Can't get tile: errorCode = \(error.code), errorMessage = \(error.message ?? "nil"), details = \(error.details ?? "nil")"
)
@@ -147,7 +139,7 @@
}
/// Controller of multiple tile overlays on the map.
-class TileOverlaysController: NSObject {
+class TileOverlaysController {
private var tileOverlayIdentifierToController: [String: TileOverlayController] = [:]
private weak var tileProviderDelegate: TileProviderDelegate?
private weak var mapView: GMSMapView?
@@ -155,10 +147,9 @@
init(mapView: GMSMapView, tileProvider: TileProviderDelegate) {
self.mapView = mapView
self.tileProviderDelegate = tileProvider
- super.init()
}
- func add(_ tileOverlaysToAdd: [FGMPlatformTileOverlay]) {
+ func add(_ tileOverlaysToAdd: [PlatformTileOverlay]) {
guard let mapView = mapView, let tileProviderDelegate = tileProviderDelegate else { return }
for tileOverlay in tileOverlaysToAdd {
let identifier = tileOverlay.tileOverlayId
@@ -175,7 +166,7 @@
}
}
- func change(_ tileOverlaysToChange: [FGMPlatformTileOverlay]) {
+ func change(_ tileOverlaysToChange: [PlatformTileOverlay]) {
for tileOverlay in tileOverlaysToChange {
let identifier = tileOverlay.tileOverlayId
tileOverlayIdentifierToController[identifier]?.update(from: tileOverlay)
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9_objc/FGMCATransactionWrapper.m b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9_objc/FGMCATransactionWrapper.m
deleted file mode 100644
index 5fb79de..0000000
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9_objc/FGMCATransactionWrapper.m
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2013 The Flutter Authors
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#import "FGMCATransactionWrapper.h"
-
-@import QuartzCore;
-
-@implementation FGMCATransactionWrapper
-
-- (void)begin {
- [CATransaction begin];
-}
-
-- (void)commit {
- [CATransaction commit];
-}
-
-- (void)setAnimationDuration:(CFTimeInterval)duration {
- [CATransaction setAnimationDuration:duration];
-}
-
-@end
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9_objc/google_maps_flutter_pigeon_messages.g.m b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9_objc/google_maps_flutter_pigeon_messages.g.m
deleted file mode 100644
index 205bc2a..0000000
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9_objc/google_maps_flutter_pigeon_messages.g.m
+++ /dev/null
@@ -1,4849 +0,0 @@
-// Copyright 2013 The Flutter Authors
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-// Autogenerated from Pigeon (v27.3.2), do not edit directly.
-// See also: https://pub.dev/packages/pigeon
-
-#import "google_maps_flutter_pigeon_messages.g.h"
-
-#if TARGET_OS_OSX
-@import FlutterMacOS;
-#else
-@import Flutter;
-#endif
-
-static BOOL __attribute__((unused)) FLTPigeonDeepEquals(id _Nullable a, id _Nullable b) {
- if (a == b) {
- return YES;
- }
- if (a == nil) {
- return b == [NSNull null];
- }
- if (b == nil) {
- return a == [NSNull null];
- }
- if ([a isKindOfClass:[NSNumber class]] && [b isKindOfClass:[NSNumber class]]) {
- return
- [a isEqual:b] || (isnan([(NSNumber *)a doubleValue]) && isnan([(NSNumber *)b doubleValue]));
- }
- if ([a isKindOfClass:[NSArray class]] && [b isKindOfClass:[NSArray class]]) {
- NSArray *arrayA = (NSArray *)a;
- NSArray *arrayB = (NSArray *)b;
- if (arrayA.count != arrayB.count) {
- return NO;
- }
- for (NSUInteger i = 0; i < arrayA.count; i++) {
- if (!FLTPigeonDeepEquals(arrayA[i], arrayB[i])) {
- return NO;
- }
- }
- return YES;
- }
- if ([a isKindOfClass:[NSDictionary class]] && [b isKindOfClass:[NSDictionary class]]) {
- NSDictionary *dictA = (NSDictionary *)a;
- NSDictionary *dictB = (NSDictionary *)b;
- if (dictA.count != dictB.count) {
- return NO;
- }
- for (id keyA in dictA) {
- id valueA = dictA[keyA];
- BOOL found = NO;
- for (id keyB in dictB) {
- if (FLTPigeonDeepEquals(keyA, keyB)) {
- id valueB = dictB[keyB];
- if (FLTPigeonDeepEquals(valueA, valueB)) {
- found = YES;
- break;
- } else {
- return NO;
- }
- }
- }
- if (!found) {
- return NO;
- }
- }
- return YES;
- }
- return [a isEqual:b];
-}
-
-static NSUInteger __attribute__((unused)) FLTPigeonDeepHash(id _Nullable value) {
- if (value == nil || value == (id)[NSNull null]) {
- return 0;
- }
- if ([value isKindOfClass:[NSNumber class]]) {
- NSNumber *n = (NSNumber *)value;
- double d = n.doubleValue;
- if (isnan(d)) {
- // Normalize NaN to a consistent hash.
- return (NSUInteger)0x7FF8000000000000;
- }
- if (d == 0.0) {
- // Normalize -0.0 to 0.0 so they have the same hash code.
- d = 0.0;
- }
- return @(d).hash;
- }
- if ([value isKindOfClass:[NSArray class]]) {
- NSUInteger result = 1;
- for (id item in (NSArray *)value) {
- result = result * 31 + FLTPigeonDeepHash(item);
- }
- return result;
- }
- if ([value isKindOfClass:[NSDictionary class]]) {
- NSUInteger result = 0;
- NSDictionary *dict = (NSDictionary *)value;
- for (id key in dict) {
- result += ((FLTPigeonDeepHash(key) * 31) ^ FLTPigeonDeepHash(dict[key]));
- }
- return result;
- }
- return [value hash];
-}
-
-static NSArray<id> *wrapResult(id result, FlutterError *error) {
- if (error) {
- return @[
- error.code ?: [NSNull null], error.message ?: [NSNull null], error.details ?: [NSNull null]
- ];
- }
- return @[ result ?: [NSNull null] ];
-}
-
-static FlutterError *createConnectionError(NSString *channelName) {
- return [FlutterError
- errorWithCode:@"channel-error"
- message:[NSString stringWithFormat:@"%@/%@/%@",
- @"Unable to establish connection on channel: '",
- channelName, @"'."]
- details:@""];
-}
-
-static id GetNullableObjectAtIndex(NSArray<id> *array, NSInteger key) {
- id result = array[key];
- return (result == [NSNull null]) ? nil : result;
-}
-
-/// Pigeon equivalent of MapType
-@implementation FGMPlatformMapTypeBox
-- (instancetype)initWithValue:(FGMPlatformMapType)value {
- self = [super init];
- if (self) {
- _value = value;
- }
- return self;
-}
-@end
-
-/// Pigeon equivalent of the MarkerCollisionBehavior enum.
-@implementation FGMPlatformMarkerCollisionBehaviorBox
-- (instancetype)initWithValue:(FGMPlatformMarkerCollisionBehavior)value {
- self = [super init];
- if (self) {
- _value = value;
- }
- return self;
-}
-@end
-
-/// Join types for polyline joints.
-@implementation FGMPlatformJointTypeBox
-- (instancetype)initWithValue:(FGMPlatformJointType)value {
- self = [super init];
- if (self) {
- _value = value;
- }
- return self;
-}
-@end
-
-/// Enumeration of possible types for PatternItem.
-@implementation FGMPlatformPatternItemTypeBox
-- (instancetype)initWithValue:(FGMPlatformPatternItemType)value {
- self = [super init];
- if (self) {
- _value = value;
- }
- return self;
-}
-@end
-
-@implementation FGMPlatformMarkerTypeBox
-- (instancetype)initWithValue:(FGMPlatformMarkerType)value {
- self = [super init];
- if (self) {
- _value = value;
- }
- return self;
-}
-@end
-
-/// Pigeon equivalent of [MapBitmapScaling].
-@implementation FGMPlatformMapBitmapScalingBox
-- (instancetype)initWithValue:(FGMPlatformMapBitmapScaling)value {
- self = [super init];
- if (self) {
- _value = value;
- }
- return self;
-}
-@end
-
-@interface FGMPlatformCameraPosition ()
-+ (FGMPlatformCameraPosition *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformCameraPosition *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformCameraUpdate ()
-+ (FGMPlatformCameraUpdate *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformCameraUpdate *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformCameraUpdateNewCameraPosition ()
-+ (FGMPlatformCameraUpdateNewCameraPosition *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformCameraUpdateNewCameraPosition *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformCameraUpdateNewLatLng ()
-+ (FGMPlatformCameraUpdateNewLatLng *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformCameraUpdateNewLatLng *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformCameraUpdateNewLatLngBounds ()
-+ (FGMPlatformCameraUpdateNewLatLngBounds *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformCameraUpdateNewLatLngBounds *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformCameraUpdateNewLatLngZoom ()
-+ (FGMPlatformCameraUpdateNewLatLngZoom *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformCameraUpdateNewLatLngZoom *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformCameraUpdateScrollBy ()
-+ (FGMPlatformCameraUpdateScrollBy *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformCameraUpdateScrollBy *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformCameraUpdateZoomBy ()
-+ (FGMPlatformCameraUpdateZoomBy *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformCameraUpdateZoomBy *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformCameraUpdateZoom ()
-+ (FGMPlatformCameraUpdateZoom *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformCameraUpdateZoom *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformCameraUpdateZoomTo ()
-+ (FGMPlatformCameraUpdateZoomTo *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformCameraUpdateZoomTo *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformCircle ()
-+ (FGMPlatformCircle *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformCircle *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformHeatmap ()
-+ (FGMPlatformHeatmap *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformHeatmap *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformHeatmapGradient ()
-+ (FGMPlatformHeatmapGradient *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformHeatmapGradient *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformWeightedLatLng ()
-+ (FGMPlatformWeightedLatLng *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformWeightedLatLng *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformInfoWindow ()
-+ (FGMPlatformInfoWindow *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformInfoWindow *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformCluster ()
-+ (FGMPlatformCluster *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformCluster *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformClusterManager ()
-+ (FGMPlatformClusterManager *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformClusterManager *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformMarker ()
-+ (FGMPlatformMarker *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformMarker *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformPolygon ()
-+ (FGMPlatformPolygon *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformPolygon *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformPolyline ()
-+ (FGMPlatformPolyline *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformPolyline *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformPatternItem ()
-+ (FGMPlatformPatternItem *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformPatternItem *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformTile ()
-+ (FGMPlatformTile *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformTile *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformTileOverlay ()
-+ (FGMPlatformTileOverlay *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformTileOverlay *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformEdgeInsets ()
-+ (FGMPlatformEdgeInsets *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformEdgeInsets *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformLatLng ()
-+ (FGMPlatformLatLng *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformLatLng *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformLatLngBounds ()
-+ (FGMPlatformLatLngBounds *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformLatLngBounds *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformCameraTargetBounds ()
-+ (FGMPlatformCameraTargetBounds *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformCameraTargetBounds *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformGroundOverlay ()
-+ (FGMPlatformGroundOverlay *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformGroundOverlay *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformMapViewCreationParams ()
-+ (FGMPlatformMapViewCreationParams *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformMapViewCreationParams *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformMapConfiguration ()
-+ (FGMPlatformMapConfiguration *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformMapConfiguration *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformPoint ()
-+ (FGMPlatformPoint *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformPoint *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformSize ()
-+ (FGMPlatformSize *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformSize *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformColor ()
-+ (FGMPlatformColor *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformColor *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformTileLayer ()
-+ (FGMPlatformTileLayer *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformTileLayer *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformZoomRange ()
-+ (FGMPlatformZoomRange *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformZoomRange *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformBitmap ()
-+ (FGMPlatformBitmap *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformBitmap *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformBitmapDefaultMarker ()
-+ (FGMPlatformBitmapDefaultMarker *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformBitmapDefaultMarker *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformBitmapBytes ()
-+ (FGMPlatformBitmapBytes *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformBitmapBytes *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformBitmapAsset ()
-+ (FGMPlatformBitmapAsset *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformBitmapAsset *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformBitmapAssetImage ()
-+ (FGMPlatformBitmapAssetImage *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformBitmapAssetImage *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformBitmapAssetMap ()
-+ (FGMPlatformBitmapAssetMap *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformBitmapAssetMap *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformBitmapBytesMap ()
-+ (FGMPlatformBitmapBytesMap *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformBitmapBytesMap *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformBitmapPinConfig ()
-+ (FGMPlatformBitmapPinConfig *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformBitmapPinConfig *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@implementation FGMPlatformCameraPosition
-+ (instancetype)makeWithBearing:(double)bearing
- target:(FGMPlatformLatLng *)target
- tilt:(double)tilt
- zoom:(double)zoom {
- FGMPlatformCameraPosition *pigeonResult = [[FGMPlatformCameraPosition alloc] init];
- pigeonResult.bearing = bearing;
- pigeonResult.target = target;
- pigeonResult.tilt = tilt;
- pigeonResult.zoom = zoom;
- return pigeonResult;
-}
-+ (FGMPlatformCameraPosition *)fromList:(NSArray<id> *)list {
- FGMPlatformCameraPosition *pigeonResult = [[FGMPlatformCameraPosition alloc] init];
- pigeonResult.bearing = [GetNullableObjectAtIndex(list, 0) doubleValue];
- pigeonResult.target = GetNullableObjectAtIndex(list, 1);
- pigeonResult.tilt = [GetNullableObjectAtIndex(list, 2) doubleValue];
- pigeonResult.zoom = [GetNullableObjectAtIndex(list, 3) doubleValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformCameraPosition *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformCameraPosition fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.bearing),
- self.target ?: [NSNull null],
- @(self.tilt),
- @(self.zoom),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformCameraPosition *other = (FGMPlatformCameraPosition *)object;
- return (self.bearing == other.bearing || (isnan(self.bearing) && isnan(other.bearing))) &&
- FLTPigeonDeepEquals(self.target, other.target) &&
- (self.tilt == other.tilt || (isnan(self.tilt) && isnan(other.tilt))) &&
- (self.zoom == other.zoom || (isnan(self.zoom) && isnan(other.zoom)));
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result =
- result * 31 + (isnan(self.bearing) ? (NSUInteger)0x7FF8000000000000 : @(self.bearing).hash);
- result = result * 31 + FLTPigeonDeepHash(self.target);
- result = result * 31 + (isnan(self.tilt) ? (NSUInteger)0x7FF8000000000000 : @(self.tilt).hash);
- result = result * 31 + (isnan(self.zoom) ? (NSUInteger)0x7FF8000000000000 : @(self.zoom).hash);
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:@"FGMPlatformCameraPosition(bearing: %f, target: %@, tilt: %f, zoom: %f)",
- self.bearing, self.target, self.tilt, self.zoom];
-}
-@end
-
-@implementation FGMPlatformCameraUpdate
-+ (instancetype)makeWithCameraUpdate:(id)cameraUpdate {
- FGMPlatformCameraUpdate *pigeonResult = [[FGMPlatformCameraUpdate alloc] init];
- pigeonResult.cameraUpdate = cameraUpdate;
- return pigeonResult;
-}
-+ (FGMPlatformCameraUpdate *)fromList:(NSArray<id> *)list {
- FGMPlatformCameraUpdate *pigeonResult = [[FGMPlatformCameraUpdate alloc] init];
- pigeonResult.cameraUpdate = GetNullableObjectAtIndex(list, 0);
- return pigeonResult;
-}
-+ (nullable FGMPlatformCameraUpdate *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformCameraUpdate fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.cameraUpdate ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformCameraUpdate *other = (FGMPlatformCameraUpdate *)object;
- return FLTPigeonDeepEquals(self.cameraUpdate, other.cameraUpdate);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.cameraUpdate);
- return result;
-}
-- (NSString *)description {
- return
- [NSString stringWithFormat:@"FGMPlatformCameraUpdate(cameraUpdate: %@)", self.cameraUpdate];
-}
-@end
-
-@implementation FGMPlatformCameraUpdateNewCameraPosition
-+ (instancetype)makeWithCameraPosition:(FGMPlatformCameraPosition *)cameraPosition {
- FGMPlatformCameraUpdateNewCameraPosition *pigeonResult =
- [[FGMPlatformCameraUpdateNewCameraPosition alloc] init];
- pigeonResult.cameraPosition = cameraPosition;
- return pigeonResult;
-}
-+ (FGMPlatformCameraUpdateNewCameraPosition *)fromList:(NSArray<id> *)list {
- FGMPlatformCameraUpdateNewCameraPosition *pigeonResult =
- [[FGMPlatformCameraUpdateNewCameraPosition alloc] init];
- pigeonResult.cameraPosition = GetNullableObjectAtIndex(list, 0);
- return pigeonResult;
-}
-+ (nullable FGMPlatformCameraUpdateNewCameraPosition *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformCameraUpdateNewCameraPosition fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.cameraPosition ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformCameraUpdateNewCameraPosition *other =
- (FGMPlatformCameraUpdateNewCameraPosition *)object;
- return FLTPigeonDeepEquals(self.cameraPosition, other.cameraPosition);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.cameraPosition);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformCameraUpdateNewCameraPosition(cameraPosition: %@)",
- self.cameraPosition];
-}
-@end
-
-@implementation FGMPlatformCameraUpdateNewLatLng
-+ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng {
- FGMPlatformCameraUpdateNewLatLng *pigeonResult = [[FGMPlatformCameraUpdateNewLatLng alloc] init];
- pigeonResult.latLng = latLng;
- return pigeonResult;
-}
-+ (FGMPlatformCameraUpdateNewLatLng *)fromList:(NSArray<id> *)list {
- FGMPlatformCameraUpdateNewLatLng *pigeonResult = [[FGMPlatformCameraUpdateNewLatLng alloc] init];
- pigeonResult.latLng = GetNullableObjectAtIndex(list, 0);
- return pigeonResult;
-}
-+ (nullable FGMPlatformCameraUpdateNewLatLng *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformCameraUpdateNewLatLng fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.latLng ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformCameraUpdateNewLatLng *other = (FGMPlatformCameraUpdateNewLatLng *)object;
- return FLTPigeonDeepEquals(self.latLng, other.latLng);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.latLng);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformCameraUpdateNewLatLng(latLng: %@)", self.latLng];
-}
-@end
-
-@implementation FGMPlatformCameraUpdateNewLatLngBounds
-+ (instancetype)makeWithBounds:(FGMPlatformLatLngBounds *)bounds padding:(double)padding {
- FGMPlatformCameraUpdateNewLatLngBounds *pigeonResult =
- [[FGMPlatformCameraUpdateNewLatLngBounds alloc] init];
- pigeonResult.bounds = bounds;
- pigeonResult.padding = padding;
- return pigeonResult;
-}
-+ (FGMPlatformCameraUpdateNewLatLngBounds *)fromList:(NSArray<id> *)list {
- FGMPlatformCameraUpdateNewLatLngBounds *pigeonResult =
- [[FGMPlatformCameraUpdateNewLatLngBounds alloc] init];
- pigeonResult.bounds = GetNullableObjectAtIndex(list, 0);
- pigeonResult.padding = [GetNullableObjectAtIndex(list, 1) doubleValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformCameraUpdateNewLatLngBounds *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformCameraUpdateNewLatLngBounds fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.bounds ?: [NSNull null],
- @(self.padding),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformCameraUpdateNewLatLngBounds *other = (FGMPlatformCameraUpdateNewLatLngBounds *)object;
- return FLTPigeonDeepEquals(self.bounds, other.bounds) &&
- (self.padding == other.padding || (isnan(self.padding) && isnan(other.padding)));
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.bounds);
- result =
- result * 31 + (isnan(self.padding) ? (NSUInteger)0x7FF8000000000000 : @(self.padding).hash);
- return result;
-}
-- (NSString *)description {
- return
- [NSString stringWithFormat:@"FGMPlatformCameraUpdateNewLatLngBounds(bounds: %@, padding: %f)",
- self.bounds, self.padding];
-}
-@end
-
-@implementation FGMPlatformCameraUpdateNewLatLngZoom
-+ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng zoom:(double)zoom {
- FGMPlatformCameraUpdateNewLatLngZoom *pigeonResult =
- [[FGMPlatformCameraUpdateNewLatLngZoom alloc] init];
- pigeonResult.latLng = latLng;
- pigeonResult.zoom = zoom;
- return pigeonResult;
-}
-+ (FGMPlatformCameraUpdateNewLatLngZoom *)fromList:(NSArray<id> *)list {
- FGMPlatformCameraUpdateNewLatLngZoom *pigeonResult =
- [[FGMPlatformCameraUpdateNewLatLngZoom alloc] init];
- pigeonResult.latLng = GetNullableObjectAtIndex(list, 0);
- pigeonResult.zoom = [GetNullableObjectAtIndex(list, 1) doubleValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformCameraUpdateNewLatLngZoom *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformCameraUpdateNewLatLngZoom fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.latLng ?: [NSNull null],
- @(self.zoom),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformCameraUpdateNewLatLngZoom *other = (FGMPlatformCameraUpdateNewLatLngZoom *)object;
- return FLTPigeonDeepEquals(self.latLng, other.latLng) &&
- (self.zoom == other.zoom || (isnan(self.zoom) && isnan(other.zoom)));
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.latLng);
- result = result * 31 + (isnan(self.zoom) ? (NSUInteger)0x7FF8000000000000 : @(self.zoom).hash);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformCameraUpdateNewLatLngZoom(latLng: %@, zoom: %f)",
- self.latLng, self.zoom];
-}
-@end
-
-@implementation FGMPlatformCameraUpdateScrollBy
-+ (instancetype)makeWithDx:(double)dx dy:(double)dy {
- FGMPlatformCameraUpdateScrollBy *pigeonResult = [[FGMPlatformCameraUpdateScrollBy alloc] init];
- pigeonResult.dx = dx;
- pigeonResult.dy = dy;
- return pigeonResult;
-}
-+ (FGMPlatformCameraUpdateScrollBy *)fromList:(NSArray<id> *)list {
- FGMPlatformCameraUpdateScrollBy *pigeonResult = [[FGMPlatformCameraUpdateScrollBy alloc] init];
- pigeonResult.dx = [GetNullableObjectAtIndex(list, 0) doubleValue];
- pigeonResult.dy = [GetNullableObjectAtIndex(list, 1) doubleValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformCameraUpdateScrollBy *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformCameraUpdateScrollBy fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.dx),
- @(self.dy),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformCameraUpdateScrollBy *other = (FGMPlatformCameraUpdateScrollBy *)object;
- return (self.dx == other.dx || (isnan(self.dx) && isnan(other.dx))) &&
- (self.dy == other.dy || (isnan(self.dy) && isnan(other.dy)));
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + (isnan(self.dx) ? (NSUInteger)0x7FF8000000000000 : @(self.dx).hash);
- result = result * 31 + (isnan(self.dy) ? (NSUInteger)0x7FF8000000000000 : @(self.dy).hash);
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:@"FGMPlatformCameraUpdateScrollBy(dx: %f, dy: %f)", self.dx, self.dy];
-}
-@end
-
-@implementation FGMPlatformCameraUpdateZoomBy
-+ (instancetype)makeWithAmount:(double)amount focus:(nullable FGMPlatformPoint *)focus {
- FGMPlatformCameraUpdateZoomBy *pigeonResult = [[FGMPlatformCameraUpdateZoomBy alloc] init];
- pigeonResult.amount = amount;
- pigeonResult.focus = focus;
- return pigeonResult;
-}
-+ (FGMPlatformCameraUpdateZoomBy *)fromList:(NSArray<id> *)list {
- FGMPlatformCameraUpdateZoomBy *pigeonResult = [[FGMPlatformCameraUpdateZoomBy alloc] init];
- pigeonResult.amount = [GetNullableObjectAtIndex(list, 0) doubleValue];
- pigeonResult.focus = GetNullableObjectAtIndex(list, 1);
- return pigeonResult;
-}
-+ (nullable FGMPlatformCameraUpdateZoomBy *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformCameraUpdateZoomBy fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.amount),
- self.focus ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformCameraUpdateZoomBy *other = (FGMPlatformCameraUpdateZoomBy *)object;
- return (self.amount == other.amount || (isnan(self.amount) && isnan(other.amount))) &&
- FLTPigeonDeepEquals(self.focus, other.focus);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result =
- result * 31 + (isnan(self.amount) ? (NSUInteger)0x7FF8000000000000 : @(self.amount).hash);
- result = result * 31 + FLTPigeonDeepHash(self.focus);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformCameraUpdateZoomBy(amount: %f, focus: %@)",
- self.amount, self.focus];
-}
-@end
-
-@implementation FGMPlatformCameraUpdateZoom
-+ (instancetype)makeWithOut:(BOOL)out {
- FGMPlatformCameraUpdateZoom *pigeonResult = [[FGMPlatformCameraUpdateZoom alloc] init];
- pigeonResult.out = out;
- return pigeonResult;
-}
-+ (FGMPlatformCameraUpdateZoom *)fromList:(NSArray<id> *)list {
- FGMPlatformCameraUpdateZoom *pigeonResult = [[FGMPlatformCameraUpdateZoom alloc] init];
- pigeonResult.out = [GetNullableObjectAtIndex(list, 0) boolValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformCameraUpdateZoom *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformCameraUpdateZoom fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.out),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformCameraUpdateZoom *other = (FGMPlatformCameraUpdateZoom *)object;
- return self.out == other.out;
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + @(self.out).hash;
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:@"FGMPlatformCameraUpdateZoom(out: %@)", self.out ? @"true" : @"false"];
-}
-@end
-
-@implementation FGMPlatformCameraUpdateZoomTo
-+ (instancetype)makeWithZoom:(double)zoom {
- FGMPlatformCameraUpdateZoomTo *pigeonResult = [[FGMPlatformCameraUpdateZoomTo alloc] init];
- pigeonResult.zoom = zoom;
- return pigeonResult;
-}
-+ (FGMPlatformCameraUpdateZoomTo *)fromList:(NSArray<id> *)list {
- FGMPlatformCameraUpdateZoomTo *pigeonResult = [[FGMPlatformCameraUpdateZoomTo alloc] init];
- pigeonResult.zoom = [GetNullableObjectAtIndex(list, 0) doubleValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformCameraUpdateZoomTo *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformCameraUpdateZoomTo fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.zoom),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformCameraUpdateZoomTo *other = (FGMPlatformCameraUpdateZoomTo *)object;
- return (self.zoom == other.zoom || (isnan(self.zoom) && isnan(other.zoom)));
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + (isnan(self.zoom) ? (NSUInteger)0x7FF8000000000000 : @(self.zoom).hash);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformCameraUpdateZoomTo(zoom: %f)", self.zoom];
-}
-@end
-
-@implementation FGMPlatformCircle
-+ (instancetype)makeWithConsumeTapEvents:(BOOL)consumeTapEvents
- fillColor:(FGMPlatformColor *)fillColor
- strokeColor:(FGMPlatformColor *)strokeColor
- visible:(BOOL)visible
- strokeWidth:(NSInteger)strokeWidth
- zIndex:(double)zIndex
- center:(FGMPlatformLatLng *)center
- radius:(double)radius
- circleId:(NSString *)circleId {
- FGMPlatformCircle *pigeonResult = [[FGMPlatformCircle alloc] init];
- pigeonResult.consumeTapEvents = consumeTapEvents;
- pigeonResult.fillColor = fillColor;
- pigeonResult.strokeColor = strokeColor;
- pigeonResult.visible = visible;
- pigeonResult.strokeWidth = strokeWidth;
- pigeonResult.zIndex = zIndex;
- pigeonResult.center = center;
- pigeonResult.radius = radius;
- pigeonResult.circleId = circleId;
- return pigeonResult;
-}
-+ (FGMPlatformCircle *)fromList:(NSArray<id> *)list {
- FGMPlatformCircle *pigeonResult = [[FGMPlatformCircle alloc] init];
- pigeonResult.consumeTapEvents = [GetNullableObjectAtIndex(list, 0) boolValue];
- pigeonResult.fillColor = GetNullableObjectAtIndex(list, 1);
- pigeonResult.strokeColor = GetNullableObjectAtIndex(list, 2);
- pigeonResult.visible = [GetNullableObjectAtIndex(list, 3) boolValue];
- pigeonResult.strokeWidth = [GetNullableObjectAtIndex(list, 4) integerValue];
- pigeonResult.zIndex = [GetNullableObjectAtIndex(list, 5) doubleValue];
- pigeonResult.center = GetNullableObjectAtIndex(list, 6);
- pigeonResult.radius = [GetNullableObjectAtIndex(list, 7) doubleValue];
- pigeonResult.circleId = GetNullableObjectAtIndex(list, 8);
- return pigeonResult;
-}
-+ (nullable FGMPlatformCircle *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformCircle fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.consumeTapEvents),
- self.fillColor ?: [NSNull null],
- self.strokeColor ?: [NSNull null],
- @(self.visible),
- @(self.strokeWidth),
- @(self.zIndex),
- self.center ?: [NSNull null],
- @(self.radius),
- self.circleId ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformCircle *other = (FGMPlatformCircle *)object;
- return self.consumeTapEvents == other.consumeTapEvents &&
- FLTPigeonDeepEquals(self.fillColor, other.fillColor) &&
- FLTPigeonDeepEquals(self.strokeColor, other.strokeColor) &&
- self.visible == other.visible && self.strokeWidth == other.strokeWidth &&
- (self.zIndex == other.zIndex || (isnan(self.zIndex) && isnan(other.zIndex))) &&
- FLTPigeonDeepEquals(self.center, other.center) &&
- (self.radius == other.radius || (isnan(self.radius) && isnan(other.radius))) &&
- FLTPigeonDeepEquals(self.circleId, other.circleId);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + @(self.consumeTapEvents).hash;
- result = result * 31 + FLTPigeonDeepHash(self.fillColor);
- result = result * 31 + FLTPigeonDeepHash(self.strokeColor);
- result = result * 31 + @(self.visible).hash;
- result = result * 31 + @(self.strokeWidth).hash;
- result =
- result * 31 + (isnan(self.zIndex) ? (NSUInteger)0x7FF8000000000000 : @(self.zIndex).hash);
- result = result * 31 + FLTPigeonDeepHash(self.center);
- result =
- result * 31 + (isnan(self.radius) ? (NSUInteger)0x7FF8000000000000 : @(self.radius).hash);
- result = result * 31 + FLTPigeonDeepHash(self.circleId);
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:
- @"FGMPlatformCircle(consumeTapEvents: %@, fillColor: %@, strokeColor: %@, visible: %@, "
- @"strokeWidth: %ld, zIndex: %f, center: %@, radius: %f, circleId: %@)",
- self.consumeTapEvents ? @"true" : @"false", self.fillColor, self.strokeColor,
- self.visible ? @"true" : @"false", (long)self.strokeWidth, self.zIndex, self.center,
- self.radius, self.circleId];
-}
-@end
-
-@implementation FGMPlatformHeatmap
-+ (instancetype)makeWithHeatmapId:(NSString *)heatmapId
- data:(NSArray<FGMPlatformWeightedLatLng *> *)data
- gradient:(nullable FGMPlatformHeatmapGradient *)gradient
- opacity:(double)opacity
- radius:(NSInteger)radius
- minimumZoomIntensity:(NSInteger)minimumZoomIntensity
- maximumZoomIntensity:(NSInteger)maximumZoomIntensity {
- FGMPlatformHeatmap *pigeonResult = [[FGMPlatformHeatmap alloc] init];
- pigeonResult.heatmapId = heatmapId;
- pigeonResult.data = data;
- pigeonResult.gradient = gradient;
- pigeonResult.opacity = opacity;
- pigeonResult.radius = radius;
- pigeonResult.minimumZoomIntensity = minimumZoomIntensity;
- pigeonResult.maximumZoomIntensity = maximumZoomIntensity;
- return pigeonResult;
-}
-+ (FGMPlatformHeatmap *)fromList:(NSArray<id> *)list {
- FGMPlatformHeatmap *pigeonResult = [[FGMPlatformHeatmap alloc] init];
- pigeonResult.heatmapId = GetNullableObjectAtIndex(list, 0);
- pigeonResult.data = GetNullableObjectAtIndex(list, 1);
- pigeonResult.gradient = GetNullableObjectAtIndex(list, 2);
- pigeonResult.opacity = [GetNullableObjectAtIndex(list, 3) doubleValue];
- pigeonResult.radius = [GetNullableObjectAtIndex(list, 4) integerValue];
- pigeonResult.minimumZoomIntensity = [GetNullableObjectAtIndex(list, 5) integerValue];
- pigeonResult.maximumZoomIntensity = [GetNullableObjectAtIndex(list, 6) integerValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformHeatmap *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformHeatmap fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.heatmapId ?: [NSNull null],
- self.data ?: [NSNull null],
- self.gradient ?: [NSNull null],
- @(self.opacity),
- @(self.radius),
- @(self.minimumZoomIntensity),
- @(self.maximumZoomIntensity),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformHeatmap *other = (FGMPlatformHeatmap *)object;
- return FLTPigeonDeepEquals(self.heatmapId, other.heatmapId) &&
- FLTPigeonDeepEquals(self.data, other.data) &&
- FLTPigeonDeepEquals(self.gradient, other.gradient) &&
- (self.opacity == other.opacity || (isnan(self.opacity) && isnan(other.opacity))) &&
- self.radius == other.radius && self.minimumZoomIntensity == other.minimumZoomIntensity &&
- self.maximumZoomIntensity == other.maximumZoomIntensity;
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.heatmapId);
- result = result * 31 + FLTPigeonDeepHash(self.data);
- result = result * 31 + FLTPigeonDeepHash(self.gradient);
- result =
- result * 31 + (isnan(self.opacity) ? (NSUInteger)0x7FF8000000000000 : @(self.opacity).hash);
- result = result * 31 + @(self.radius).hash;
- result = result * 31 + @(self.minimumZoomIntensity).hash;
- result = result * 31 + @(self.maximumZoomIntensity).hash;
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:@"FGMPlatformHeatmap(heatmapId: %@, data: %@, gradient: %@, opacity: %f, "
- @"radius: %ld, minimumZoomIntensity: %ld, maximumZoomIntensity: %ld)",
- self.heatmapId, self.data, self.gradient, self.opacity, (long)self.radius,
- (long)self.minimumZoomIntensity, (long)self.maximumZoomIntensity];
-}
-@end
-
-@implementation FGMPlatformHeatmapGradient
-+ (instancetype)makeWithColors:(NSArray<FGMPlatformColor *> *)colors
- startPoints:(NSArray<NSNumber *> *)startPoints
- colorMapSize:(NSInteger)colorMapSize {
- FGMPlatformHeatmapGradient *pigeonResult = [[FGMPlatformHeatmapGradient alloc] init];
- pigeonResult.colors = colors;
- pigeonResult.startPoints = startPoints;
- pigeonResult.colorMapSize = colorMapSize;
- return pigeonResult;
-}
-+ (FGMPlatformHeatmapGradient *)fromList:(NSArray<id> *)list {
- FGMPlatformHeatmapGradient *pigeonResult = [[FGMPlatformHeatmapGradient alloc] init];
- pigeonResult.colors = GetNullableObjectAtIndex(list, 0);
- pigeonResult.startPoints = GetNullableObjectAtIndex(list, 1);
- pigeonResult.colorMapSize = [GetNullableObjectAtIndex(list, 2) integerValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformHeatmapGradient *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformHeatmapGradient fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.colors ?: [NSNull null],
- self.startPoints ?: [NSNull null],
- @(self.colorMapSize),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformHeatmapGradient *other = (FGMPlatformHeatmapGradient *)object;
- return FLTPigeonDeepEquals(self.colors, other.colors) &&
- FLTPigeonDeepEquals(self.startPoints, other.startPoints) &&
- self.colorMapSize == other.colorMapSize;
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.colors);
- result = result * 31 + FLTPigeonDeepHash(self.startPoints);
- result = result * 31 + @(self.colorMapSize).hash;
- return result;
-}
-- (NSString *)description {
- return
- [NSString stringWithFormat:
- @"FGMPlatformHeatmapGradient(colors: %@, startPoints: %@, colorMapSize: %ld)",
- self.colors, self.startPoints, (long)self.colorMapSize];
-}
-@end
-
-@implementation FGMPlatformWeightedLatLng
-+ (instancetype)makeWithPoint:(FGMPlatformLatLng *)point weight:(double)weight {
- FGMPlatformWeightedLatLng *pigeonResult = [[FGMPlatformWeightedLatLng alloc] init];
- pigeonResult.point = point;
- pigeonResult.weight = weight;
- return pigeonResult;
-}
-+ (FGMPlatformWeightedLatLng *)fromList:(NSArray<id> *)list {
- FGMPlatformWeightedLatLng *pigeonResult = [[FGMPlatformWeightedLatLng alloc] init];
- pigeonResult.point = GetNullableObjectAtIndex(list, 0);
- pigeonResult.weight = [GetNullableObjectAtIndex(list, 1) doubleValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformWeightedLatLng *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformWeightedLatLng fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.point ?: [NSNull null],
- @(self.weight),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformWeightedLatLng *other = (FGMPlatformWeightedLatLng *)object;
- return FLTPigeonDeepEquals(self.point, other.point) &&
- (self.weight == other.weight || (isnan(self.weight) && isnan(other.weight)));
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.point);
- result =
- result * 31 + (isnan(self.weight) ? (NSUInteger)0x7FF8000000000000 : @(self.weight).hash);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformWeightedLatLng(point: %@, weight: %f)", self.point,
- self.weight];
-}
-@end
-
-@implementation FGMPlatformInfoWindow
-+ (instancetype)makeWithTitle:(nullable NSString *)title
- snippet:(nullable NSString *)snippet
- anchor:(FGMPlatformPoint *)anchor {
- FGMPlatformInfoWindow *pigeonResult = [[FGMPlatformInfoWindow alloc] init];
- pigeonResult.title = title;
- pigeonResult.snippet = snippet;
- pigeonResult.anchor = anchor;
- return pigeonResult;
-}
-+ (FGMPlatformInfoWindow *)fromList:(NSArray<id> *)list {
- FGMPlatformInfoWindow *pigeonResult = [[FGMPlatformInfoWindow alloc] init];
- pigeonResult.title = GetNullableObjectAtIndex(list, 0);
- pigeonResult.snippet = GetNullableObjectAtIndex(list, 1);
- pigeonResult.anchor = GetNullableObjectAtIndex(list, 2);
- return pigeonResult;
-}
-+ (nullable FGMPlatformInfoWindow *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformInfoWindow fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.title ?: [NSNull null],
- self.snippet ?: [NSNull null],
- self.anchor ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformInfoWindow *other = (FGMPlatformInfoWindow *)object;
- return FLTPigeonDeepEquals(self.title, other.title) &&
- FLTPigeonDeepEquals(self.snippet, other.snippet) &&
- FLTPigeonDeepEquals(self.anchor, other.anchor);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.title);
- result = result * 31 + FLTPigeonDeepHash(self.snippet);
- result = result * 31 + FLTPigeonDeepHash(self.anchor);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformInfoWindow(title: %@, snippet: %@, anchor: %@)",
- self.title, self.snippet, self.anchor];
-}
-@end
-
-@implementation FGMPlatformCluster
-+ (instancetype)makeWithClusterManagerId:(NSString *)clusterManagerId
- position:(FGMPlatformLatLng *)position
- bounds:(FGMPlatformLatLngBounds *)bounds
- markerIds:(NSArray<NSString *> *)markerIds {
- FGMPlatformCluster *pigeonResult = [[FGMPlatformCluster alloc] init];
- pigeonResult.clusterManagerId = clusterManagerId;
- pigeonResult.position = position;
- pigeonResult.bounds = bounds;
- pigeonResult.markerIds = markerIds;
- return pigeonResult;
-}
-+ (FGMPlatformCluster *)fromList:(NSArray<id> *)list {
- FGMPlatformCluster *pigeonResult = [[FGMPlatformCluster alloc] init];
- pigeonResult.clusterManagerId = GetNullableObjectAtIndex(list, 0);
- pigeonResult.position = GetNullableObjectAtIndex(list, 1);
- pigeonResult.bounds = GetNullableObjectAtIndex(list, 2);
- pigeonResult.markerIds = GetNullableObjectAtIndex(list, 3);
- return pigeonResult;
-}
-+ (nullable FGMPlatformCluster *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformCluster fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.clusterManagerId ?: [NSNull null],
- self.position ?: [NSNull null],
- self.bounds ?: [NSNull null],
- self.markerIds ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformCluster *other = (FGMPlatformCluster *)object;
- return FLTPigeonDeepEquals(self.clusterManagerId, other.clusterManagerId) &&
- FLTPigeonDeepEquals(self.position, other.position) &&
- FLTPigeonDeepEquals(self.bounds, other.bounds) &&
- FLTPigeonDeepEquals(self.markerIds, other.markerIds);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.clusterManagerId);
- result = result * 31 + FLTPigeonDeepHash(self.position);
- result = result * 31 + FLTPigeonDeepHash(self.bounds);
- result = result * 31 + FLTPigeonDeepHash(self.markerIds);
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:
- @"FGMPlatformCluster(clusterManagerId: %@, position: %@, bounds: %@, markerIds: %@)",
- self.clusterManagerId, self.position, self.bounds, self.markerIds];
-}
-@end
-
-@implementation FGMPlatformClusterManager
-+ (instancetype)makeWithIdentifier:(NSString *)identifier {
- FGMPlatformClusterManager *pigeonResult = [[FGMPlatformClusterManager alloc] init];
- pigeonResult.identifier = identifier;
- return pigeonResult;
-}
-+ (FGMPlatformClusterManager *)fromList:(NSArray<id> *)list {
- FGMPlatformClusterManager *pigeonResult = [[FGMPlatformClusterManager alloc] init];
- pigeonResult.identifier = GetNullableObjectAtIndex(list, 0);
- return pigeonResult;
-}
-+ (nullable FGMPlatformClusterManager *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformClusterManager fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.identifier ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformClusterManager *other = (FGMPlatformClusterManager *)object;
- return FLTPigeonDeepEquals(self.identifier, other.identifier);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.identifier);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformClusterManager(identifier: %@)", self.identifier];
-}
-@end
-
-@implementation FGMPlatformMarker
-+ (instancetype)makeWithAlpha:(double)alpha
- anchor:(FGMPlatformPoint *)anchor
- consumeTapEvents:(BOOL)consumeTapEvents
- draggable:(BOOL)draggable
- flat:(BOOL)flat
- icon:(FGMPlatformBitmap *)icon
- infoWindow:(FGMPlatformInfoWindow *)infoWindow
- position:(FGMPlatformLatLng *)position
- rotation:(double)rotation
- visible:(BOOL)visible
- zIndex:(NSInteger)zIndex
- markerId:(NSString *)markerId
- clusterManagerId:(nullable NSString *)clusterManagerId
- collisionBehavior:(nullable FGMPlatformMarkerCollisionBehaviorBox *)collisionBehavior {
- FGMPlatformMarker *pigeonResult = [[FGMPlatformMarker alloc] init];
- pigeonResult.alpha = alpha;
- pigeonResult.anchor = anchor;
- pigeonResult.consumeTapEvents = consumeTapEvents;
- pigeonResult.draggable = draggable;
- pigeonResult.flat = flat;
- pigeonResult.icon = icon;
- pigeonResult.infoWindow = infoWindow;
- pigeonResult.position = position;
- pigeonResult.rotation = rotation;
- pigeonResult.visible = visible;
- pigeonResult.zIndex = zIndex;
- pigeonResult.markerId = markerId;
- pigeonResult.clusterManagerId = clusterManagerId;
- pigeonResult.collisionBehavior = collisionBehavior;
- return pigeonResult;
-}
-+ (FGMPlatformMarker *)fromList:(NSArray<id> *)list {
- FGMPlatformMarker *pigeonResult = [[FGMPlatformMarker alloc] init];
- pigeonResult.alpha = [GetNullableObjectAtIndex(list, 0) doubleValue];
- pigeonResult.anchor = GetNullableObjectAtIndex(list, 1);
- pigeonResult.consumeTapEvents = [GetNullableObjectAtIndex(list, 2) boolValue];
- pigeonResult.draggable = [GetNullableObjectAtIndex(list, 3) boolValue];
- pigeonResult.flat = [GetNullableObjectAtIndex(list, 4) boolValue];
- pigeonResult.icon = GetNullableObjectAtIndex(list, 5);
- pigeonResult.infoWindow = GetNullableObjectAtIndex(list, 6);
- pigeonResult.position = GetNullableObjectAtIndex(list, 7);
- pigeonResult.rotation = [GetNullableObjectAtIndex(list, 8) doubleValue];
- pigeonResult.visible = [GetNullableObjectAtIndex(list, 9) boolValue];
- pigeonResult.zIndex = [GetNullableObjectAtIndex(list, 10) integerValue];
- pigeonResult.markerId = GetNullableObjectAtIndex(list, 11);
- pigeonResult.clusterManagerId = GetNullableObjectAtIndex(list, 12);
- pigeonResult.collisionBehavior = GetNullableObjectAtIndex(list, 13);
- return pigeonResult;
-}
-+ (nullable FGMPlatformMarker *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformMarker fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.alpha),
- self.anchor ?: [NSNull null],
- @(self.consumeTapEvents),
- @(self.draggable),
- @(self.flat),
- self.icon ?: [NSNull null],
- self.infoWindow ?: [NSNull null],
- self.position ?: [NSNull null],
- @(self.rotation),
- @(self.visible),
- @(self.zIndex),
- self.markerId ?: [NSNull null],
- self.clusterManagerId ?: [NSNull null],
- self.collisionBehavior ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformMarker *other = (FGMPlatformMarker *)object;
- return (self.alpha == other.alpha || (isnan(self.alpha) && isnan(other.alpha))) &&
- FLTPigeonDeepEquals(self.anchor, other.anchor) &&
- self.consumeTapEvents == other.consumeTapEvents && self.draggable == other.draggable &&
- self.flat == other.flat && FLTPigeonDeepEquals(self.icon, other.icon) &&
- FLTPigeonDeepEquals(self.infoWindow, other.infoWindow) &&
- FLTPigeonDeepEquals(self.position, other.position) &&
- (self.rotation == other.rotation || (isnan(self.rotation) && isnan(other.rotation))) &&
- self.visible == other.visible && self.zIndex == other.zIndex &&
- FLTPigeonDeepEquals(self.markerId, other.markerId) &&
- FLTPigeonDeepEquals(self.clusterManagerId, other.clusterManagerId) &&
- FLTPigeonDeepEquals(self.collisionBehavior, other.collisionBehavior);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + (isnan(self.alpha) ? (NSUInteger)0x7FF8000000000000 : @(self.alpha).hash);
- result = result * 31 + FLTPigeonDeepHash(self.anchor);
- result = result * 31 + @(self.consumeTapEvents).hash;
- result = result * 31 + @(self.draggable).hash;
- result = result * 31 + @(self.flat).hash;
- result = result * 31 + FLTPigeonDeepHash(self.icon);
- result = result * 31 + FLTPigeonDeepHash(self.infoWindow);
- result = result * 31 + FLTPigeonDeepHash(self.position);
- result =
- result * 31 + (isnan(self.rotation) ? (NSUInteger)0x7FF8000000000000 : @(self.rotation).hash);
- result = result * 31 + @(self.visible).hash;
- result = result * 31 + @(self.zIndex).hash;
- result = result * 31 + FLTPigeonDeepHash(self.markerId);
- result = result * 31 + FLTPigeonDeepHash(self.clusterManagerId);
- result = result * 31 + FLTPigeonDeepHash(self.collisionBehavior);
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:
- @"FGMPlatformMarker(alpha: %f, anchor: %@, consumeTapEvents: %@, draggable: %@, flat: "
- @"%@, icon: %@, infoWindow: %@, position: %@, rotation: %f, visible: %@, zIndex: %ld, "
- @"markerId: %@, clusterManagerId: %@, collisionBehavior: %@)",
- self.alpha, self.anchor, self.consumeTapEvents ? @"true" : @"false",
- self.draggable ? @"true" : @"false", self.flat ? @"true" : @"false", self.icon,
- self.infoWindow, self.position, self.rotation, self.visible ? @"true" : @"false",
- (long)self.zIndex, self.markerId, self.clusterManagerId, self.collisionBehavior];
-}
-@end
-
-@implementation FGMPlatformPolygon
-+ (instancetype)makeWithPolygonId:(NSString *)polygonId
- consumesTapEvents:(BOOL)consumesTapEvents
- fillColor:(FGMPlatformColor *)fillColor
- geodesic:(BOOL)geodesic
- points:(NSArray<FGMPlatformLatLng *> *)points
- holes:(NSArray<NSArray<FGMPlatformLatLng *> *> *)holes
- visible:(BOOL)visible
- strokeColor:(FGMPlatformColor *)strokeColor
- strokeWidth:(NSInteger)strokeWidth
- zIndex:(NSInteger)zIndex {
- FGMPlatformPolygon *pigeonResult = [[FGMPlatformPolygon alloc] init];
- pigeonResult.polygonId = polygonId;
- pigeonResult.consumesTapEvents = consumesTapEvents;
- pigeonResult.fillColor = fillColor;
- pigeonResult.geodesic = geodesic;
- pigeonResult.points = points;
- pigeonResult.holes = holes;
- pigeonResult.visible = visible;
- pigeonResult.strokeColor = strokeColor;
- pigeonResult.strokeWidth = strokeWidth;
- pigeonResult.zIndex = zIndex;
- return pigeonResult;
-}
-+ (FGMPlatformPolygon *)fromList:(NSArray<id> *)list {
- FGMPlatformPolygon *pigeonResult = [[FGMPlatformPolygon alloc] init];
- pigeonResult.polygonId = GetNullableObjectAtIndex(list, 0);
- pigeonResult.consumesTapEvents = [GetNullableObjectAtIndex(list, 1) boolValue];
- pigeonResult.fillColor = GetNullableObjectAtIndex(list, 2);
- pigeonResult.geodesic = [GetNullableObjectAtIndex(list, 3) boolValue];
- pigeonResult.points = GetNullableObjectAtIndex(list, 4);
- pigeonResult.holes = GetNullableObjectAtIndex(list, 5);
- pigeonResult.visible = [GetNullableObjectAtIndex(list, 6) boolValue];
- pigeonResult.strokeColor = GetNullableObjectAtIndex(list, 7);
- pigeonResult.strokeWidth = [GetNullableObjectAtIndex(list, 8) integerValue];
- pigeonResult.zIndex = [GetNullableObjectAtIndex(list, 9) integerValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformPolygon *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformPolygon fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.polygonId ?: [NSNull null],
- @(self.consumesTapEvents),
- self.fillColor ?: [NSNull null],
- @(self.geodesic),
- self.points ?: [NSNull null],
- self.holes ?: [NSNull null],
- @(self.visible),
- self.strokeColor ?: [NSNull null],
- @(self.strokeWidth),
- @(self.zIndex),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformPolygon *other = (FGMPlatformPolygon *)object;
- return FLTPigeonDeepEquals(self.polygonId, other.polygonId) &&
- self.consumesTapEvents == other.consumesTapEvents &&
- FLTPigeonDeepEquals(self.fillColor, other.fillColor) && self.geodesic == other.geodesic &&
- FLTPigeonDeepEquals(self.points, other.points) &&
- FLTPigeonDeepEquals(self.holes, other.holes) && self.visible == other.visible &&
- FLTPigeonDeepEquals(self.strokeColor, other.strokeColor) &&
- self.strokeWidth == other.strokeWidth && self.zIndex == other.zIndex;
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.polygonId);
- result = result * 31 + @(self.consumesTapEvents).hash;
- result = result * 31 + FLTPigeonDeepHash(self.fillColor);
- result = result * 31 + @(self.geodesic).hash;
- result = result * 31 + FLTPigeonDeepHash(self.points);
- result = result * 31 + FLTPigeonDeepHash(self.holes);
- result = result * 31 + @(self.visible).hash;
- result = result * 31 + FLTPigeonDeepHash(self.strokeColor);
- result = result * 31 + @(self.strokeWidth).hash;
- result = result * 31 + @(self.zIndex).hash;
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:
- @"FGMPlatformPolygon(polygonId: %@, consumesTapEvents: %@, fillColor: %@, geodesic: %@, "
- @"points: %@, holes: %@, visible: %@, strokeColor: %@, strokeWidth: %ld, zIndex: %ld)",
- self.polygonId, self.consumesTapEvents ? @"true" : @"false", self.fillColor,
- self.geodesic ? @"true" : @"false", self.points, self.holes,
- self.visible ? @"true" : @"false", self.strokeColor, (long)self.strokeWidth,
- (long)self.zIndex];
-}
-@end
-
-@implementation FGMPlatformPolyline
-+ (instancetype)makeWithPolylineId:(NSString *)polylineId
- consumesTapEvents:(BOOL)consumesTapEvents
- color:(FGMPlatformColor *)color
- geodesic:(BOOL)geodesic
- jointType:(FGMPlatformJointType)jointType
- patterns:(NSArray<FGMPlatformPatternItem *> *)patterns
- points:(NSArray<FGMPlatformLatLng *> *)points
- visible:(BOOL)visible
- width:(NSInteger)width
- zIndex:(NSInteger)zIndex {
- FGMPlatformPolyline *pigeonResult = [[FGMPlatformPolyline alloc] init];
- pigeonResult.polylineId = polylineId;
- pigeonResult.consumesTapEvents = consumesTapEvents;
- pigeonResult.color = color;
- pigeonResult.geodesic = geodesic;
- pigeonResult.jointType = jointType;
- pigeonResult.patterns = patterns;
- pigeonResult.points = points;
- pigeonResult.visible = visible;
- pigeonResult.width = width;
- pigeonResult.zIndex = zIndex;
- return pigeonResult;
-}
-+ (FGMPlatformPolyline *)fromList:(NSArray<id> *)list {
- FGMPlatformPolyline *pigeonResult = [[FGMPlatformPolyline alloc] init];
- pigeonResult.polylineId = GetNullableObjectAtIndex(list, 0);
- pigeonResult.consumesTapEvents = [GetNullableObjectAtIndex(list, 1) boolValue];
- pigeonResult.color = GetNullableObjectAtIndex(list, 2);
- pigeonResult.geodesic = [GetNullableObjectAtIndex(list, 3) boolValue];
- FGMPlatformJointTypeBox *boxedFGMPlatformJointType = GetNullableObjectAtIndex(list, 4);
- pigeonResult.jointType = boxedFGMPlatformJointType.value;
- pigeonResult.patterns = GetNullableObjectAtIndex(list, 5);
- pigeonResult.points = GetNullableObjectAtIndex(list, 6);
- pigeonResult.visible = [GetNullableObjectAtIndex(list, 7) boolValue];
- pigeonResult.width = [GetNullableObjectAtIndex(list, 8) integerValue];
- pigeonResult.zIndex = [GetNullableObjectAtIndex(list, 9) integerValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformPolyline *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformPolyline fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.polylineId ?: [NSNull null],
- @(self.consumesTapEvents),
- self.color ?: [NSNull null],
- @(self.geodesic),
- [[FGMPlatformJointTypeBox alloc] initWithValue:self.jointType],
- self.patterns ?: [NSNull null],
- self.points ?: [NSNull null],
- @(self.visible),
- @(self.width),
- @(self.zIndex),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformPolyline *other = (FGMPlatformPolyline *)object;
- return FLTPigeonDeepEquals(self.polylineId, other.polylineId) &&
- self.consumesTapEvents == other.consumesTapEvents &&
- FLTPigeonDeepEquals(self.color, other.color) && self.geodesic == other.geodesic &&
- self.jointType == other.jointType && FLTPigeonDeepEquals(self.patterns, other.patterns) &&
- FLTPigeonDeepEquals(self.points, other.points) && self.visible == other.visible &&
- self.width == other.width && self.zIndex == other.zIndex;
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.polylineId);
- result = result * 31 + @(self.consumesTapEvents).hash;
- result = result * 31 + FLTPigeonDeepHash(self.color);
- result = result * 31 + @(self.geodesic).hash;
- result = result * 31 + @(self.jointType).hash;
- result = result * 31 + FLTPigeonDeepHash(self.patterns);
- result = result * 31 + FLTPigeonDeepHash(self.points);
- result = result * 31 + @(self.visible).hash;
- result = result * 31 + @(self.width).hash;
- result = result * 31 + @(self.zIndex).hash;
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:
- @"FGMPlatformPolyline(polylineId: %@, consumesTapEvents: %@, color: %@, geodesic: %@, "
- @"jointType: %ld, patterns: %@, points: %@, visible: %@, width: %ld, zIndex: %ld)",
- self.polylineId, self.consumesTapEvents ? @"true" : @"false", self.color,
- self.geodesic ? @"true" : @"false", (long)self.jointType, self.patterns, self.points,
- self.visible ? @"true" : @"false", (long)self.width, (long)self.zIndex];
-}
-@end
-
-@implementation FGMPlatformPatternItem
-+ (instancetype)makeWithType:(FGMPlatformPatternItemType)type length:(nullable NSNumber *)length {
- FGMPlatformPatternItem *pigeonResult = [[FGMPlatformPatternItem alloc] init];
- pigeonResult.type = type;
- pigeonResult.length = length;
- return pigeonResult;
-}
-+ (FGMPlatformPatternItem *)fromList:(NSArray<id> *)list {
- FGMPlatformPatternItem *pigeonResult = [[FGMPlatformPatternItem alloc] init];
- FGMPlatformPatternItemTypeBox *boxedFGMPlatformPatternItemType =
- GetNullableObjectAtIndex(list, 0);
- pigeonResult.type = boxedFGMPlatformPatternItemType.value;
- pigeonResult.length = GetNullableObjectAtIndex(list, 1);
- return pigeonResult;
-}
-+ (nullable FGMPlatformPatternItem *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformPatternItem fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- [[FGMPlatformPatternItemTypeBox alloc] initWithValue:self.type],
- self.length ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformPatternItem *other = (FGMPlatformPatternItem *)object;
- return self.type == other.type && FLTPigeonDeepEquals(self.length, other.length);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + @(self.type).hash;
- result = result * 31 + FLTPigeonDeepHash(self.length);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformPatternItem(type: %ld, length: %@)",
- (long)self.type, self.length];
-}
-@end
-
-@implementation FGMPlatformTile
-+ (instancetype)makeWithWidth:(NSInteger)width
- height:(NSInteger)height
- data:(nullable FlutterStandardTypedData *)data {
- FGMPlatformTile *pigeonResult = [[FGMPlatformTile alloc] init];
- pigeonResult.width = width;
- pigeonResult.height = height;
- pigeonResult.data = data;
- return pigeonResult;
-}
-+ (FGMPlatformTile *)fromList:(NSArray<id> *)list {
- FGMPlatformTile *pigeonResult = [[FGMPlatformTile alloc] init];
- pigeonResult.width = [GetNullableObjectAtIndex(list, 0) integerValue];
- pigeonResult.height = [GetNullableObjectAtIndex(list, 1) integerValue];
- pigeonResult.data = GetNullableObjectAtIndex(list, 2);
- return pigeonResult;
-}
-+ (nullable FGMPlatformTile *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformTile fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.width),
- @(self.height),
- self.data ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformTile *other = (FGMPlatformTile *)object;
- return self.width == other.width && self.height == other.height &&
- FLTPigeonDeepEquals(self.data, other.data);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + @(self.width).hash;
- result = result * 31 + @(self.height).hash;
- result = result * 31 + FLTPigeonDeepHash(self.data);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformTile(width: %ld, height: %ld, data: %@)",
- (long)self.width, (long)self.height, self.data];
-}
-@end
-
-@implementation FGMPlatformTileOverlay
-+ (instancetype)makeWithTileOverlayId:(NSString *)tileOverlayId
- fadeIn:(BOOL)fadeIn
- transparency:(double)transparency
- zIndex:(NSInteger)zIndex
- visible:(BOOL)visible
- tileSize:(NSInteger)tileSize {
- FGMPlatformTileOverlay *pigeonResult = [[FGMPlatformTileOverlay alloc] init];
- pigeonResult.tileOverlayId = tileOverlayId;
- pigeonResult.fadeIn = fadeIn;
- pigeonResult.transparency = transparency;
- pigeonResult.zIndex = zIndex;
- pigeonResult.visible = visible;
- pigeonResult.tileSize = tileSize;
- return pigeonResult;
-}
-+ (FGMPlatformTileOverlay *)fromList:(NSArray<id> *)list {
- FGMPlatformTileOverlay *pigeonResult = [[FGMPlatformTileOverlay alloc] init];
- pigeonResult.tileOverlayId = GetNullableObjectAtIndex(list, 0);
- pigeonResult.fadeIn = [GetNullableObjectAtIndex(list, 1) boolValue];
- pigeonResult.transparency = [GetNullableObjectAtIndex(list, 2) doubleValue];
- pigeonResult.zIndex = [GetNullableObjectAtIndex(list, 3) integerValue];
- pigeonResult.visible = [GetNullableObjectAtIndex(list, 4) boolValue];
- pigeonResult.tileSize = [GetNullableObjectAtIndex(list, 5) integerValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformTileOverlay *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformTileOverlay fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.tileOverlayId ?: [NSNull null],
- @(self.fadeIn),
- @(self.transparency),
- @(self.zIndex),
- @(self.visible),
- @(self.tileSize),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformTileOverlay *other = (FGMPlatformTileOverlay *)object;
- return FLTPigeonDeepEquals(self.tileOverlayId, other.tileOverlayId) &&
- self.fadeIn == other.fadeIn &&
- (self.transparency == other.transparency ||
- (isnan(self.transparency) && isnan(other.transparency))) &&
- self.zIndex == other.zIndex && self.visible == other.visible &&
- self.tileSize == other.tileSize;
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.tileOverlayId);
- result = result * 31 + @(self.fadeIn).hash;
- result = result * 31 +
- (isnan(self.transparency) ? (NSUInteger)0x7FF8000000000000 : @(self.transparency).hash);
- result = result * 31 + @(self.zIndex).hash;
- result = result * 31 + @(self.visible).hash;
- result = result * 31 + @(self.tileSize).hash;
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformTileOverlay(tileOverlayId: %@, fadeIn: %@, "
- @"transparency: %f, zIndex: %ld, visible: %@, tileSize: %ld)",
- self.tileOverlayId, self.fadeIn ? @"true" : @"false",
- self.transparency, (long)self.zIndex,
- self.visible ? @"true" : @"false", (long)self.tileSize];
-}
-@end
-
-@implementation FGMPlatformEdgeInsets
-+ (instancetype)makeWithTop:(double)top
- bottom:(double)bottom
- left:(double)left
- right:(double)right {
- FGMPlatformEdgeInsets *pigeonResult = [[FGMPlatformEdgeInsets alloc] init];
- pigeonResult.top = top;
- pigeonResult.bottom = bottom;
- pigeonResult.left = left;
- pigeonResult.right = right;
- return pigeonResult;
-}
-+ (FGMPlatformEdgeInsets *)fromList:(NSArray<id> *)list {
- FGMPlatformEdgeInsets *pigeonResult = [[FGMPlatformEdgeInsets alloc] init];
- pigeonResult.top = [GetNullableObjectAtIndex(list, 0) doubleValue];
- pigeonResult.bottom = [GetNullableObjectAtIndex(list, 1) doubleValue];
- pigeonResult.left = [GetNullableObjectAtIndex(list, 2) doubleValue];
- pigeonResult.right = [GetNullableObjectAtIndex(list, 3) doubleValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformEdgeInsets *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformEdgeInsets fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.top),
- @(self.bottom),
- @(self.left),
- @(self.right),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformEdgeInsets *other = (FGMPlatformEdgeInsets *)object;
- return (self.top == other.top || (isnan(self.top) && isnan(other.top))) &&
- (self.bottom == other.bottom || (isnan(self.bottom) && isnan(other.bottom))) &&
- (self.left == other.left || (isnan(self.left) && isnan(other.left))) &&
- (self.right == other.right || (isnan(self.right) && isnan(other.right)));
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + (isnan(self.top) ? (NSUInteger)0x7FF8000000000000 : @(self.top).hash);
- result =
- result * 31 + (isnan(self.bottom) ? (NSUInteger)0x7FF8000000000000 : @(self.bottom).hash);
- result = result * 31 + (isnan(self.left) ? (NSUInteger)0x7FF8000000000000 : @(self.left).hash);
- result = result * 31 + (isnan(self.right) ? (NSUInteger)0x7FF8000000000000 : @(self.right).hash);
- return result;
-}
-- (NSString *)description {
- return
- [NSString stringWithFormat:@"FGMPlatformEdgeInsets(top: %f, bottom: %f, left: %f, right: %f)",
- self.top, self.bottom, self.left, self.right];
-}
-@end
-
-@implementation FGMPlatformLatLng
-+ (instancetype)makeWithLatitude:(double)latitude longitude:(double)longitude {
- FGMPlatformLatLng *pigeonResult = [[FGMPlatformLatLng alloc] init];
- pigeonResult.latitude = latitude;
- pigeonResult.longitude = longitude;
- return pigeonResult;
-}
-+ (FGMPlatformLatLng *)fromList:(NSArray<id> *)list {
- FGMPlatformLatLng *pigeonResult = [[FGMPlatformLatLng alloc] init];
- pigeonResult.latitude = [GetNullableObjectAtIndex(list, 0) doubleValue];
- pigeonResult.longitude = [GetNullableObjectAtIndex(list, 1) doubleValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformLatLng *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformLatLng fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.latitude),
- @(self.longitude),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformLatLng *other = (FGMPlatformLatLng *)object;
- return (self.latitude == other.latitude || (isnan(self.latitude) && isnan(other.latitude))) &&
- (self.longitude == other.longitude || (isnan(self.longitude) && isnan(other.longitude)));
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result =
- result * 31 + (isnan(self.latitude) ? (NSUInteger)0x7FF8000000000000 : @(self.latitude).hash);
- result = result * 31 +
- (isnan(self.longitude) ? (NSUInteger)0x7FF8000000000000 : @(self.longitude).hash);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformLatLng(latitude: %f, longitude: %f)",
- self.latitude, self.longitude];
-}
-@end
-
-@implementation FGMPlatformLatLngBounds
-+ (instancetype)makeWithNortheast:(FGMPlatformLatLng *)northeast
- southwest:(FGMPlatformLatLng *)southwest {
- FGMPlatformLatLngBounds *pigeonResult = [[FGMPlatformLatLngBounds alloc] init];
- pigeonResult.northeast = northeast;
- pigeonResult.southwest = southwest;
- return pigeonResult;
-}
-+ (FGMPlatformLatLngBounds *)fromList:(NSArray<id> *)list {
- FGMPlatformLatLngBounds *pigeonResult = [[FGMPlatformLatLngBounds alloc] init];
- pigeonResult.northeast = GetNullableObjectAtIndex(list, 0);
- pigeonResult.southwest = GetNullableObjectAtIndex(list, 1);
- return pigeonResult;
-}
-+ (nullable FGMPlatformLatLngBounds *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformLatLngBounds fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.northeast ?: [NSNull null],
- self.southwest ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformLatLngBounds *other = (FGMPlatformLatLngBounds *)object;
- return FLTPigeonDeepEquals(self.northeast, other.northeast) &&
- FLTPigeonDeepEquals(self.southwest, other.southwest);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.northeast);
- result = result * 31 + FLTPigeonDeepHash(self.southwest);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformLatLngBounds(northeast: %@, southwest: %@)",
- self.northeast, self.southwest];
-}
-@end
-
-@implementation FGMPlatformCameraTargetBounds
-+ (instancetype)makeWithBounds:(nullable FGMPlatformLatLngBounds *)bounds {
- FGMPlatformCameraTargetBounds *pigeonResult = [[FGMPlatformCameraTargetBounds alloc] init];
- pigeonResult.bounds = bounds;
- return pigeonResult;
-}
-+ (FGMPlatformCameraTargetBounds *)fromList:(NSArray<id> *)list {
- FGMPlatformCameraTargetBounds *pigeonResult = [[FGMPlatformCameraTargetBounds alloc] init];
- pigeonResult.bounds = GetNullableObjectAtIndex(list, 0);
- return pigeonResult;
-}
-+ (nullable FGMPlatformCameraTargetBounds *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformCameraTargetBounds fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.bounds ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformCameraTargetBounds *other = (FGMPlatformCameraTargetBounds *)object;
- return FLTPigeonDeepEquals(self.bounds, other.bounds);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.bounds);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformCameraTargetBounds(bounds: %@)", self.bounds];
-}
-@end
-
-@implementation FGMPlatformGroundOverlay
-+ (instancetype)makeWithGroundOverlayId:(NSString *)groundOverlayId
- image:(FGMPlatformBitmap *)image
- position:(nullable FGMPlatformLatLng *)position
- bounds:(nullable FGMPlatformLatLngBounds *)bounds
- anchor:(nullable FGMPlatformPoint *)anchor
- transparency:(double)transparency
- bearing:(double)bearing
- zIndex:(NSInteger)zIndex
- visible:(BOOL)visible
- clickable:(BOOL)clickable
- zoomLevel:(nullable NSNumber *)zoomLevel {
- FGMPlatformGroundOverlay *pigeonResult = [[FGMPlatformGroundOverlay alloc] init];
- pigeonResult.groundOverlayId = groundOverlayId;
- pigeonResult.image = image;
- pigeonResult.position = position;
- pigeonResult.bounds = bounds;
- pigeonResult.anchor = anchor;
- pigeonResult.transparency = transparency;
- pigeonResult.bearing = bearing;
- pigeonResult.zIndex = zIndex;
- pigeonResult.visible = visible;
- pigeonResult.clickable = clickable;
- pigeonResult.zoomLevel = zoomLevel;
- return pigeonResult;
-}
-+ (FGMPlatformGroundOverlay *)fromList:(NSArray<id> *)list {
- FGMPlatformGroundOverlay *pigeonResult = [[FGMPlatformGroundOverlay alloc] init];
- pigeonResult.groundOverlayId = GetNullableObjectAtIndex(list, 0);
- pigeonResult.image = GetNullableObjectAtIndex(list, 1);
- pigeonResult.position = GetNullableObjectAtIndex(list, 2);
- pigeonResult.bounds = GetNullableObjectAtIndex(list, 3);
- pigeonResult.anchor = GetNullableObjectAtIndex(list, 4);
- pigeonResult.transparency = [GetNullableObjectAtIndex(list, 5) doubleValue];
- pigeonResult.bearing = [GetNullableObjectAtIndex(list, 6) doubleValue];
- pigeonResult.zIndex = [GetNullableObjectAtIndex(list, 7) integerValue];
- pigeonResult.visible = [GetNullableObjectAtIndex(list, 8) boolValue];
- pigeonResult.clickable = [GetNullableObjectAtIndex(list, 9) boolValue];
- pigeonResult.zoomLevel = GetNullableObjectAtIndex(list, 10);
- return pigeonResult;
-}
-+ (nullable FGMPlatformGroundOverlay *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformGroundOverlay fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.groundOverlayId ?: [NSNull null],
- self.image ?: [NSNull null],
- self.position ?: [NSNull null],
- self.bounds ?: [NSNull null],
- self.anchor ?: [NSNull null],
- @(self.transparency),
- @(self.bearing),
- @(self.zIndex),
- @(self.visible),
- @(self.clickable),
- self.zoomLevel ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformGroundOverlay *other = (FGMPlatformGroundOverlay *)object;
- return FLTPigeonDeepEquals(self.groundOverlayId, other.groundOverlayId) &&
- FLTPigeonDeepEquals(self.image, other.image) &&
- FLTPigeonDeepEquals(self.position, other.position) &&
- FLTPigeonDeepEquals(self.bounds, other.bounds) &&
- FLTPigeonDeepEquals(self.anchor, other.anchor) &&
- (self.transparency == other.transparency ||
- (isnan(self.transparency) && isnan(other.transparency))) &&
- (self.bearing == other.bearing || (isnan(self.bearing) && isnan(other.bearing))) &&
- self.zIndex == other.zIndex && self.visible == other.visible &&
- self.clickable == other.clickable && FLTPigeonDeepEquals(self.zoomLevel, other.zoomLevel);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.groundOverlayId);
- result = result * 31 + FLTPigeonDeepHash(self.image);
- result = result * 31 + FLTPigeonDeepHash(self.position);
- result = result * 31 + FLTPigeonDeepHash(self.bounds);
- result = result * 31 + FLTPigeonDeepHash(self.anchor);
- result = result * 31 +
- (isnan(self.transparency) ? (NSUInteger)0x7FF8000000000000 : @(self.transparency).hash);
- result =
- result * 31 + (isnan(self.bearing) ? (NSUInteger)0x7FF8000000000000 : @(self.bearing).hash);
- result = result * 31 + @(self.zIndex).hash;
- result = result * 31 + @(self.visible).hash;
- result = result * 31 + @(self.clickable).hash;
- result = result * 31 + FLTPigeonDeepHash(self.zoomLevel);
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:@"FGMPlatformGroundOverlay(groundOverlayId: %@, image: %@, position: %@, "
- @"bounds: %@, anchor: %@, transparency: %f, bearing: %f, zIndex: %ld, "
- @"visible: %@, clickable: %@, zoomLevel: %@)",
- self.groundOverlayId, self.image, self.position, self.bounds, self.anchor,
- self.transparency, self.bearing, (long)self.zIndex,
- self.visible ? @"true" : @"false", self.clickable ? @"true" : @"false",
- self.zoomLevel];
-}
-@end
-
-@implementation FGMPlatformMapViewCreationParams
-+ (instancetype)
- makeWithInitialCameraPosition:(FGMPlatformCameraPosition *)initialCameraPosition
- mapConfiguration:(FGMPlatformMapConfiguration *)mapConfiguration
- initialCircles:(NSArray<FGMPlatformCircle *> *)initialCircles
- initialMarkers:(NSArray<FGMPlatformMarker *> *)initialMarkers
- initialPolygons:(NSArray<FGMPlatformPolygon *> *)initialPolygons
- initialPolylines:(NSArray<FGMPlatformPolyline *> *)initialPolylines
- initialHeatmaps:(NSArray<FGMPlatformHeatmap *> *)initialHeatmaps
- initialTileOverlays:(NSArray<FGMPlatformTileOverlay *> *)initialTileOverlays
- initialClusterManagers:(NSArray<FGMPlatformClusterManager *> *)initialClusterManagers
- initialGroundOverlays:(NSArray<FGMPlatformGroundOverlay *> *)initialGroundOverlays {
- FGMPlatformMapViewCreationParams *pigeonResult = [[FGMPlatformMapViewCreationParams alloc] init];
- pigeonResult.initialCameraPosition = initialCameraPosition;
- pigeonResult.mapConfiguration = mapConfiguration;
- pigeonResult.initialCircles = initialCircles;
- pigeonResult.initialMarkers = initialMarkers;
- pigeonResult.initialPolygons = initialPolygons;
- pigeonResult.initialPolylines = initialPolylines;
- pigeonResult.initialHeatmaps = initialHeatmaps;
- pigeonResult.initialTileOverlays = initialTileOverlays;
- pigeonResult.initialClusterManagers = initialClusterManagers;
- pigeonResult.initialGroundOverlays = initialGroundOverlays;
- return pigeonResult;
-}
-+ (FGMPlatformMapViewCreationParams *)fromList:(NSArray<id> *)list {
- FGMPlatformMapViewCreationParams *pigeonResult = [[FGMPlatformMapViewCreationParams alloc] init];
- pigeonResult.initialCameraPosition = GetNullableObjectAtIndex(list, 0);
- pigeonResult.mapConfiguration = GetNullableObjectAtIndex(list, 1);
- pigeonResult.initialCircles = GetNullableObjectAtIndex(list, 2);
- pigeonResult.initialMarkers = GetNullableObjectAtIndex(list, 3);
- pigeonResult.initialPolygons = GetNullableObjectAtIndex(list, 4);
- pigeonResult.initialPolylines = GetNullableObjectAtIndex(list, 5);
- pigeonResult.initialHeatmaps = GetNullableObjectAtIndex(list, 6);
- pigeonResult.initialTileOverlays = GetNullableObjectAtIndex(list, 7);
- pigeonResult.initialClusterManagers = GetNullableObjectAtIndex(list, 8);
- pigeonResult.initialGroundOverlays = GetNullableObjectAtIndex(list, 9);
- return pigeonResult;
-}
-+ (nullable FGMPlatformMapViewCreationParams *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformMapViewCreationParams fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.initialCameraPosition ?: [NSNull null],
- self.mapConfiguration ?: [NSNull null],
- self.initialCircles ?: [NSNull null],
- self.initialMarkers ?: [NSNull null],
- self.initialPolygons ?: [NSNull null],
- self.initialPolylines ?: [NSNull null],
- self.initialHeatmaps ?: [NSNull null],
- self.initialTileOverlays ?: [NSNull null],
- self.initialClusterManagers ?: [NSNull null],
- self.initialGroundOverlays ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformMapViewCreationParams *other = (FGMPlatformMapViewCreationParams *)object;
- return FLTPigeonDeepEquals(self.initialCameraPosition, other.initialCameraPosition) &&
- FLTPigeonDeepEquals(self.mapConfiguration, other.mapConfiguration) &&
- FLTPigeonDeepEquals(self.initialCircles, other.initialCircles) &&
- FLTPigeonDeepEquals(self.initialMarkers, other.initialMarkers) &&
- FLTPigeonDeepEquals(self.initialPolygons, other.initialPolygons) &&
- FLTPigeonDeepEquals(self.initialPolylines, other.initialPolylines) &&
- FLTPigeonDeepEquals(self.initialHeatmaps, other.initialHeatmaps) &&
- FLTPigeonDeepEquals(self.initialTileOverlays, other.initialTileOverlays) &&
- FLTPigeonDeepEquals(self.initialClusterManagers, other.initialClusterManagers) &&
- FLTPigeonDeepEquals(self.initialGroundOverlays, other.initialGroundOverlays);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.initialCameraPosition);
- result = result * 31 + FLTPigeonDeepHash(self.mapConfiguration);
- result = result * 31 + FLTPigeonDeepHash(self.initialCircles);
- result = result * 31 + FLTPigeonDeepHash(self.initialMarkers);
- result = result * 31 + FLTPigeonDeepHash(self.initialPolygons);
- result = result * 31 + FLTPigeonDeepHash(self.initialPolylines);
- result = result * 31 + FLTPigeonDeepHash(self.initialHeatmaps);
- result = result * 31 + FLTPigeonDeepHash(self.initialTileOverlays);
- result = result * 31 + FLTPigeonDeepHash(self.initialClusterManagers);
- result = result * 31 + FLTPigeonDeepHash(self.initialGroundOverlays);
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:
- @"FGMPlatformMapViewCreationParams(initialCameraPosition: %@, mapConfiguration: %@, "
- @"initialCircles: %@, initialMarkers: %@, initialPolygons: %@, initialPolylines: %@, "
- @"initialHeatmaps: %@, initialTileOverlays: %@, initialClusterManagers: %@, "
- @"initialGroundOverlays: %@)",
- self.initialCameraPosition, self.mapConfiguration, self.initialCircles,
- self.initialMarkers, self.initialPolygons, self.initialPolylines, self.initialHeatmaps,
- self.initialTileOverlays, self.initialClusterManagers, self.initialGroundOverlays];
-}
-@end
-
-@implementation FGMPlatformMapConfiguration
-+ (instancetype)makeWithCompassEnabled:(nullable NSNumber *)compassEnabled
- cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds
- mapType:(nullable FGMPlatformMapTypeBox *)mapType
- minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference
- rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled
- scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled
- tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled
- trackCameraPosition:(nullable NSNumber *)trackCameraPosition
- zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled
- myLocationEnabled:(nullable NSNumber *)myLocationEnabled
- myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled
- padding:(nullable FGMPlatformEdgeInsets *)padding
- indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled
- trafficEnabled:(nullable NSNumber *)trafficEnabled
- buildingsEnabled:(nullable NSNumber *)buildingsEnabled
- markerType:(FGMPlatformMarkerType)markerType
- mapId:(nullable NSString *)mapId
- style:(nullable NSString *)style {
- FGMPlatformMapConfiguration *pigeonResult = [[FGMPlatformMapConfiguration alloc] init];
- pigeonResult.compassEnabled = compassEnabled;
- pigeonResult.cameraTargetBounds = cameraTargetBounds;
- pigeonResult.mapType = mapType;
- pigeonResult.minMaxZoomPreference = minMaxZoomPreference;
- pigeonResult.rotateGesturesEnabled = rotateGesturesEnabled;
- pigeonResult.scrollGesturesEnabled = scrollGesturesEnabled;
- pigeonResult.tiltGesturesEnabled = tiltGesturesEnabled;
- pigeonResult.trackCameraPosition = trackCameraPosition;
- pigeonResult.zoomGesturesEnabled = zoomGesturesEnabled;
- pigeonResult.myLocationEnabled = myLocationEnabled;
- pigeonResult.myLocationButtonEnabled = myLocationButtonEnabled;
- pigeonResult.padding = padding;
- pigeonResult.indoorViewEnabled = indoorViewEnabled;
- pigeonResult.trafficEnabled = trafficEnabled;
- pigeonResult.buildingsEnabled = buildingsEnabled;
- pigeonResult.markerType = markerType;
- pigeonResult.mapId = mapId;
- pigeonResult.style = style;
- return pigeonResult;
-}
-+ (FGMPlatformMapConfiguration *)fromList:(NSArray<id> *)list {
- FGMPlatformMapConfiguration *pigeonResult = [[FGMPlatformMapConfiguration alloc] init];
- pigeonResult.compassEnabled = GetNullableObjectAtIndex(list, 0);
- pigeonResult.cameraTargetBounds = GetNullableObjectAtIndex(list, 1);
- pigeonResult.mapType = GetNullableObjectAtIndex(list, 2);
- pigeonResult.minMaxZoomPreference = GetNullableObjectAtIndex(list, 3);
- pigeonResult.rotateGesturesEnabled = GetNullableObjectAtIndex(list, 4);
- pigeonResult.scrollGesturesEnabled = GetNullableObjectAtIndex(list, 5);
- pigeonResult.tiltGesturesEnabled = GetNullableObjectAtIndex(list, 6);
- pigeonResult.trackCameraPosition = GetNullableObjectAtIndex(list, 7);
- pigeonResult.zoomGesturesEnabled = GetNullableObjectAtIndex(list, 8);
- pigeonResult.myLocationEnabled = GetNullableObjectAtIndex(list, 9);
- pigeonResult.myLocationButtonEnabled = GetNullableObjectAtIndex(list, 10);
- pigeonResult.padding = GetNullableObjectAtIndex(list, 11);
- pigeonResult.indoorViewEnabled = GetNullableObjectAtIndex(list, 12);
- pigeonResult.trafficEnabled = GetNullableObjectAtIndex(list, 13);
- pigeonResult.buildingsEnabled = GetNullableObjectAtIndex(list, 14);
- FGMPlatformMarkerTypeBox *boxedFGMPlatformMarkerType = GetNullableObjectAtIndex(list, 15);
- pigeonResult.markerType = boxedFGMPlatformMarkerType.value;
- pigeonResult.mapId = GetNullableObjectAtIndex(list, 16);
- pigeonResult.style = GetNullableObjectAtIndex(list, 17);
- return pigeonResult;
-}
-+ (nullable FGMPlatformMapConfiguration *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformMapConfiguration fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.compassEnabled ?: [NSNull null],
- self.cameraTargetBounds ?: [NSNull null],
- self.mapType ?: [NSNull null],
- self.minMaxZoomPreference ?: [NSNull null],
- self.rotateGesturesEnabled ?: [NSNull null],
- self.scrollGesturesEnabled ?: [NSNull null],
- self.tiltGesturesEnabled ?: [NSNull null],
- self.trackCameraPosition ?: [NSNull null],
- self.zoomGesturesEnabled ?: [NSNull null],
- self.myLocationEnabled ?: [NSNull null],
- self.myLocationButtonEnabled ?: [NSNull null],
- self.padding ?: [NSNull null],
- self.indoorViewEnabled ?: [NSNull null],
- self.trafficEnabled ?: [NSNull null],
- self.buildingsEnabled ?: [NSNull null],
- [[FGMPlatformMarkerTypeBox alloc] initWithValue:self.markerType],
- self.mapId ?: [NSNull null],
- self.style ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformMapConfiguration *other = (FGMPlatformMapConfiguration *)object;
- return FLTPigeonDeepEquals(self.compassEnabled, other.compassEnabled) &&
- FLTPigeonDeepEquals(self.cameraTargetBounds, other.cameraTargetBounds) &&
- FLTPigeonDeepEquals(self.mapType, other.mapType) &&
- FLTPigeonDeepEquals(self.minMaxZoomPreference, other.minMaxZoomPreference) &&
- FLTPigeonDeepEquals(self.rotateGesturesEnabled, other.rotateGesturesEnabled) &&
- FLTPigeonDeepEquals(self.scrollGesturesEnabled, other.scrollGesturesEnabled) &&
- FLTPigeonDeepEquals(self.tiltGesturesEnabled, other.tiltGesturesEnabled) &&
- FLTPigeonDeepEquals(self.trackCameraPosition, other.trackCameraPosition) &&
- FLTPigeonDeepEquals(self.zoomGesturesEnabled, other.zoomGesturesEnabled) &&
- FLTPigeonDeepEquals(self.myLocationEnabled, other.myLocationEnabled) &&
- FLTPigeonDeepEquals(self.myLocationButtonEnabled, other.myLocationButtonEnabled) &&
- FLTPigeonDeepEquals(self.padding, other.padding) &&
- FLTPigeonDeepEquals(self.indoorViewEnabled, other.indoorViewEnabled) &&
- FLTPigeonDeepEquals(self.trafficEnabled, other.trafficEnabled) &&
- FLTPigeonDeepEquals(self.buildingsEnabled, other.buildingsEnabled) &&
- self.markerType == other.markerType && FLTPigeonDeepEquals(self.mapId, other.mapId) &&
- FLTPigeonDeepEquals(self.style, other.style);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.compassEnabled);
- result = result * 31 + FLTPigeonDeepHash(self.cameraTargetBounds);
- result = result * 31 + FLTPigeonDeepHash(self.mapType);
- result = result * 31 + FLTPigeonDeepHash(self.minMaxZoomPreference);
- result = result * 31 + FLTPigeonDeepHash(self.rotateGesturesEnabled);
- result = result * 31 + FLTPigeonDeepHash(self.scrollGesturesEnabled);
- result = result * 31 + FLTPigeonDeepHash(self.tiltGesturesEnabled);
- result = result * 31 + FLTPigeonDeepHash(self.trackCameraPosition);
- result = result * 31 + FLTPigeonDeepHash(self.zoomGesturesEnabled);
- result = result * 31 + FLTPigeonDeepHash(self.myLocationEnabled);
- result = result * 31 + FLTPigeonDeepHash(self.myLocationButtonEnabled);
- result = result * 31 + FLTPigeonDeepHash(self.padding);
- result = result * 31 + FLTPigeonDeepHash(self.indoorViewEnabled);
- result = result * 31 + FLTPigeonDeepHash(self.trafficEnabled);
- result = result * 31 + FLTPigeonDeepHash(self.buildingsEnabled);
- result = result * 31 + @(self.markerType).hash;
- result = result * 31 + FLTPigeonDeepHash(self.mapId);
- result = result * 31 + FLTPigeonDeepHash(self.style);
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:
- @"FGMPlatformMapConfiguration(compassEnabled: %@, cameraTargetBounds: %@, mapType: %@, "
- @"minMaxZoomPreference: %@, rotateGesturesEnabled: %@, scrollGesturesEnabled: %@, "
- @"tiltGesturesEnabled: %@, trackCameraPosition: %@, zoomGesturesEnabled: %@, "
- @"myLocationEnabled: %@, myLocationButtonEnabled: %@, padding: %@, indoorViewEnabled: "
- @"%@, trafficEnabled: %@, buildingsEnabled: %@, markerType: %ld, mapId: %@, style: %@)",
- self.compassEnabled, self.cameraTargetBounds, self.mapType, self.minMaxZoomPreference,
- self.rotateGesturesEnabled, self.scrollGesturesEnabled, self.tiltGesturesEnabled,
- self.trackCameraPosition, self.zoomGesturesEnabled, self.myLocationEnabled,
- self.myLocationButtonEnabled, self.padding, self.indoorViewEnabled, self.trafficEnabled,
- self.buildingsEnabled, (long)self.markerType, self.mapId, self.style];
-}
-@end
-
-@implementation FGMPlatformPoint
-+ (instancetype)makeWithX:(double)x y:(double)y {
- FGMPlatformPoint *pigeonResult = [[FGMPlatformPoint alloc] init];
- pigeonResult.x = x;
- pigeonResult.y = y;
- return pigeonResult;
-}
-+ (FGMPlatformPoint *)fromList:(NSArray<id> *)list {
- FGMPlatformPoint *pigeonResult = [[FGMPlatformPoint alloc] init];
- pigeonResult.x = [GetNullableObjectAtIndex(list, 0) doubleValue];
- pigeonResult.y = [GetNullableObjectAtIndex(list, 1) doubleValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformPoint *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformPoint fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.x),
- @(self.y),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformPoint *other = (FGMPlatformPoint *)object;
- return (self.x == other.x || (isnan(self.x) && isnan(other.x))) &&
- (self.y == other.y || (isnan(self.y) && isnan(other.y)));
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + (isnan(self.x) ? (NSUInteger)0x7FF8000000000000 : @(self.x).hash);
- result = result * 31 + (isnan(self.y) ? (NSUInteger)0x7FF8000000000000 : @(self.y).hash);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformPoint(x: %f, y: %f)", self.x, self.y];
-}
-@end
-
-@implementation FGMPlatformSize
-+ (instancetype)makeWithWidth:(double)width height:(double)height {
- FGMPlatformSize *pigeonResult = [[FGMPlatformSize alloc] init];
- pigeonResult.width = width;
- pigeonResult.height = height;
- return pigeonResult;
-}
-+ (FGMPlatformSize *)fromList:(NSArray<id> *)list {
- FGMPlatformSize *pigeonResult = [[FGMPlatformSize alloc] init];
- pigeonResult.width = [GetNullableObjectAtIndex(list, 0) doubleValue];
- pigeonResult.height = [GetNullableObjectAtIndex(list, 1) doubleValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformSize *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformSize fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.width),
- @(self.height),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformSize *other = (FGMPlatformSize *)object;
- return (self.width == other.width || (isnan(self.width) && isnan(other.width))) &&
- (self.height == other.height || (isnan(self.height) && isnan(other.height)));
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + (isnan(self.width) ? (NSUInteger)0x7FF8000000000000 : @(self.width).hash);
- result =
- result * 31 + (isnan(self.height) ? (NSUInteger)0x7FF8000000000000 : @(self.height).hash);
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:@"FGMPlatformSize(width: %f, height: %f)", self.width, self.height];
-}
-@end
-
-@implementation FGMPlatformColor
-+ (instancetype)makeWithRed:(double)red green:(double)green blue:(double)blue alpha:(double)alpha {
- FGMPlatformColor *pigeonResult = [[FGMPlatformColor alloc] init];
- pigeonResult.red = red;
- pigeonResult.green = green;
- pigeonResult.blue = blue;
- pigeonResult.alpha = alpha;
- return pigeonResult;
-}
-+ (FGMPlatformColor *)fromList:(NSArray<id> *)list {
- FGMPlatformColor *pigeonResult = [[FGMPlatformColor alloc] init];
- pigeonResult.red = [GetNullableObjectAtIndex(list, 0) doubleValue];
- pigeonResult.green = [GetNullableObjectAtIndex(list, 1) doubleValue];
- pigeonResult.blue = [GetNullableObjectAtIndex(list, 2) doubleValue];
- pigeonResult.alpha = [GetNullableObjectAtIndex(list, 3) doubleValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformColor *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformColor fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.red),
- @(self.green),
- @(self.blue),
- @(self.alpha),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformColor *other = (FGMPlatformColor *)object;
- return (self.red == other.red || (isnan(self.red) && isnan(other.red))) &&
- (self.green == other.green || (isnan(self.green) && isnan(other.green))) &&
- (self.blue == other.blue || (isnan(self.blue) && isnan(other.blue))) &&
- (self.alpha == other.alpha || (isnan(self.alpha) && isnan(other.alpha)));
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + (isnan(self.red) ? (NSUInteger)0x7FF8000000000000 : @(self.red).hash);
- result = result * 31 + (isnan(self.green) ? (NSUInteger)0x7FF8000000000000 : @(self.green).hash);
- result = result * 31 + (isnan(self.blue) ? (NSUInteger)0x7FF8000000000000 : @(self.blue).hash);
- result = result * 31 + (isnan(self.alpha) ? (NSUInteger)0x7FF8000000000000 : @(self.alpha).hash);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformColor(red: %f, green: %f, blue: %f, alpha: %f)",
- self.red, self.green, self.blue, self.alpha];
-}
-@end
-
-@implementation FGMPlatformTileLayer
-+ (instancetype)makeWithVisible:(BOOL)visible
- fadeIn:(BOOL)fadeIn
- opacity:(double)opacity
- zIndex:(NSInteger)zIndex {
- FGMPlatformTileLayer *pigeonResult = [[FGMPlatformTileLayer alloc] init];
- pigeonResult.visible = visible;
- pigeonResult.fadeIn = fadeIn;
- pigeonResult.opacity = opacity;
- pigeonResult.zIndex = zIndex;
- return pigeonResult;
-}
-+ (FGMPlatformTileLayer *)fromList:(NSArray<id> *)list {
- FGMPlatformTileLayer *pigeonResult = [[FGMPlatformTileLayer alloc] init];
- pigeonResult.visible = [GetNullableObjectAtIndex(list, 0) boolValue];
- pigeonResult.fadeIn = [GetNullableObjectAtIndex(list, 1) boolValue];
- pigeonResult.opacity = [GetNullableObjectAtIndex(list, 2) doubleValue];
- pigeonResult.zIndex = [GetNullableObjectAtIndex(list, 3) integerValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformTileLayer *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformTileLayer fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.visible),
- @(self.fadeIn),
- @(self.opacity),
- @(self.zIndex),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformTileLayer *other = (FGMPlatformTileLayer *)object;
- return self.visible == other.visible && self.fadeIn == other.fadeIn &&
- (self.opacity == other.opacity || (isnan(self.opacity) && isnan(other.opacity))) &&
- self.zIndex == other.zIndex;
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + @(self.visible).hash;
- result = result * 31 + @(self.fadeIn).hash;
- result =
- result * 31 + (isnan(self.opacity) ? (NSUInteger)0x7FF8000000000000 : @(self.opacity).hash);
- result = result * 31 + @(self.zIndex).hash;
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:@"FGMPlatformTileLayer(visible: %@, fadeIn: %@, opacity: %f, zIndex: %ld)",
- self.visible ? @"true" : @"false", self.fadeIn ? @"true" : @"false",
- self.opacity, (long)self.zIndex];
-}
-@end
-
-@implementation FGMPlatformZoomRange
-+ (instancetype)makeWithMin:(nullable NSNumber *)min max:(nullable NSNumber *)max {
- FGMPlatformZoomRange *pigeonResult = [[FGMPlatformZoomRange alloc] init];
- pigeonResult.min = min;
- pigeonResult.max = max;
- return pigeonResult;
-}
-+ (FGMPlatformZoomRange *)fromList:(NSArray<id> *)list {
- FGMPlatformZoomRange *pigeonResult = [[FGMPlatformZoomRange alloc] init];
- pigeonResult.min = GetNullableObjectAtIndex(list, 0);
- pigeonResult.max = GetNullableObjectAtIndex(list, 1);
- return pigeonResult;
-}
-+ (nullable FGMPlatformZoomRange *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformZoomRange fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.min ?: [NSNull null],
- self.max ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformZoomRange *other = (FGMPlatformZoomRange *)object;
- return FLTPigeonDeepEquals(self.min, other.min) && FLTPigeonDeepEquals(self.max, other.max);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.min);
- result = result * 31 + FLTPigeonDeepHash(self.max);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformZoomRange(min: %@, max: %@)", self.min, self.max];
-}
-@end
-
-@implementation FGMPlatformBitmap
-+ (instancetype)makeWithBitmap:(id)bitmap {
- FGMPlatformBitmap *pigeonResult = [[FGMPlatformBitmap alloc] init];
- pigeonResult.bitmap = bitmap;
- return pigeonResult;
-}
-+ (FGMPlatformBitmap *)fromList:(NSArray<id> *)list {
- FGMPlatformBitmap *pigeonResult = [[FGMPlatformBitmap alloc] init];
- pigeonResult.bitmap = GetNullableObjectAtIndex(list, 0);
- return pigeonResult;
-}
-+ (nullable FGMPlatformBitmap *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformBitmap fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.bitmap ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformBitmap *other = (FGMPlatformBitmap *)object;
- return FLTPigeonDeepEquals(self.bitmap, other.bitmap);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.bitmap);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformBitmap(bitmap: %@)", self.bitmap];
-}
-@end
-
-@implementation FGMPlatformBitmapDefaultMarker
-+ (instancetype)makeWithHue:(nullable NSNumber *)hue {
- FGMPlatformBitmapDefaultMarker *pigeonResult = [[FGMPlatformBitmapDefaultMarker alloc] init];
- pigeonResult.hue = hue;
- return pigeonResult;
-}
-+ (FGMPlatformBitmapDefaultMarker *)fromList:(NSArray<id> *)list {
- FGMPlatformBitmapDefaultMarker *pigeonResult = [[FGMPlatformBitmapDefaultMarker alloc] init];
- pigeonResult.hue = GetNullableObjectAtIndex(list, 0);
- return pigeonResult;
-}
-+ (nullable FGMPlatformBitmapDefaultMarker *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformBitmapDefaultMarker fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.hue ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformBitmapDefaultMarker *other = (FGMPlatformBitmapDefaultMarker *)object;
- return FLTPigeonDeepEquals(self.hue, other.hue);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.hue);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformBitmapDefaultMarker(hue: %@)", self.hue];
-}
-@end
-
-@implementation FGMPlatformBitmapBytes
-+ (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData
- size:(nullable FGMPlatformSize *)size {
- FGMPlatformBitmapBytes *pigeonResult = [[FGMPlatformBitmapBytes alloc] init];
- pigeonResult.byteData = byteData;
- pigeonResult.size = size;
- return pigeonResult;
-}
-+ (FGMPlatformBitmapBytes *)fromList:(NSArray<id> *)list {
- FGMPlatformBitmapBytes *pigeonResult = [[FGMPlatformBitmapBytes alloc] init];
- pigeonResult.byteData = GetNullableObjectAtIndex(list, 0);
- pigeonResult.size = GetNullableObjectAtIndex(list, 1);
- return pigeonResult;
-}
-+ (nullable FGMPlatformBitmapBytes *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformBitmapBytes fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.byteData ?: [NSNull null],
- self.size ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformBitmapBytes *other = (FGMPlatformBitmapBytes *)object;
- return FLTPigeonDeepEquals(self.byteData, other.byteData) &&
- FLTPigeonDeepEquals(self.size, other.size);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.byteData);
- result = result * 31 + FLTPigeonDeepHash(self.size);
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:@"FGMPlatformBitmapBytes(byteData: %@, size: %@)", self.byteData, self.size];
-}
-@end
-
-@implementation FGMPlatformBitmapAsset
-+ (instancetype)makeWithName:(NSString *)name pkg:(nullable NSString *)pkg {
- FGMPlatformBitmapAsset *pigeonResult = [[FGMPlatformBitmapAsset alloc] init];
- pigeonResult.name = name;
- pigeonResult.pkg = pkg;
- return pigeonResult;
-}
-+ (FGMPlatformBitmapAsset *)fromList:(NSArray<id> *)list {
- FGMPlatformBitmapAsset *pigeonResult = [[FGMPlatformBitmapAsset alloc] init];
- pigeonResult.name = GetNullableObjectAtIndex(list, 0);
- pigeonResult.pkg = GetNullableObjectAtIndex(list, 1);
- return pigeonResult;
-}
-+ (nullable FGMPlatformBitmapAsset *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformBitmapAsset fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.name ?: [NSNull null],
- self.pkg ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformBitmapAsset *other = (FGMPlatformBitmapAsset *)object;
- return FLTPigeonDeepEquals(self.name, other.name) && FLTPigeonDeepEquals(self.pkg, other.pkg);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.name);
- result = result * 31 + FLTPigeonDeepHash(self.pkg);
- return result;
-}
-- (NSString *)description {
- return
- [NSString stringWithFormat:@"FGMPlatformBitmapAsset(name: %@, pkg: %@)", self.name, self.pkg];
-}
-@end
-
-@implementation FGMPlatformBitmapAssetImage
-+ (instancetype)makeWithName:(NSString *)name
- scale:(double)scale
- size:(nullable FGMPlatformSize *)size {
- FGMPlatformBitmapAssetImage *pigeonResult = [[FGMPlatformBitmapAssetImage alloc] init];
- pigeonResult.name = name;
- pigeonResult.scale = scale;
- pigeonResult.size = size;
- return pigeonResult;
-}
-+ (FGMPlatformBitmapAssetImage *)fromList:(NSArray<id> *)list {
- FGMPlatformBitmapAssetImage *pigeonResult = [[FGMPlatformBitmapAssetImage alloc] init];
- pigeonResult.name = GetNullableObjectAtIndex(list, 0);
- pigeonResult.scale = [GetNullableObjectAtIndex(list, 1) doubleValue];
- pigeonResult.size = GetNullableObjectAtIndex(list, 2);
- return pigeonResult;
-}
-+ (nullable FGMPlatformBitmapAssetImage *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformBitmapAssetImage fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.name ?: [NSNull null],
- @(self.scale),
- self.size ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformBitmapAssetImage *other = (FGMPlatformBitmapAssetImage *)object;
- return FLTPigeonDeepEquals(self.name, other.name) &&
- (self.scale == other.scale || (isnan(self.scale) && isnan(other.scale))) &&
- FLTPigeonDeepEquals(self.size, other.size);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.name);
- result = result * 31 + (isnan(self.scale) ? (NSUInteger)0x7FF8000000000000 : @(self.scale).hash);
- result = result * 31 + FLTPigeonDeepHash(self.size);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformBitmapAssetImage(name: %@, scale: %f, size: %@)",
- self.name, self.scale, self.size];
-}
-@end
-
-@implementation FGMPlatformBitmapAssetMap
-+ (instancetype)makeWithAssetName:(NSString *)assetName
- bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling
- imagePixelRatio:(double)imagePixelRatio
- width:(nullable NSNumber *)width
- height:(nullable NSNumber *)height {
- FGMPlatformBitmapAssetMap *pigeonResult = [[FGMPlatformBitmapAssetMap alloc] init];
- pigeonResult.assetName = assetName;
- pigeonResult.bitmapScaling = bitmapScaling;
- pigeonResult.imagePixelRatio = imagePixelRatio;
- pigeonResult.width = width;
- pigeonResult.height = height;
- return pigeonResult;
-}
-+ (FGMPlatformBitmapAssetMap *)fromList:(NSArray<id> *)list {
- FGMPlatformBitmapAssetMap *pigeonResult = [[FGMPlatformBitmapAssetMap alloc] init];
- pigeonResult.assetName = GetNullableObjectAtIndex(list, 0);
- FGMPlatformMapBitmapScalingBox *boxedFGMPlatformMapBitmapScaling =
- GetNullableObjectAtIndex(list, 1);
- pigeonResult.bitmapScaling = boxedFGMPlatformMapBitmapScaling.value;
- pigeonResult.imagePixelRatio = [GetNullableObjectAtIndex(list, 2) doubleValue];
- pigeonResult.width = GetNullableObjectAtIndex(list, 3);
- pigeonResult.height = GetNullableObjectAtIndex(list, 4);
- return pigeonResult;
-}
-+ (nullable FGMPlatformBitmapAssetMap *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformBitmapAssetMap fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.assetName ?: [NSNull null],
- [[FGMPlatformMapBitmapScalingBox alloc] initWithValue:self.bitmapScaling],
- @(self.imagePixelRatio),
- self.width ?: [NSNull null],
- self.height ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformBitmapAssetMap *other = (FGMPlatformBitmapAssetMap *)object;
- return FLTPigeonDeepEquals(self.assetName, other.assetName) &&
- self.bitmapScaling == other.bitmapScaling &&
- (self.imagePixelRatio == other.imagePixelRatio ||
- (isnan(self.imagePixelRatio) && isnan(other.imagePixelRatio))) &&
- FLTPigeonDeepEquals(self.width, other.width) &&
- FLTPigeonDeepEquals(self.height, other.height);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.assetName);
- result = result * 31 + @(self.bitmapScaling).hash;
- result = result * 31 + (isnan(self.imagePixelRatio) ? (NSUInteger)0x7FF8000000000000
- : @(self.imagePixelRatio).hash);
- result = result * 31 + FLTPigeonDeepHash(self.width);
- result = result * 31 + FLTPigeonDeepHash(self.height);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformBitmapAssetMap(assetName: %@, bitmapScaling: %ld, "
- @"imagePixelRatio: %f, width: %@, height: %@)",
- self.assetName, (long)self.bitmapScaling, self.imagePixelRatio,
- self.width, self.height];
-}
-@end
-
-@implementation FGMPlatformBitmapBytesMap
-+ (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData
- bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling
- imagePixelRatio:(double)imagePixelRatio
- width:(nullable NSNumber *)width
- height:(nullable NSNumber *)height {
- FGMPlatformBitmapBytesMap *pigeonResult = [[FGMPlatformBitmapBytesMap alloc] init];
- pigeonResult.byteData = byteData;
- pigeonResult.bitmapScaling = bitmapScaling;
- pigeonResult.imagePixelRatio = imagePixelRatio;
- pigeonResult.width = width;
- pigeonResult.height = height;
- return pigeonResult;
-}
-+ (FGMPlatformBitmapBytesMap *)fromList:(NSArray<id> *)list {
- FGMPlatformBitmapBytesMap *pigeonResult = [[FGMPlatformBitmapBytesMap alloc] init];
- pigeonResult.byteData = GetNullableObjectAtIndex(list, 0);
- FGMPlatformMapBitmapScalingBox *boxedFGMPlatformMapBitmapScaling =
- GetNullableObjectAtIndex(list, 1);
- pigeonResult.bitmapScaling = boxedFGMPlatformMapBitmapScaling.value;
- pigeonResult.imagePixelRatio = [GetNullableObjectAtIndex(list, 2) doubleValue];
- pigeonResult.width = GetNullableObjectAtIndex(list, 3);
- pigeonResult.height = GetNullableObjectAtIndex(list, 4);
- return pigeonResult;
-}
-+ (nullable FGMPlatformBitmapBytesMap *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformBitmapBytesMap fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.byteData ?: [NSNull null],
- [[FGMPlatformMapBitmapScalingBox alloc] initWithValue:self.bitmapScaling],
- @(self.imagePixelRatio),
- self.width ?: [NSNull null],
- self.height ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformBitmapBytesMap *other = (FGMPlatformBitmapBytesMap *)object;
- return FLTPigeonDeepEquals(self.byteData, other.byteData) &&
- self.bitmapScaling == other.bitmapScaling &&
- (self.imagePixelRatio == other.imagePixelRatio ||
- (isnan(self.imagePixelRatio) && isnan(other.imagePixelRatio))) &&
- FLTPigeonDeepEquals(self.width, other.width) &&
- FLTPigeonDeepEquals(self.height, other.height);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.byteData);
- result = result * 31 + @(self.bitmapScaling).hash;
- result = result * 31 + (isnan(self.imagePixelRatio) ? (NSUInteger)0x7FF8000000000000
- : @(self.imagePixelRatio).hash);
- result = result * 31 + FLTPigeonDeepHash(self.width);
- result = result * 31 + FLTPigeonDeepHash(self.height);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformBitmapBytesMap(byteData: %@, bitmapScaling: %ld, "
- @"imagePixelRatio: %f, width: %@, height: %@)",
- self.byteData, (long)self.bitmapScaling, self.imagePixelRatio,
- self.width, self.height];
-}
-@end
-
-@implementation FGMPlatformBitmapPinConfig
-+ (instancetype)makeWithBackgroundColor:(nullable FGMPlatformColor *)backgroundColor
- borderColor:(nullable FGMPlatformColor *)borderColor
- glyphColor:(nullable FGMPlatformColor *)glyphColor
- glyphTextColor:(nullable FGMPlatformColor *)glyphTextColor
- glyphText:(nullable NSString *)glyphText
- glyphBitmap:(nullable FGMPlatformBitmap *)glyphBitmap {
- FGMPlatformBitmapPinConfig *pigeonResult = [[FGMPlatformBitmapPinConfig alloc] init];
- pigeonResult.backgroundColor = backgroundColor;
- pigeonResult.borderColor = borderColor;
- pigeonResult.glyphColor = glyphColor;
- pigeonResult.glyphTextColor = glyphTextColor;
- pigeonResult.glyphText = glyphText;
- pigeonResult.glyphBitmap = glyphBitmap;
- return pigeonResult;
-}
-+ (FGMPlatformBitmapPinConfig *)fromList:(NSArray<id> *)list {
- FGMPlatformBitmapPinConfig *pigeonResult = [[FGMPlatformBitmapPinConfig alloc] init];
- pigeonResult.backgroundColor = GetNullableObjectAtIndex(list, 0);
- pigeonResult.borderColor = GetNullableObjectAtIndex(list, 1);
- pigeonResult.glyphColor = GetNullableObjectAtIndex(list, 2);
- pigeonResult.glyphTextColor = GetNullableObjectAtIndex(list, 3);
- pigeonResult.glyphText = GetNullableObjectAtIndex(list, 4);
- pigeonResult.glyphBitmap = GetNullableObjectAtIndex(list, 5);
- return pigeonResult;
-}
-+ (nullable FGMPlatformBitmapPinConfig *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformBitmapPinConfig fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.backgroundColor ?: [NSNull null],
- self.borderColor ?: [NSNull null],
- self.glyphColor ?: [NSNull null],
- self.glyphTextColor ?: [NSNull null],
- self.glyphText ?: [NSNull null],
- self.glyphBitmap ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformBitmapPinConfig *other = (FGMPlatformBitmapPinConfig *)object;
- return FLTPigeonDeepEquals(self.backgroundColor, other.backgroundColor) &&
- FLTPigeonDeepEquals(self.borderColor, other.borderColor) &&
- FLTPigeonDeepEquals(self.glyphColor, other.glyphColor) &&
- FLTPigeonDeepEquals(self.glyphTextColor, other.glyphTextColor) &&
- FLTPigeonDeepEquals(self.glyphText, other.glyphText) &&
- FLTPigeonDeepEquals(self.glyphBitmap, other.glyphBitmap);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.backgroundColor);
- result = result * 31 + FLTPigeonDeepHash(self.borderColor);
- result = result * 31 + FLTPigeonDeepHash(self.glyphColor);
- result = result * 31 + FLTPigeonDeepHash(self.glyphTextColor);
- result = result * 31 + FLTPigeonDeepHash(self.glyphText);
- result = result * 31 + FLTPigeonDeepHash(self.glyphBitmap);
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:@"FGMPlatformBitmapPinConfig(backgroundColor: %@, borderColor: %@, "
- @"glyphColor: %@, glyphTextColor: %@, glyphText: %@, glyphBitmap: %@)",
- self.backgroundColor, self.borderColor, self.glyphColor, self.glyphTextColor,
- self.glyphText, self.glyphBitmap];
-}
-@end
-
-@interface FGMGoogleMapsFlutterPigeonMessagesPigeonCodecReader : FlutterStandardReader
-@end
-@implementation FGMGoogleMapsFlutterPigeonMessagesPigeonCodecReader
-- (nullable id)readValueOfType:(UInt8)type {
- switch (type) {
- case 129: {
- NSNumber *enumAsNumber = [self readValue];
- return enumAsNumber == nil
- ? nil
- : [[FGMPlatformMapTypeBox alloc] initWithValue:[enumAsNumber integerValue]];
- }
- case 130: {
- NSNumber *enumAsNumber = [self readValue];
- return enumAsNumber == nil ? nil
- : [[FGMPlatformMarkerCollisionBehaviorBox alloc]
- initWithValue:[enumAsNumber integerValue]];
- }
- case 131: {
- NSNumber *enumAsNumber = [self readValue];
- return enumAsNumber == nil
- ? nil
- : [[FGMPlatformJointTypeBox alloc] initWithValue:[enumAsNumber integerValue]];
- }
- case 132: {
- NSNumber *enumAsNumber = [self readValue];
- return enumAsNumber == nil ? nil
- : [[FGMPlatformPatternItemTypeBox alloc]
- initWithValue:[enumAsNumber integerValue]];
- }
- case 133: {
- NSNumber *enumAsNumber = [self readValue];
- return enumAsNumber == nil
- ? nil
- : [[FGMPlatformMarkerTypeBox alloc] initWithValue:[enumAsNumber integerValue]];
- }
- case 134: {
- NSNumber *enumAsNumber = [self readValue];
- return enumAsNumber == nil ? nil
- : [[FGMPlatformMapBitmapScalingBox alloc]
- initWithValue:[enumAsNumber integerValue]];
- }
- case 135:
- return [FGMPlatformCameraPosition fromList:[self readValue]];
- case 136:
- return [FGMPlatformCameraUpdate fromList:[self readValue]];
- case 137:
- return [FGMPlatformCameraUpdateNewCameraPosition fromList:[self readValue]];
- case 138:
- return [FGMPlatformCameraUpdateNewLatLng fromList:[self readValue]];
- case 139:
- return [FGMPlatformCameraUpdateNewLatLngBounds fromList:[self readValue]];
- case 140:
- return [FGMPlatformCameraUpdateNewLatLngZoom fromList:[self readValue]];
- case 141:
- return [FGMPlatformCameraUpdateScrollBy fromList:[self readValue]];
- case 142:
- return [FGMPlatformCameraUpdateZoomBy fromList:[self readValue]];
- case 143:
- return [FGMPlatformCameraUpdateZoom fromList:[self readValue]];
- case 144:
- return [FGMPlatformCameraUpdateZoomTo fromList:[self readValue]];
- case 145:
- return [FGMPlatformCircle fromList:[self readValue]];
- case 146:
- return [FGMPlatformHeatmap fromList:[self readValue]];
- case 147:
- return [FGMPlatformHeatmapGradient fromList:[self readValue]];
- case 148:
- return [FGMPlatformWeightedLatLng fromList:[self readValue]];
- case 149:
- return [FGMPlatformInfoWindow fromList:[self readValue]];
- case 150:
- return [FGMPlatformCluster fromList:[self readValue]];
- case 151:
- return [FGMPlatformClusterManager fromList:[self readValue]];
- case 152:
- return [FGMPlatformMarker fromList:[self readValue]];
- case 153:
- return [FGMPlatformPolygon fromList:[self readValue]];
- case 154:
- return [FGMPlatformPolyline fromList:[self readValue]];
- case 155:
- return [FGMPlatformPatternItem fromList:[self readValue]];
- case 156:
- return [FGMPlatformTile fromList:[self readValue]];
- case 157:
- return [FGMPlatformTileOverlay fromList:[self readValue]];
- case 158:
- return [FGMPlatformEdgeInsets fromList:[self readValue]];
- case 159:
- return [FGMPlatformLatLng fromList:[self readValue]];
- case 160:
- return [FGMPlatformLatLngBounds fromList:[self readValue]];
- case 161:
- return [FGMPlatformCameraTargetBounds fromList:[self readValue]];
- case 162:
- return [FGMPlatformGroundOverlay fromList:[self readValue]];
- case 163:
- return [FGMPlatformMapViewCreationParams fromList:[self readValue]];
- case 164:
- return [FGMPlatformMapConfiguration fromList:[self readValue]];
- case 165:
- return [FGMPlatformPoint fromList:[self readValue]];
- case 166:
- return [FGMPlatformSize fromList:[self readValue]];
- case 167:
- return [FGMPlatformColor fromList:[self readValue]];
- case 168:
- return [FGMPlatformTileLayer fromList:[self readValue]];
- case 169:
- return [FGMPlatformZoomRange fromList:[self readValue]];
- case 170:
- return [FGMPlatformBitmap fromList:[self readValue]];
- case 171:
- return [FGMPlatformBitmapDefaultMarker fromList:[self readValue]];
- case 172:
- return [FGMPlatformBitmapBytes fromList:[self readValue]];
- case 173:
- return [FGMPlatformBitmapAsset fromList:[self readValue]];
- case 174:
- return [FGMPlatformBitmapAssetImage fromList:[self readValue]];
- case 175:
- return [FGMPlatformBitmapAssetMap fromList:[self readValue]];
- case 176:
- return [FGMPlatformBitmapBytesMap fromList:[self readValue]];
- case 177:
- return [FGMPlatformBitmapPinConfig fromList:[self readValue]];
- default:
- return [super readValueOfType:type];
- }
-}
-@end
-
-@interface FGMGoogleMapsFlutterPigeonMessagesPigeonCodecWriter : FlutterStandardWriter
-@end
-@implementation FGMGoogleMapsFlutterPigeonMessagesPigeonCodecWriter
-- (void)writeValue:(id)value {
- if ([value isKindOfClass:[FGMPlatformMapTypeBox class]]) {
- FGMPlatformMapTypeBox *box = (FGMPlatformMapTypeBox *)value;
- [self writeByte:129];
- [self writeValue:(value == nil ? [NSNull null] : [NSNumber numberWithInteger:box.value])];
- } else if ([value isKindOfClass:[FGMPlatformMarkerCollisionBehaviorBox class]]) {
- FGMPlatformMarkerCollisionBehaviorBox *box = (FGMPlatformMarkerCollisionBehaviorBox *)value;
- [self writeByte:130];
- [self writeValue:(value == nil ? [NSNull null] : [NSNumber numberWithInteger:box.value])];
- } else if ([value isKindOfClass:[FGMPlatformJointTypeBox class]]) {
- FGMPlatformJointTypeBox *box = (FGMPlatformJointTypeBox *)value;
- [self writeByte:131];
- [self writeValue:(value == nil ? [NSNull null] : [NSNumber numberWithInteger:box.value])];
- } else if ([value isKindOfClass:[FGMPlatformPatternItemTypeBox class]]) {
- FGMPlatformPatternItemTypeBox *box = (FGMPlatformPatternItemTypeBox *)value;
- [self writeByte:132];
- [self writeValue:(value == nil ? [NSNull null] : [NSNumber numberWithInteger:box.value])];
- } else if ([value isKindOfClass:[FGMPlatformMarkerTypeBox class]]) {
- FGMPlatformMarkerTypeBox *box = (FGMPlatformMarkerTypeBox *)value;
- [self writeByte:133];
- [self writeValue:(value == nil ? [NSNull null] : [NSNumber numberWithInteger:box.value])];
- } else if ([value isKindOfClass:[FGMPlatformMapBitmapScalingBox class]]) {
- FGMPlatformMapBitmapScalingBox *box = (FGMPlatformMapBitmapScalingBox *)value;
- [self writeByte:134];
- [self writeValue:(value == nil ? [NSNull null] : [NSNumber numberWithInteger:box.value])];
- } else if ([value isKindOfClass:[FGMPlatformCameraPosition class]]) {
- [self writeByte:135];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformCameraUpdate class]]) {
- [self writeByte:136];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformCameraUpdateNewCameraPosition class]]) {
- [self writeByte:137];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformCameraUpdateNewLatLng class]]) {
- [self writeByte:138];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformCameraUpdateNewLatLngBounds class]]) {
- [self writeByte:139];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformCameraUpdateNewLatLngZoom class]]) {
- [self writeByte:140];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformCameraUpdateScrollBy class]]) {
- [self writeByte:141];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformCameraUpdateZoomBy class]]) {
- [self writeByte:142];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformCameraUpdateZoom class]]) {
- [self writeByte:143];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformCameraUpdateZoomTo class]]) {
- [self writeByte:144];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformCircle class]]) {
- [self writeByte:145];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformHeatmap class]]) {
- [self writeByte:146];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformHeatmapGradient class]]) {
- [self writeByte:147];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformWeightedLatLng class]]) {
- [self writeByte:148];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformInfoWindow class]]) {
- [self writeByte:149];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformCluster class]]) {
- [self writeByte:150];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformClusterManager class]]) {
- [self writeByte:151];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformMarker class]]) {
- [self writeByte:152];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformPolygon class]]) {
- [self writeByte:153];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformPolyline class]]) {
- [self writeByte:154];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformPatternItem class]]) {
- [self writeByte:155];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformTile class]]) {
- [self writeByte:156];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformTileOverlay class]]) {
- [self writeByte:157];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformEdgeInsets class]]) {
- [self writeByte:158];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformLatLng class]]) {
- [self writeByte:159];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformLatLngBounds class]]) {
- [self writeByte:160];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformCameraTargetBounds class]]) {
- [self writeByte:161];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformGroundOverlay class]]) {
- [self writeByte:162];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformMapViewCreationParams class]]) {
- [self writeByte:163];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformMapConfiguration class]]) {
- [self writeByte:164];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformPoint class]]) {
- [self writeByte:165];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformSize class]]) {
- [self writeByte:166];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformColor class]]) {
- [self writeByte:167];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformTileLayer class]]) {
- [self writeByte:168];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformZoomRange class]]) {
- [self writeByte:169];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformBitmap class]]) {
- [self writeByte:170];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformBitmapDefaultMarker class]]) {
- [self writeByte:171];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformBitmapBytes class]]) {
- [self writeByte:172];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformBitmapAsset class]]) {
- [self writeByte:173];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformBitmapAssetImage class]]) {
- [self writeByte:174];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformBitmapAssetMap class]]) {
- [self writeByte:175];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformBitmapBytesMap class]]) {
- [self writeByte:176];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformBitmapPinConfig class]]) {
- [self writeByte:177];
- [self writeValue:[value toList]];
- } else {
- [super writeValue:value];
- }
-}
-@end
-
-@interface FGMGoogleMapsFlutterPigeonMessagesPigeonCodecReaderWriter : FlutterStandardReaderWriter
-@end
-@implementation FGMGoogleMapsFlutterPigeonMessagesPigeonCodecReaderWriter
-- (FlutterStandardWriter *)writerWithData:(NSMutableData *)data {
- return [[FGMGoogleMapsFlutterPigeonMessagesPigeonCodecWriter alloc] initWithData:data];
-}
-- (FlutterStandardReader *)readerWithData:(NSData *)data {
- return [[FGMGoogleMapsFlutterPigeonMessagesPigeonCodecReader alloc] initWithData:data];
-}
-@end
-
-NSObject<FlutterMessageCodec> *FGMGetGoogleMapsFlutterPigeonMessagesCodec(void) {
- static FlutterStandardMessageCodec *sSharedObject = nil;
- static dispatch_once_t sPred = 0;
- dispatch_once(&sPred, ^{
- FGMGoogleMapsFlutterPigeonMessagesPigeonCodecReaderWriter *readerWriter =
- [[FGMGoogleMapsFlutterPigeonMessagesPigeonCodecReaderWriter alloc] init];
- sSharedObject = [FlutterStandardMessageCodec codecWithReaderWriter:readerWriter];
- });
- return sSharedObject;
-}
-void SetUpFGMMapsApi(id<FlutterBinaryMessenger> binaryMessenger, NSObject<FGMMapsApi> *api) {
- SetUpFGMMapsApiWithSuffix(binaryMessenger, api, @"");
-}
-
-void SetUpFGMMapsApiWithSuffix(id<FlutterBinaryMessenger> binaryMessenger,
- NSObject<FGMMapsApi> *api, NSString *messageChannelSuffix) {
- messageChannelSuffix = messageChannelSuffix.length > 0
- ? [NSString stringWithFormat:@".%@", messageChannelSuffix]
- : @"";
- /// Returns once the map instance is available.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString
- stringWithFormat:
- @"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.waitForMap",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(waitForMapWithError:)],
- @"FGMMapsApi api (%@) doesn't respond to @selector(waitForMapWithError:)", api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- [api waitForMapWithError:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Updates the map's configuration options.
- ///
- /// Only non-null configuration values will result in updates; options with
- /// null values will remain unchanged.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.updateMapConfiguration",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert(
- [api respondsToSelector:@selector(updateWithMapConfiguration:error:)],
- @"FGMMapsApi api (%@) doesn't respond to @selector(updateWithMapConfiguration:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- FGMPlatformMapConfiguration *arg_configuration = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- [api updateWithMapConfiguration:arg_configuration error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Updates the set of circles on the map.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString
- stringWithFormat:
- @"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateCircles",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(updateCirclesByAdding:changing:removing:error:)],
- @"FGMMapsApi api (%@) doesn't respond to "
- @"@selector(updateCirclesByAdding:changing:removing:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSArray<FGMPlatformCircle *> *arg_toAdd = GetNullableObjectAtIndex(args, 0);
- NSArray<FGMPlatformCircle *> *arg_toChange = GetNullableObjectAtIndex(args, 1);
- NSArray<NSString *> *arg_idsToRemove = GetNullableObjectAtIndex(args, 2);
- FlutterError *error;
- [api updateCirclesByAdding:arg_toAdd
- changing:arg_toChange
- removing:arg_idsToRemove
- error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Updates the set of heatmaps on the map.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.updateHeatmaps",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(updateHeatmapsByAdding:changing:removing:error:)],
- @"FGMMapsApi api (%@) doesn't respond to "
- @"@selector(updateHeatmapsByAdding:changing:removing:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSArray<FGMPlatformHeatmap *> *arg_toAdd = GetNullableObjectAtIndex(args, 0);
- NSArray<FGMPlatformHeatmap *> *arg_toChange = GetNullableObjectAtIndex(args, 1);
- NSArray<NSString *> *arg_idsToRemove = GetNullableObjectAtIndex(args, 2);
- FlutterError *error;
- [api updateHeatmapsByAdding:arg_toAdd
- changing:arg_toChange
- removing:arg_idsToRemove
- error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Updates the set of custer managers for clusters on the map.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.updateClusterManagers",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(updateClusterManagersByAdding:removing:error:)],
- @"FGMMapsApi api (%@) doesn't respond to "
- @"@selector(updateClusterManagersByAdding:removing:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSArray<FGMPlatformClusterManager *> *arg_toAdd = GetNullableObjectAtIndex(args, 0);
- NSArray<NSString *> *arg_idsToRemove = GetNullableObjectAtIndex(args, 1);
- FlutterError *error;
- [api updateClusterManagersByAdding:arg_toAdd removing:arg_idsToRemove error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Updates the set of markers on the map.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString
- stringWithFormat:
- @"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMarkers",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(updateMarkersByAdding:changing:removing:error:)],
- @"FGMMapsApi api (%@) doesn't respond to "
- @"@selector(updateMarkersByAdding:changing:removing:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSArray<FGMPlatformMarker *> *arg_toAdd = GetNullableObjectAtIndex(args, 0);
- NSArray<FGMPlatformMarker *> *arg_toChange = GetNullableObjectAtIndex(args, 1);
- NSArray<NSString *> *arg_idsToRemove = GetNullableObjectAtIndex(args, 2);
- FlutterError *error;
- [api updateMarkersByAdding:arg_toAdd
- changing:arg_toChange
- removing:arg_idsToRemove
- error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Updates the set of polygonss on the map.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.updatePolygons",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(updatePolygonsByAdding:changing:removing:error:)],
- @"FGMMapsApi api (%@) doesn't respond to "
- @"@selector(updatePolygonsByAdding:changing:removing:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSArray<FGMPlatformPolygon *> *arg_toAdd = GetNullableObjectAtIndex(args, 0);
- NSArray<FGMPlatformPolygon *> *arg_toChange = GetNullableObjectAtIndex(args, 1);
- NSArray<NSString *> *arg_idsToRemove = GetNullableObjectAtIndex(args, 2);
- FlutterError *error;
- [api updatePolygonsByAdding:arg_toAdd
- changing:arg_toChange
- removing:arg_idsToRemove
- error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Updates the set of polylines on the map.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.updatePolylines",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(updatePolylinesByAdding:
- changing:removing:error:)],
- @"FGMMapsApi api (%@) doesn't respond to "
- @"@selector(updatePolylinesByAdding:changing:removing:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSArray<FGMPlatformPolyline *> *arg_toAdd = GetNullableObjectAtIndex(args, 0);
- NSArray<FGMPlatformPolyline *> *arg_toChange = GetNullableObjectAtIndex(args, 1);
- NSArray<NSString *> *arg_idsToRemove = GetNullableObjectAtIndex(args, 2);
- FlutterError *error;
- [api updatePolylinesByAdding:arg_toAdd
- changing:arg_toChange
- removing:arg_idsToRemove
- error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Updates the set of tile overlays on the map.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.updateTileOverlays",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(updateTileOverlaysByAdding:
- changing:removing:error:)],
- @"FGMMapsApi api (%@) doesn't respond to "
- @"@selector(updateTileOverlaysByAdding:changing:removing:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSArray<FGMPlatformTileOverlay *> *arg_toAdd = GetNullableObjectAtIndex(args, 0);
- NSArray<FGMPlatformTileOverlay *> *arg_toChange = GetNullableObjectAtIndex(args, 1);
- NSArray<NSString *> *arg_idsToRemove = GetNullableObjectAtIndex(args, 2);
- FlutterError *error;
- [api updateTileOverlaysByAdding:arg_toAdd
- changing:arg_toChange
- removing:arg_idsToRemove
- error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Updates the set of ground overlays on the map.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.updateGroundOverlays",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(updateGroundOverlaysByAdding:
- changing:removing:error:)],
- @"FGMMapsApi api (%@) doesn't respond to "
- @"@selector(updateGroundOverlaysByAdding:changing:removing:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSArray<FGMPlatformGroundOverlay *> *arg_toAdd = GetNullableObjectAtIndex(args, 0);
- NSArray<FGMPlatformGroundOverlay *> *arg_toChange = GetNullableObjectAtIndex(args, 1);
- NSArray<NSString *> *arg_idsToRemove = GetNullableObjectAtIndex(args, 2);
- FlutterError *error;
- [api updateGroundOverlaysByAdding:arg_toAdd
- changing:arg_toChange
- removing:arg_idsToRemove
- error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Gets the screen coordinate for the given map location.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.getScreenCoordinate",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert(
- [api respondsToSelector:@selector(screenCoordinatesForLatLng:error:)],
- @"FGMMapsApi api (%@) doesn't respond to @selector(screenCoordinatesForLatLng:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- FGMPlatformLatLng *arg_latLng = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- FGMPlatformPoint *output = [api screenCoordinatesForLatLng:arg_latLng error:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Gets the map location for the given screen coordinate.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:
- [NSString
- stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLatLng",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert(
- [api respondsToSelector:@selector(latLngForScreenCoordinate:error:)],
- @"FGMMapsApi api (%@) doesn't respond to @selector(latLngForScreenCoordinate:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- FGMPlatformPoint *arg_screenCoordinate = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- FGMPlatformLatLng *output = [api latLngForScreenCoordinate:arg_screenCoordinate
- error:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Gets the map region currently displayed on the map.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.getVisibleRegion",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(visibleMapRegion:)],
- @"FGMMapsApi api (%@) doesn't respond to @selector(visibleMapRegion:)", api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- FGMPlatformLatLngBounds *output = [api visibleMapRegion:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Moves the camera according to [cameraUpdate] immediately, with no
- /// animation.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString
- stringWithFormat:
- @"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.moveCamera",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(moveCameraWithUpdate:error:)],
- @"FGMMapsApi api (%@) doesn't respond to @selector(moveCameraWithUpdate:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- FGMPlatformCameraUpdate *arg_cameraUpdate = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- [api moveCameraWithUpdate:arg_cameraUpdate error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Moves the camera according to [cameraUpdate], animating the update using a
- /// duration in milliseconds if provided.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString
- stringWithFormat:
- @"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.animateCamera",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(animateCameraWithUpdate:duration:error:)],
- @"FGMMapsApi api (%@) doesn't respond to "
- @"@selector(animateCameraWithUpdate:duration:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- FGMPlatformCameraUpdate *arg_cameraUpdate = GetNullableObjectAtIndex(args, 0);
- NSNumber *arg_durationMilliseconds = GetNullableObjectAtIndex(args, 1);
- FlutterError *error;
- [api animateCameraWithUpdate:arg_cameraUpdate
- duration:arg_durationMilliseconds
- error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Gets the current map zoom level.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString
- stringWithFormat:
- @"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getZoomLevel",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(currentZoomLevel:)],
- @"FGMMapsApi api (%@) doesn't respond to @selector(currentZoomLevel:)", api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- NSNumber *output = [api currentZoomLevel:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Show the info window for the marker with the given ID.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.showInfoWindow",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(showInfoWindowForMarkerWithIdentifier:error:)],
- @"FGMMapsApi api (%@) doesn't respond to "
- @"@selector(showInfoWindowForMarkerWithIdentifier:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSString *arg_markerId = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- [api showInfoWindowForMarkerWithIdentifier:arg_markerId error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Hide the info window for the marker with the given ID.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.hideInfoWindow",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(hideInfoWindowForMarkerWithIdentifier:error:)],
- @"FGMMapsApi api (%@) doesn't respond to "
- @"@selector(hideInfoWindowForMarkerWithIdentifier:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSString *arg_markerId = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- [api hideInfoWindowForMarkerWithIdentifier:arg_markerId error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Returns true if the marker with the given ID is currently displaying its
- /// info window.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.isInfoWindowShown",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(isShowingInfoWindowForMarkerWithIdentifier:
- error:)],
- @"FGMMapsApi api (%@) doesn't respond to "
- @"@selector(isShowingInfoWindowForMarkerWithIdentifier:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSString *arg_markerId = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- NSNumber *output = [api isShowingInfoWindowForMarkerWithIdentifier:arg_markerId
- error:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Sets the style to the given map style string, where an empty string
- /// indicates that the style should be cleared.
- ///
- /// If there was an error setting the style, such as an invalid style string,
- /// returns the error message.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:
- [NSString
- stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.setStyle",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(setStyle:error:)],
- @"FGMMapsApi api (%@) doesn't respond to @selector(setStyle:error:)", api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSString *arg_style = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- NSString *output = [api setStyle:arg_style error:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Returns the error string from the last attempt to set the map style, if
- /// any.
- ///
- /// This allows checking asynchronously for initial style failures, as there
- /// is no way to return failures from map initialization.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.getLastStyleError",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(lastStyleError:)],
- @"FGMMapsApi api (%@) doesn't respond to @selector(lastStyleError:)", api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- NSString *output = [api lastStyleError:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Clears the cache of tiles previously requseted from the tile provider.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.clearTileCache",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(clearTileCacheForOverlayWithIdentifier:error:)],
- @"FGMMapsApi api (%@) doesn't respond to "
- @"@selector(clearTileCacheForOverlayWithIdentifier:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSString *arg_tileOverlayId = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- [api clearTileCacheForOverlayWithIdentifier:arg_tileOverlayId error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Takes a snapshot of the map and returns its image data.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString
- stringWithFormat:
- @"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.takeSnapshot",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(takeSnapshotWithError:)],
- @"FGMMapsApi api (%@) doesn't respond to @selector(takeSnapshotWithError:)", api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- FlutterStandardTypedData *output = [api takeSnapshotWithError:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Returns true if the map supports advanced markers.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.isAdvancedMarkersAvailable",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(isAdvancedMarkersAvailable:)],
- @"FGMMapsApi api (%@) doesn't respond to @selector(isAdvancedMarkersAvailable:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- NSNumber *output = [api isAdvancedMarkersAvailable:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
-}
-@interface FGMMapsCallbackApi ()
-@property(nonatomic, strong) NSObject<FlutterBinaryMessenger> *binaryMessenger;
-@property(nonatomic, strong) NSString *messageChannelSuffix;
-@end
-
-@implementation FGMMapsCallbackApi
-
-- (instancetype)initWithBinaryMessenger:(NSObject<FlutterBinaryMessenger> *)binaryMessenger {
- return [self initWithBinaryMessenger:binaryMessenger messageChannelSuffix:@""];
-}
-- (instancetype)initWithBinaryMessenger:(NSObject<FlutterBinaryMessenger> *)binaryMessenger
- messageChannelSuffix:(nullable NSString *)messageChannelSuffix {
- self = [self init];
- if (self) {
- _binaryMessenger = binaryMessenger;
- _messageChannelSuffix = [messageChannelSuffix length] == 0
- ? @""
- : [NSString stringWithFormat:@".%@", messageChannelSuffix];
- }
- return self;
-}
-- (void)didStartCameraMoveWithCompletion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:
- @"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMoveStarted",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:nil
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didMoveCameraToPosition:(FGMPlatformCameraPosition *)arg_cameraPosition
- completion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[ arg_cameraPosition ?: [NSNull null] ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didIdleCameraWithCompletion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraIdle",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:nil
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didTapAtPosition:(FGMPlatformLatLng *)arg_position
- completion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[ arg_position ?: [NSNull null] ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didLongPressAtPosition:(FGMPlatformLatLng *)arg_position
- completion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[ arg_position ?: [NSNull null] ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didTapMarkerWithIdentifier:(NSString *)arg_markerId
- completion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[ arg_markerId ?: [NSNull null] ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didStartDragForMarkerWithIdentifier:(NSString *)arg_markerId
- atPosition:(FGMPlatformLatLng *)arg_position
- completion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:
- @"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[ arg_markerId ?: [NSNull null], arg_position ?: [NSNull null] ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didDragMarkerWithIdentifier:(NSString *)arg_markerId
- atPosition:(FGMPlatformLatLng *)arg_position
- completion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[ arg_markerId ?: [NSNull null], arg_position ?: [NSNull null] ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didEndDragForMarkerWithIdentifier:(NSString *)arg_markerId
- atPosition:(FGMPlatformLatLng *)arg_position
- completion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:
- @"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[ arg_markerId ?: [NSNull null], arg_position ?: [NSNull null] ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)arg_markerId
- completion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:
- @"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[ arg_markerId ?: [NSNull null] ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didTapCircleWithIdentifier:(NSString *)arg_circleId
- completion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[ arg_circleId ?: [NSNull null] ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didTapCluster:(FGMPlatformCluster *)arg_cluster
- completion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[ arg_cluster ?: [NSNull null] ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didTapPolygonWithIdentifier:(NSString *)arg_polygonId
- completion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[ arg_polygonId ?: [NSNull null] ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didTapPolylineWithIdentifier:(NSString *)arg_polylineId
- completion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[ arg_polylineId ?: [NSNull null] ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didTapGroundOverlayWithIdentifier:(NSString *)arg_groundOverlayId
- completion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:
- @"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[ arg_groundOverlayId ?: [NSNull null] ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)tileWithOverlayIdentifier:(NSString *)arg_tileOverlayId
- location:(FGMPlatformPoint *)arg_location
- zoom:(NSInteger)arg_zoom
- completion:(void (^)(FGMPlatformTile *_Nullable,
- FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:
- @"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[
- arg_tileOverlayId ?: [NSNull null], arg_location ?: [NSNull null], @(arg_zoom)
- ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion(nil, [FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- FGMPlatformTile *output = reply[0] == [NSNull null] ? nil : reply[0];
- completion(output, nil);
- }
- } else {
- completion(nil, createConnectionError(channelName));
- }
- }];
-}
-@end
-
-void SetUpFGMMapsPlatformViewApi(id<FlutterBinaryMessenger> binaryMessenger,
- NSObject<FGMMapsPlatformViewApi> *api) {
- SetUpFGMMapsPlatformViewApiWithSuffix(binaryMessenger, api, @"");
-}
-
-void SetUpFGMMapsPlatformViewApiWithSuffix(id<FlutterBinaryMessenger> binaryMessenger,
- NSObject<FGMMapsPlatformViewApi> *api,
- NSString *messageChannelSuffix) {
- messageChannelSuffix = messageChannelSuffix.length > 0
- ? [NSString stringWithFormat:@".%@", messageChannelSuffix]
- : @"";
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsPlatformViewApi.createView",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert(
- [api respondsToSelector:@selector(createViewType:error:)],
- @"FGMMapsPlatformViewApi api (%@) doesn't respond to @selector(createViewType:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- FGMPlatformMapViewCreationParams *arg_type = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- [api createViewType:arg_type error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
-}
-void SetUpFGMMapsInspectorApi(id<FlutterBinaryMessenger> binaryMessenger,
- NSObject<FGMMapsInspectorApi> *api) {
- SetUpFGMMapsInspectorApiWithSuffix(binaryMessenger, api, @"");
-}
-
-void SetUpFGMMapsInspectorApiWithSuffix(id<FlutterBinaryMessenger> binaryMessenger,
- NSObject<FGMMapsInspectorApi> *api,
- NSString *messageChannelSuffix) {
- messageChannelSuffix = messageChannelSuffix.length > 0
- ? [NSString stringWithFormat:@".%@", messageChannelSuffix]
- : @"";
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.areBuildingsEnabled",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(areBuildingsEnabledWithError:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to "
- @"@selector(areBuildingsEnabledWithError:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- NSNumber *output = [api areBuildingsEnabledWithError:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.areRotateGesturesEnabled",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(areRotateGesturesEnabledWithError:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to "
- @"@selector(areRotateGesturesEnabledWithError:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- NSNumber *output = [api areRotateGesturesEnabledWithError:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.areScrollGesturesEnabled",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(areScrollGesturesEnabledWithError:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to "
- @"@selector(areScrollGesturesEnabledWithError:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- NSNumber *output = [api areScrollGesturesEnabledWithError:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.areTiltGesturesEnabled",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(areTiltGesturesEnabledWithError:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to "
- @"@selector(areTiltGesturesEnabledWithError:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- NSNumber *output = [api areTiltGesturesEnabledWithError:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.areZoomGesturesEnabled",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(areZoomGesturesEnabledWithError:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to "
- @"@selector(areZoomGesturesEnabledWithError:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- NSNumber *output = [api areZoomGesturesEnabledWithError:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.isCompassEnabled",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert(
- [api respondsToSelector:@selector(isCompassEnabledWithError:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(isCompassEnabledWithError:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- NSNumber *output = [api isCompassEnabledWithError:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.isMyLocationButtonEnabled",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(isMyLocationButtonEnabledWithError:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to "
- @"@selector(isMyLocationButtonEnabledWithError:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- NSNumber *output = [api isMyLocationButtonEnabledWithError:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.isTrafficEnabled",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert(
- [api respondsToSelector:@selector(isTrafficEnabledWithError:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(isTrafficEnabledWithError:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- NSNumber *output = [api isTrafficEnabledWithError:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.getTileOverlayInfo",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(tileOverlayWithIdentifier:error:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to "
- @"@selector(tileOverlayWithIdentifier:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSString *arg_tileOverlayId = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- FGMPlatformTileLayer *output = [api tileOverlayWithIdentifier:arg_tileOverlayId
- error:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.getGroundOverlayInfo",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(groundOverlayWithIdentifier:error:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to "
- @"@selector(groundOverlayWithIdentifier:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSString *arg_groundOverlayId = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- FGMPlatformGroundOverlay *output = [api groundOverlayWithIdentifier:arg_groundOverlayId
- error:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.getHeatmapInfo",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(heatmapWithIdentifier:error:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to "
- @"@selector(heatmapWithIdentifier:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSString *arg_heatmapId = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- FGMPlatformHeatmap *output = [api heatmapWithIdentifier:arg_heatmapId error:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.getZoomRange",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(zoomRange:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(zoomRange:)", api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- FGMPlatformZoomRange *output = [api zoomRange:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.getClusters",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(clustersWithIdentifier:error:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to "
- @"@selector(clustersWithIdentifier:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSString *arg_clusterManagerId = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- NSArray<FGMPlatformCluster *> *output = [api clustersWithIdentifier:arg_clusterManagerId
- error:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.getCameraPosition",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(cameraPosition:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(cameraPosition:)", api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- FGMPlatformCameraPosition *output = [api cameraPosition:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
-}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9_objc/include/google_maps_flutter_ios_sdk9_objc/FGMAssetProvider.h b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9_objc/include/google_maps_flutter_ios_sdk9_objc/FGMAssetProvider.h
deleted file mode 100644
index 2254ec7..0000000
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9_objc/include/google_maps_flutter_ios_sdk9_objc/FGMAssetProvider.h
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2013 The Flutter Authors
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-@import UIKit;
-
-NS_ASSUME_NONNULL_BEGIN
-
-/// Protocol for looking up Flutter assets and resolving them to images.
-///
-/// This is used to allow testing with mock assets without mocking the entire
-/// Flutter plugin registrar and UIImage class.
-@protocol FGMAssetProvider <NSObject>
-
-/// Returns the key for the given asset.
-///
-/// Wraps the FlutterPluginRegistrar method of the same name.
-///
-/// @param asset The name of the asset.
-/// @return The key for the asset, or nil if not found.
-- (nullable NSString *)lookupKeyForAsset:(NSString *)asset;
-
-/// Returns the key for the given asset from the given package.
-///
-/// Wraps the FlutterPluginRegistrar method of the same name.
-///
-/// @param asset The name of the asset.
-/// @param package The name of the package to load the asset from.
-/// @return The key for the asset, or nil if not found.
-- (nullable NSString *)lookupKeyForAsset:(NSString *)asset fromPackage:(NSString *)package;
-
-/// Returns the image for the given named asset.
-///
-/// Wraps the UIImage method of the same name.
-///
-/// @param name The name of the image asset or file.
-/// @return The image, or nil if not found.
-- (nullable UIImage *)imageNamed:(NSString *)name;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9_objc/include/google_maps_flutter_ios_sdk9_objc/FGMCATransactionWrapper.h b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9_objc/include/google_maps_flutter_ios_sdk9_objc/FGMCATransactionWrapper.h
deleted file mode 100644
index 41df2de..0000000
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9_objc/include/google_maps_flutter_ios_sdk9_objc/FGMCATransactionWrapper.h
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2013 The Flutter Authors
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-@import Foundation;
-
-NS_ASSUME_NONNULL_BEGIN
-
-/// Protocol for CATransaction to allow mocking in tests.
-@protocol FGMCATransactionProtocol <NSObject>
-- (void)begin;
-- (void)commit;
-- (void)setAnimationDuration:(CFTimeInterval)duration;
-@end
-
-/// Wrapper for CATransaction to allow mocking in tests.
-@interface FGMCATransactionWrapper : NSObject <FGMCATransactionProtocol>
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9_objc/include/google_maps_flutter_ios_sdk9_objc/FGMMapEventDelegate.h b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9_objc/include/google_maps_flutter_ios_sdk9_objc/FGMMapEventDelegate.h
deleted file mode 100644
index f93f1ad..0000000
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9_objc/include/google_maps_flutter_ios_sdk9_objc/FGMMapEventDelegate.h
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2013 The Flutter Authors
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-@import Foundation;
-
-#import "google_maps_flutter_pigeon_messages.g.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-/// Delegate for map event notifications.
-///
-/// This is abstraction of the map event portions of FGMMapsCallbackApi, to
-/// avoid coupling all the individual controllers to the Pigeon implementation
-/// of event handling, and to allow for mocks/fakes in unit tests.
-@protocol FGMMapEventDelegate <NSObject>
-
-/// Called when the map camera starts moving.
-- (void)didStartCameraMove;
-
-/// Called when the map camera moves.
-- (void)didMoveCameraToPosition:(FGMPlatformCameraPosition *)cameraPosition;
-
-/// Called when the map camera stops moving.
-- (void)didIdleCamera;
-
-/// Called when the map, not a specifc map object, is tapped.
-- (void)didTapAtPosition:(FGMPlatformLatLng *)position;
-
-/// Called when the map, not a specifc map object, is long pressed.
-- (void)didLongPressAtPosition:(FGMPlatformLatLng *)position;
-
-/// Called when a marker is tapped.
-- (void)didTapMarkerWithIdentifier:(NSString *)markerId;
-
-/// Called when a marker drag starts.
-- (void)didStartDragForMarkerWithIdentifier:(NSString *)markerId
- atPosition:(FGMPlatformLatLng *)position;
-
-/// Called when a marker drag updates.
-- (void)didDragMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position;
-
-/// Called when a marker drag ends.
-- (void)didEndDragForMarkerWithIdentifier:(NSString *)markerId
- atPosition:(FGMPlatformLatLng *)position;
-
-/// Called when a marker's info window is tapped.
-- (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)markerId;
-
-/// Called when a circle is tapped.
-- (void)didTapCircleWithIdentifier:(NSString *)circleId;
-
-/// Called when a marker cluster is tapped.
-- (void)didTapCluster:(FGMPlatformCluster *)cluster;
-
-/// Called when a polygon is tapped.
-- (void)didTapPolygonWithIdentifier:(NSString *)polygonId;
-
-/// Called when a polyline is tapped.
-- (void)didTapPolylineWithIdentifier:(NSString *)polylineId;
-
-/// Called when a ground overlay is tapped.
-- (void)didTapGroundOverlayWithIdentifier:(NSString *)groundOverlayId;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9_objc/include/google_maps_flutter_ios_sdk9_objc/GoogleMapsUtilsTrampoline.h b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9_objc/include/google_maps_flutter_ios_sdk9_objc/GoogleMapsUtilsTrampoline.h
deleted file mode 100644
index cf6399b..0000000
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9_objc/include/google_maps_flutter_ios_sdk9_objc/GoogleMapsUtilsTrampoline.h
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright 2013 The Flutter Authors
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// If Swift Package Manager is in use, Objective-C headers are available under the
-// GoogleMapsUtilsObjC package. When using CocoaPods, the headers are provided by the
-// GoogleMapsUtils package.
-#ifdef FGM_USING_COCOAPODS
-@import GoogleMapsUtils;
-#else
-@import GoogleMapsUtilsObjC;
-#endif
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9_objc/include/google_maps_flutter_ios_sdk9_objc/google_maps_flutter_pigeon_messages.g.h b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9_objc/include/google_maps_flutter_ios_sdk9_objc/google_maps_flutter_pigeon_messages.g.h
deleted file mode 100644
index fbd78a7..0000000
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9_objc/include/google_maps_flutter_ios_sdk9_objc/google_maps_flutter_pigeon_messages.g.h
+++ /dev/null
@@ -1,991 +0,0 @@
-// Copyright 2013 The Flutter Authors
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-// Autogenerated from Pigeon (v27.3.2), do not edit directly.
-// See also: https://pub.dev/packages/pigeon
-
-@import Foundation;
-
-@protocol FlutterBinaryMessenger;
-@protocol FlutterMessageCodec;
-@class FlutterError;
-@class FlutterStandardTypedData;
-
-NS_ASSUME_NONNULL_BEGIN
-
-/// Pigeon equivalent of MapType
-typedef NS_ENUM(NSUInteger, FGMPlatformMapType) {
- FGMPlatformMapTypeNone = 0,
- FGMPlatformMapTypeNormal = 1,
- FGMPlatformMapTypeSatellite = 2,
- FGMPlatformMapTypeTerrain = 3,
- FGMPlatformMapTypeHybrid = 4,
-};
-
-/// Wrapper for FGMPlatformMapType to allow for nullability.
-@interface FGMPlatformMapTypeBox : NSObject
-@property(nonatomic, assign) FGMPlatformMapType value;
-- (instancetype)initWithValue:(FGMPlatformMapType)value;
-@end
-
-/// Pigeon equivalent of the MarkerCollisionBehavior enum.
-typedef NS_ENUM(NSUInteger, FGMPlatformMarkerCollisionBehavior) {
- FGMPlatformMarkerCollisionBehaviorRequiredDisplay = 0,
- FGMPlatformMarkerCollisionBehaviorOptionalAndHidesLowerPriority = 1,
- FGMPlatformMarkerCollisionBehaviorRequiredAndHidesOptional = 2,
-};
-
-/// Wrapper for FGMPlatformMarkerCollisionBehavior to allow for nullability.
-@interface FGMPlatformMarkerCollisionBehaviorBox : NSObject
-@property(nonatomic, assign) FGMPlatformMarkerCollisionBehavior value;
-- (instancetype)initWithValue:(FGMPlatformMarkerCollisionBehavior)value;
-@end
-
-/// Join types for polyline joints.
-typedef NS_ENUM(NSUInteger, FGMPlatformJointType) {
- FGMPlatformJointTypeMitered = 0,
- FGMPlatformJointTypeBevel = 1,
- FGMPlatformJointTypeRound = 2,
-};
-
-/// Wrapper for FGMPlatformJointType to allow for nullability.
-@interface FGMPlatformJointTypeBox : NSObject
-@property(nonatomic, assign) FGMPlatformJointType value;
-- (instancetype)initWithValue:(FGMPlatformJointType)value;
-@end
-
-/// Enumeration of possible types for PatternItem.
-typedef NS_ENUM(NSUInteger, FGMPlatformPatternItemType) {
- FGMPlatformPatternItemTypeDot = 0,
- FGMPlatformPatternItemTypeDash = 1,
- FGMPlatformPatternItemTypeGap = 2,
-};
-
-/// Wrapper for FGMPlatformPatternItemType to allow for nullability.
-@interface FGMPlatformPatternItemTypeBox : NSObject
-@property(nonatomic, assign) FGMPlatformPatternItemType value;
-- (instancetype)initWithValue:(FGMPlatformPatternItemType)value;
-@end
-
-typedef NS_ENUM(NSUInteger, FGMPlatformMarkerType) {
- FGMPlatformMarkerTypeMarker = 0,
- FGMPlatformMarkerTypeAdvancedMarker = 1,
-};
-
-/// Wrapper for FGMPlatformMarkerType to allow for nullability.
-@interface FGMPlatformMarkerTypeBox : NSObject
-@property(nonatomic, assign) FGMPlatformMarkerType value;
-- (instancetype)initWithValue:(FGMPlatformMarkerType)value;
-@end
-
-/// Pigeon equivalent of [MapBitmapScaling].
-typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) {
- FGMPlatformMapBitmapScalingAuto = 0,
- FGMPlatformMapBitmapScalingNone = 1,
-};
-
-/// Wrapper for FGMPlatformMapBitmapScaling to allow for nullability.
-@interface FGMPlatformMapBitmapScalingBox : NSObject
-@property(nonatomic, assign) FGMPlatformMapBitmapScaling value;
-- (instancetype)initWithValue:(FGMPlatformMapBitmapScaling)value;
-@end
-
-@class FGMPlatformCameraPosition;
-@class FGMPlatformCameraUpdate;
-@class FGMPlatformCameraUpdateNewCameraPosition;
-@class FGMPlatformCameraUpdateNewLatLng;
-@class FGMPlatformCameraUpdateNewLatLngBounds;
-@class FGMPlatformCameraUpdateNewLatLngZoom;
-@class FGMPlatformCameraUpdateScrollBy;
-@class FGMPlatformCameraUpdateZoomBy;
-@class FGMPlatformCameraUpdateZoom;
-@class FGMPlatformCameraUpdateZoomTo;
-@class FGMPlatformCircle;
-@class FGMPlatformHeatmap;
-@class FGMPlatformHeatmapGradient;
-@class FGMPlatformWeightedLatLng;
-@class FGMPlatformInfoWindow;
-@class FGMPlatformCluster;
-@class FGMPlatformClusterManager;
-@class FGMPlatformMarker;
-@class FGMPlatformPolygon;
-@class FGMPlatformPolyline;
-@class FGMPlatformPatternItem;
-@class FGMPlatformTile;
-@class FGMPlatformTileOverlay;
-@class FGMPlatformEdgeInsets;
-@class FGMPlatformLatLng;
-@class FGMPlatformLatLngBounds;
-@class FGMPlatformCameraTargetBounds;
-@class FGMPlatformGroundOverlay;
-@class FGMPlatformMapViewCreationParams;
-@class FGMPlatformMapConfiguration;
-@class FGMPlatformPoint;
-@class FGMPlatformSize;
-@class FGMPlatformColor;
-@class FGMPlatformTileLayer;
-@class FGMPlatformZoomRange;
-@class FGMPlatformBitmap;
-@class FGMPlatformBitmapDefaultMarker;
-@class FGMPlatformBitmapBytes;
-@class FGMPlatformBitmapAsset;
-@class FGMPlatformBitmapAssetImage;
-@class FGMPlatformBitmapAssetMap;
-@class FGMPlatformBitmapBytesMap;
-@class FGMPlatformBitmapPinConfig;
-
-/// Pigeon representatation of a CameraPosition.
-@interface FGMPlatformCameraPosition : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithBearing:(double)bearing
- target:(FGMPlatformLatLng *)target
- tilt:(double)tilt
- zoom:(double)zoom;
-@property(nonatomic, assign) double bearing;
-@property(nonatomic, strong) FGMPlatformLatLng *target;
-@property(nonatomic, assign) double tilt;
-@property(nonatomic, assign) double zoom;
-@end
-
-/// Pigeon representation of a CameraUpdate.
-@interface FGMPlatformCameraUpdate : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithCameraUpdate:(id)cameraUpdate;
-/// This Object must be one of the classes below prefixed with
-/// PlatformCameraUpdate. Each such class represents a different type of
-/// camera update, and each holds a different set of data, preventing the
-/// use of a single unified class.
-@property(nonatomic, strong) id cameraUpdate;
-@end
-
-/// Pigeon equivalent of NewCameraPosition
-@interface FGMPlatformCameraUpdateNewCameraPosition : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithCameraPosition:(FGMPlatformCameraPosition *)cameraPosition;
-@property(nonatomic, strong) FGMPlatformCameraPosition *cameraPosition;
-@end
-
-/// Pigeon equivalent of NewLatLng
-@interface FGMPlatformCameraUpdateNewLatLng : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng;
-@property(nonatomic, strong) FGMPlatformLatLng *latLng;
-@end
-
-/// Pigeon equivalent of NewLatLngBounds
-@interface FGMPlatformCameraUpdateNewLatLngBounds : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithBounds:(FGMPlatformLatLngBounds *)bounds padding:(double)padding;
-@property(nonatomic, strong) FGMPlatformLatLngBounds *bounds;
-@property(nonatomic, assign) double padding;
-@end
-
-/// Pigeon equivalent of NewLatLngZoom
-@interface FGMPlatformCameraUpdateNewLatLngZoom : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng zoom:(double)zoom;
-@property(nonatomic, strong) FGMPlatformLatLng *latLng;
-@property(nonatomic, assign) double zoom;
-@end
-
-/// Pigeon equivalent of ScrollBy
-@interface FGMPlatformCameraUpdateScrollBy : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithDx:(double)dx dy:(double)dy;
-@property(nonatomic, assign) double dx;
-@property(nonatomic, assign) double dy;
-@end
-
-/// Pigeon equivalent of ZoomBy
-@interface FGMPlatformCameraUpdateZoomBy : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithAmount:(double)amount focus:(nullable FGMPlatformPoint *)focus;
-@property(nonatomic, assign) double amount;
-@property(nonatomic, strong, nullable) FGMPlatformPoint *focus;
-@end
-
-/// Pigeon equivalent of ZoomIn/ZoomOut
-@interface FGMPlatformCameraUpdateZoom : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithOut:(BOOL)out;
-@property(nonatomic, assign) BOOL out;
-@end
-
-/// Pigeon equivalent of ZoomTo
-@interface FGMPlatformCameraUpdateZoomTo : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithZoom:(double)zoom;
-@property(nonatomic, assign) double zoom;
-@end
-
-/// Pigeon equivalent of the Circle class.
-@interface FGMPlatformCircle : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithConsumeTapEvents:(BOOL)consumeTapEvents
- fillColor:(FGMPlatformColor *)fillColor
- strokeColor:(FGMPlatformColor *)strokeColor
- visible:(BOOL)visible
- strokeWidth:(NSInteger)strokeWidth
- zIndex:(double)zIndex
- center:(FGMPlatformLatLng *)center
- radius:(double)radius
- circleId:(NSString *)circleId;
-@property(nonatomic, assign) BOOL consumeTapEvents;
-@property(nonatomic, strong) FGMPlatformColor *fillColor;
-@property(nonatomic, strong) FGMPlatformColor *strokeColor;
-@property(nonatomic, assign) BOOL visible;
-@property(nonatomic, assign) NSInteger strokeWidth;
-@property(nonatomic, assign) double zIndex;
-@property(nonatomic, strong) FGMPlatformLatLng *center;
-@property(nonatomic, assign) double radius;
-@property(nonatomic, copy) NSString *circleId;
-@end
-
-/// Pigeon equivalent of the Heatmap class.
-@interface FGMPlatformHeatmap : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithHeatmapId:(NSString *)heatmapId
- data:(NSArray<FGMPlatformWeightedLatLng *> *)data
- gradient:(nullable FGMPlatformHeatmapGradient *)gradient
- opacity:(double)opacity
- radius:(NSInteger)radius
- minimumZoomIntensity:(NSInteger)minimumZoomIntensity
- maximumZoomIntensity:(NSInteger)maximumZoomIntensity;
-@property(nonatomic, copy) NSString *heatmapId;
-@property(nonatomic, copy) NSArray<FGMPlatformWeightedLatLng *> *data;
-@property(nonatomic, strong, nullable) FGMPlatformHeatmapGradient *gradient;
-@property(nonatomic, assign) double opacity;
-@property(nonatomic, assign) NSInteger radius;
-@property(nonatomic, assign) NSInteger minimumZoomIntensity;
-@property(nonatomic, assign) NSInteger maximumZoomIntensity;
-@end
-
-/// Pigeon equivalent of the HeatmapGradient class.
-///
-/// The GMUGradient structure is slightly different from HeatmapGradient, so
-/// this matches the iOS API so that conversion can be done on the Dart side
-/// where the structures are easier to work with.
-@interface FGMPlatformHeatmapGradient : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithColors:(NSArray<FGMPlatformColor *> *)colors
- startPoints:(NSArray<NSNumber *> *)startPoints
- colorMapSize:(NSInteger)colorMapSize;
-@property(nonatomic, copy) NSArray<FGMPlatformColor *> *colors;
-@property(nonatomic, copy) NSArray<NSNumber *> *startPoints;
-@property(nonatomic, assign) NSInteger colorMapSize;
-@end
-
-/// Pigeon equivalent of the WeightedLatLng class.
-@interface FGMPlatformWeightedLatLng : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithPoint:(FGMPlatformLatLng *)point weight:(double)weight;
-@property(nonatomic, strong) FGMPlatformLatLng *point;
-@property(nonatomic, assign) double weight;
-@end
-
-/// Pigeon equivalent of the InfoWindow class.
-@interface FGMPlatformInfoWindow : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithTitle:(nullable NSString *)title
- snippet:(nullable NSString *)snippet
- anchor:(FGMPlatformPoint *)anchor;
-@property(nonatomic, copy, nullable) NSString *title;
-@property(nonatomic, copy, nullable) NSString *snippet;
-@property(nonatomic, strong) FGMPlatformPoint *anchor;
-@end
-
-/// Pigeon equivalent of Cluster.
-@interface FGMPlatformCluster : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithClusterManagerId:(NSString *)clusterManagerId
- position:(FGMPlatformLatLng *)position
- bounds:(FGMPlatformLatLngBounds *)bounds
- markerIds:(NSArray<NSString *> *)markerIds;
-@property(nonatomic, copy) NSString *clusterManagerId;
-@property(nonatomic, strong) FGMPlatformLatLng *position;
-@property(nonatomic, strong) FGMPlatformLatLngBounds *bounds;
-@property(nonatomic, copy) NSArray<NSString *> *markerIds;
-@end
-
-/// Pigeon equivalent of the ClusterManager class.
-@interface FGMPlatformClusterManager : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithIdentifier:(NSString *)identifier;
-@property(nonatomic, copy) NSString *identifier;
-@end
-
-/// Pigeon equivalent of the Marker class.
-@interface FGMPlatformMarker : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithAlpha:(double)alpha
- anchor:(FGMPlatformPoint *)anchor
- consumeTapEvents:(BOOL)consumeTapEvents
- draggable:(BOOL)draggable
- flat:(BOOL)flat
- icon:(FGMPlatformBitmap *)icon
- infoWindow:(FGMPlatformInfoWindow *)infoWindow
- position:(FGMPlatformLatLng *)position
- rotation:(double)rotation
- visible:(BOOL)visible
- zIndex:(NSInteger)zIndex
- markerId:(NSString *)markerId
- clusterManagerId:(nullable NSString *)clusterManagerId
- collisionBehavior:(nullable FGMPlatformMarkerCollisionBehaviorBox *)collisionBehavior;
-@property(nonatomic, assign) double alpha;
-@property(nonatomic, strong) FGMPlatformPoint *anchor;
-@property(nonatomic, assign) BOOL consumeTapEvents;
-@property(nonatomic, assign) BOOL draggable;
-@property(nonatomic, assign) BOOL flat;
-@property(nonatomic, strong) FGMPlatformBitmap *icon;
-@property(nonatomic, strong) FGMPlatformInfoWindow *infoWindow;
-@property(nonatomic, strong) FGMPlatformLatLng *position;
-@property(nonatomic, assign) double rotation;
-@property(nonatomic, assign) BOOL visible;
-@property(nonatomic, assign) NSInteger zIndex;
-@property(nonatomic, copy) NSString *markerId;
-@property(nonatomic, copy, nullable) NSString *clusterManagerId;
-@property(nonatomic, strong, nullable) FGMPlatformMarkerCollisionBehaviorBox *collisionBehavior;
-@end
-
-/// Pigeon equivalent of the Polygon class.
-@interface FGMPlatformPolygon : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithPolygonId:(NSString *)polygonId
- consumesTapEvents:(BOOL)consumesTapEvents
- fillColor:(FGMPlatformColor *)fillColor
- geodesic:(BOOL)geodesic
- points:(NSArray<FGMPlatformLatLng *> *)points
- holes:(NSArray<NSArray<FGMPlatformLatLng *> *> *)holes
- visible:(BOOL)visible
- strokeColor:(FGMPlatformColor *)strokeColor
- strokeWidth:(NSInteger)strokeWidth
- zIndex:(NSInteger)zIndex;
-@property(nonatomic, copy) NSString *polygonId;
-@property(nonatomic, assign) BOOL consumesTapEvents;
-@property(nonatomic, strong) FGMPlatformColor *fillColor;
-@property(nonatomic, assign) BOOL geodesic;
-@property(nonatomic, copy) NSArray<FGMPlatformLatLng *> *points;
-@property(nonatomic, copy) NSArray<NSArray<FGMPlatformLatLng *> *> *holes;
-@property(nonatomic, assign) BOOL visible;
-@property(nonatomic, strong) FGMPlatformColor *strokeColor;
-@property(nonatomic, assign) NSInteger strokeWidth;
-@property(nonatomic, assign) NSInteger zIndex;
-@end
-
-/// Pigeon equivalent of the Polyline class.
-@interface FGMPlatformPolyline : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithPolylineId:(NSString *)polylineId
- consumesTapEvents:(BOOL)consumesTapEvents
- color:(FGMPlatformColor *)color
- geodesic:(BOOL)geodesic
- jointType:(FGMPlatformJointType)jointType
- patterns:(NSArray<FGMPlatformPatternItem *> *)patterns
- points:(NSArray<FGMPlatformLatLng *> *)points
- visible:(BOOL)visible
- width:(NSInteger)width
- zIndex:(NSInteger)zIndex;
-@property(nonatomic, copy) NSString *polylineId;
-@property(nonatomic, assign) BOOL consumesTapEvents;
-@property(nonatomic, strong) FGMPlatformColor *color;
-@property(nonatomic, assign) BOOL geodesic;
-/// The joint type.
-@property(nonatomic, assign) FGMPlatformJointType jointType;
-/// The pattern data, as a list of pattern items.
-@property(nonatomic, copy) NSArray<FGMPlatformPatternItem *> *patterns;
-@property(nonatomic, copy) NSArray<FGMPlatformLatLng *> *points;
-@property(nonatomic, assign) BOOL visible;
-@property(nonatomic, assign) NSInteger width;
-@property(nonatomic, assign) NSInteger zIndex;
-@end
-
-/// Pigeon equivalent of the PatternItem class.
-@interface FGMPlatformPatternItem : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithType:(FGMPlatformPatternItemType)type length:(nullable NSNumber *)length;
-@property(nonatomic, assign) FGMPlatformPatternItemType type;
-@property(nonatomic, strong, nullable) NSNumber *length;
-@end
-
-/// Pigeon equivalent of the Tile class.
-@interface FGMPlatformTile : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithWidth:(NSInteger)width
- height:(NSInteger)height
- data:(nullable FlutterStandardTypedData *)data;
-@property(nonatomic, assign) NSInteger width;
-@property(nonatomic, assign) NSInteger height;
-@property(nonatomic, strong, nullable) FlutterStandardTypedData *data;
-@end
-
-/// Pigeon equivalent of the TileOverlay class.
-@interface FGMPlatformTileOverlay : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithTileOverlayId:(NSString *)tileOverlayId
- fadeIn:(BOOL)fadeIn
- transparency:(double)transparency
- zIndex:(NSInteger)zIndex
- visible:(BOOL)visible
- tileSize:(NSInteger)tileSize;
-@property(nonatomic, copy) NSString *tileOverlayId;
-@property(nonatomic, assign) BOOL fadeIn;
-@property(nonatomic, assign) double transparency;
-@property(nonatomic, assign) NSInteger zIndex;
-@property(nonatomic, assign) BOOL visible;
-@property(nonatomic, assign) NSInteger tileSize;
-@end
-
-/// Pigeon equivalent of Flutter's EdgeInsets.
-@interface FGMPlatformEdgeInsets : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithTop:(double)top bottom:(double)bottom left:(double)left right:(double)right;
-@property(nonatomic, assign) double top;
-@property(nonatomic, assign) double bottom;
-@property(nonatomic, assign) double left;
-@property(nonatomic, assign) double right;
-@end
-
-/// Pigeon equivalent of LatLng.
-@interface FGMPlatformLatLng : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithLatitude:(double)latitude longitude:(double)longitude;
-@property(nonatomic, assign) double latitude;
-@property(nonatomic, assign) double longitude;
-@end
-
-/// Pigeon equivalent of LatLngBounds.
-@interface FGMPlatformLatLngBounds : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithNortheast:(FGMPlatformLatLng *)northeast
- southwest:(FGMPlatformLatLng *)southwest;
-@property(nonatomic, strong) FGMPlatformLatLng *northeast;
-@property(nonatomic, strong) FGMPlatformLatLng *southwest;
-@end
-
-/// Pigeon equivalent of CameraTargetBounds.
-///
-/// As with the Dart version, it exists to distinguish between not setting a
-/// a target, and having an explicitly unbounded target (null [bounds]).
-@interface FGMPlatformCameraTargetBounds : NSObject
-+ (instancetype)makeWithBounds:(nullable FGMPlatformLatLngBounds *)bounds;
-@property(nonatomic, strong, nullable) FGMPlatformLatLngBounds *bounds;
-@end
-
-/// Pigeon equivalent of the GroundOverlay class.
-@interface FGMPlatformGroundOverlay : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithGroundOverlayId:(NSString *)groundOverlayId
- image:(FGMPlatformBitmap *)image
- position:(nullable FGMPlatformLatLng *)position
- bounds:(nullable FGMPlatformLatLngBounds *)bounds
- anchor:(nullable FGMPlatformPoint *)anchor
- transparency:(double)transparency
- bearing:(double)bearing
- zIndex:(NSInteger)zIndex
- visible:(BOOL)visible
- clickable:(BOOL)clickable
- zoomLevel:(nullable NSNumber *)zoomLevel;
-@property(nonatomic, copy) NSString *groundOverlayId;
-@property(nonatomic, strong) FGMPlatformBitmap *image;
-@property(nonatomic, strong, nullable) FGMPlatformLatLng *position;
-@property(nonatomic, strong, nullable) FGMPlatformLatLngBounds *bounds;
-@property(nonatomic, strong, nullable) FGMPlatformPoint *anchor;
-@property(nonatomic, assign) double transparency;
-@property(nonatomic, assign) double bearing;
-@property(nonatomic, assign) NSInteger zIndex;
-@property(nonatomic, assign) BOOL visible;
-@property(nonatomic, assign) BOOL clickable;
-@property(nonatomic, strong, nullable) NSNumber *zoomLevel;
-@end
-
-/// Information passed to the platform view creation.
-@interface FGMPlatformMapViewCreationParams : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)
- makeWithInitialCameraPosition:(FGMPlatformCameraPosition *)initialCameraPosition
- mapConfiguration:(FGMPlatformMapConfiguration *)mapConfiguration
- initialCircles:(NSArray<FGMPlatformCircle *> *)initialCircles
- initialMarkers:(NSArray<FGMPlatformMarker *> *)initialMarkers
- initialPolygons:(NSArray<FGMPlatformPolygon *> *)initialPolygons
- initialPolylines:(NSArray<FGMPlatformPolyline *> *)initialPolylines
- initialHeatmaps:(NSArray<FGMPlatformHeatmap *> *)initialHeatmaps
- initialTileOverlays:(NSArray<FGMPlatformTileOverlay *> *)initialTileOverlays
- initialClusterManagers:(NSArray<FGMPlatformClusterManager *> *)initialClusterManagers
- initialGroundOverlays:(NSArray<FGMPlatformGroundOverlay *> *)initialGroundOverlays;
-@property(nonatomic, strong) FGMPlatformCameraPosition *initialCameraPosition;
-@property(nonatomic, strong) FGMPlatformMapConfiguration *mapConfiguration;
-@property(nonatomic, copy) NSArray<FGMPlatformCircle *> *initialCircles;
-@property(nonatomic, copy) NSArray<FGMPlatformMarker *> *initialMarkers;
-@property(nonatomic, copy) NSArray<FGMPlatformPolygon *> *initialPolygons;
-@property(nonatomic, copy) NSArray<FGMPlatformPolyline *> *initialPolylines;
-@property(nonatomic, copy) NSArray<FGMPlatformHeatmap *> *initialHeatmaps;
-@property(nonatomic, copy) NSArray<FGMPlatformTileOverlay *> *initialTileOverlays;
-@property(nonatomic, copy) NSArray<FGMPlatformClusterManager *> *initialClusterManagers;
-@property(nonatomic, copy) NSArray<FGMPlatformGroundOverlay *> *initialGroundOverlays;
-@end
-
-/// Pigeon equivalent of MapConfiguration.
-@interface FGMPlatformMapConfiguration : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithCompassEnabled:(nullable NSNumber *)compassEnabled
- cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds
- mapType:(nullable FGMPlatformMapTypeBox *)mapType
- minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference
- rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled
- scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled
- tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled
- trackCameraPosition:(nullable NSNumber *)trackCameraPosition
- zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled
- myLocationEnabled:(nullable NSNumber *)myLocationEnabled
- myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled
- padding:(nullable FGMPlatformEdgeInsets *)padding
- indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled
- trafficEnabled:(nullable NSNumber *)trafficEnabled
- buildingsEnabled:(nullable NSNumber *)buildingsEnabled
- markerType:(FGMPlatformMarkerType)markerType
- mapId:(nullable NSString *)mapId
- style:(nullable NSString *)style;
-@property(nonatomic, strong, nullable) NSNumber *compassEnabled;
-@property(nonatomic, strong, nullable) FGMPlatformCameraTargetBounds *cameraTargetBounds;
-@property(nonatomic, strong, nullable) FGMPlatformMapTypeBox *mapType;
-@property(nonatomic, strong, nullable) FGMPlatformZoomRange *minMaxZoomPreference;
-@property(nonatomic, strong, nullable) NSNumber *rotateGesturesEnabled;
-@property(nonatomic, strong, nullable) NSNumber *scrollGesturesEnabled;
-@property(nonatomic, strong, nullable) NSNumber *tiltGesturesEnabled;
-@property(nonatomic, strong, nullable) NSNumber *trackCameraPosition;
-@property(nonatomic, strong, nullable) NSNumber *zoomGesturesEnabled;
-@property(nonatomic, strong, nullable) NSNumber *myLocationEnabled;
-@property(nonatomic, strong, nullable) NSNumber *myLocationButtonEnabled;
-@property(nonatomic, strong, nullable) FGMPlatformEdgeInsets *padding;
-@property(nonatomic, strong, nullable) NSNumber *indoorViewEnabled;
-@property(nonatomic, strong, nullable) NSNumber *trafficEnabled;
-@property(nonatomic, strong, nullable) NSNumber *buildingsEnabled;
-@property(nonatomic, assign) FGMPlatformMarkerType markerType;
-@property(nonatomic, copy, nullable) NSString *mapId;
-@property(nonatomic, copy, nullable) NSString *style;
-@end
-
-/// Pigeon representation of an x,y coordinate.
-@interface FGMPlatformPoint : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithX:(double)x y:(double)y;
-@property(nonatomic, assign) double x;
-@property(nonatomic, assign) double y;
-@end
-
-/// Pigeon representation of a size.
-@interface FGMPlatformSize : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithWidth:(double)width height:(double)height;
-@property(nonatomic, assign) double width;
-@property(nonatomic, assign) double height;
-@end
-
-/// Pigeon representation of a color.
-@interface FGMPlatformColor : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithRed:(double)red green:(double)green blue:(double)blue alpha:(double)alpha;
-@property(nonatomic, assign) double red;
-@property(nonatomic, assign) double green;
-@property(nonatomic, assign) double blue;
-@property(nonatomic, assign) double alpha;
-@end
-
-/// Pigeon equivalent of GMSTileLayer properties.
-@interface FGMPlatformTileLayer : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithVisible:(BOOL)visible
- fadeIn:(BOOL)fadeIn
- opacity:(double)opacity
- zIndex:(NSInteger)zIndex;
-@property(nonatomic, assign) BOOL visible;
-@property(nonatomic, assign) BOOL fadeIn;
-@property(nonatomic, assign) double opacity;
-@property(nonatomic, assign) NSInteger zIndex;
-@end
-
-/// Pigeon equivalent of MinMaxZoomPreference.
-@interface FGMPlatformZoomRange : NSObject
-+ (instancetype)makeWithMin:(nullable NSNumber *)min max:(nullable NSNumber *)max;
-@property(nonatomic, strong, nullable) NSNumber *min;
-@property(nonatomic, strong, nullable) NSNumber *max;
-@end
-
-/// Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint
-/// types of [BitmapDescriptor], [PlatformBitmap] contains a single field which
-/// may hold the pigeon equivalent type of any of them.
-@interface FGMPlatformBitmap : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithBitmap:(id)bitmap;
-/// One of [PlatformBitmapAssetMap], [PlatformBitmapAsset],
-/// [PlatformBitmapAssetImage], [PlatformBitmapBytesMap],
-/// [PlatformBitmapBytes], or [PlatformBitmapDefaultMarker].
-/// As Pigeon does not currently support data class inheritance, this
-/// approach allows for the different bitmap implementations to be valid
-/// argument and return types of the API methods. See
-/// https://github.com/flutter/flutter/issues/117819.
-@property(nonatomic, strong) id bitmap;
-@end
-
-/// Pigeon equivalent of [DefaultMarker].
-@interface FGMPlatformBitmapDefaultMarker : NSObject
-+ (instancetype)makeWithHue:(nullable NSNumber *)hue;
-@property(nonatomic, strong, nullable) NSNumber *hue;
-@end
-
-/// Pigeon equivalent of [BytesBitmap].
-@interface FGMPlatformBitmapBytes : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData
- size:(nullable FGMPlatformSize *)size;
-@property(nonatomic, strong) FlutterStandardTypedData *byteData;
-@property(nonatomic, strong, nullable) FGMPlatformSize *size;
-@end
-
-/// Pigeon equivalent of [AssetBitmap].
-@interface FGMPlatformBitmapAsset : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithName:(NSString *)name pkg:(nullable NSString *)pkg;
-@property(nonatomic, copy) NSString *name;
-@property(nonatomic, copy, nullable) NSString *pkg;
-@end
-
-/// Pigeon equivalent of [AssetImageBitmap].
-@interface FGMPlatformBitmapAssetImage : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithName:(NSString *)name
- scale:(double)scale
- size:(nullable FGMPlatformSize *)size;
-@property(nonatomic, copy) NSString *name;
-@property(nonatomic, assign) double scale;
-@property(nonatomic, strong, nullable) FGMPlatformSize *size;
-@end
-
-/// Pigeon equivalent of [AssetMapBitmap].
-@interface FGMPlatformBitmapAssetMap : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithAssetName:(NSString *)assetName
- bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling
- imagePixelRatio:(double)imagePixelRatio
- width:(nullable NSNumber *)width
- height:(nullable NSNumber *)height;
-@property(nonatomic, copy) NSString *assetName;
-@property(nonatomic, assign) FGMPlatformMapBitmapScaling bitmapScaling;
-@property(nonatomic, assign) double imagePixelRatio;
-@property(nonatomic, strong, nullable) NSNumber *width;
-@property(nonatomic, strong, nullable) NSNumber *height;
-@end
-
-/// Pigeon equivalent of [BytesMapBitmap].
-@interface FGMPlatformBitmapBytesMap : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData
- bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling
- imagePixelRatio:(double)imagePixelRatio
- width:(nullable NSNumber *)width
- height:(nullable NSNumber *)height;
-@property(nonatomic, strong) FlutterStandardTypedData *byteData;
-@property(nonatomic, assign) FGMPlatformMapBitmapScaling bitmapScaling;
-@property(nonatomic, assign) double imagePixelRatio;
-@property(nonatomic, strong, nullable) NSNumber *width;
-@property(nonatomic, strong, nullable) NSNumber *height;
-@end
-
-/// Pigeon equivalent of [PinConfig].
-@interface FGMPlatformBitmapPinConfig : NSObject
-+ (instancetype)makeWithBackgroundColor:(nullable FGMPlatformColor *)backgroundColor
- borderColor:(nullable FGMPlatformColor *)borderColor
- glyphColor:(nullable FGMPlatformColor *)glyphColor
- glyphTextColor:(nullable FGMPlatformColor *)glyphTextColor
- glyphText:(nullable NSString *)glyphText
- glyphBitmap:(nullable FGMPlatformBitmap *)glyphBitmap;
-@property(nonatomic, strong, nullable) FGMPlatformColor *backgroundColor;
-@property(nonatomic, strong, nullable) FGMPlatformColor *borderColor;
-@property(nonatomic, strong, nullable) FGMPlatformColor *glyphColor;
-@property(nonatomic, strong, nullable) FGMPlatformColor *glyphTextColor;
-@property(nonatomic, copy, nullable) NSString *glyphText;
-@property(nonatomic, strong, nullable) FGMPlatformBitmap *glyphBitmap;
-@end
-
-/// The codec used by all APIs.
-NSObject<FlutterMessageCodec> *FGMGetGoogleMapsFlutterPigeonMessagesCodec(void);
-
-/// Interface for non-test interactions with the native SDK.
-///
-/// For test-only state queries, see [MapsInspectorApi].
-@protocol FGMMapsApi
-/// Returns once the map instance is available.
-- (void)waitForMapWithError:(FlutterError *_Nullable *_Nonnull)error;
-/// Updates the map's configuration options.
-///
-/// Only non-null configuration values will result in updates; options with
-/// null values will remain unchanged.
-- (void)updateWithMapConfiguration:(FGMPlatformMapConfiguration *)configuration
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Updates the set of circles on the map.
-- (void)updateCirclesByAdding:(NSArray<FGMPlatformCircle *> *)toAdd
- changing:(NSArray<FGMPlatformCircle *> *)toChange
- removing:(NSArray<NSString *> *)idsToRemove
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Updates the set of heatmaps on the map.
-- (void)updateHeatmapsByAdding:(NSArray<FGMPlatformHeatmap *> *)toAdd
- changing:(NSArray<FGMPlatformHeatmap *> *)toChange
- removing:(NSArray<NSString *> *)idsToRemove
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Updates the set of custer managers for clusters on the map.
-- (void)updateClusterManagersByAdding:(NSArray<FGMPlatformClusterManager *> *)toAdd
- removing:(NSArray<NSString *> *)idsToRemove
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Updates the set of markers on the map.
-- (void)updateMarkersByAdding:(NSArray<FGMPlatformMarker *> *)toAdd
- changing:(NSArray<FGMPlatformMarker *> *)toChange
- removing:(NSArray<NSString *> *)idsToRemove
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Updates the set of polygonss on the map.
-- (void)updatePolygonsByAdding:(NSArray<FGMPlatformPolygon *> *)toAdd
- changing:(NSArray<FGMPlatformPolygon *> *)toChange
- removing:(NSArray<NSString *> *)idsToRemove
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Updates the set of polylines on the map.
-- (void)updatePolylinesByAdding:(NSArray<FGMPlatformPolyline *> *)toAdd
- changing:(NSArray<FGMPlatformPolyline *> *)toChange
- removing:(NSArray<NSString *> *)idsToRemove
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Updates the set of tile overlays on the map.
-- (void)updateTileOverlaysByAdding:(NSArray<FGMPlatformTileOverlay *> *)toAdd
- changing:(NSArray<FGMPlatformTileOverlay *> *)toChange
- removing:(NSArray<NSString *> *)idsToRemove
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Updates the set of ground overlays on the map.
-- (void)updateGroundOverlaysByAdding:(NSArray<FGMPlatformGroundOverlay *> *)toAdd
- changing:(NSArray<FGMPlatformGroundOverlay *> *)toChange
- removing:(NSArray<NSString *> *)idsToRemove
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Gets the screen coordinate for the given map location.
-///
-/// @return `nil` only when `error != nil`.
-- (nullable FGMPlatformPoint *)screenCoordinatesForLatLng:(FGMPlatformLatLng *)latLng
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Gets the map location for the given screen coordinate.
-///
-/// @return `nil` only when `error != nil`.
-- (nullable FGMPlatformLatLng *)latLngForScreenCoordinate:(FGMPlatformPoint *)screenCoordinate
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Gets the map region currently displayed on the map.
-///
-/// @return `nil` only when `error != nil`.
-- (nullable FGMPlatformLatLngBounds *)visibleMapRegion:(FlutterError *_Nullable *_Nonnull)error;
-/// Moves the camera according to [cameraUpdate] immediately, with no
-/// animation.
-- (void)moveCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Moves the camera according to [cameraUpdate], animating the update using a
-/// duration in milliseconds if provided.
-- (void)animateCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate
- duration:(nullable NSNumber *)durationMilliseconds
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Gets the current map zoom level.
-///
-/// @return `nil` only when `error != nil`.
-- (nullable NSNumber *)currentZoomLevel:(FlutterError *_Nullable *_Nonnull)error;
-/// Show the info window for the marker with the given ID.
-- (void)showInfoWindowForMarkerWithIdentifier:(NSString *)markerId
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Hide the info window for the marker with the given ID.
-- (void)hideInfoWindowForMarkerWithIdentifier:(NSString *)markerId
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Returns true if the marker with the given ID is currently displaying its
-/// info window.
-///
-/// @return `nil` only when `error != nil`.
-- (nullable NSNumber *)
- isShowingInfoWindowForMarkerWithIdentifier:(NSString *)markerId
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Sets the style to the given map style string, where an empty string
-/// indicates that the style should be cleared.
-///
-/// If there was an error setting the style, such as an invalid style string,
-/// returns the error message.
-- (nullable NSString *)setStyle:(NSString *)style error:(FlutterError *_Nullable *_Nonnull)error;
-/// Returns the error string from the last attempt to set the map style, if
-/// any.
-///
-/// This allows checking asynchronously for initial style failures, as there
-/// is no way to return failures from map initialization.
-- (nullable NSString *)lastStyleError:(FlutterError *_Nullable *_Nonnull)error;
-/// Clears the cache of tiles previously requseted from the tile provider.
-- (void)clearTileCacheForOverlayWithIdentifier:(NSString *)tileOverlayId
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Takes a snapshot of the map and returns its image data.
-- (nullable FlutterStandardTypedData *)takeSnapshotWithError:
- (FlutterError *_Nullable *_Nonnull)error;
-/// Returns true if the map supports advanced markers.
-///
-/// @return `nil` only when `error != nil`.
-- (nullable NSNumber *)isAdvancedMarkersAvailable:(FlutterError *_Nullable *_Nonnull)error;
-@end
-
-extern void SetUpFGMMapsApi(id<FlutterBinaryMessenger> binaryMessenger,
- NSObject<FGMMapsApi> *_Nullable api);
-
-extern void SetUpFGMMapsApiWithSuffix(id<FlutterBinaryMessenger> binaryMessenger,
- NSObject<FGMMapsApi> *_Nullable api,
- NSString *messageChannelSuffix);
-
-/// Interface for calls from the native SDK to Dart.
-@interface FGMMapsCallbackApi : NSObject
-- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger;
-- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger
- messageChannelSuffix:(nullable NSString *)messageChannelSuffix;
-/// Called when the map camera starts moving.
-- (void)didStartCameraMoveWithCompletion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when the map camera moves.
-- (void)didMoveCameraToPosition:(FGMPlatformCameraPosition *)cameraPosition
- completion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when the map camera stops moving.
-- (void)didIdleCameraWithCompletion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when the map, not a specifc map object, is tapped.
-- (void)didTapAtPosition:(FGMPlatformLatLng *)position
- completion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when the map, not a specifc map object, is long pressed.
-- (void)didLongPressAtPosition:(FGMPlatformLatLng *)position
- completion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when a marker is tapped.
-- (void)didTapMarkerWithIdentifier:(NSString *)markerId
- completion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when a marker drag starts.
-- (void)didStartDragForMarkerWithIdentifier:(NSString *)markerId
- atPosition:(FGMPlatformLatLng *)position
- completion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when a marker drag updates.
-- (void)didDragMarkerWithIdentifier:(NSString *)markerId
- atPosition:(FGMPlatformLatLng *)position
- completion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when a marker drag ends.
-- (void)didEndDragForMarkerWithIdentifier:(NSString *)markerId
- atPosition:(FGMPlatformLatLng *)position
- completion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when a marker's info window is tapped.
-- (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)markerId
- completion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when a circle is tapped.
-- (void)didTapCircleWithIdentifier:(NSString *)circleId
- completion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when a marker cluster is tapped.
-- (void)didTapCluster:(FGMPlatformCluster *)cluster
- completion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when a polygon is tapped.
-- (void)didTapPolygonWithIdentifier:(NSString *)polygonId
- completion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when a polyline is tapped.
-- (void)didTapPolylineWithIdentifier:(NSString *)polylineId
- completion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when a ground overlay is tapped.
-- (void)didTapGroundOverlayWithIdentifier:(NSString *)groundOverlayId
- completion:(void (^)(FlutterError *_Nullable))completion;
-/// Called to get data for a map tile.
-- (void)tileWithOverlayIdentifier:(NSString *)tileOverlayId
- location:(FGMPlatformPoint *)location
- zoom:(NSInteger)zoom
- completion:(void (^)(FGMPlatformTile *_Nullable,
- FlutterError *_Nullable))completion;
-@end
-
-/// Dummy interface to force generation of the platform view creation params,
-/// which are not used in any Pigeon calls, only the platform view creation
-/// call made internally by Flutter.
-@protocol FGMMapsPlatformViewApi
-- (void)createViewType:(nullable FGMPlatformMapViewCreationParams *)type
- error:(FlutterError *_Nullable *_Nonnull)error;
-@end
-
-extern void SetUpFGMMapsPlatformViewApi(id<FlutterBinaryMessenger> binaryMessenger,
- NSObject<FGMMapsPlatformViewApi> *_Nullable api);
-
-extern void SetUpFGMMapsPlatformViewApiWithSuffix(id<FlutterBinaryMessenger> binaryMessenger,
- NSObject<FGMMapsPlatformViewApi> *_Nullable api,
- NSString *messageChannelSuffix);
-
-/// Inspector API only intended for use in integration tests.
-@protocol FGMMapsInspectorApi
-/// @return `nil` only when `error != nil`.
-- (nullable NSNumber *)areBuildingsEnabledWithError:(FlutterError *_Nullable *_Nonnull)error;
-/// @return `nil` only when `error != nil`.
-- (nullable NSNumber *)areRotateGesturesEnabledWithError:(FlutterError *_Nullable *_Nonnull)error;
-/// @return `nil` only when `error != nil`.
-- (nullable NSNumber *)areScrollGesturesEnabledWithError:(FlutterError *_Nullable *_Nonnull)error;
-/// @return `nil` only when `error != nil`.
-- (nullable NSNumber *)areTiltGesturesEnabledWithError:(FlutterError *_Nullable *_Nonnull)error;
-/// @return `nil` only when `error != nil`.
-- (nullable NSNumber *)areZoomGesturesEnabledWithError:(FlutterError *_Nullable *_Nonnull)error;
-/// @return `nil` only when `error != nil`.
-- (nullable NSNumber *)isCompassEnabledWithError:(FlutterError *_Nullable *_Nonnull)error;
-/// @return `nil` only when `error != nil`.
-- (nullable NSNumber *)isMyLocationButtonEnabledWithError:(FlutterError *_Nullable *_Nonnull)error;
-/// @return `nil` only when `error != nil`.
-- (nullable NSNumber *)isTrafficEnabledWithError:(FlutterError *_Nullable *_Nonnull)error;
-- (nullable FGMPlatformTileLayer *)tileOverlayWithIdentifier:(NSString *)tileOverlayId
- error:
- (FlutterError *_Nullable *_Nonnull)error;
-- (nullable FGMPlatformGroundOverlay *)
- groundOverlayWithIdentifier:(NSString *)groundOverlayId
- error:(FlutterError *_Nullable *_Nonnull)error;
-- (nullable FGMPlatformHeatmap *)heatmapWithIdentifier:(NSString *)heatmapId
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// @return `nil` only when `error != nil`.
-- (nullable FGMPlatformZoomRange *)zoomRange:(FlutterError *_Nullable *_Nonnull)error;
-/// @return `nil` only when `error != nil`.
-- (nullable NSArray<FGMPlatformCluster *> *)
- clustersWithIdentifier:(NSString *)clusterManagerId
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// @return `nil` only when `error != nil`.
-- (nullable FGMPlatformCameraPosition *)cameraPosition:(FlutterError *_Nullable *_Nonnull)error;
-@end
-
-extern void SetUpFGMMapsInspectorApi(id<FlutterBinaryMessenger> binaryMessenger,
- NSObject<FGMMapsInspectorApi> *_Nullable api);
-
-extern void SetUpFGMMapsInspectorApiWithSuffix(id<FlutterBinaryMessenger> binaryMessenger,
- NSObject<FGMMapsInspectorApi> *_Nullable api,
- NSString *messageChannelSuffix);
-
-NS_ASSUME_NONNULL_END
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/lib/src/google_maps_flutter_ios.dart b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/lib/src/google_maps_flutter_ios.dart
index c0c8db0..11df181 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/lib/src/google_maps_flutter_ios.dart
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/lib/src/google_maps_flutter_ios.dart
@@ -714,57 +714,43 @@
switch (update.updateType) {
case CameraUpdateType.newCameraPosition:
update as CameraUpdateNewCameraPosition;
- return PlatformCameraUpdate(
- cameraUpdate: PlatformCameraUpdateNewCameraPosition(
- cameraPosition: _platformCameraPositionFromCameraPosition(update.cameraPosition),
- ),
+ return PlatformCameraUpdateNewCameraPosition(
+ cameraPosition: _platformCameraPositionFromCameraPosition(update.cameraPosition),
);
case CameraUpdateType.newLatLng:
update as CameraUpdateNewLatLng;
- return PlatformCameraUpdate(
- cameraUpdate: PlatformCameraUpdateNewLatLng(
- latLng: _platformLatLngFromLatLng(update.latLng),
- ),
- );
+ return PlatformCameraUpdateNewLatLng(latLng: _platformLatLngFromLatLng(update.latLng));
case CameraUpdateType.newLatLngZoom:
update as CameraUpdateNewLatLngZoom;
- return PlatformCameraUpdate(
- cameraUpdate: PlatformCameraUpdateNewLatLngZoom(
- latLng: _platformLatLngFromLatLng(update.latLng),
- zoom: update.zoom,
- ),
+ return PlatformCameraUpdateNewLatLngZoom(
+ latLng: _platformLatLngFromLatLng(update.latLng),
+ zoom: update.zoom,
);
case CameraUpdateType.newLatLngBounds:
update as CameraUpdateNewLatLngBounds;
- return PlatformCameraUpdate(
- cameraUpdate: PlatformCameraUpdateNewLatLngBounds(
- bounds: _platformLatLngBoundsFromLatLngBounds(update.bounds)!,
- padding: update.padding,
- ),
+ return PlatformCameraUpdateNewLatLngBounds(
+ bounds: _platformLatLngBoundsFromLatLngBounds(update.bounds)!,
+ padding: update.padding,
);
case CameraUpdateType.zoomTo:
update as CameraUpdateZoomTo;
- return PlatformCameraUpdate(cameraUpdate: PlatformCameraUpdateZoomTo(zoom: update.zoom));
+ return PlatformCameraUpdateZoomTo(zoom: update.zoom);
case CameraUpdateType.zoomBy:
update as CameraUpdateZoomBy;
final Offset? focus = update.focus;
- return PlatformCameraUpdate(
- cameraUpdate: PlatformCameraUpdateZoomBy(
- amount: update.amount,
- focus: focus == null ? null : _platformPointFromOffset(focus),
- ),
+ return PlatformCameraUpdateZoomBy(
+ amount: update.amount,
+ focus: focus == null ? null : _platformPointFromOffset(focus),
);
case CameraUpdateType.zoomIn:
update as CameraUpdateZoomIn;
- return PlatformCameraUpdate(cameraUpdate: PlatformCameraUpdateZoom(out: false));
+ return PlatformCameraUpdateZoom(out: false);
case CameraUpdateType.zoomOut:
update as CameraUpdateZoomOut;
- return PlatformCameraUpdate(cameraUpdate: PlatformCameraUpdateZoom(out: true));
+ return PlatformCameraUpdateZoom(out: true);
case CameraUpdateType.scrollBy:
update as CameraUpdateScrollBy;
- return PlatformCameraUpdate(
- cameraUpdate: PlatformCameraUpdateScrollBy(dx: update.dx, dy: update.dy),
- );
+ return PlatformCameraUpdateScrollBy(dx: update.dx, dy: update.dy);
}
}
@@ -816,51 +802,41 @@
static PlatformBitmap platformBitmapFromBitmapDescriptor(BitmapDescriptor bitmap) {
switch (bitmap) {
case final DefaultMarker marker:
- return PlatformBitmap(bitmap: PlatformBitmapDefaultMarker(hue: marker.hue?.toDouble()));
+ return PlatformBitmapDefaultMarker(hue: marker.hue?.toDouble());
// Clients may still use this deprecated format, so it must be supported.
// ignore: deprecated_member_use
case final BytesBitmap bytes:
final Size? size = bytes.size;
- return PlatformBitmap(
- bitmap: PlatformBitmapBytes(
- byteData: bytes.byteData,
- size: (size == null) ? null : _platformSizeFromSize(size),
- ),
+ return PlatformBitmapBytes(
+ byteData: bytes.byteData,
+ size: (size == null) ? null : _platformSizeFromSize(size),
);
case final AssetBitmap asset:
- return PlatformBitmap(
- bitmap: PlatformBitmapAsset(name: asset.name, pkg: asset.package),
- );
+ return PlatformBitmapAsset(name: asset.name, pkg: asset.package);
// Clients may still use this deprecated format, so it must be supported.
// ignore: deprecated_member_use
case final AssetImageBitmap asset:
final Size? size = asset.size;
- return PlatformBitmap(
- bitmap: PlatformBitmapAssetImage(
- name: asset.name,
- scale: asset.scale,
- size: (size == null) ? null : _platformSizeFromSize(size),
- ),
+ return PlatformBitmapAssetImage(
+ name: asset.name,
+ scale: asset.scale,
+ size: (size == null) ? null : _platformSizeFromSize(size),
);
case final AssetMapBitmap asset:
- return PlatformBitmap(
- bitmap: PlatformBitmapAssetMap(
- assetName: asset.assetName,
- bitmapScaling: platformMapBitmapScalingFromScaling(asset.bitmapScaling),
- imagePixelRatio: asset.imagePixelRatio,
- width: asset.width,
- height: asset.height,
- ),
+ return PlatformBitmapAssetMap(
+ assetName: asset.assetName,
+ bitmapScaling: platformMapBitmapScalingFromScaling(asset.bitmapScaling),
+ imagePixelRatio: asset.imagePixelRatio,
+ width: asset.width,
+ height: asset.height,
);
case final BytesMapBitmap bytes:
- return PlatformBitmap(
- bitmap: PlatformBitmapBytesMap(
- byteData: bytes.byteData,
- bitmapScaling: platformMapBitmapScalingFromScaling(bytes.bitmapScaling),
- imagePixelRatio: bytes.imagePixelRatio,
- width: bytes.width,
- height: bytes.height,
- ),
+ return PlatformBitmapBytesMap(
+ byteData: bytes.byteData,
+ bitmapScaling: platformMapBitmapScalingFromScaling(bytes.bitmapScaling),
+ imagePixelRatio: bytes.imagePixelRatio,
+ width: bytes.width,
+ height: bytes.height,
);
case final PinConfig pinConfig:
final PlatformColor? backgroundColor = pinConfig.backgroundColor != null
@@ -871,38 +847,30 @@
: null;
switch (pinConfig.glyph) {
case final CircleGlyph circleGlyph:
- return PlatformBitmap(
- bitmap: PlatformBitmapPinConfig(
- backgroundColor: backgroundColor,
- borderColor: borderColor,
- glyphColor: _platformColorFromColor(circleGlyph.color),
- ),
+ return PlatformBitmapPinConfig(
+ backgroundColor: backgroundColor,
+ borderColor: borderColor,
+ glyphColor: _platformColorFromColor(circleGlyph.color),
);
case final TextGlyph textGlyph:
- return PlatformBitmap(
- bitmap: PlatformBitmapPinConfig(
- backgroundColor: backgroundColor,
- borderColor: borderColor,
- glyphText: textGlyph.text,
- glyphTextColor: textGlyph.textColor != null
- ? _platformColorFromColor(textGlyph.textColor!)
- : null,
- ),
+ return PlatformBitmapPinConfig(
+ backgroundColor: backgroundColor,
+ borderColor: borderColor,
+ glyphText: textGlyph.text,
+ glyphTextColor: textGlyph.textColor != null
+ ? _platformColorFromColor(textGlyph.textColor!)
+ : null,
);
case final BitmapGlyph bitmapGlyph:
- return PlatformBitmap(
- bitmap: PlatformBitmapPinConfig(
- backgroundColor: backgroundColor,
- borderColor: borderColor,
- glyphBitmap: platformBitmapFromBitmapDescriptor(bitmapGlyph.bitmap),
- ),
+ return PlatformBitmapPinConfig(
+ backgroundColor: backgroundColor,
+ borderColor: borderColor,
+ glyphBitmap: platformBitmapFromBitmapDescriptor(bitmapGlyph.bitmap),
);
case null:
- return PlatformBitmap(
- bitmap: PlatformBitmapPinConfig(
- backgroundColor: backgroundColor,
- borderColor: borderColor,
- ),
+ return PlatformBitmapPinConfig(
+ backgroundColor: backgroundColor,
+ borderColor: borderColor,
);
}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/lib/src/messages.g.dart b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/lib/src/messages.g.dart
index ee3002a..0d4c1db 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/lib/src/messages.g.dart
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/lib/src/messages.g.dart
@@ -190,52 +190,10 @@
}
/// Pigeon representation of a CameraUpdate.
-class PlatformCameraUpdate {
- PlatformCameraUpdate({required this.cameraUpdate});
-
- /// This Object must be one of the classes below prefixed with
- /// PlatformCameraUpdate. Each such class represents a different type of
- /// camera update, and each holds a different set of data, preventing the
- /// use of a single unified class.
- Object cameraUpdate;
-
- List<Object?> _toList() {
- return <Object?>[cameraUpdate];
- }
-
- Object encode() {
- return _toList();
- }
-
- static PlatformCameraUpdate decode(Object result) {
- result as List<Object?>;
- return PlatformCameraUpdate(cameraUpdate: result[0]!);
- }
-
- @override
- // ignore: avoid_equals_and_hash_code_on_mutable_classes
- bool operator ==(Object other) {
- if (other is! PlatformCameraUpdate || other.runtimeType != runtimeType) {
- return false;
- }
- if (identical(this, other)) {
- return true;
- }
- return _deepEquals(cameraUpdate, other.cameraUpdate);
- }
-
- @override
- // ignore: avoid_equals_and_hash_code_on_mutable_classes
- int get hashCode => _deepHash(<Object?>[runtimeType, ..._toList()]);
-
- @override
- String toString() {
- return 'PlatformCameraUpdate(cameraUpdate: $cameraUpdate)';
- }
-}
+sealed class PlatformCameraUpdate {}
/// Pigeon equivalent of NewCameraPosition
-class PlatformCameraUpdateNewCameraPosition {
+class PlatformCameraUpdateNewCameraPosition extends PlatformCameraUpdate {
PlatformCameraUpdateNewCameraPosition({required this.cameraPosition});
PlatformCameraPosition cameraPosition;
@@ -278,7 +236,7 @@
}
/// Pigeon equivalent of NewLatLng
-class PlatformCameraUpdateNewLatLng {
+class PlatformCameraUpdateNewLatLng extends PlatformCameraUpdate {
PlatformCameraUpdateNewLatLng({required this.latLng});
PlatformLatLng latLng;
@@ -319,7 +277,7 @@
}
/// Pigeon equivalent of NewLatLngBounds
-class PlatformCameraUpdateNewLatLngBounds {
+class PlatformCameraUpdateNewLatLngBounds extends PlatformCameraUpdate {
PlatformCameraUpdateNewLatLngBounds({required this.bounds, required this.padding});
PlatformLatLngBounds bounds;
@@ -365,7 +323,7 @@
}
/// Pigeon equivalent of NewLatLngZoom
-class PlatformCameraUpdateNewLatLngZoom {
+class PlatformCameraUpdateNewLatLngZoom extends PlatformCameraUpdate {
PlatformCameraUpdateNewLatLngZoom({required this.latLng, required this.zoom});
PlatformLatLng latLng;
@@ -411,7 +369,7 @@
}
/// Pigeon equivalent of ScrollBy
-class PlatformCameraUpdateScrollBy {
+class PlatformCameraUpdateScrollBy extends PlatformCameraUpdate {
PlatformCameraUpdateScrollBy({required this.dx, required this.dy});
double dx;
@@ -454,7 +412,7 @@
}
/// Pigeon equivalent of ZoomBy
-class PlatformCameraUpdateZoomBy {
+class PlatformCameraUpdateZoomBy extends PlatformCameraUpdate {
PlatformCameraUpdateZoomBy({required this.amount, this.focus});
double amount;
@@ -500,7 +458,7 @@
}
/// Pigeon equivalent of ZoomIn/ZoomOut
-class PlatformCameraUpdateZoom {
+class PlatformCameraUpdateZoom extends PlatformCameraUpdate {
PlatformCameraUpdateZoom({required this.out});
bool out;
@@ -541,7 +499,7 @@
}
/// Pigeon equivalent of ZoomTo
-class PlatformCameraUpdateZoomTo {
+class PlatformCameraUpdateZoomTo extends PlatformCameraUpdate {
PlatformCameraUpdateZoomTo({required this.zoom});
double zoom;
@@ -2306,58 +2264,11 @@
}
}
-/// Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint
-/// types of [BitmapDescriptor], [PlatformBitmap] contains a single field which
-/// may hold the pigeon equivalent type of any of them.
-class PlatformBitmap {
- PlatformBitmap({required this.bitmap});
-
- /// One of [PlatformBitmapAssetMap], [PlatformBitmapAsset],
- /// [PlatformBitmapAssetImage], [PlatformBitmapBytesMap],
- /// [PlatformBitmapBytes], or [PlatformBitmapDefaultMarker].
- /// As Pigeon does not currently support data class inheritance, this
- /// approach allows for the different bitmap implementations to be valid
- /// argument and return types of the API methods. See
- /// https://github.com/flutter/flutter/issues/117819.
- Object bitmap;
-
- List<Object?> _toList() {
- return <Object?>[bitmap];
- }
-
- Object encode() {
- return _toList();
- }
-
- static PlatformBitmap decode(Object result) {
- result as List<Object?>;
- return PlatformBitmap(bitmap: result[0]!);
- }
-
- @override
- // ignore: avoid_equals_and_hash_code_on_mutable_classes
- bool operator ==(Object other) {
- if (other is! PlatformBitmap || other.runtimeType != runtimeType) {
- return false;
- }
- if (identical(this, other)) {
- return true;
- }
- return _deepEquals(bitmap, other.bitmap);
- }
-
- @override
- // ignore: avoid_equals_and_hash_code_on_mutable_classes
- int get hashCode => _deepHash(<Object?>[runtimeType, ..._toList()]);
-
- @override
- String toString() {
- return 'PlatformBitmap(bitmap: $bitmap)';
- }
-}
+/// Pigeon equivalent of [BitmapDescriptor].
+sealed class PlatformBitmap {}
/// Pigeon equivalent of [DefaultMarker].
-class PlatformBitmapDefaultMarker {
+class PlatformBitmapDefaultMarker extends PlatformBitmap {
PlatformBitmapDefaultMarker({this.hue});
double? hue;
@@ -2398,7 +2309,7 @@
}
/// Pigeon equivalent of [BytesBitmap].
-class PlatformBitmapBytes {
+class PlatformBitmapBytes extends PlatformBitmap {
PlatformBitmapBytes({required this.byteData, this.size});
Uint8List byteData;
@@ -2441,7 +2352,7 @@
}
/// Pigeon equivalent of [AssetBitmap].
-class PlatformBitmapAsset {
+class PlatformBitmapAsset extends PlatformBitmap {
PlatformBitmapAsset({required this.name, this.pkg});
String name;
@@ -2484,7 +2395,7 @@
}
/// Pigeon equivalent of [AssetImageBitmap].
-class PlatformBitmapAssetImage {
+class PlatformBitmapAssetImage extends PlatformBitmap {
PlatformBitmapAssetImage({required this.name, required this.scale, this.size});
String name;
@@ -2535,7 +2446,7 @@
}
/// Pigeon equivalent of [AssetMapBitmap].
-class PlatformBitmapAssetMap {
+class PlatformBitmapAssetMap extends PlatformBitmap {
PlatformBitmapAssetMap({
required this.assetName,
required this.bitmapScaling,
@@ -2600,7 +2511,7 @@
}
/// Pigeon equivalent of [BytesMapBitmap].
-class PlatformBitmapBytesMap {
+class PlatformBitmapBytesMap extends PlatformBitmap {
PlatformBitmapBytesMap({
required this.byteData,
required this.bitmapScaling,
@@ -2665,7 +2576,7 @@
}
/// Pigeon equivalent of [PinConfig].
-class PlatformBitmapPinConfig {
+class PlatformBitmapPinConfig extends PlatformBitmap {
PlatformBitmapPinConfig({
this.backgroundColor,
this.borderColor,
@@ -2769,131 +2680,125 @@
} else if (value is PlatformCameraPosition) {
buffer.putUint8(135);
writeValue(buffer, value.encode());
- } else if (value is PlatformCameraUpdate) {
+ } else if (value is PlatformCameraUpdateNewCameraPosition) {
buffer.putUint8(136);
writeValue(buffer, value.encode());
- } else if (value is PlatformCameraUpdateNewCameraPosition) {
+ } else if (value is PlatformCameraUpdateNewLatLng) {
buffer.putUint8(137);
writeValue(buffer, value.encode());
- } else if (value is PlatformCameraUpdateNewLatLng) {
+ } else if (value is PlatformCameraUpdateNewLatLngBounds) {
buffer.putUint8(138);
writeValue(buffer, value.encode());
- } else if (value is PlatformCameraUpdateNewLatLngBounds) {
+ } else if (value is PlatformCameraUpdateNewLatLngZoom) {
buffer.putUint8(139);
writeValue(buffer, value.encode());
- } else if (value is PlatformCameraUpdateNewLatLngZoom) {
+ } else if (value is PlatformCameraUpdateScrollBy) {
buffer.putUint8(140);
writeValue(buffer, value.encode());
- } else if (value is PlatformCameraUpdateScrollBy) {
+ } else if (value is PlatformCameraUpdateZoomBy) {
buffer.putUint8(141);
writeValue(buffer, value.encode());
- } else if (value is PlatformCameraUpdateZoomBy) {
+ } else if (value is PlatformCameraUpdateZoom) {
buffer.putUint8(142);
writeValue(buffer, value.encode());
- } else if (value is PlatformCameraUpdateZoom) {
+ } else if (value is PlatformCameraUpdateZoomTo) {
buffer.putUint8(143);
writeValue(buffer, value.encode());
- } else if (value is PlatformCameraUpdateZoomTo) {
+ } else if (value is PlatformCircle) {
buffer.putUint8(144);
writeValue(buffer, value.encode());
- } else if (value is PlatformCircle) {
+ } else if (value is PlatformHeatmap) {
buffer.putUint8(145);
writeValue(buffer, value.encode());
- } else if (value is PlatformHeatmap) {
+ } else if (value is PlatformHeatmapGradient) {
buffer.putUint8(146);
writeValue(buffer, value.encode());
- } else if (value is PlatformHeatmapGradient) {
+ } else if (value is PlatformWeightedLatLng) {
buffer.putUint8(147);
writeValue(buffer, value.encode());
- } else if (value is PlatformWeightedLatLng) {
+ } else if (value is PlatformInfoWindow) {
buffer.putUint8(148);
writeValue(buffer, value.encode());
- } else if (value is PlatformInfoWindow) {
+ } else if (value is PlatformCluster) {
buffer.putUint8(149);
writeValue(buffer, value.encode());
- } else if (value is PlatformCluster) {
+ } else if (value is PlatformClusterManager) {
buffer.putUint8(150);
writeValue(buffer, value.encode());
- } else if (value is PlatformClusterManager) {
+ } else if (value is PlatformMarker) {
buffer.putUint8(151);
writeValue(buffer, value.encode());
- } else if (value is PlatformMarker) {
+ } else if (value is PlatformPolygon) {
buffer.putUint8(152);
writeValue(buffer, value.encode());
- } else if (value is PlatformPolygon) {
+ } else if (value is PlatformPolyline) {
buffer.putUint8(153);
writeValue(buffer, value.encode());
- } else if (value is PlatformPolyline) {
+ } else if (value is PlatformPatternItem) {
buffer.putUint8(154);
writeValue(buffer, value.encode());
- } else if (value is PlatformPatternItem) {
+ } else if (value is PlatformTile) {
buffer.putUint8(155);
writeValue(buffer, value.encode());
- } else if (value is PlatformTile) {
+ } else if (value is PlatformTileOverlay) {
buffer.putUint8(156);
writeValue(buffer, value.encode());
- } else if (value is PlatformTileOverlay) {
+ } else if (value is PlatformEdgeInsets) {
buffer.putUint8(157);
writeValue(buffer, value.encode());
- } else if (value is PlatformEdgeInsets) {
+ } else if (value is PlatformLatLng) {
buffer.putUint8(158);
writeValue(buffer, value.encode());
- } else if (value is PlatformLatLng) {
+ } else if (value is PlatformLatLngBounds) {
buffer.putUint8(159);
writeValue(buffer, value.encode());
- } else if (value is PlatformLatLngBounds) {
+ } else if (value is PlatformCameraTargetBounds) {
buffer.putUint8(160);
writeValue(buffer, value.encode());
- } else if (value is PlatformCameraTargetBounds) {
+ } else if (value is PlatformGroundOverlay) {
buffer.putUint8(161);
writeValue(buffer, value.encode());
- } else if (value is PlatformGroundOverlay) {
+ } else if (value is PlatformMapViewCreationParams) {
buffer.putUint8(162);
writeValue(buffer, value.encode());
- } else if (value is PlatformMapViewCreationParams) {
+ } else if (value is PlatformMapConfiguration) {
buffer.putUint8(163);
writeValue(buffer, value.encode());
- } else if (value is PlatformMapConfiguration) {
+ } else if (value is PlatformPoint) {
buffer.putUint8(164);
writeValue(buffer, value.encode());
- } else if (value is PlatformPoint) {
+ } else if (value is PlatformSize) {
buffer.putUint8(165);
writeValue(buffer, value.encode());
- } else if (value is PlatformSize) {
+ } else if (value is PlatformColor) {
buffer.putUint8(166);
writeValue(buffer, value.encode());
- } else if (value is PlatformColor) {
+ } else if (value is PlatformTileLayer) {
buffer.putUint8(167);
writeValue(buffer, value.encode());
- } else if (value is PlatformTileLayer) {
+ } else if (value is PlatformZoomRange) {
buffer.putUint8(168);
writeValue(buffer, value.encode());
- } else if (value is PlatformZoomRange) {
+ } else if (value is PlatformBitmapDefaultMarker) {
buffer.putUint8(169);
writeValue(buffer, value.encode());
- } else if (value is PlatformBitmap) {
+ } else if (value is PlatformBitmapBytes) {
buffer.putUint8(170);
writeValue(buffer, value.encode());
- } else if (value is PlatformBitmapDefaultMarker) {
+ } else if (value is PlatformBitmapAsset) {
buffer.putUint8(171);
writeValue(buffer, value.encode());
- } else if (value is PlatformBitmapBytes) {
+ } else if (value is PlatformBitmapAssetImage) {
buffer.putUint8(172);
writeValue(buffer, value.encode());
- } else if (value is PlatformBitmapAsset) {
+ } else if (value is PlatformBitmapAssetMap) {
buffer.putUint8(173);
writeValue(buffer, value.encode());
- } else if (value is PlatformBitmapAssetImage) {
+ } else if (value is PlatformBitmapBytesMap) {
buffer.putUint8(174);
writeValue(buffer, value.encode());
- } else if (value is PlatformBitmapAssetMap) {
- buffer.putUint8(175);
- writeValue(buffer, value.encode());
- } else if (value is PlatformBitmapBytesMap) {
- buffer.putUint8(176);
- writeValue(buffer, value.encode());
} else if (value is PlatformBitmapPinConfig) {
- buffer.putUint8(177);
+ buffer.putUint8(175);
writeValue(buffer, value.encode());
} else {
super.writeValue(buffer, value);
@@ -2924,88 +2829,84 @@
case 135:
return PlatformCameraPosition.decode(readValue(buffer)!);
case 136:
- return PlatformCameraUpdate.decode(readValue(buffer)!);
- case 137:
return PlatformCameraUpdateNewCameraPosition.decode(readValue(buffer)!);
- case 138:
+ case 137:
return PlatformCameraUpdateNewLatLng.decode(readValue(buffer)!);
- case 139:
+ case 138:
return PlatformCameraUpdateNewLatLngBounds.decode(readValue(buffer)!);
- case 140:
+ case 139:
return PlatformCameraUpdateNewLatLngZoom.decode(readValue(buffer)!);
- case 141:
+ case 140:
return PlatformCameraUpdateScrollBy.decode(readValue(buffer)!);
- case 142:
+ case 141:
return PlatformCameraUpdateZoomBy.decode(readValue(buffer)!);
- case 143:
+ case 142:
return PlatformCameraUpdateZoom.decode(readValue(buffer)!);
- case 144:
+ case 143:
return PlatformCameraUpdateZoomTo.decode(readValue(buffer)!);
- case 145:
+ case 144:
return PlatformCircle.decode(readValue(buffer)!);
- case 146:
+ case 145:
return PlatformHeatmap.decode(readValue(buffer)!);
- case 147:
+ case 146:
return PlatformHeatmapGradient.decode(readValue(buffer)!);
- case 148:
+ case 147:
return PlatformWeightedLatLng.decode(readValue(buffer)!);
- case 149:
+ case 148:
return PlatformInfoWindow.decode(readValue(buffer)!);
- case 150:
+ case 149:
return PlatformCluster.decode(readValue(buffer)!);
- case 151:
+ case 150:
return PlatformClusterManager.decode(readValue(buffer)!);
- case 152:
+ case 151:
return PlatformMarker.decode(readValue(buffer)!);
- case 153:
+ case 152:
return PlatformPolygon.decode(readValue(buffer)!);
- case 154:
+ case 153:
return PlatformPolyline.decode(readValue(buffer)!);
- case 155:
+ case 154:
return PlatformPatternItem.decode(readValue(buffer)!);
- case 156:
+ case 155:
return PlatformTile.decode(readValue(buffer)!);
- case 157:
+ case 156:
return PlatformTileOverlay.decode(readValue(buffer)!);
- case 158:
+ case 157:
return PlatformEdgeInsets.decode(readValue(buffer)!);
- case 159:
+ case 158:
return PlatformLatLng.decode(readValue(buffer)!);
- case 160:
+ case 159:
return PlatformLatLngBounds.decode(readValue(buffer)!);
- case 161:
+ case 160:
return PlatformCameraTargetBounds.decode(readValue(buffer)!);
- case 162:
+ case 161:
return PlatformGroundOverlay.decode(readValue(buffer)!);
- case 163:
+ case 162:
return PlatformMapViewCreationParams.decode(readValue(buffer)!);
- case 164:
+ case 163:
return PlatformMapConfiguration.decode(readValue(buffer)!);
- case 165:
+ case 164:
return PlatformPoint.decode(readValue(buffer)!);
- case 166:
+ case 165:
return PlatformSize.decode(readValue(buffer)!);
- case 167:
+ case 166:
return PlatformColor.decode(readValue(buffer)!);
- case 168:
+ case 167:
return PlatformTileLayer.decode(readValue(buffer)!);
- case 169:
+ case 168:
return PlatformZoomRange.decode(readValue(buffer)!);
- case 170:
- return PlatformBitmap.decode(readValue(buffer)!);
- case 171:
+ case 169:
return PlatformBitmapDefaultMarker.decode(readValue(buffer)!);
- case 172:
+ case 170:
return PlatformBitmapBytes.decode(readValue(buffer)!);
- case 173:
+ case 171:
return PlatformBitmapAsset.decode(readValue(buffer)!);
- case 174:
+ case 172:
return PlatformBitmapAssetImage.decode(readValue(buffer)!);
- case 175:
+ case 173:
return PlatformBitmapAssetMap.decode(readValue(buffer)!);
- case 176:
+ case 174:
return PlatformBitmapBytesMap.decode(readValue(buffer)!);
- case 177:
+ case 175:
return PlatformBitmapPinConfig.decode(readValue(buffer)!);
default:
return super.readValueOfType(type, buffer);
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/pigeons/messages.dart b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/pigeons/messages.dart
index ff2d091..a9f2eae 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/pigeons/messages.dart
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/pigeons/messages.dart
@@ -7,14 +7,8 @@
@ConfigurePigeon(
PigeonOptions(
dartOut: 'lib/src/messages.g.dart',
- // This uses a different output name to avoid conflicts with the pigeon
- // files in other packages, without having to use full relative paths
- // in #includes (which would make source sharing harder to manage).
- objcHeaderOut:
- 'ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9_objc/include/google_maps_flutter_ios_sdk9_objc/google_maps_flutter_pigeon_messages.g.h',
- objcSourceOut:
- 'ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9_objc/google_maps_flutter_pigeon_messages.g.m',
- objcOptions: ObjcOptions(prefix: 'FGM'),
+ swiftOut:
+ 'ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9/Messages.g.swift',
copyrightHeader: 'pigeons/copyright.txt',
// Use the base package name so that the generated code can be shared
// across the implementation copies.
@@ -40,66 +34,56 @@
}
/// Pigeon representation of a CameraUpdate.
-class PlatformCameraUpdate {
- PlatformCameraUpdate(this.cameraUpdate);
-
- /// This Object must be one of the classes below prefixed with
- /// PlatformCameraUpdate. Each such class represents a different type of
- /// camera update, and each holds a different set of data, preventing the
- /// use of a single unified class.
- // Pigeon does not support inheritance, which prevents a more strict type
- // bound. See https://github.com/flutter/flutter/issues/117819.
- final Object cameraUpdate;
-}
+sealed class PlatformCameraUpdate {}
/// Pigeon equivalent of NewCameraPosition
-class PlatformCameraUpdateNewCameraPosition {
+class PlatformCameraUpdateNewCameraPosition extends PlatformCameraUpdate {
PlatformCameraUpdateNewCameraPosition(this.cameraPosition);
final PlatformCameraPosition cameraPosition;
}
/// Pigeon equivalent of NewLatLng
-class PlatformCameraUpdateNewLatLng {
+class PlatformCameraUpdateNewLatLng extends PlatformCameraUpdate {
PlatformCameraUpdateNewLatLng(this.latLng);
final PlatformLatLng latLng;
}
/// Pigeon equivalent of NewLatLngBounds
-class PlatformCameraUpdateNewLatLngBounds {
+class PlatformCameraUpdateNewLatLngBounds extends PlatformCameraUpdate {
PlatformCameraUpdateNewLatLngBounds(this.bounds, this.padding);
final PlatformLatLngBounds bounds;
final double padding;
}
/// Pigeon equivalent of NewLatLngZoom
-class PlatformCameraUpdateNewLatLngZoom {
+class PlatformCameraUpdateNewLatLngZoom extends PlatformCameraUpdate {
PlatformCameraUpdateNewLatLngZoom(this.latLng, this.zoom);
final PlatformLatLng latLng;
final double zoom;
}
/// Pigeon equivalent of ScrollBy
-class PlatformCameraUpdateScrollBy {
+class PlatformCameraUpdateScrollBy extends PlatformCameraUpdate {
PlatformCameraUpdateScrollBy(this.dx, this.dy);
final double dx;
final double dy;
}
/// Pigeon equivalent of ZoomBy
-class PlatformCameraUpdateZoomBy {
+class PlatformCameraUpdateZoomBy extends PlatformCameraUpdate {
PlatformCameraUpdateZoomBy(this.amount, [this.focus]);
final double amount;
final PlatformPoint? focus;
}
/// Pigeon equivalent of ZoomIn/ZoomOut
-class PlatformCameraUpdateZoom {
+class PlatformCameraUpdateZoom extends PlatformCameraUpdate {
PlatformCameraUpdateZoom(this.out);
final bool out;
}
/// Pigeon equivalent of ZoomTo
-class PlatformCameraUpdateZoomTo {
+class PlatformCameraUpdateZoomTo extends PlatformCameraUpdate {
PlatformCameraUpdateZoomTo(this.zoom);
final double zoom;
}
@@ -541,31 +525,18 @@
final double? max;
}
-/// Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint
-/// types of [BitmapDescriptor], [PlatformBitmap] contains a single field which
-/// may hold the pigeon equivalent type of any of them.
-class PlatformBitmap {
- PlatformBitmap({required this.bitmap});
-
- /// One of [PlatformBitmapAssetMap], [PlatformBitmapAsset],
- /// [PlatformBitmapAssetImage], [PlatformBitmapBytesMap],
- /// [PlatformBitmapBytes], or [PlatformBitmapDefaultMarker].
- /// As Pigeon does not currently support data class inheritance, this
- /// approach allows for the different bitmap implementations to be valid
- /// argument and return types of the API methods. See
- /// https://github.com/flutter/flutter/issues/117819.
- final Object bitmap;
-}
+/// Pigeon equivalent of [BitmapDescriptor].
+sealed class PlatformBitmap {}
/// Pigeon equivalent of [DefaultMarker].
-class PlatformBitmapDefaultMarker {
+class PlatformBitmapDefaultMarker extends PlatformBitmap {
PlatformBitmapDefaultMarker({this.hue});
final double? hue;
}
/// Pigeon equivalent of [BytesBitmap].
-class PlatformBitmapBytes {
+class PlatformBitmapBytes extends PlatformBitmap {
PlatformBitmapBytes({required this.byteData, this.size});
final Uint8List byteData;
@@ -573,7 +544,7 @@
}
/// Pigeon equivalent of [AssetBitmap].
-class PlatformBitmapAsset {
+class PlatformBitmapAsset extends PlatformBitmap {
PlatformBitmapAsset({required this.name, this.pkg});
final String name;
@@ -581,7 +552,7 @@
}
/// Pigeon equivalent of [AssetImageBitmap].
-class PlatformBitmapAssetImage {
+class PlatformBitmapAssetImage extends PlatformBitmap {
PlatformBitmapAssetImage({required this.name, required this.scale, this.size});
final String name;
final double scale;
@@ -589,7 +560,7 @@
}
/// Pigeon equivalent of [AssetMapBitmap].
-class PlatformBitmapAssetMap {
+class PlatformBitmapAssetMap extends PlatformBitmap {
PlatformBitmapAssetMap({
required this.assetName,
required this.bitmapScaling,
@@ -605,7 +576,7 @@
}
/// Pigeon equivalent of [BytesMapBitmap].
-class PlatformBitmapBytesMap {
+class PlatformBitmapBytesMap extends PlatformBitmap {
PlatformBitmapBytesMap({
required this.byteData,
required this.bitmapScaling,
@@ -624,7 +595,7 @@
enum PlatformMapBitmapScaling { auto, none }
/// Pigeon equivalent of [PinConfig].
-class PlatformBitmapPinConfig {
+class PlatformBitmapPinConfig extends PlatformBitmap {
PlatformBitmapPinConfig({
required this.backgroundColor,
required this.borderColor,
@@ -655,11 +626,11 @@
///
/// Only non-null configuration values will result in updates; options with
/// null values will remain unchanged.
- @ObjCSelector('updateWithMapConfiguration:')
+ @SwiftFunction('updateWithMapConfiguration(_:)')
void updateMapConfiguration(PlatformMapConfiguration configuration);
/// Updates the set of circles on the map.
- @ObjCSelector('updateCirclesByAdding:changing:removing:')
+ @SwiftFunction('updateCircles(adding:changing:removing:)')
void updateCircles(
List<PlatformCircle> toAdd,
List<PlatformCircle> toChange,
@@ -667,7 +638,7 @@
);
/// Updates the set of heatmaps on the map.
- @ObjCSelector('updateHeatmapsByAdding:changing:removing:')
+ @SwiftFunction('updateHeatmaps(adding:changing:removing:)')
void updateHeatmaps(
List<PlatformHeatmap> toAdd,
List<PlatformHeatmap> toChange,
@@ -675,11 +646,11 @@
);
/// Updates the set of custer managers for clusters on the map.
- @ObjCSelector('updateClusterManagersByAdding:removing:')
+ @SwiftFunction('updateClusterManagers(adding:removing:)')
void updateClusterManagers(List<PlatformClusterManager> toAdd, List<String> idsToRemove);
/// Updates the set of markers on the map.
- @ObjCSelector('updateMarkersByAdding:changing:removing:')
+ @SwiftFunction('updateMarkers(adding:changing:removing:)')
void updateMarkers(
List<PlatformMarker> toAdd,
List<PlatformMarker> toChange,
@@ -687,7 +658,7 @@
);
/// Updates the set of polygonss on the map.
- @ObjCSelector('updatePolygonsByAdding:changing:removing:')
+ @SwiftFunction('updatePolygons(adding:changing:removing:)')
void updatePolygons(
List<PlatformPolygon> toAdd,
List<PlatformPolygon> toChange,
@@ -695,7 +666,7 @@
);
/// Updates the set of polylines on the map.
- @ObjCSelector('updatePolylinesByAdding:changing:removing:')
+ @SwiftFunction('updatePolylines(adding:changing:removing:)')
void updatePolylines(
List<PlatformPolyline> toAdd,
List<PlatformPolyline> toChange,
@@ -703,7 +674,7 @@
);
/// Updates the set of tile overlays on the map.
- @ObjCSelector('updateTileOverlaysByAdding:changing:removing:')
+ @SwiftFunction('updateTileOverlays(adding:changing:removing:)')
void updateTileOverlays(
List<PlatformTileOverlay> toAdd,
List<PlatformTileOverlay> toChange,
@@ -711,7 +682,7 @@
);
/// Updates the set of ground overlays on the map.
- @ObjCSelector('updateGroundOverlaysByAdding:changing:removing:')
+ @SwiftFunction('updateGroundOverlays(adding:changing:removing:)')
void updateGroundOverlays(
List<PlatformGroundOverlay> toAdd,
List<PlatformGroundOverlay> toChange,
@@ -719,42 +690,42 @@
);
/// Gets the screen coordinate for the given map location.
- @ObjCSelector('screenCoordinatesForLatLng:')
+ @SwiftFunction('screenCoordinates(for:)')
PlatformPoint getScreenCoordinate(PlatformLatLng latLng);
/// Gets the map location for the given screen coordinate.
- @ObjCSelector('latLngForScreenCoordinate:')
+ @SwiftFunction('latLng(for:)')
PlatformLatLng getLatLng(PlatformPoint screenCoordinate);
/// Gets the map region currently displayed on the map.
- @ObjCSelector('visibleMapRegion')
+ @SwiftFunction('visibleMapRegion()')
PlatformLatLngBounds getVisibleRegion();
/// Moves the camera according to [cameraUpdate] immediately, with no
/// animation.
- @ObjCSelector('moveCameraWithUpdate:')
+ @SwiftFunction('moveCamera(_:)')
void moveCamera(PlatformCameraUpdate cameraUpdate);
/// Moves the camera according to [cameraUpdate], animating the update using a
/// duration in milliseconds if provided.
- @ObjCSelector('animateCameraWithUpdate:duration:')
+ @SwiftFunction('animateCamera(_:duration:)')
void animateCamera(PlatformCameraUpdate cameraUpdate, int? durationMilliseconds);
/// Gets the current map zoom level.
- @ObjCSelector('currentZoomLevel')
+ @SwiftFunction('zoomLevel()')
double getZoomLevel();
/// Show the info window for the marker with the given ID.
- @ObjCSelector('showInfoWindowForMarkerWithIdentifier:')
+ @SwiftFunction('showInfoWindowForMarker(withIdentifier:)')
void showInfoWindow(String markerId);
/// Hide the info window for the marker with the given ID.
- @ObjCSelector('hideInfoWindowForMarkerWithIdentifier:')
+ @SwiftFunction('hideInfoWindowForMarker(withIdentifier:)')
void hideInfoWindow(String markerId);
/// Returns true if the marker with the given ID is currently displaying its
/// info window.
- @ObjCSelector('isShowingInfoWindowForMarkerWithIdentifier:')
+ @SwiftFunction('isShowingInfoWindowForMarker(withIdentifier:)')
bool isInfoWindowShown(String markerId);
/// Sets the style to the given map style string, where an empty string
@@ -762,7 +733,7 @@
///
/// If there was an error setting the style, such as an invalid style string,
/// returns the error message.
- @ObjCSelector('setStyle:')
+ @SwiftFunction('setStyle(_:)')
String? setStyle(String style);
/// Returns the error string from the last attempt to set the map style, if
@@ -770,18 +741,18 @@
///
/// This allows checking asynchronously for initial style failures, as there
/// is no way to return failures from map initialization.
- @ObjCSelector('lastStyleError')
+ @SwiftFunction('lastStyleError()')
String? getLastStyleError();
/// Clears the cache of tiles previously requseted from the tile provider.
- @ObjCSelector('clearTileCacheForOverlayWithIdentifier:')
+ @SwiftFunction('clearTileCacheForOverlay(withIdentifier:)')
void clearTileCache(String tileOverlayId);
/// Takes a snapshot of the map and returns its image data.
Uint8List? takeSnapshot();
/// Returns true if the map supports advanced markers.
- @ObjCSelector('isAdvancedMarkersAvailable')
+ @SwiftFunction('isAdvancedMarkersAvailable()')
bool isAdvancedMarkersAvailable();
}
@@ -789,68 +760,68 @@
@FlutterApi()
abstract class MapsCallbackApi {
/// Called when the map camera starts moving.
- @ObjCSelector('didStartCameraMoveWithCompletion')
+ @SwiftFunction('didStartCameraMove()')
void onCameraMoveStarted();
/// Called when the map camera moves.
- @ObjCSelector('didMoveCameraToPosition:')
+ @SwiftFunction('didMoveCamera(to:)')
void onCameraMove(PlatformCameraPosition cameraPosition);
/// Called when the map camera stops moving.
- @ObjCSelector('didIdleCameraWithCompletion')
+ @SwiftFunction('didIdleCamera()')
void onCameraIdle();
/// Called when the map, not a specifc map object, is tapped.
- @ObjCSelector('didTapAtPosition:')
+ @SwiftFunction('didTap(at:)')
void onTap(PlatformLatLng position);
/// Called when the map, not a specifc map object, is long pressed.
- @ObjCSelector('didLongPressAtPosition:')
+ @SwiftFunction('didLongPress(at:)')
void onLongPress(PlatformLatLng position);
/// Called when a marker is tapped.
- @ObjCSelector('didTapMarkerWithIdentifier:')
+ @SwiftFunction('didTapMarker(withIdentifier:)')
void onMarkerTap(String markerId);
/// Called when a marker drag starts.
- @ObjCSelector('didStartDragForMarkerWithIdentifier:atPosition:')
+ @SwiftFunction('didStartDragForMarker(withIdentifier:at:)')
void onMarkerDragStart(String markerId, PlatformLatLng position);
/// Called when a marker drag updates.
- @ObjCSelector('didDragMarkerWithIdentifier:atPosition:')
+ @SwiftFunction('didDragMarker(withIdentifier:at:)')
void onMarkerDrag(String markerId, PlatformLatLng position);
/// Called when a marker drag ends.
- @ObjCSelector('didEndDragForMarkerWithIdentifier:atPosition:')
+ @SwiftFunction('didEndDragForMarker(withIdentifier:at:)')
void onMarkerDragEnd(String markerId, PlatformLatLng position);
/// Called when a marker's info window is tapped.
- @ObjCSelector('didTapInfoWindowOfMarkerWithIdentifier:')
+ @SwiftFunction('didTapInfoWindowOfMarker(withIdentifier:)')
void onInfoWindowTap(String markerId);
/// Called when a circle is tapped.
- @ObjCSelector('didTapCircleWithIdentifier:')
+ @SwiftFunction('didTapCircle(withIdentifier:)')
void onCircleTap(String circleId);
/// Called when a marker cluster is tapped.
- @ObjCSelector('didTapCluster:')
+ @SwiftFunction('didTapCluster(_:)')
void onClusterTap(PlatformCluster cluster);
/// Called when a polygon is tapped.
- @ObjCSelector('didTapPolygonWithIdentifier:')
+ @SwiftFunction('didTapPolygon(withIdentifier:)')
void onPolygonTap(String polygonId);
/// Called when a polyline is tapped.
- @ObjCSelector('didTapPolylineWithIdentifier:')
+ @SwiftFunction('didTapPolyline(withIdentifier:)')
void onPolylineTap(String polylineId);
/// Called when a ground overlay is tapped.
- @ObjCSelector('didTapGroundOverlayWithIdentifier:')
+ @SwiftFunction('didTapGroundOverlay(withIdentifier:)')
void onGroundOverlayTap(String groundOverlayId);
/// Called to get data for a map tile.
@async
- @ObjCSelector('tileWithOverlayIdentifier:location:zoom:')
+ @SwiftFunction('tile(withOverlayIdentifier:location:zoom:)')
PlatformTile getTileOverlayTile(String tileOverlayId, PlatformPoint location, int zoom);
}
@@ -874,16 +845,16 @@
bool isCompassEnabled();
bool isMyLocationButtonEnabled();
bool isTrafficEnabled();
- @ObjCSelector('tileOverlayWithIdentifier:')
+ @SwiftFunction('tileOverlay(withIdentifier:)')
PlatformTileLayer? getTileOverlayInfo(String tileOverlayId);
- @ObjCSelector('groundOverlayWithIdentifier:')
+ @SwiftFunction('groundOverlay(withIdentifier:)')
PlatformGroundOverlay? getGroundOverlayInfo(String groundOverlayId);
- @ObjCSelector('heatmapWithIdentifier:')
+ @SwiftFunction('heatmap(withIdentifier:)')
PlatformHeatmap? getHeatmapInfo(String heatmapId);
- @ObjCSelector('zoomRange')
+ @SwiftFunction('zoomRange()')
PlatformZoomRange getZoomRange();
- @ObjCSelector('clustersWithIdentifier:')
+ @SwiftFunction('clusters(withIdentifier:)')
List<PlatformCluster> getClusters(String clusterManagerId);
- @ObjCSelector('cameraPosition')
+ @SwiftFunction('cameraPosition()')
PlatformCameraPosition getCameraPosition();
}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/pubspec.yaml
index b1ad887..7e0ae8b 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/pubspec.yaml
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/pubspec.yaml
@@ -2,7 +2,7 @@
description: iOS implementation of the google_maps_flutter plugin using Google Maps SDK 9.
repository: https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter_ios_sdk9
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22
-version: 2.18.12
+version: 2.18.13
environment:
sdk: ^3.10.0
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/test/google_maps_flutter_ios_test.dart b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/test/google_maps_flutter_ios_test.dart
index da996d1..6d21a3e 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/test/google_maps_flutter_ios_test.dart
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/test/google_maps_flutter_ios_test.dart
@@ -115,7 +115,7 @@
final VerificationResult verification = verify(api.moveCamera(captureAny));
final passedUpdate = verification.captured[0] as PlatformCameraUpdate;
- final scroll = passedUpdate.cameraUpdate as PlatformCameraUpdateScrollBy;
+ final scroll = passedUpdate as PlatformCameraUpdateScrollBy;
update as CameraUpdateScrollBy;
expect(scroll.dx, update.dx);
expect(scroll.dy, update.dy);
@@ -130,7 +130,7 @@
final VerificationResult verification = verify(api.animateCamera(captureAny, captureAny));
final passedUpdate = verification.captured[0] as PlatformCameraUpdate;
- final scroll = passedUpdate.cameraUpdate as PlatformCameraUpdateScrollBy;
+ final scroll = passedUpdate as PlatformCameraUpdateScrollBy;
update as CameraUpdateScrollBy;
expect(scroll.dx, update.dx);
expect(scroll.dy, update.dy);
@@ -148,7 +148,7 @@
final VerificationResult verification = verify(api.animateCamera(captureAny, captureAny));
final passedUpdate = verification.captured[0] as PlatformCameraUpdate;
- final scroll = passedUpdate.cameraUpdate as PlatformCameraUpdateScrollBy;
+ final scroll = passedUpdate as PlatformCameraUpdateScrollBy;
update as CameraUpdateScrollBy;
expect(scroll.dx, update.dx);
expect(scroll.dy, update.dy);
@@ -415,8 +415,8 @@
expect(firstChanged.draggable, object2new.draggable);
expect(firstChanged.flat, object2new.flat);
expect(
- firstChanged.icon.bitmap.runtimeType,
- GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(object2new.icon).bitmap.runtimeType,
+ firstChanged.icon.runtimeType,
+ GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(object2new.icon).runtimeType,
);
expect(firstChanged.infoWindow.title, object2new.infoWindow.title);
expect(firstChanged.infoWindow.snippet, object2new.infoWindow.snippet);
@@ -441,8 +441,8 @@
expect(firstAdded.draggable, object3.draggable);
expect(firstAdded.flat, object3.flat);
expect(
- firstAdded.icon.bitmap.runtimeType,
- GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(object3.icon).bitmap.runtimeType,
+ firstAdded.icon.runtimeType,
+ GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(object3.icon).runtimeType,
);
expect(firstAdded.infoWindow.title, object3.infoWindow.title);
expect(firstAdded.infoWindow.snippet, object3.infoWindow.snippet);
@@ -500,8 +500,8 @@
expect(firstChanged.draggable, object2new.draggable);
expect(firstChanged.flat, object2new.flat);
expect(
- firstChanged.icon.bitmap.runtimeType,
- GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(object2new.icon).bitmap.runtimeType,
+ firstChanged.icon.runtimeType,
+ GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(object2new.icon).runtimeType,
);
expect(firstChanged.infoWindow.title, object2new.infoWindow.title);
expect(firstChanged.infoWindow.snippet, object2new.infoWindow.snippet);
@@ -532,8 +532,8 @@
expect(firstAdded.draggable, object3.draggable);
expect(firstAdded.flat, object3.flat);
expect(
- firstAdded.icon.bitmap.runtimeType,
- GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(object3.icon).bitmap.runtimeType,
+ firstAdded.icon.runtimeType,
+ GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(object3.icon).runtimeType,
);
expect(firstAdded.infoWindow.title, object3.infoWindow.title);
expect(firstAdded.infoWindow.snippet, object3.infoWindow.snippet);
@@ -789,10 +789,8 @@
expect(firstChanged.zoomLevel, object2new.zoomLevel);
expect(firstChanged.transparency, object2new.transparency);
expect(
- firstChanged.image.bitmap.runtimeType,
- GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(
- object2new.image,
- ).bitmap.runtimeType,
+ firstChanged.image.runtimeType,
+ GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(object2new.image).runtimeType,
);
}
// Object three should be added.
@@ -814,8 +812,8 @@
expect(firstAdded.zoomLevel, object3.zoomLevel);
expect(firstAdded.transparency, object3.transparency);
expect(
- firstAdded.image.bitmap.runtimeType,
- GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(object3.image).bitmap.runtimeType,
+ firstAdded.image.runtimeType,
+ GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(object3.image).runtimeType,
);
}
});
@@ -997,7 +995,7 @@
final VerificationResult verification = verify(api.moveCamera(captureAny));
final passedUpdate = verification.captured[0] as PlatformCameraUpdate;
- final typedUpdate = passedUpdate.cameraUpdate as PlatformCameraUpdateNewCameraPosition;
+ final typedUpdate = passedUpdate as PlatformCameraUpdateNewCameraPosition;
update as CameraUpdateNewCameraPosition;
expect(typedUpdate.cameraPosition.target.latitude, update.cameraPosition.target.latitude);
expect(typedUpdate.cameraPosition.target.longitude, update.cameraPosition.target.longitude);
@@ -1013,7 +1011,7 @@
final VerificationResult verification = verify(api.moveCamera(captureAny));
final passedUpdate = verification.captured[0] as PlatformCameraUpdate;
- final typedUpdate = passedUpdate.cameraUpdate as PlatformCameraUpdateNewLatLng;
+ final typedUpdate = passedUpdate as PlatformCameraUpdateNewLatLng;
update as CameraUpdateNewLatLng;
expect(typedUpdate.latLng.latitude, update.latLng.latitude);
expect(typedUpdate.latLng.longitude, update.latLng.longitude);
@@ -1032,7 +1030,7 @@
final VerificationResult verification = verify(api.moveCamera(captureAny));
final passedUpdate = verification.captured[0] as PlatformCameraUpdate;
- final typedUpdate = passedUpdate.cameraUpdate as PlatformCameraUpdateNewLatLngBounds;
+ final typedUpdate = passedUpdate as PlatformCameraUpdateNewLatLngBounds;
update as CameraUpdateNewLatLngBounds;
expect(typedUpdate.bounds.northeast.latitude, update.bounds.northeast.latitude);
expect(typedUpdate.bounds.northeast.longitude, update.bounds.northeast.longitude);
@@ -1051,7 +1049,7 @@
final VerificationResult verification = verify(api.moveCamera(captureAny));
final passedUpdate = verification.captured[0] as PlatformCameraUpdate;
- final typedUpdate = passedUpdate.cameraUpdate as PlatformCameraUpdateNewLatLngZoom;
+ final typedUpdate = passedUpdate as PlatformCameraUpdateNewLatLngZoom;
update as CameraUpdateNewLatLngZoom;
expect(typedUpdate.latLng.latitude, update.latLng.latitude);
expect(typedUpdate.latLng.longitude, update.latLng.longitude);
@@ -1068,7 +1066,7 @@
final VerificationResult verification = verify(api.moveCamera(captureAny));
final passedUpdate = verification.captured[0] as PlatformCameraUpdate;
- final typedUpdate = passedUpdate.cameraUpdate as PlatformCameraUpdateZoomBy;
+ final typedUpdate = passedUpdate as PlatformCameraUpdateZoomBy;
update as CameraUpdateZoomBy;
expect(typedUpdate.focus?.x, update.focus?.dx);
expect(typedUpdate.focus?.y, update.focus?.dy);
@@ -1084,7 +1082,7 @@
final VerificationResult verification = verify(api.moveCamera(captureAny));
final passedUpdate = verification.captured[0] as PlatformCameraUpdate;
- final typedUpdate = passedUpdate.cameraUpdate as PlatformCameraUpdateZoomTo;
+ final typedUpdate = passedUpdate as PlatformCameraUpdateZoomTo;
update as CameraUpdateZoomTo;
expect(typedUpdate.zoom, update.zoom);
});
@@ -1098,7 +1096,7 @@
final VerificationResult verification = verify(api.moveCamera(captureAny));
final passedUpdate = verification.captured[0] as PlatformCameraUpdate;
- final typedUpdate = passedUpdate.cameraUpdate as PlatformCameraUpdateZoom;
+ final typedUpdate = passedUpdate as PlatformCameraUpdateZoom;
expect(typedUpdate.out, false);
});
@@ -1111,7 +1109,7 @@
final VerificationResult verification = verify(api.moveCamera(captureAny));
final passedUpdate = verification.captured[0] as PlatformCameraUpdate;
- final typedUpdate = passedUpdate.cameraUpdate as PlatformCameraUpdateZoom;
+ final typedUpdate = passedUpdate as PlatformCameraUpdateZoom;
expect(typedUpdate.out, true);
});
@@ -1131,8 +1129,8 @@
final PlatformBitmap platformBitmap = GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(
bitmap,
);
- expect(platformBitmap.bitmap, isA<PlatformBitmapDefaultMarker>());
- final typedBitmap = platformBitmap.bitmap as PlatformBitmapDefaultMarker;
+ expect(platformBitmap, isA<PlatformBitmapDefaultMarker>());
+ final typedBitmap = platformBitmap as PlatformBitmapDefaultMarker;
expect(typedBitmap.hue, 10.0);
});
@@ -1147,8 +1145,8 @@
final PlatformBitmap platformBitmap = GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(
bitmap,
);
- expect(platformBitmap.bitmap, isA<PlatformBitmapBytesMap>());
- final typedBitmap = platformBitmap.bitmap as PlatformBitmapBytesMap;
+ expect(platformBitmap, isA<PlatformBitmapBytesMap>());
+ final typedBitmap = platformBitmap as PlatformBitmapBytesMap;
expect(typedBitmap.byteData, data);
expect(typedBitmap.bitmapScaling, PlatformMapBitmapScaling.auto);
expect(typedBitmap.imagePixelRatio, 2.0);
@@ -1162,8 +1160,8 @@
final PlatformBitmap platformBitmap = GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(
bitmap,
);
- expect(platformBitmap.bitmap, isA<PlatformBitmapAssetMap>());
- final typedBitmap = platformBitmap.bitmap as PlatformBitmapAssetMap;
+ expect(platformBitmap, isA<PlatformBitmapAssetMap>());
+ final typedBitmap = platformBitmap as PlatformBitmapAssetMap;
expect(typedBitmap.assetName, assetName);
expect(typedBitmap.bitmapScaling, PlatformMapBitmapScaling.auto);
expect(typedBitmap.imagePixelRatio, 2.0);
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/tool/unshared_source_files.dart b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/tool/unshared_source_files.dart
index 2b9405a..1cfb85a 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/tool/unshared_source_files.dart
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_sdk9/tool/unshared_source_files.dart
@@ -12,6 +12,4 @@
'test/package_specific_test_import.dart',
// Each package will have its own list.
'tool/unshared_source_files.dart',
- // Unshared due to https://github.com/flutter/flutter/issues/183441.
- 'ios/google_maps_flutter_ios_sdk9/Sources/google_maps_flutter_ios_sdk9_objc/include/google_maps_flutter_ios_sdk9_objc/GoogleMapsUtilsTrampoline.h',
];
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/CircleControllerTests.swift b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/CircleControllerTests.swift
index 5be000f..cbcbca2 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/CircleControllerTests.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/CircleControllerTests.swift
@@ -4,7 +4,6 @@
import GoogleMaps
import Testing
-import google_maps_flutter_ios_objc
@testable import google_maps_flutter_ios
@@ -14,14 +13,14 @@
let circle = PropertyOrderValidatingCircle()
CircleController.update(
circle,
- from: FGMPlatformCircle.make(
- withConsumeTapEvents: false,
- fill: FGMPlatformColor.make(withRed: 0, green: 0, blue: 0, alpha: 0),
- stroke: FGMPlatformColor.make(withRed: 0, green: 0, blue: 0, alpha: 0),
+ from: PlatformCircle(
+ consumeTapEvents: false,
+ fillColor: PlatformColor(red: 0, green: 0, blue: 0, alpha: 0),
+ strokeColor: PlatformColor(red: 0, green: 0, blue: 0, alpha: 0),
visible: true,
strokeWidth: 0,
zIndex: 0,
- center: FGMPlatformLatLng.make(withLatitude: 0, longitude: 0),
+ center: PlatformLatLng(latitude: 0, longitude: 0),
radius: 10,
circleId: "circle"
),
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/ClusterManagersControllerTests.swift b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/ClusterManagersControllerTests.swift
index 0d2cf1f..38bcae7 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/ClusterManagersControllerTests.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/ClusterManagersControllerTests.swift
@@ -5,7 +5,6 @@
import Flutter
import GoogleMaps
import Testing
-import google_maps_flutter_ios_objc
@testable import google_maps_flutter_ios
@@ -36,7 +35,7 @@
// Add cluster managers.
let clusterManagerId = "cm"
- let clusterManagerToAdd = FGMPlatformClusterManager.make(withIdentifier: clusterManagerId)
+ let clusterManagerToAdd = PlatformClusterManager(identifier: clusterManagerId)
clusterManagersController.add([clusterManagerToAdd])
// Verify that cluster managers are available
@@ -47,18 +46,16 @@
let markerId1 = "m1"
let markerId2 = "m2"
- let zeroPoint = FGMPlatformPoint.makeWith(x: 0, y: 0)
- let zeroLatLng = FGMPlatformLatLng.make(withLatitude: 0, longitude: 0)
- let bitmap = FGMPlatformBitmap.make(
- withBitmap: FGMPlatformBitmapDefaultMarker.make(withHue: 0)
- )
- let infoWindow = FGMPlatformInfoWindow.make(
- withTitle: "Info",
+ let zeroPoint = PlatformPoint(x: 0, y: 0)
+ let zeroLatLng = PlatformLatLng(latitude: 0, longitude: 0)
+ let bitmap = PlatformBitmapDefaultMarker(hue: 0)
+ let infoWindow = PlatformInfoWindow(
+ title: "Info",
snippet: nil,
anchor: zeroPoint
)
- let marker1 = FGMPlatformMarker.make(
- withAlpha: 1,
+ let marker1 = PlatformMarker(
+ alpha: 1,
anchor: zeroPoint,
consumeTapEvents: false,
draggable: false,
@@ -73,8 +70,8 @@
clusterManagerId: clusterManagerId,
collisionBehavior: nil
)
- let marker2 = FGMPlatformMarker.make(
- withAlpha: 1,
+ let marker2 = PlatformMarker(
+ alpha: 1,
anchor: zeroPoint,
consumeTapEvents: false,
draggable: false,
@@ -96,11 +93,7 @@
clusterManagersController.invokeClusteringForEachClusterManager()
// Verify that the markers were added to the cluster manager
- var error: FlutterError? = nil
- let clusters1 = try #require(
- clusterManagersController.clusters(withIdentifier: clusterManagerId, error: &error)
- )
- #expect(error == nil)
+ let clusters1 = try clusterManagersController.clusters(withIdentifier: clusterManagerId)
let targetCluster = try #require(
clusters1.first(where: { $0.clusterManagerId == clusterManagerId })
)
@@ -111,11 +104,7 @@
markersController.removeMarkers(withIdentifiers: [markerId2])
// Verify that the marker2 is removed from the clusterManager
- error = nil
- let clusters2 = try #require(
- clusterManagersController.clusters(withIdentifier: clusterManagerId, error: &error)
- )
- #expect(error == nil)
+ let clusters2 = try clusterManagersController.clusters(withIdentifier: clusterManagerId)
let targetCluster2 = try #require(
clusters2.first(where: { $0.clusterManagerId == clusterManagerId })
)
@@ -125,11 +114,7 @@
markersController.removeMarkers(withIdentifiers: [markerId1])
// Verify that all markers are removed from clusterManager
- error = nil
- let clusters3 = try #require(
- clusterManagersController.clusters(withIdentifier: clusterManagerId, error: &error)
- )
- #expect(error == nil)
+ let clusters3 = try clusterManagersController.clusters(withIdentifier: clusterManagerId)
#expect(clusters3.count == 0)
// Remove cluster manager
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/ConversionsUtilsTests.swift b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/ConversionsUtilsTests.swift
index 4c8f4d8..12e1b25 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/ConversionsUtilsTests.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/ConversionsUtilsTests.swift
@@ -4,7 +4,6 @@
import GoogleMaps
import Testing
-import google_maps_flutter_ios_objc
@testable import google_maps_flutter_ios
@@ -15,8 +14,8 @@
let platformGreen: CGFloat = 2 / 255.0
let platformBlue: CGFloat = 3 / 255.0
let platformAlpha: CGFloat = 4 / 255.0
- let color = FGMPlatformColor.make(
- withRed: platformRed,
+ let color = PlatformColor(
+ red: platformRed,
green: platformGreen,
blue: platformBlue,
alpha: platformAlpha
@@ -39,7 +38,7 @@
let blue: CGFloat = 3 / 255.0
let alpha: CGFloat = 4 / 255.0
let color = UIColor(red: red, green: green, blue: blue, alpha: alpha)
- let platformColor = FGMPlatformColor.make(from: color)
+ let platformColor = PlatformColor.make(from: color)
#expect(abs(red - platformColor.red) <= CGFloat.ulpOfOne)
#expect(abs(green - platformColor.green) <= CGFloat.ulpOfOne)
#expect(abs(blue - platformColor.blue) <= CGFloat.ulpOfOne)
@@ -47,7 +46,7 @@
}
@Test func pointFromLatLong() {
- let latlong = FGMPlatformLatLng.make(withLatitude: 1, longitude: 2)
+ let latlong = PlatformLatLng(latitude: 1, longitude: 2)
let location = latlong.toCLLocationCoordinate2D()
#expect(location.latitude == 1)
#expect(location.longitude == 2)
@@ -60,7 +59,7 @@
bearing: 3.0,
viewingAngle: 75.0
)
- let pigeonPosition = FGMPlatformCameraPosition.make(from: position)
+ let pigeonPosition = PlatformCameraPosition.make(from: position)
#expect(abs(pigeonPosition.target.latitude - position.target.latitude) <= Double.ulpOfOne)
#expect(abs(pigeonPosition.target.longitude - position.target.longitude) <= Double.ulpOfOne)
#expect(abs(Float(pigeonPosition.zoom) - position.zoom) <= Float.ulpOfOne)
@@ -70,7 +69,7 @@
@Test func pigeonPointForGCPoint() {
let point = CGPoint(x: 10, y: 20)
- let pigeonPoint = FGMPlatformPoint.make(from: point)
+ let pigeonPoint = PlatformPoint.make(from: point)
#expect(abs(pigeonPoint.x - Double(point.x)) <= Double.ulpOfOne)
#expect(abs(pigeonPoint.y - Double(point.y)) <= Double.ulpOfOne)
}
@@ -80,7 +79,7 @@
coordinate: CLLocationCoordinate2D(latitude: 10, longitude: 20),
coordinate: CLLocationCoordinate2D(latitude: 30, longitude: 40)
)
- let pigeonBounds = FGMPlatformLatLngBounds.make(from: bounds)
+ let pigeonBounds = PlatformLatLngBounds.make(from: bounds)
#expect(abs(pigeonBounds.southwest.latitude - bounds.southWest.latitude) <= Double.ulpOfOne)
#expect(abs(pigeonBounds.southwest.longitude - bounds.southWest.longitude) <= Double.ulpOfOne)
#expect(abs(pigeonBounds.northeast.latitude - bounds.northEast.latitude) <= Double.ulpOfOne)
@@ -88,9 +87,9 @@
}
@Test func getCameraPostionForPigeonCameraPosition() {
- let pigeonCameraPosition = FGMPlatformCameraPosition.make(
- withBearing: 1.0,
- target: FGMPlatformLatLng.make(withLatitude: 2.0, longitude: 3.0),
+ let pigeonCameraPosition = PlatformCameraPosition(
+ bearing: 1.0,
+ target: PlatformLatLng(latitude: 2.0, longitude: 3.0),
tilt: 4.0,
zoom: 5.0
)
@@ -108,7 +107,7 @@
}
@Test func cgPointForPigeonPoint() {
- let pigeonPoint = FGMPlatformPoint.makeWith(x: 1.0, y: 2.0)
+ let pigeonPoint = PlatformPoint(x: 1.0, y: 2.0)
let point = pigeonPoint.toCGPoint()
@@ -117,9 +116,9 @@
}
@Test func coordinateBoundsFromLatLongs() {
- let pigeonBounds = FGMPlatformLatLngBounds.make(
- withNortheast: FGMPlatformLatLng.make(withLatitude: 3, longitude: 4),
- southwest: FGMPlatformLatLng.make(withLatitude: 1, longitude: 2)
+ let pigeonBounds = PlatformLatLngBounds(
+ northeast: PlatformLatLng(latitude: 3, longitude: 4),
+ southwest: PlatformLatLng(latitude: 1, longitude: 2)
)
let bounds = pigeonBounds.toGMSCoordinateBounds()
@@ -132,25 +131,25 @@
}
@Test func mapViewTypeFromPigeonType() {
- #expect(GMSMapViewType.normal == FGMPlatformMapType.normal.gmsMapViewType)
- #expect(GMSMapViewType.satellite == FGMPlatformMapType.satellite.gmsMapViewType)
- #expect(GMSMapViewType.terrain == FGMPlatformMapType.terrain.gmsMapViewType)
- #expect(GMSMapViewType.hybrid == FGMPlatformMapType.hybrid.gmsMapViewType)
- #expect(GMSMapViewType.none == FGMPlatformMapType.none.gmsMapViewType)
+ #expect(GMSMapViewType.normal == PlatformMapType.normal.gmsMapViewType)
+ #expect(GMSMapViewType.satellite == PlatformMapType.satellite.gmsMapViewType)
+ #expect(GMSMapViewType.terrain == PlatformMapType.terrain.gmsMapViewType)
+ #expect(GMSMapViewType.hybrid == PlatformMapType.hybrid.gmsMapViewType)
+ #expect(GMSMapViewType.none == PlatformMapType.none.gmsMapViewType)
}
@Test func cameraUpdateFromNewCameraPosition() {
- let newPositionUpdate = FGMPlatformCameraUpdateNewCameraPosition.make(
- with: FGMPlatformCameraPosition.make(
- withBearing: 4,
- target: FGMPlatformLatLng.make(withLatitude: 1, longitude: 2),
+ let platformUpdate = PlatformCameraUpdateNewCameraPosition(
+ cameraPosition: PlatformCameraPosition(
+ bearing: 4,
+ target: PlatformLatLng(latitude: 1, longitude: 2),
tilt: 5,
zoom: 3
)
)
- _ = FGMPlatformCameraUpdate.make(withCameraUpdate: newPositionUpdate).toGMSCameraUpdate()
+ _ = platformUpdate.toGMSCameraUpdate()
// GMSCameraUpdate is not inspectable, so this test just ensures that the codepath
- // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that
+ // doesn't throw. toGMSCameraUpdate is simple enough that
// injecting a wrapper would not meaningfully improve test coverage, since the non-test
// implementation would be about as complex as the conversion function itself.
}
@@ -158,32 +157,32 @@
@Test func cameraUpdateFromNewLatLong() {
let lat: Double = 1
let lng: Double = 2
- let platformUpdate = FGMPlatformCameraUpdateNewLatLng.make(
- with: FGMPlatformLatLng.make(withLatitude: lat, longitude: lng)
+ let platformUpdate = PlatformCameraUpdateNewLatLng(
+ latLng: PlatformLatLng(latitude: lat, longitude: lng)
)
- _ = FGMPlatformCameraUpdate.make(withCameraUpdate: platformUpdate).toGMSCameraUpdate()
+ _ = platformUpdate.toGMSCameraUpdate()
// GMSCameraUpdate is not inspectable, so this test just ensures that the codepath
- // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that
+ // doesn't throw. toGMSCameraUpdate is simple enough that
// injecting a wrapper would not meaningfully improve test coverage, since the non-test
// implementation would be about as complex as the conversion function itself.
}
@Test func cameraUpdateFromNewLatLngBounds() {
- let pigeonBounds = FGMPlatformLatLngBounds.make(
- withNortheast: FGMPlatformLatLng.make(withLatitude: 1, longitude: 2),
- southwest: FGMPlatformLatLng.make(withLatitude: 3, longitude: 4)
+ let pigeonBounds = PlatformLatLngBounds(
+ northeast: PlatformLatLng(latitude: 1, longitude: 2),
+ southwest: PlatformLatLng(latitude: 3, longitude: 4)
)
let bounds = pigeonBounds.toGMSCoordinateBounds()
let padding: Double = 20
- let platformUpdate = FGMPlatformCameraUpdateNewLatLngBounds.make(
- with: FGMPlatformLatLngBounds.make(from: bounds),
+ let platformUpdate = PlatformCameraUpdateNewLatLngBounds(
+ bounds: PlatformLatLngBounds.make(from: bounds),
padding: padding
)
- _ = FGMPlatformCameraUpdate.make(withCameraUpdate: platformUpdate).toGMSCameraUpdate()
+ _ = platformUpdate.toGMSCameraUpdate()
// GMSCameraUpdate is not inspectable, so this test just ensures that the codepath
- // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that
+ // doesn't throw. toGMSCameraUpdate is simple enough that
// injecting a wrapper would not meaningfully improve test coverage, since the non-test
// implementation would be about as complex as the conversion function itself.
}
@@ -192,14 +191,14 @@
let lat: Double = 1
let lng: Double = 2
let zoom: Double = 3
- let platformUpdate = FGMPlatformCameraUpdateNewLatLngZoom.make(
- with: FGMPlatformLatLng.make(withLatitude: lat, longitude: lng),
+ let platformUpdate = PlatformCameraUpdateNewLatLngZoom(
+ latLng: PlatformLatLng(latitude: lat, longitude: lng),
zoom: zoom
)
- _ = FGMPlatformCameraUpdate.make(withCameraUpdate: platformUpdate).toGMSCameraUpdate()
+ _ = platformUpdate.toGMSCameraUpdate()
// GMSCameraUpdate is not inspectable, so this test just ensures that the codepath
- // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that
+ // doesn't throw. toGMSCameraUpdate is simple enough that
// injecting a wrapper would not meaningfully improve test coverage, since the non-test
// implementation would be about as complex as the conversion function itself.
}
@@ -207,22 +206,22 @@
@Test func cameraUpdateFromScrollBy() {
let x: Double = 1
let y: Double = 2
- let platformUpdate = FGMPlatformCameraUpdateScrollBy.make(withDx: x, dy: y)
+ let platformUpdate = PlatformCameraUpdateScrollBy(dx: x, dy: y)
- _ = FGMPlatformCameraUpdate.make(withCameraUpdate: platformUpdate).toGMSCameraUpdate()
+ _ = platformUpdate.toGMSCameraUpdate()
// GMSCameraUpdate is not inspectable, so this test just ensures that the codepath
- // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that
+ // doesn't throw. toGMSCameraUpdate is simple enough that
// injecting a wrapper would not meaningfully improve test coverage, since the non-test
// implementation would be about as complex as the conversion function itself.
}
@Test func cameraUpdateFromZoomBy() {
let zoom: Double = 1
- let platformUpdateNoPoint = FGMPlatformCameraUpdateZoomBy.make(withAmount: zoom, focus: nil)
+ let platformUpdateNoPoint = PlatformCameraUpdateZoomBy(amount: zoom, focus: nil)
- _ = FGMPlatformCameraUpdate.make(withCameraUpdate: platformUpdateNoPoint).toGMSCameraUpdate()
+ _ = platformUpdateNoPoint.toGMSCameraUpdate()
// GMSCameraUpdate is not inspectable, so this test just ensures that the codepath
- // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that
+ // doesn't throw. toGMSCameraUpdate is simple enough that
// injecting a wrapper would not meaningfully improve test coverage, since the non-test
// implementation would be about as complex as the conversion function itself.
}
@@ -231,51 +230,48 @@
let zoom: Double = 1
let x: Double = 2
let y: Double = 3
- let platformUpdate = FGMPlatformCameraUpdateZoomBy.make(
- withAmount: zoom,
- focus: FGMPlatformPoint.makeWith(x: x, y: y)
- )
+ let platformUpdate = PlatformCameraUpdateZoomBy(amount: zoom, focus: PlatformPoint(x: x, y: y))
- _ = FGMPlatformCameraUpdate.make(withCameraUpdate: platformUpdate).toGMSCameraUpdate()
+ _ = platformUpdate.toGMSCameraUpdate()
// GMSCameraUpdate is not inspectable, so this test just ensures that the codepath
- // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that
+ // doesn't throw. toGMSCameraUpdate is simple enough that
// injecting a wrapper would not meaningfully improve test coverage, since the non-test
// implementation would be about as complex as the conversion function itself.
}
@Test func cameraUpdateFromZoomIn() {
- let platformUpdate = FGMPlatformCameraUpdateZoom.make(withOut: false)
+ let platformUpdate = PlatformCameraUpdateZoom(out: false)
- _ = FGMPlatformCameraUpdate.make(withCameraUpdate: platformUpdate).toGMSCameraUpdate()
+ _ = platformUpdate.toGMSCameraUpdate()
// GMSCameraUpdate is not inspectable, so this test just ensures that the codepath
- // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that
+ // doesn't throw. toGMSCameraUpdate is simple enough that
// injecting a wrapper would not meaningfully improve test coverage, since the non-test
// implementation would be about as complex as the conversion function itself.
}
@Test func cameraUpdateFromZoomOut() {
- let platformUpdate = FGMPlatformCameraUpdateZoom.make(withOut: true)
+ let platformUpdate = PlatformCameraUpdateZoom(out: true)
- _ = FGMPlatformCameraUpdate.make(withCameraUpdate: platformUpdate).toGMSCameraUpdate()
+ _ = platformUpdate.toGMSCameraUpdate()
// GMSCameraUpdate is not inspectable, so this test just ensures that the codepath
- // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that
+ // doesn't throw. toGMSCameraUpdate is simple enough that
// injecting a wrapper would not meaningfully improve test coverage, since the non-test
// implementation would be about as complex as the conversion function itself.
}
@Test func cameraUpdateFromZoomTo() {
let zoom: Double = 1
- let platformUpdate = FGMPlatformCameraUpdateZoomTo.make(withZoom: zoom)
+ let platformUpdate = PlatformCameraUpdateZoomTo(zoom: zoom)
- _ = FGMPlatformCameraUpdate.make(withCameraUpdate: platformUpdate).toGMSCameraUpdate()
+ _ = platformUpdate.toGMSCameraUpdate()
// GMSCameraUpdate is not inspectable, so this test just ensures that the codepath
- // doesn't throw. FGMGetCameraUpdateForPigeonCameraUpdate is simple enough that
+ // doesn't throw. toGMSCameraUpdate is simple enough that
// injecting a wrapper would not meaningfully improve test coverage, since the non-test
// implementation would be about as complex as the conversion function itself.
}
@Test func strokeStyleFromPattern() {
- let pattern = FGMPlatformPatternItem.make(with: .dash, length: 1)
+ let pattern = PlatformPatternItem(type: .dash, length: 1)
let strokeColor = UIColor.red
_ = pattern.gmsStrokeStyle(strokeColor: strokeColor)
@@ -285,7 +281,7 @@
@Test func nonNullLengthFromPatternItem() {
let length: Double = 6.4
- let pattern = FGMPlatformPatternItem.make(with: .gap, length: length as NSNumber)
+ let pattern = PlatformPatternItem(type: .gap, length: length)
let spanLength = pattern.gmsStyleSpanLength()
@@ -293,7 +289,7 @@
}
@Test func nullLengthFromPatternItem() {
- let pattern = FGMPlatformPatternItem.make(with: .dot, length: nil)
+ let pattern = PlatformPatternItem(type: .dot, length: nil)
let spanLength = pattern.gmsStyleSpanLength()
@@ -302,8 +298,8 @@
@Test func weightedLatLngFromPlatformWeightedLatLng() {
let intensity: Double = 3.0
- let data = FGMPlatformWeightedLatLng.make(
- withPoint: FGMPlatformLatLng.make(withLatitude: 10, longitude: 20),
+ let data = PlatformWeightedLatLng(
+ point: PlatformLatLng(latitude: 10, longitude: 20),
weight: intensity
)
@@ -318,17 +314,17 @@
let platformBlue: Double = 0.3
let platformAlpha: Double = 0.4
let colorMapSize: Int = 200
- let platformGradient = FGMPlatformHeatmapGradient.make(
- with: [
- FGMPlatformColor.make(
- withRed: platformRed,
+ let platformGradient = PlatformHeatmapGradient(
+ colors: [
+ PlatformColor(
+ red: platformRed,
green: platformGreen,
blue: platformBlue,
alpha: platformAlpha
)
],
- startPoints: [startPoint as NSNumber],
- colorMapSize: colorMapSize
+ startPoints: [startPoint],
+ colorMapSize: Int64(colorMapSize)
)
let gradient = platformGradient.toGMUGradient()
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/ExtractIconFromDataTests.swift b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/ExtractIconFromDataTests.swift
index 0b9e8c9..06f0ab9 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/ExtractIconFromDataTests.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/ExtractIconFromDataTests.swift
@@ -4,7 +4,6 @@
import Flutter
import Testing
-import google_maps_flutter_ios_objc
@testable import google_maps_flutter_ios
@@ -15,8 +14,8 @@
let assetName = "fakeImageName"
let assetProvider = TestAssetProvider(image: testImage, forAssetName: assetName, package: nil)
- let bitmap = FGMPlatformBitmapAssetMap.make(
- withAssetName: assetName,
+ let bitmap = PlatformBitmapAssetMap(
+ assetName: assetName,
bitmapScaling: .auto,
imagePixelRatio: 1,
width: nil,
@@ -25,10 +24,7 @@
let screenScale: CGFloat = 3.0
- let resultImage = FGMPlatformBitmap.make(withBitmap: bitmap).createIcon(
- assetProvider: assetProvider,
- screenScale: screenScale
- )
+ let resultImage = bitmap.createIcon(assetProvider: assetProvider, screenScale: screenScale)
#expect(resultImage != nil)
#expect(resultImage?.scale == 1.0)
@@ -42,8 +38,8 @@
let assetName = "fakeImageName"
let assetProvider = TestAssetProvider(image: testImage, forAssetName: assetName, package: nil)
- let bitmap = FGMPlatformBitmapAssetMap.make(
- withAssetName: assetName,
+ let bitmap = PlatformBitmapAssetMap(
+ assetName: assetName,
bitmapScaling: .auto,
imagePixelRatio: 10,
width: nil,
@@ -52,10 +48,7 @@
let screenScale: CGFloat = 3.0
- let resultImage = FGMPlatformBitmap.make(withBitmap: bitmap).createIcon(
- assetProvider: assetProvider,
- screenScale: screenScale
- )
+ let resultImage = bitmap.createIcon(assetProvider: assetProvider, screenScale: screenScale)
#expect(resultImage != nil)
#expect(resultImage?.scale == 10)
@@ -71,20 +64,17 @@
let assetProvider = TestAssetProvider(image: testImage, forAssetName: assetName, package: nil)
let width: CGFloat = 15.0
- let bitmap = FGMPlatformBitmapAssetMap.make(
- withAssetName: assetName,
+ let bitmap = PlatformBitmapAssetMap(
+ assetName: assetName,
bitmapScaling: .auto,
imagePixelRatio: 1,
- width: width as NSNumber,
+ width: width,
height: nil
)
let screenScale: CGFloat = 3.0
- let resultImage = FGMPlatformBitmap.make(withBitmap: bitmap).createIcon(
- assetProvider: assetProvider,
- screenScale: screenScale
- )
+ let resultImage = bitmap.createIcon(assetProvider: assetProvider, screenScale: screenScale)
#expect(resultImage != nil)
#expect(testImage.scale == 1.0)
@@ -105,20 +95,17 @@
let width: CGFloat = 15.0
let height: CGFloat = 45.0
- let bitmap = FGMPlatformBitmapAssetMap.make(
- withAssetName: assetName,
+ let bitmap = PlatformBitmapAssetMap(
+ assetName: assetName,
bitmapScaling: .auto,
imagePixelRatio: 1,
- width: width as NSNumber,
- height: height as NSNumber
+ width: width,
+ height: height
)
let screenScale: CGFloat = 3.0
- let resultImage = FGMPlatformBitmap.make(withBitmap: bitmap).createIcon(
- assetProvider: assetProvider,
- screenScale: screenScale
- )
+ let resultImage = bitmap.createIcon(assetProvider: assetProvider, screenScale: screenScale)
#expect(resultImage != nil)
#expect(resultImage?.scale == screenScale)
#expect(resultImage?.size.width == width)
@@ -131,8 +118,8 @@
let assetName = "fakeImageName"
let assetProvider = TestAssetProvider(image: testImage, forAssetName: assetName, package: nil)
- let bitmap = FGMPlatformBitmapAssetMap.make(
- withAssetName: assetName,
+ let bitmap = PlatformBitmapAssetMap(
+ assetName: assetName,
bitmapScaling: .none,
imagePixelRatio: 1,
width: nil,
@@ -141,10 +128,7 @@
let screenScale: CGFloat = 3.0
- let resultImage = FGMPlatformBitmap.make(withBitmap: bitmap).createIcon(
- assetProvider: assetProvider,
- screenScale: screenScale
- )
+ let resultImage = bitmap.createIcon(assetProvider: assetProvider, screenScale: screenScale)
#expect(resultImage != nil)
#expect(resultImage?.scale == 1.0)
@@ -157,8 +141,8 @@
let pngData = try #require(testImage.pngData())
let typedData = FlutterStandardTypedData(bytes: pngData)
- let bitmap = FGMPlatformBitmapBytesMap.make(
- withByteData: typedData,
+ let bitmap = PlatformBitmapBytesMap(
+ byteData: typedData,
bitmapScaling: .auto,
imagePixelRatio: 1,
width: nil,
@@ -167,7 +151,7 @@
let screenScale: CGFloat = 3.0
- let resultImage = FGMPlatformBitmap.make(withBitmap: bitmap).createIcon(
+ let resultImage = bitmap.createIcon(
assetProvider: TestAssetProvider(),
screenScale: screenScale
)
@@ -183,8 +167,8 @@
let pngData = try #require(testImage.pngData())
let typedData = FlutterStandardTypedData(bytes: pngData)
- let bitmap = FGMPlatformBitmapBytesMap.make(
- withByteData: typedData,
+ let bitmap = PlatformBitmapBytesMap(
+ byteData: typedData,
bitmapScaling: .auto,
imagePixelRatio: 10,
width: nil,
@@ -193,7 +177,7 @@
let screenScale: CGFloat = 3.0
- let resultImage = FGMPlatformBitmap.make(withBitmap: bitmap).createIcon(
+ let resultImage = bitmap.createIcon(
assetProvider: TestAssetProvider(),
screenScale: screenScale
)
@@ -210,17 +194,17 @@
let width: CGFloat = 15.0
let height: CGFloat = 15.0
let typedData = FlutterStandardTypedData(bytes: pngData)
- let bitmap = FGMPlatformBitmapBytesMap.make(
- withByteData: typedData,
+ let bitmap = PlatformBitmapBytesMap(
+ byteData: typedData,
bitmapScaling: .auto,
imagePixelRatio: 1,
- width: width as NSNumber,
- height: height as NSNumber
+ width: width,
+ height: height
)
let screenScale: CGFloat = 3.0
- let resultImage = FGMPlatformBitmap.make(withBitmap: bitmap).createIcon(
+ let resultImage = bitmap.createIcon(
assetProvider: TestAssetProvider(),
screenScale: screenScale
)
@@ -244,17 +228,17 @@
let width: CGFloat = 15.0
let height: CGFloat = 45.0
let typedData = FlutterStandardTypedData(bytes: pngData)
- let bitmap = FGMPlatformBitmapBytesMap.make(
- withByteData: typedData,
+ let bitmap = PlatformBitmapBytesMap(
+ byteData: typedData,
bitmapScaling: .auto,
imagePixelRatio: 1,
- width: width as NSNumber,
- height: height as NSNumber
+ width: width,
+ height: height
)
let screenScale: CGFloat = 3.0
- let resultImage = FGMPlatformBitmap.make(withBitmap: bitmap).createIcon(
+ let resultImage = bitmap.createIcon(
assetProvider: TestAssetProvider(),
screenScale: screenScale
)
@@ -269,8 +253,8 @@
let pngData = try #require(testImage.pngData())
let typedData = FlutterStandardTypedData(bytes: pngData)
- let bitmap = FGMPlatformBitmapBytesMap.make(
- withByteData: typedData,
+ let bitmap = PlatformBitmapBytesMap(
+ byteData: typedData,
bitmapScaling: .none,
imagePixelRatio: 1,
width: nil,
@@ -279,7 +263,7 @@
let screenScale: CGFloat = 3.0
- let resultImage = FGMPlatformBitmap.make(withBitmap: bitmap).createIcon(
+ let resultImage = bitmap.createIcon(
assetProvider: TestAssetProvider(),
screenScale: screenScale
)
@@ -294,12 +278,12 @@
@Test func extractIconFromPinConfigWithGlyphColor() {
let assetProvider = TestAssetProvider()
- let backgroundColor = FGMPlatformColor.make(withRed: 0.0, green: 1.0, blue: 1.0, alpha: 1.0)
- let borderColor = FGMPlatformColor.make(withRed: 1.0, green: 0.0, blue: 1.0, alpha: 1.0)
- let glyphColor = FGMPlatformColor.make(withRed: 0.1, green: 0.2, blue: 0.3, alpha: 1.0)
+ let backgroundColor = PlatformColor(red: 0.0, green: 1.0, blue: 1.0, alpha: 1.0)
+ let borderColor = PlatformColor(red: 1.0, green: 0.0, blue: 1.0, alpha: 1.0)
+ let glyphColor = PlatformColor(red: 0.1, green: 0.2, blue: 0.3, alpha: 1.0)
- let pinConfig = FGMPlatformBitmapPinConfig.make(
- withBackgroundColor: backgroundColor,
+ let pinConfig = PlatformBitmapPinConfig(
+ backgroundColor: backgroundColor,
borderColor: borderColor,
glyphColor: glyphColor,
glyphTextColor: nil,
@@ -309,10 +293,7 @@
let screenScale: CGFloat = 3.0
- let resultImage = FGMPlatformBitmap.make(withBitmap: pinConfig).createIcon(
- assetProvider: assetProvider,
- screenScale: screenScale
- )
+ let resultImage = pinConfig.createIcon(assetProvider: assetProvider, screenScale: screenScale)
// PinConfig may return nil on old Google Maps SDK versions (<=8.4.0).
// Also, due to a Google Maps SDK issue (https://issuetracker.google.com/issues/370536110),
@@ -324,10 +305,10 @@
@Test func extractIconFromPinConfigWithGlyphText() {
let assetProvider = TestAssetProvider()
- let glyphTextColor = FGMPlatformColor.make(withRed: 1.0, green: 1.0, blue: 1.0, alpha: 1.0)
+ let glyphTextColor = PlatformColor(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0)
- let pinConfig = FGMPlatformBitmapPinConfig.make(
- withBackgroundColor: nil,
+ let pinConfig = PlatformBitmapPinConfig(
+ backgroundColor: nil,
borderColor: nil,
glyphColor: nil,
glyphTextColor: glyphTextColor,
@@ -337,10 +318,7 @@
let screenScale: CGFloat = 3.0
- let resultImage = FGMPlatformBitmap.make(withBitmap: pinConfig).createIcon(
- assetProvider: assetProvider,
- screenScale: screenScale
- )
+ let resultImage = pinConfig.createIcon(assetProvider: assetProvider, screenScale: screenScale)
// PinConfig returns nil on iOS versions without GMSPinImageOptions support (< iOS 16.0).
// On simulators, GMSPinImage may also return a zero-dimension image. Both cases are acceptable
@@ -355,33 +333,29 @@
let assetName = "fakeImageNameKey"
let assetProvider = TestAssetProvider(image: testImage, forAssetName: assetName, package: nil)
- let assetBitmap = FGMPlatformBitmapAssetMap.make(
- withAssetName: assetName,
+ let assetBitmap = PlatformBitmapAssetMap(
+ assetName: assetName,
bitmapScaling: .auto,
imagePixelRatio: 1,
width: nil,
height: nil
)
- let glyphBitmap = FGMPlatformBitmap.make(withBitmap: assetBitmap)
- let backgroundColor = FGMPlatformColor.make(withRed: 1.0, green: 1.0, blue: 1.0, alpha: 1.0)
- let borderColor = FGMPlatformColor.make(withRed: 0.0, green: 0.0, blue: 0.0, alpha: 1.0)
+ let backgroundColor = PlatformColor(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0)
+ let borderColor = PlatformColor(red: 0.0, green: 0.0, blue: 0.0, alpha: 1.0)
- let pinConfig = FGMPlatformBitmapPinConfig.make(
- withBackgroundColor: backgroundColor,
+ let pinConfig = PlatformBitmapPinConfig(
+ backgroundColor: backgroundColor,
borderColor: borderColor,
glyphColor: nil,
glyphTextColor: nil,
glyphText: nil,
- glyphBitmap: glyphBitmap
+ glyphBitmap: assetBitmap
)
let screenScale: CGFloat = 3.0
- let resultImage = FGMPlatformBitmap.make(withBitmap: pinConfig).createIcon(
- assetProvider: assetProvider,
- screenScale: screenScale
- )
+ let resultImage = pinConfig.createIcon(assetProvider: assetProvider, screenScale: screenScale)
// PinConfig returns nil on iOS versions without GMSPinImageOptions support (< iOS 16.0).
// On simulators, GMSPinImage may also return a zero-dimension image. Both cases are acceptable
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/GoogleMapsTests.swift b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/GoogleMapsTests.swift
index 9178990..e918732 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/GoogleMapsTests.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/GoogleMapsTests.swift
@@ -5,11 +5,10 @@
import Flutter
import GoogleMaps
import Testing
-import google_maps_flutter_ios_objc
@testable import google_maps_flutter_ios
-class MockCATransaction: NSObject, FGMCATransactionProtocol {
+class MockCATransaction: MapAnimationCATransactionProtocol {
var beginCalled = false
var commitCalled = false
var animationDuration: CFTimeInterval = 0.0
@@ -129,12 +128,9 @@
let mockTransactionWrapper = MockCATransaction()
controller.callHandler.transactionWrapper = mockTransactionWrapper
- let zoomTo = FGMPlatformCameraUpdateZoomTo.make(withZoom: 10.0)
- let cameraUpdate = FGMPlatformCameraUpdate.make(withCameraUpdate: zoomTo)
- var error: FlutterError? = nil
+ let zoomTo = PlatformCameraUpdateZoomTo(zoom: 10.0)
- controller.callHandler.animateCamera(with: cameraUpdate, duration: nil, error: &error)
- #expect(error == nil)
+ try controller.callHandler.animateCamera(zoomTo, duration: nil)
#expect(mapView.didAnimateCamera)
#expect(!mockTransactionWrapper.beginCalled)
#expect(!mockTransactionWrapper.commitCalled)
@@ -161,21 +157,14 @@
let mockTransactionWrapper = MockCATransaction()
controller.callHandler.transactionWrapper = mockTransactionWrapper
- let zoomTo = FGMPlatformCameraUpdateZoomTo.make(withZoom: 10.0)
- let cameraUpdate = FGMPlatformCameraUpdate.make(withCameraUpdate: zoomTo)
- var error: FlutterError? = nil
+ let zoomTo = PlatformCameraUpdateZoomTo(zoom: 10.0)
- let durationMilliseconds: NSNumber = 100
- controller.callHandler.animateCamera(
- with: cameraUpdate,
- duration: durationMilliseconds,
- error: &error
- )
- #expect(error == nil)
+ let durationMilliseconds: Int64 = 100
+ try controller.callHandler.animateCamera(zoomTo, duration: durationMilliseconds)
#expect(mapView.didAnimateCamera)
#expect(mockTransactionWrapper.beginCalled)
#expect(mockTransactionWrapper.commitCalled)
- #expect(mockTransactionWrapper.animationDuration == durationMilliseconds.doubleValue / 1000)
+ #expect(mockTransactionWrapper.animationDuration == Double(durationMilliseconds) / 1000)
}
@Test func inspectorAPICameraPosition() throws {
@@ -201,9 +190,7 @@
let inspector = MapInspector(messenger: binaryMessenger, pigeonSuffix: "0")
inspector.controller = controller
- var error: FlutterError? = nil
- let cameraPosition = try #require(inspector.cameraPosition(&error))
- #expect(error == nil)
+ let cameraPosition = try inspector.cameraPosition()
#expect(cameraPosition.target.latitude == initialCameraPosition.target.latitude)
#expect(cameraPosition.target.longitude == initialCameraPosition.target.longitude)
@@ -212,16 +199,16 @@
/// Creates an empty creation parameters object for tests where the values don't matter, just that
/// there's a valid object to pass in.
- private func emptyCreationParameters() -> FGMPlatformMapViewCreationParams {
- return FGMPlatformMapViewCreationParams.make(
- withInitialCameraPosition: FGMPlatformCameraPosition.make(
- withBearing: 0.0,
- target: FGMPlatformLatLng.make(withLatitude: 0.0, longitude: 0.0),
+ private func emptyCreationParameters() -> PlatformMapViewCreationParams {
+ return PlatformMapViewCreationParams(
+ initialCameraPosition: PlatformCameraPosition(
+ bearing: 0.0,
+ target: PlatformLatLng(latitude: 0.0, longitude: 0.0),
tilt: 0.0,
zoom: 0.0
),
- mapConfiguration: FGMPlatformMapConfiguration.make(
- withCompassEnabled: nil,
+ mapConfiguration: PlatformMapConfiguration(
+ compassEnabled: nil,
cameraTargetBounds: nil,
mapType: nil,
minMaxZoomPreference: nil,
@@ -267,6 +254,7 @@
#expect(mapView.frameObserverCount == 1)
+ withExtendedLifetime(controller) {}
// Deallocate the controller
controller = nil
@@ -288,8 +276,8 @@
#expect(controller.styleError != nil)
// Update config without style
- let config = FGMPlatformMapConfiguration.make(
- withCompassEnabled: true,
+ let config = PlatformMapConfiguration(
+ compassEnabled: true,
cameraTargetBounds: nil,
mapType: nil,
minMaxZoomPreference: nil,
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/GroundOverlayControllerTests.swift b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/GroundOverlayControllerTests.swift
index 05ebaa9..610c9c3 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/GroundOverlayControllerTests.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/GroundOverlayControllerTests.swift
@@ -4,7 +4,6 @@
import GoogleMaps
import Testing
-import google_maps_flutter_ios_objc
@testable import google_maps_flutter_ios
@@ -76,18 +75,16 @@
let (groundOverlayController, mapView) =
try GroundOverlayControllerTests.groundOverlayControllerWithPositionWithMockedMap()
- let position = FGMPlatformLatLng.make(withLatitude: 52.4816, longitude: 3.1791)
+ let position = PlatformLatLng(latitude: 52.4816, longitude: 3.1791)
- let bitmap = FGMPlatformBitmap.make(
- withBitmap: FGMPlatformBitmapDefaultMarker.make(withHue: 0)
- )
+ let bitmap = PlatformBitmapDefaultMarker(hue: 0)
- let platformGroundOverlay = FGMPlatformGroundOverlay.make(
- withGroundOverlayId: "id_1",
+ let platformGroundOverlay = PlatformGroundOverlay(
+ groundOverlayId: "id_1",
image: bitmap,
position: position,
bounds: nil,
- anchor: FGMPlatformPoint.makeWith(x: 0.5, y: 0.5),
+ anchor: PlatformPoint(x: 0.5, y: 0.5),
transparency: 0.5,
bearing: 65.0,
zIndex: 2,
@@ -116,7 +113,7 @@
#expect(abs(groundOverlayController.groundOverlay.anchor.y - 0.5) <= Double.ulpOfOne)
#expect(groundOverlayController.groundOverlay.zIndex == Int32(platformGroundOverlay.zIndex))
- let convertedPlatformGroundOverlay = FGMPlatformGroundOverlay.make(
+ let convertedPlatformGroundOverlay = PlatformGroundOverlay.make(
from: groundOverlayController.groundOverlay,
overlayId: "id_1",
isCreatedWithBounds: false,
@@ -128,7 +125,7 @@
#expect(
abs(convertedPlatformGroundOverlay.position!.longitude - position.longitude)
<= Double.ulpOfOne)
- #expect(convertedPlatformGroundOverlay.zoomLevel!.doubleValue == 14.0)
+ #expect(convertedPlatformGroundOverlay.zoomLevel == 14.0)
#expect(convertedPlatformGroundOverlay.transparency == platformGroundOverlay.transparency)
#expect(convertedPlatformGroundOverlay.bearing == platformGroundOverlay.bearing)
#expect(abs(convertedPlatformGroundOverlay.anchor!.x - 0.5) <= Double.ulpOfOne)
@@ -141,21 +138,19 @@
let (groundOverlayController, mapView) =
try GroundOverlayControllerTests.groundOverlayControllerWithBoundsWithMockedMap()
- let bounds = FGMPlatformLatLngBounds.make(
- withNortheast: FGMPlatformLatLng.make(withLatitude: 54.4816, longitude: 5.1791),
- southwest: FGMPlatformLatLng.make(withLatitude: 52.4816, longitude: 3.1791)
+ let bounds = PlatformLatLngBounds(
+ northeast: PlatformLatLng(latitude: 54.4816, longitude: 5.1791),
+ southwest: PlatformLatLng(latitude: 52.4816, longitude: 3.1791)
)
- let bitmap = FGMPlatformBitmap.make(
- withBitmap: FGMPlatformBitmapDefaultMarker.make(withHue: 0)
- )
+ let bitmap = PlatformBitmapDefaultMarker(hue: 0)
- let platformGroundOverlay = FGMPlatformGroundOverlay.make(
- withGroundOverlayId: "id_1",
+ let platformGroundOverlay = PlatformGroundOverlay(
+ groundOverlayId: "id_1",
image: bitmap,
position: nil,
bounds: bounds,
- anchor: FGMPlatformPoint.makeWith(x: 0.5, y: 0.5),
+ anchor: PlatformPoint(x: 0.5, y: 0.5),
transparency: 0.5,
bearing: 65.0,
zIndex: 2,
@@ -183,7 +178,7 @@
#expect(abs(groundOverlayController.groundOverlay.anchor.y - 0.5) <= Double.ulpOfOne)
#expect(groundOverlayController.groundOverlay.zIndex == Int32(platformGroundOverlay.zIndex))
- let convertedPlatformGroundOverlay = FGMPlatformGroundOverlay.make(
+ let convertedPlatformGroundOverlay = PlatformGroundOverlay.make(
from: groundOverlayController.groundOverlay,
overlayId: "id_1",
isCreatedWithBounds: true,
@@ -214,17 +209,15 @@
let groundOverlay = PropertyOrderValidatingGroundOverlay()
GroundOverlayController.update(
groundOverlay,
- from: FGMPlatformGroundOverlay.make(
- withGroundOverlayId: "groundOverlay",
- image: FGMPlatformBitmap.make(
- withBitmap: FGMPlatformBitmapDefaultMarker.make(withHue: 0)
+ from: PlatformGroundOverlay(
+ groundOverlayId: "groundOverlay",
+ image: PlatformBitmapDefaultMarker(hue: 0),
+ position: PlatformLatLng(latitude: 0, longitude: 0),
+ bounds: PlatformLatLngBounds(
+ northeast: PlatformLatLng(latitude: 54.4816, longitude: 5.1791),
+ southwest: PlatformLatLng(latitude: 52.4816, longitude: 3.1791)
),
- position: FGMPlatformLatLng.make(withLatitude: 0, longitude: 0),
- bounds: FGMPlatformLatLngBounds.make(
- withNortheast: FGMPlatformLatLng.make(withLatitude: 54.4816, longitude: 5.1791),
- southwest: FGMPlatformLatLng.make(withLatitude: 52.4816, longitude: 3.1791)
- ),
- anchor: FGMPlatformPoint.makeWith(x: 0.5, y: 0.5),
+ anchor: PlatformPoint(x: 0.5, y: 0.5),
transparency: 0.5,
bearing: 65.0,
zIndex: 2,
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/HeatmapControllerTests.swift b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/HeatmapControllerTests.swift
index 649d731..9fdfcce 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/HeatmapControllerTests.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/HeatmapControllerTests.swift
@@ -5,7 +5,6 @@
import GoogleMaps
import GoogleMapsUtils
import Testing
-import google_maps_flutter_ios_objc
@testable import google_maps_flutter_ios
@@ -13,25 +12,25 @@
@Test func updateHeatmapSetsVisibilityLast() {
let heatmap = PropertyOrderValidatingHeatmap()
- let gradient = FGMPlatformHeatmapGradient.make(
- with: [
- FGMPlatformColor.make(withRed: 0, green: 0, blue: 0, alpha: 0),
- FGMPlatformColor.make(withRed: 1.0, green: 1.0, blue: 1.0, alpha: 1.0),
+ let gradient = PlatformHeatmapGradient(
+ colors: [
+ PlatformColor(red: 0, green: 0, blue: 0, alpha: 0),
+ PlatformColor(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0),
],
- startPoints: [0 as NSNumber, 1 as NSNumber],
+ startPoints: [0, 1],
colorMapSize: 256
)
HeatmapController.update(
heatmap,
- from: FGMPlatformHeatmap.make(
- withHeatmapId: "heatmap",
+ from: PlatformHeatmap(
+ heatmapId: "heatmap",
data: [
- FGMPlatformWeightedLatLng.make(
- withPoint: FGMPlatformLatLng.make(withLatitude: 5.0, longitude: 5.0),
+ PlatformWeightedLatLng(
+ point: PlatformLatLng(latitude: 5.0, longitude: 5.0),
weight: 0.5
),
- FGMPlatformWeightedLatLng.make(
- withPoint: FGMPlatformLatLng.make(withLatitude: 10.0, longitude: 10.0),
+ PlatformWeightedLatLng(
+ point: PlatformLatLng(latitude: 10.0, longitude: 10.0),
weight: 0.75
),
],
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/MarkerControllerTests.swift b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/MarkerControllerTests.swift
index 4c3d751..a0dae94 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/MarkerControllerTests.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/MarkerControllerTests.swift
@@ -4,7 +4,6 @@
import GoogleMaps
import Testing
-import google_maps_flutter_ios_objc
@testable import google_maps_flutter_ios
@@ -18,12 +17,12 @@
return PartiallyMockedMapView(options: mapViewOptions)
}
- /// Returns a FGMMarkersController instance instantiated with the given map view.
+ /// Returns a MarkersController instance instantiated with the given map view.
///
/// The mapView should outlive the controller, as the controller keeps a weak reference to it.
func markersController(
withMapView mapView: GMSMapView,
- eventDelegate: NSObject & FGMMapEventDelegate
+ eventDelegate: MapEventDelegate
) -> MarkersController {
return MarkersController(
mapView: mapView,
@@ -34,8 +33,8 @@
)
}
- func placeholderBitmap() -> FGMPlatformBitmap {
- return FGMPlatformBitmap.make(withBitmap: FGMPlatformBitmapDefaultMarker.make(withHue: 0))
+ func placeholderBitmap() -> PlatformBitmap {
+ return PlatformBitmapDefaultMarker(hue: 0)
}
@Test func setsMarkerNumericProperties() throws {
@@ -48,23 +47,23 @@
let anchorY = 2.718
let alpha = 0.4
let rotation = 90.0
- let zIndex = 3
+ let zIndex: Int64 = 3
let latitude = 10.0
let longitude = 20.0
controller.add([
- FGMPlatformMarker.make(
- withAlpha: alpha,
- anchor: FGMPlatformPoint.makeWith(x: anchorX, y: anchorY),
+ PlatformMarker(
+ alpha: alpha,
+ anchor: PlatformPoint(x: anchorX, y: anchorY),
consumeTapEvents: true,
draggable: true,
flat: true,
icon: placeholderBitmap(),
- infoWindow: FGMPlatformInfoWindow.make(
- withTitle: "info title",
+ infoWindow: PlatformInfoWindow(
+ title: "info title",
snippet: "info snippet",
- anchor: FGMPlatformPoint.makeWith(x: 0, y: 0)
+ anchor: PlatformPoint(x: 0, y: 0)
),
- position: FGMPlatformLatLng.make(withLatitude: latitude, longitude: longitude),
+ position: PlatformLatLng(latitude: latitude, longitude: longitude),
rotation: rotation,
visible: true,
zIndex: zIndex,
@@ -94,19 +93,19 @@
let markerIdentifier = "marker"
controller.add([
- FGMPlatformMarker.make(
- withAlpha: 1.0,
- anchor: FGMPlatformPoint.makeWith(x: 0, y: 0),
+ PlatformMarker(
+ alpha: 1.0,
+ anchor: PlatformPoint(x: 0, y: 0),
consumeTapEvents: false,
draggable: true,
flat: false,
icon: placeholderBitmap(),
- infoWindow: FGMPlatformInfoWindow.make(
- withTitle: "info title",
+ infoWindow: PlatformInfoWindow(
+ title: "info title",
snippet: "info snippet",
- anchor: FGMPlatformPoint.makeWith(x: 0, y: 0)
+ anchor: PlatformPoint(x: 0, y: 0)
),
- position: FGMPlatformLatLng.make(withLatitude: 0.0, longitude: 0.0),
+ position: PlatformLatLng(latitude: 0.0, longitude: 0.0),
rotation: 0,
visible: false,
zIndex: 0,
@@ -131,19 +130,19 @@
let markerIdentifier = "marker"
controller.add([
- FGMPlatformMarker.make(
- withAlpha: 1.0,
- anchor: FGMPlatformPoint.makeWith(x: 0, y: 0),
+ PlatformMarker(
+ alpha: 1.0,
+ anchor: PlatformPoint(x: 0, y: 0),
consumeTapEvents: false,
draggable: false,
flat: true,
icon: placeholderBitmap(),
- infoWindow: FGMPlatformInfoWindow.make(
- withTitle: "info title",
+ infoWindow: PlatformInfoWindow(
+ title: "info title",
snippet: "info snippet",
- anchor: FGMPlatformPoint.makeWith(x: 0, y: 0)
+ anchor: PlatformPoint(x: 0, y: 0)
),
- position: FGMPlatformLatLng.make(withLatitude: 0.0, longitude: 0.0),
+ position: PlatformLatLng(latitude: 0.0, longitude: 0.0),
rotation: 0,
visible: false,
zIndex: 0,
@@ -168,19 +167,19 @@
let markerIdentifier = "marker"
controller.add([
- FGMPlatformMarker.make(
- withAlpha: 1.0,
- anchor: FGMPlatformPoint.makeWith(x: 0, y: 0),
+ PlatformMarker(
+ alpha: 1.0,
+ anchor: PlatformPoint(x: 0, y: 0),
consumeTapEvents: false,
draggable: false,
flat: false,
icon: placeholderBitmap(),
- infoWindow: FGMPlatformInfoWindow.make(
- withTitle: "info title",
+ infoWindow: PlatformInfoWindow(
+ title: "info title",
snippet: "info snippet",
- anchor: FGMPlatformPoint.makeWith(x: 0, y: 0)
+ anchor: PlatformPoint(x: 0, y: 0)
),
- position: FGMPlatformLatLng.make(withLatitude: 0.0, longitude: 0.0),
+ position: PlatformLatLng(latitude: 0.0, longitude: 0.0),
rotation: 0,
visible: true,
zIndex: 0,
@@ -208,19 +207,19 @@
let anchorX = 3.14
let anchorY = 2.718
controller.add([
- FGMPlatformMarker.make(
- withAlpha: 1.0,
- anchor: FGMPlatformPoint.makeWith(x: 0, y: 0),
+ PlatformMarker(
+ alpha: 1.0,
+ anchor: PlatformPoint(x: 0, y: 0),
consumeTapEvents: true,
draggable: true,
flat: true,
icon: placeholderBitmap(),
- infoWindow: FGMPlatformInfoWindow.make(
- withTitle: title,
+ infoWindow: PlatformInfoWindow(
+ title: title,
snippet: snippet,
- anchor: FGMPlatformPoint.makeWith(x: anchorX, y: anchorY)
+ anchor: PlatformPoint(x: anchorX, y: anchorY)
),
- position: FGMPlatformLatLng.make(withLatitude: 0, longitude: 0),
+ position: PlatformLatLng(latitude: 0, longitude: 0),
rotation: 0,
visible: true,
zIndex: 0,
@@ -242,24 +241,22 @@
@Test func updateMarkerSetsVisibilityLast() {
let marker = PropertyOrderValidatingAdvancedMarker()
- let collisionBehavior = FGMPlatformMarkerCollisionBehaviorBox(
- value: .requiredAndHidesOptional
- )
+ let collisionBehavior = PlatformMarkerCollisionBehavior.requiredAndHidesOptional
MarkerController.update(
marker,
- from: FGMPlatformMarker.make(
- withAlpha: 1.0,
- anchor: FGMPlatformPoint.makeWith(x: 0, y: 0),
+ from: PlatformMarker(
+ alpha: 1.0,
+ anchor: PlatformPoint(x: 0, y: 0),
consumeTapEvents: true,
draggable: true,
flat: true,
icon: placeholderBitmap(),
- infoWindow: FGMPlatformInfoWindow.make(
- withTitle: "info title",
+ infoWindow: PlatformInfoWindow(
+ title: "info title",
snippet: "info snippet",
- anchor: FGMPlatformPoint.makeWith(x: 0, y: 0)
+ anchor: PlatformPoint(x: 0, y: 0)
),
- position: FGMPlatformLatLng.make(withLatitude: 0, longitude: 0),
+ position: PlatformLatLng(latitude: 0, longitude: 0),
rotation: 0,
visible: true,
zIndex: 0,
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/PolygonControllerTests.swift b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/PolygonControllerTests.swift
index 921f095..078383b 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/PolygonControllerTests.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/PolygonControllerTests.swift
@@ -4,7 +4,6 @@
import GoogleMaps
import Testing
-import google_maps_flutter_ios_objc
@testable import google_maps_flutter_ios
@@ -14,15 +13,15 @@
let polygon = PropertyOrderValidatingPolygon()
PolygonController.update(
polygon,
- from: FGMPlatformPolygon.make(
- withPolygonId: "polygon",
+ from: PlatformPolygon(
+ polygonId: "polygon",
consumesTapEvents: false,
- fill: FGMPlatformColor.make(withRed: 0, green: 0, blue: 0, alpha: 0),
+ fillColor: PlatformColor(red: 0, green: 0, blue: 0, alpha: 0),
geodesic: false,
points: [],
holes: [],
visible: true,
- stroke: FGMPlatformColor.make(withRed: 0, green: 0, blue: 0, alpha: 0),
+ strokeColor: PlatformColor(red: 0, green: 0, blue: 0, alpha: 0),
strokeWidth: 0,
zIndex: 0
),
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/PolylineControllerTests.swift b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/PolylineControllerTests.swift
index 2b8d9d4..691e277 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/PolylineControllerTests.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/PolylineControllerTests.swift
@@ -4,7 +4,6 @@
import GoogleMaps
import Testing
-import google_maps_flutter_ios_objc
@testable import google_maps_flutter_ios
@@ -13,15 +12,15 @@
@Test func patternsSetSpans() {
let mapView = PolylineControllerTests.mapView()
- let polyline = FGMPlatformPolyline.make(
- withPolylineId: "polyline_id_0",
+ let polyline = PlatformPolyline(
+ polylineId: "polyline_id_0",
consumesTapEvents: false,
- color: FGMPlatformColor.make(withRed: 0, green: 0, blue: 0, alpha: 0),
+ color: PlatformColor(red: 0, green: 0, blue: 0, alpha: 0),
geodesic: false,
jointType: .round,
patterns: [
- FGMPlatformPatternItem.make(with: .dot, length: 10),
- FGMPlatformPatternItem.make(with: .dash, length: 10),
+ PlatformPatternItem(type: .dot, length: 10),
+ PlatformPatternItem(type: .dash, length: 10),
],
points: PolylineControllerTests.polylinePoints(),
visible: true,
@@ -46,10 +45,10 @@
let polyline = PropertyOrderValidatingPolyline()
PolylineController.update(
polyline,
- from: FGMPlatformPolyline.make(
- withPolylineId: "polyline",
+ from: PlatformPolyline(
+ polylineId: "polyline",
consumesTapEvents: false,
- color: FGMPlatformColor.make(withRed: 0, green: 0, blue: 0, alpha: 0),
+ color: PlatformColor(red: 0, green: 0, blue: 0, alpha: 0),
geodesic: false,
jointType: .round,
patterns: [],
@@ -72,12 +71,12 @@
}
/// Returns a set of points to use for tests that need a valid but arbitrary line.
- static func polylinePoints() -> [FGMPlatformLatLng] {
+ static func polylinePoints() -> [PlatformLatLng] {
return [
- FGMPlatformLatLng.make(withLatitude: 52.4816, longitude: -3.1791),
- FGMPlatformLatLng.make(withLatitude: 54.043, longitude: -2.9925),
- FGMPlatformLatLng.make(withLatitude: 54.1396, longitude: -4.2739),
- FGMPlatformLatLng.make(withLatitude: 53.4153, longitude: -4.0829),
+ PlatformLatLng(latitude: 52.4816, longitude: -3.1791),
+ PlatformLatLng(latitude: 54.043, longitude: -2.9925),
+ PlatformLatLng(latitude: 54.1396, longitude: -4.2739),
+ PlatformLatLng(latitude: 53.4153, longitude: -4.0829),
]
}
}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/TestUtils/TestAssetProvider.swift b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/TestUtils/TestAssetProvider.swift
index e32bc61..e46183f 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/TestUtils/TestAssetProvider.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/TestUtils/TestAssetProvider.swift
@@ -3,11 +3,11 @@
// found in the LICENSE file.
import UIKit
-import google_maps_flutter_ios
-import google_maps_flutter_ios_objc
-/// Fake implementation of FGMAssetProvider for unit tests.
-class TestAssetProvider: NSObject, FGMAssetProvider {
+@testable import google_maps_flutter_ios
+
+/// Fake implementation of AssetProvider for unit tests.
+class TestAssetProvider: AssetProvider {
private let image: UIImage?
private let assetName: String?
private let package: String?
@@ -25,14 +25,12 @@
self.image = image
self.assetName = assetName
self.package = package
- super.init()
}
- override init() {
+ init() {
self.image = nil
self.assetName = nil
self.package = nil
- super.init()
}
func lookupKey(forAsset asset: String) -> String? {
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/TestUtils/TestMapEventHandler.swift b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/TestUtils/TestMapEventHandler.swift
index e40d424..066c1d0 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/TestUtils/TestMapEventHandler.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/TestUtils/TestMapEventHandler.swift
@@ -3,41 +3,114 @@
// found in the LICENSE file.
import Foundation
-import google_maps_flutter_ios
-import google_maps_flutter_ios_objc
-/// Fake implementation of FGMMapEventDelegate for unit tests.
-class TestMapEventHandler: NSObject, FGMMapEventDelegate {
- func didStartCameraMove() {}
+@testable import google_maps_flutter_ios
- func didMoveCamera(to cameraPosition: FGMPlatformCameraPosition) {}
+/// Fake implementation of MapEventDelegate for unit tests.
+class TestMapEventHandler: MapEventDelegate {
+ func didStartCameraMove(completion: @escaping (Result<Void, PigeonError>) -> Void) {}
- func didIdleCamera() {}
-
- func didTap(atPosition position: FGMPlatformLatLng) {}
-
- func didLongPress(atPosition position: FGMPlatformLatLng) {}
-
- func didTapMarker(withIdentifier markerId: String) {}
-
- func didStartDragForMarker(
- withIdentifier markerId: String, atPosition position: FGMPlatformLatLng
+ func didMoveCamera(
+ to cameraPositionArg: PlatformCameraPosition,
+ completion:
+ @escaping (
+ Result<Void, PigeonError>
+ ) -> Void
) {}
- func didDragMarker(withIdentifier markerId: String, atPosition position: FGMPlatformLatLng) {}
+ func didIdleCamera(completion: @escaping (Result<Void, PigeonError>) -> Void) {}
- func didEndDragForMarker(withIdentifier markerId: String, atPosition position: FGMPlatformLatLng)
- {}
+ func didTap(
+ at positionArg: PlatformLatLng,
+ completion:
+ @escaping (
+ Result<Void, PigeonError>
+ ) -> Void
+ ) {}
- func didTapInfoWindowOfMarker(withIdentifier markerId: String) {}
+ func didLongPress(
+ at positionArg: PlatformLatLng,
+ completion:
+ @escaping (
+ Result<Void, PigeonError>
+ ) -> Void
+ ) {}
- func didTapCircle(withIdentifier circleId: String) {}
+ func didTapMarker(
+ withIdentifier markerIdArg: String,
+ completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {}
- func didTap(_ cluster: FGMPlatformCluster) {}
+ func didStartDragForMarker(
+ withIdentifier markerIdArg: String,
+ at positionArg: PlatformLatLng,
+ completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {}
- func didTapPolygon(withIdentifier polygonId: String) {}
+ func didDragMarker(
+ withIdentifier markerIdArg: String,
+ at positionArg: PlatformLatLng,
+ completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {}
- func didTapPolyline(withIdentifier polylineId: String) {}
+ func didEndDragForMarker(
+ withIdentifier markerIdArg: String,
+ at positionArg: PlatformLatLng,
+ completion:
+ @escaping (
+ Result<Void, PigeonError>
+ ) -> Void
+ ) {}
- func didTapGroundOverlay(withIdentifier groundOverlayId: String) {}
+ func didTapInfoWindowOfMarker(
+ withIdentifier markerIdArg: String,
+ completion:
+ @escaping (
+ Result<Void, PigeonError>
+ ) -> Void
+ ) {}
+
+ func didTapCircle(
+ withIdentifier circleIdArg: String,
+ completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {}
+
+ func didTapCluster(
+ _ clusterArg: PlatformCluster,
+ completion:
+ @escaping (
+ Result<Void, PigeonError>
+ ) -> Void
+ ) {}
+
+ func didTapPolygon(
+ withIdentifier polygonIdArg: String,
+ completion:
+ @escaping (
+ Result<Void, PigeonError>
+ ) -> Void
+ ) {}
+
+ func didTapPolyline(
+ withIdentifier polylineIdArg: String,
+ completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {}
+
+ func didTapGroundOverlay(
+ withIdentifier groundOverlayIdArg: String,
+ completion:
+ @escaping (
+ Result<Void, PigeonError>
+ ) -> Void
+ ) {}
+
+ func tile(
+ withOverlayIdentifier tileOverlayIdArg: String,
+ location locationArg: PlatformPoint,
+ zoom zoomArg: Int64,
+ completion:
+ @escaping (
+ Result<PlatformTile, PigeonError>
+ ) -> Void
+ ) {}
}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/TileOverlayControllerTests.swift b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/TileOverlayControllerTests.swift
index 61c2e85..bcb00b1 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/TileOverlayControllerTests.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/TileOverlayControllerTests.swift
@@ -4,7 +4,6 @@
import GoogleMaps
import Testing
-import google_maps_flutter_ios_objc
@testable import google_maps_flutter_ios
@@ -14,8 +13,8 @@
let tileLayer = PropertyOrderValidatingTileLayer()
TileOverlayController.update(
tileLayer,
- from: FGMPlatformTileOverlay.make(
- withTileOverlayId: "overlay",
+ from: PlatformTileOverlay(
+ tileOverlayId: "overlay",
fadeIn: false,
transparency: 0.5,
zIndex: 0,
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/TileProviderControllerTests.swift b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/TileProviderControllerTests.swift
index e333c63..c384ce2 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/TileProviderControllerTests.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/example/ios/RunnerTests/TileProviderControllerTests.swift
@@ -5,7 +5,6 @@
import Flutter
import GoogleMaps
import Testing
-import google_maps_flutter_ios_objc
@testable import google_maps_flutter_ios
@@ -18,19 +17,18 @@
// A tile provider that expects a single call to
// tileWithOverlayIdentifier:location:zoom:completion: on the main thread,
// and then confirms it.
-class TestTileProvider: NSObject, TileProviderDelegate {
+class TestTileProvider: TileProviderDelegate {
var onTileCalled: () -> Void
init(onTileCalled: @escaping () -> Void) {
self.onTileCalled = onTileCalled
- super.init()
}
func tile(
withOverlayIdentifier tileOverlayId: String,
- location: FGMPlatformPoint,
- zoom: Int,
- completion: @escaping (FGMPlatformTile?, FlutterError?) -> Void
+ location: PlatformPoint,
+ zoom: Int64,
+ completion: @escaping (Result<PlatformTile, PigeonError>) -> Void
) {
#expect(Thread.isMainThread)
onTileCalled()
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/AssetProvider.swift b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/AssetProvider.swift
new file mode 100644
index 0000000..cf4a2a9
--- /dev/null
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/AssetProvider.swift
@@ -0,0 +1,36 @@
+// Copyright 2013 The Flutter Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+import UIKit
+
+/// Protocol for looking up Flutter assets and resolving them to images.
+///
+/// This is used to allow testing with mock assets without mocking the entire
+/// Flutter plugin registrar and UIImage class.
+protocol AssetProvider {
+ /// Returns the key for the given asset.
+ ///
+ /// Wraps the FlutterPluginRegistrar method of the same name.
+ ///
+ /// @param asset The name of the asset.
+ /// @return The key for the asset, or nil if not found.
+ func lookupKey(forAsset asset: String) -> String?
+
+ /// Returns the key for the given asset from the given package.
+ ///
+ /// Wraps the FlutterPluginRegistrar method of the same name.
+ ///
+ /// @param asset The name of the asset.
+ /// @param package The name of the package to load the asset from.
+ /// @return The key for the asset, or nil if not found.
+ func lookupKey(forAsset asset: String, fromPackage package: String) -> String?
+
+ /// Returns the image for the given named asset.
+ ///
+ /// Wraps the UIImage method of the same name.
+ ///
+ /// @param name The name of the image asset or file.
+ /// @return The image, or nil if not found.
+ func imageNamed(_ name: String) -> UIImage?
+}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/CircleController.swift b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/CircleController.swift
index 4fdae62..f9870af 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/CircleController.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/CircleController.swift
@@ -4,20 +4,15 @@
import GoogleMaps
-#if canImport(google_maps_flutter_ios_objc)
- import google_maps_flutter_ios_objc
-#endif
-
/// Defines circle controllable by Flutter.
-class CircleController: NSObject {
+class CircleController {
let circle: GMSCircle
private weak var mapView: GMSMapView?
- init(circle: FGMPlatformCircle, mapView: GMSMapView) {
+ init(circle: PlatformCircle, mapView: GMSMapView) {
self.circle = GMSCircle()
self.mapView = mapView
self.circle.userData = [circle.circleId]
- super.init()
CircleController.update(self.circle, from: circle, with: mapView)
}
@@ -25,20 +20,20 @@
circle.map = nil
}
- /// Updates the controller's circle with the properties from a FGMPlatformCircle.
+ /// Updates the controller's circle with the properties from a PlatformCircle.
///
/// Setting the circle to visible will set its map to the given mapView.
- func update(from platformCircle: FGMPlatformCircle) {
+ func update(from platformCircle: PlatformCircle) {
if let mapView = mapView {
CircleController.update(circle, from: platformCircle, with: mapView)
}
}
- /// Updates the given GMSCircle with the properties from a FGMPlatformCircle.
+ /// Updates the given GMSCircle with the properties from a PlatformCircle.
///
/// Setting the circle to visible will set its map to the given mapView.
static func update(
- _ circle: GMSCircle, from platformCircle: FGMPlatformCircle, with mapView: GMSMapView
+ _ circle: GMSCircle, from platformCircle: PlatformCircle, with mapView: GMSMapView
) {
circle.isTappable = platformCircle.consumeTapEvents
circle.zIndex = Int32(platformCircle.zIndex)
@@ -53,25 +48,24 @@
}
}
-class CirclesController: NSObject {
- private weak var eventDelegate: FGMMapEventDelegate?
+class CirclesController {
+ private weak var eventDelegate: MapEventDelegate?
private weak var mapView: GMSMapView?
private var circleIdToController: [String: CircleController] = [:]
- init(mapView: GMSMapView, eventDelegate: FGMMapEventDelegate) {
+ init(mapView: GMSMapView, eventDelegate: MapEventDelegate) {
self.mapView = mapView
self.eventDelegate = eventDelegate
- super.init()
}
- func add(_ circles: [FGMPlatformCircle]) {
+ func add(_ circles: [PlatformCircle]) {
guard let mapView = mapView else { return }
for circle in circles {
circleIdToController[circle.circleId] = CircleController(circle: circle, mapView: mapView)
}
}
- func change(_ circles: [FGMPlatformCircle]) {
+ func change(_ circles: [PlatformCircle]) {
for circle in circles {
circleIdToController[circle.circleId]?.update(from: circle)
}
@@ -92,7 +86,7 @@
func didTapCircle(withIdentifier identifier: String) {
if hasCircle(withIdentifier: identifier) {
- eventDelegate?.didTapCircle(withIdentifier: identifier)
+ eventDelegate?.didTapCircle(withIdentifier: identifier) { _ in }
}
}
}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/ClusterManagersController.swift b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/ClusterManagersController.swift
index e4db55d..6c8bc4a 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/ClusterManagersController.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/ClusterManagersController.swift
@@ -4,24 +4,20 @@
import Flutter
import GoogleMaps
-
-#if canImport(google_maps_flutter_ios_objc)
- import google_maps_flutter_ios_objc
-#endif
+import GoogleMapsUtils
/// A controller that manages all of the cluster managers on a map.
-class ClusterManagersController: NSObject {
+class ClusterManagersController {
private var clusterManagerIdentifierToManagers: [String: GMUClusterManager] = [:]
- private weak var eventDelegate: FGMMapEventDelegate?
+ private weak var eventDelegate: MapEventDelegate?
private weak var mapView: GMSMapView?
- init(mapView: GMSMapView, eventDelegate: FGMMapEventDelegate) {
+ init(mapView: GMSMapView, eventDelegate: MapEventDelegate) {
self.mapView = mapView
self.eventDelegate = eventDelegate
- super.init()
}
- func add(_ clusterManagersToAdd: [FGMPlatformClusterManager]) {
+ func add(_ clusterManagersToAdd: [PlatformClusterManager]) {
for clusterManager in clusterManagersToAdd {
addClusterManager(clusterManager.identifier)
}
@@ -56,17 +52,13 @@
clusterManagerIdentifierToManagers.values.forEach({ $0.cluster() })
}
- func clusters(
- withIdentifier identifier: String,
- error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) -> [FGMPlatformCluster]? {
+ func clusters(withIdentifier identifier: String) throws -> [PlatformCluster] {
guard let clusterManager = clusterManagerIdentifierToManagers[identifier] else {
- error.pointee = FlutterError(
+ throw PigeonError(
code: "Invalid clusterManagerId",
message: "getClusters called with invalid clusterManagerId",
details: "clusterManagerId was: '\(identifier)'"
)
- return nil
}
guard let mapView = mapView else { return [] }
@@ -74,14 +66,14 @@
// https://github.com/googlemaps/google-maps-ios-utils/blob/0e7ed81f1bbd9d29e4529c40ae39b0791b0a0eb8/src/Clustering/GMUClusterManager.m#L94.
let integralZoom = floorf(Float(mapView.camera.zoom) + 0.5)
let clusters = clusterManager.algorithm.clusters(atZoom: integralZoom)
- return clusters.map { FGMPlatformCluster.make(from: $0, clusterManagerIdentifier: identifier) }
+ return clusters.map { PlatformCluster.make(from: $0, clusterManagerIdentifier: identifier) }
}
func didTap(_ cluster: GMUStaticCluster) {
guard let clusterManagerId = clusterManagerIdentifier(for: cluster) else { return }
- let platformCluster = FGMPlatformCluster.make(
+ let platformCluster = PlatformCluster.make(
from: cluster, clusterManagerIdentifier: clusterManagerId)
- eventDelegate?.didTap(platformCluster)
+ eventDelegate?.didTapCluster(platformCluster) { _ in }
}
/// Returns the cluster manager identifier for given cluster.
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/ConversionUtils.swift b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/ConversionUtils.swift
index 5f00cac..0fcd1be 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/ConversionUtils.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/ConversionUtils.swift
@@ -6,14 +6,10 @@
import GoogleMaps
import GoogleMapsUtils
-#if canImport(google_maps_flutter_ios_objc)
- import google_maps_flutter_ios_objc
-#endif
-
-extension FGMPlatformPoint {
+extension PlatformPoint {
/// Converts a CGPoint to its Pigeon equivalent.
- static func make(from point: CGPoint) -> FGMPlatformPoint {
- return FGMPlatformPoint.makeWith(x: point.x, y: point.y)
+ static func make(from point: CGPoint) -> PlatformPoint {
+ return PlatformPoint(x: point.x, y: point.y)
}
/// Returns the equivalent CGPoint.
@@ -22,11 +18,10 @@
}
}
-extension FGMPlatformLatLng {
+extension PlatformLatLng {
/// Converts a CLLocationCoordinate2D to its Pigeon representation.
- static func make(from coordinate: CLLocationCoordinate2D) -> FGMPlatformLatLng {
- return FGMPlatformLatLng.make(
- withLatitude: coordinate.latitude, longitude: coordinate.longitude)
+ static func make(from coordinate: CLLocationCoordinate2D) -> PlatformLatLng {
+ return PlatformLatLng(latitude: coordinate.latitude, longitude: coordinate.longitude)
}
/// Returns the equivalent CLLocationCoordinate2D.
@@ -35,12 +30,12 @@
}
}
-extension FGMPlatformLatLngBounds {
+extension PlatformLatLngBounds {
/// Converts a GMSCoordinateBounds to its Pigeon representation.
- static func make(from bounds: GMSCoordinateBounds) -> FGMPlatformLatLngBounds {
- return FGMPlatformLatLngBounds.make(
- withNortheast: FGMPlatformLatLng.make(from: bounds.northEast),
- southwest: FGMPlatformLatLng.make(from: bounds.southWest)
+ static func make(from bounds: GMSCoordinateBounds) -> PlatformLatLngBounds {
+ return PlatformLatLngBounds(
+ northeast: PlatformLatLng.make(from: bounds.northEast),
+ southwest: PlatformLatLng.make(from: bounds.southWest)
)
}
@@ -53,12 +48,12 @@
}
}
-extension FGMPlatformCameraPosition {
+extension PlatformCameraPosition {
/// Converts a GMSCameraPosition to its Pigeon representation.
- static func make(from position: GMSCameraPosition) -> FGMPlatformCameraPosition {
- return FGMPlatformCameraPosition.make(
- withBearing: position.bearing,
- target: FGMPlatformLatLng.make(from: position.target),
+ static func make(from position: GMSCameraPosition) -> PlatformCameraPosition {
+ return PlatformCameraPosition(
+ bearing: position.bearing,
+ target: PlatformLatLng.make(from: position.target),
tilt: position.viewingAngle,
zoom: Double(position.zoom)
)
@@ -84,7 +79,7 @@
return path
}
-extension FGMPlatformMapType {
+extension PlatformMapType {
/// The corresponding GMSMapViewType.
var gmsMapViewType: GMSMapViewType {
switch self {
@@ -98,7 +93,7 @@
}
}
-extension FGMPlatformMarkerCollisionBehavior {
+extension PlatformMarkerCollisionBehavior {
/// The corresponding GMSCollisionBehavior.
var gmsCollisionBehavior: GMSCollisionBehavior {
switch self {
@@ -114,40 +109,39 @@
}
}
-extension FGMPlatformGroundOverlay {
+extension PlatformGroundOverlay {
/// Converts a GMSGroundOverlay to its Pigeon representation.
static func make(
from groundOverlay: GMSGroundOverlay,
overlayId: String,
isCreatedWithBounds: Bool,
- zoomLevel: NSNumber?
- ) -> FGMPlatformGroundOverlay {
- let placeholderImage = FGMPlatformBitmap.make(
- withBitmap: FGMPlatformBitmapDefaultMarker.make(withHue: nil))
+ zoomLevel: Double?
+ ) -> PlatformGroundOverlay {
+ let placeholderImage = PlatformBitmapDefaultMarker(hue: nil)
if isCreatedWithBounds, let bounds = groundOverlay.bounds {
- return FGMPlatformGroundOverlay.make(
- withGroundOverlayId: overlayId,
+ return PlatformGroundOverlay(
+ groundOverlayId: overlayId,
image: placeholderImage,
position: nil,
- bounds: FGMPlatformLatLngBounds.make(from: bounds),
- anchor: FGMPlatformPoint.make(from: groundOverlay.anchor),
+ bounds: PlatformLatLngBounds.make(from: bounds),
+ anchor: PlatformPoint.make(from: groundOverlay.anchor),
transparency: 1.0 - Double(groundOverlay.opacity),
bearing: groundOverlay.bearing,
- zIndex: Int(groundOverlay.zIndex),
+ zIndex: Int64(groundOverlay.zIndex),
visible: groundOverlay.map != nil,
clickable: groundOverlay.isTappable,
zoomLevel: zoomLevel
)
} else {
- return FGMPlatformGroundOverlay.make(
- withGroundOverlayId: overlayId,
+ return PlatformGroundOverlay(
+ groundOverlayId: overlayId,
image: placeholderImage,
- position: FGMPlatformLatLng.make(from: groundOverlay.position),
+ position: PlatformLatLng.make(from: groundOverlay.position),
bounds: nil,
- anchor: FGMPlatformPoint.make(from: groundOverlay.anchor),
+ anchor: PlatformPoint.make(from: groundOverlay.anchor),
transparency: 1.0 - Double(groundOverlay.opacity),
bearing: groundOverlay.bearing,
- zIndex: Int(groundOverlay.zIndex),
+ zIndex: Int64(groundOverlay.zIndex),
visible: groundOverlay.map != nil,
clickable: groundOverlay.isTappable,
zoomLevel: zoomLevel
@@ -156,14 +150,14 @@
}
}
-extension FGMPlatformHeatmapGradient {
+extension PlatformHeatmapGradient {
/// Converts a GMUGradient to its Pigeon representation.
- static func make(from gradient: GMUGradient) -> FGMPlatformHeatmapGradient {
- let colors = gradient.colors.map { FGMPlatformColor.make(from: $0) }
- return FGMPlatformHeatmapGradient.make(
- with: colors,
- startPoints: gradient.startPoints,
- colorMapSize: Int(gradient.mapSize)
+ static func make(from gradient: GMUGradient) -> PlatformHeatmapGradient {
+ let colors = gradient.colors.map { PlatformColor.make(from: $0) }
+ return PlatformHeatmapGradient(
+ colors: colors,
+ startPoints: gradient.startPoints.map { $0.doubleValue },
+ colorMapSize: Int64(gradient.mapSize)
)
}
@@ -172,18 +166,18 @@
let colors = colors.map { $0.toUIColor() }
return GMUGradient(
colors: colors,
- startPoints: startPoints,
+ startPoints: startPoints.map { $0 as NSNumber },
colorMapSize: UInt(colorMapSize)
)
}
}
-extension FGMPlatformWeightedLatLng {
+extension PlatformWeightedLatLng {
/// Converts a GMUWeightedLatLng to its Pigeon representation.
- static func make(from weightedLatLng: GMUWeightedLatLng) -> FGMPlatformWeightedLatLng {
+ static func make(from weightedLatLng: GMUWeightedLatLng) -> PlatformWeightedLatLng {
let point = GMSMapPoint(x: weightedLatLng.point().x, y: weightedLatLng.point().y)
- return FGMPlatformWeightedLatLng.make(
- withPoint: FGMPlatformLatLng.make(from: GMSUnproject(point)),
+ return PlatformWeightedLatLng(
+ point: PlatformLatLng.make(from: GMSUnproject(point)),
weight: Double(weightedLatLng.intensity)
)
}
@@ -194,36 +188,35 @@
}
}
-extension FGMPlatformCameraUpdate {
+extension PlatformCameraUpdate {
/// Creates a GMSCameraUpdate from its Pigeon equivalent.
func toGMSCameraUpdate() -> GMSCameraUpdate? {
- // See note in messages.dart for why this is so loosely typed.
- switch cameraUpdate {
- case let newCameraPosition as FGMPlatformCameraUpdateNewCameraPosition:
+ switch self {
+ case let newCameraPosition as PlatformCameraUpdateNewCameraPosition:
return GMSCameraUpdate.setCamera(newCameraPosition.cameraPosition.toGMSCameraPosition())
- case let newLatLng as FGMPlatformCameraUpdateNewLatLng:
+ case let newLatLng as PlatformCameraUpdateNewLatLng:
return GMSCameraUpdate.setTarget(newLatLng.latLng.toCLLocationCoordinate2D())
- case let newLatLngBounds as FGMPlatformCameraUpdateNewLatLngBounds:
+ case let newLatLngBounds as PlatformCameraUpdateNewLatLngBounds:
return GMSCameraUpdate.fit(
newLatLngBounds.bounds.toGMSCoordinateBounds(),
withPadding: CGFloat(newLatLngBounds.padding)
)
- case let newLatLngZoom as FGMPlatformCameraUpdateNewLatLngZoom:
+ case let newLatLngZoom as PlatformCameraUpdateNewLatLngZoom:
return GMSCameraUpdate.setTarget(
newLatLngZoom.latLng.toCLLocationCoordinate2D(),
zoom: Float(newLatLngZoom.zoom)
)
- case let scrollBy as FGMPlatformCameraUpdateScrollBy:
+ case let scrollBy as PlatformCameraUpdateScrollBy:
return GMSCameraUpdate.scrollBy(x: scrollBy.dx, y: scrollBy.dy)
- case let zoomBy as FGMPlatformCameraUpdateZoomBy:
+ case let zoomBy as PlatformCameraUpdateZoomBy:
if let focus = zoomBy.focus {
return GMSCameraUpdate.zoom(by: Float(zoomBy.amount), at: focus.toCGPoint())
} else {
return GMSCameraUpdate.zoom(by: Float(zoomBy.amount))
}
- case let zoom as FGMPlatformCameraUpdateZoom:
+ case let zoom as PlatformCameraUpdateZoom:
return zoom.out ? GMSCameraUpdate.zoomOut() : GMSCameraUpdate.zoomIn()
- case let zoomTo as FGMPlatformCameraUpdateZoomTo:
+ case let zoomTo as PlatformCameraUpdateZoomTo:
return GMSCameraUpdate.zoom(to: Float(zoomTo.zoom))
default:
return nil
@@ -231,16 +224,16 @@
}
}
-extension FGMPlatformColor {
+extension PlatformColor {
/// Converts a UIColor to its Pigeon representation.
- static func make(from color: UIColor) -> FGMPlatformColor {
+ static func make(from color: UIColor) -> PlatformColor {
var red: CGFloat = 0
var green: CGFloat = 0
var blue: CGFloat = 0
var alpha: CGFloat = 0
color.getRed(&red, green: &green, blue: &blue, alpha: &alpha)
- return FGMPlatformColor.make(
- withRed: Double(red), green: Double(green), blue: Double(blue), alpha: Double(alpha))
+ return PlatformColor(
+ red: Double(red), green: Double(green), blue: Double(blue), alpha: Double(alpha))
}
/// Returns the equivalent UIColor.
@@ -249,7 +242,7 @@
}
}
-extension FGMPlatformPatternItem {
+extension PlatformPatternItem {
/// The GMSStrokeStyle expression of this pattern, using the given stroke color.
func gmsStrokeStyle(strokeColor: UIColor) -> GMSStrokeStyle {
let color = type == .gap ? UIColor.clear : strokeColor
@@ -258,16 +251,16 @@
/// The span length for this pattern, in the form expected by GMSStyleSpans.
func gmsStyleSpanLength() -> NSNumber {
- return length ?? 0
+ return (length ?? 0) as NSNumber
}
}
-extension FGMPlatformCluster {
+extension PlatformCluster {
/// Converts a GMUCluster to its Pigeon representation.
static func make(
from cluster: GMUCluster,
clusterManagerIdentifier: String
- ) -> FGMPlatformCluster {
+ ) -> PlatformCluster {
var bounds = GMSCoordinateBounds()
for item in cluster.items {
bounds = bounds.includingCoordinate(item.position)
@@ -277,10 +270,10 @@
markerIdentifierFromMarker($0)
}
- return FGMPlatformCluster.make(
- withClusterManagerId: clusterManagerIdentifier,
- position: FGMPlatformLatLng.make(from: cluster.position),
- bounds: FGMPlatformLatLngBounds.make(from: bounds),
+ return PlatformCluster(
+ clusterManagerId: clusterManagerIdentifier,
+ position: PlatformLatLng.make(from: cluster.position),
+ bounds: PlatformLatLngBounds.make(from: bounds),
markerIds: markerIds
)
}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.swift b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.swift
index 3349fb8..9bb1c8a 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapController.swift
@@ -6,17 +6,40 @@
import GoogleMaps
import GoogleMapsUtils
-#if canImport(google_maps_flutter_ios_objc)
- import google_maps_flutter_ios_objc
-#endif
+/// Protocol for CATransaction to allow mocking in tests.
+protocol MapAnimationCATransactionProtocol {
+ func begin()
+ func commit()
+ func setAnimationDuration(_ duration: CFTimeInterval)
+}
-/// Non-test implementation of FGMAssetProvider, wrapping a Flutter plugin registrar.
-class DefaultAssetProvider: NSObject, FGMAssetProvider {
+/// Add the AnyObject-required protocol to MapsCallbackApi to allow it to be passed to sub-controllers.
+extension MapsCallbackApi: MapEventDelegate {}
+
+/// Add TileProviderDelegate to avoid needing to pass the entire API surface to TileOverlayController.
+extension MapsCallbackApi: TileProviderDelegate {}
+
+/// Non-test implementation of MapAnimationCATransactionProtocol.
+class DefaultMapAnimationCATransaction: MapAnimationCATransactionProtocol {
+ func begin() {
+ CATransaction.begin()
+ }
+
+ func commit() {
+ CATransaction.commit()
+ }
+
+ func setAnimationDuration(_ duration: CFTimeInterval) {
+ CATransaction.setAnimationDuration(duration)
+ }
+}
+
+/// Non-test implementation of AssetProvider, wrapping a Flutter plugin registrar.
+class DefaultAssetProvider: AssetProvider {
weak var registrar: FlutterPluginRegistrar?
init(registrar: FlutterPluginRegistrar) {
self.registrar = registrar
- super.init()
}
func lookupKey(forAsset asset: String) -> String? {
@@ -32,92 +55,15 @@
}
}
-/// Non-test implementation of FGMMapEventDelegate, wrapping a FGMMapsCallbackApi instance.
-class DefaultMapEventHandler: NSObject, FGMMapEventDelegate {
- let callbackHandler: FGMMapsCallbackApi
-
- init(callbackHandler: FGMMapsCallbackApi) {
- self.callbackHandler = callbackHandler
- super.init()
- }
-
- func didStartCameraMove() {
- callbackHandler.didStartCameraMove { _ in }
- }
-
- func didMoveCamera(to cameraPosition: FGMPlatformCameraPosition) {
- callbackHandler.didMoveCamera(to: cameraPosition) { _ in }
- }
-
- func didIdleCamera() {
- callbackHandler.didIdleCamera { _ in }
- }
-
- func didTap(atPosition position: FGMPlatformLatLng) {
- callbackHandler.didTap(atPosition: position) { _ in }
- }
-
- func didLongPress(atPosition position: FGMPlatformLatLng) {
- callbackHandler.didLongPress(atPosition: position) { _ in }
- }
-
- func didTapMarker(withIdentifier markerId: String) {
- callbackHandler.didTapMarker(withIdentifier: markerId) { _ in }
- }
-
- func didStartDragForMarker(
- withIdentifier markerId: String, atPosition position: FGMPlatformLatLng
- ) {
- callbackHandler.didStartDragForMarker(withIdentifier: markerId, atPosition: position) { _ in }
- }
-
- func didDragMarker(withIdentifier markerId: String, atPosition position: FGMPlatformLatLng) {
- callbackHandler.didDragMarker(withIdentifier: markerId, atPosition: position) { _ in }
- }
-
- func didEndDragForMarker(withIdentifier markerId: String, atPosition position: FGMPlatformLatLng)
- {
- callbackHandler.didEndDragForMarker(withIdentifier: markerId, atPosition: position) { _ in }
- }
-
- func didTapInfoWindowOfMarker(withIdentifier markerId: String) {
- callbackHandler.didTapInfoWindowOfMarker(withIdentifier: markerId) { _ in }
- }
-
- func didTapCircle(withIdentifier circleId: String) {
- callbackHandler.didTapCircle(withIdentifier: circleId) { _ in }
- }
-
- func didTap(_ cluster: FGMPlatformCluster) {
- callbackHandler.didTap(cluster) { _ in }
- }
-
- func didTapPolygon(withIdentifier polygonId: String) {
- callbackHandler.didTapPolygon(withIdentifier: polygonId) { _ in }
- }
-
- func didTapPolyline(withIdentifier polylineId: String) {
- callbackHandler.didTapPolyline(withIdentifier: polylineId) { _ in }
- }
-
- func didTapGroundOverlay(withIdentifier groundOverlayId: String) {
- callbackHandler.didTapGroundOverlay(withIdentifier: groundOverlayId) { _ in }
- }
-}
-
public class GoogleMapController: NSObject, GMSMapViewDelegate, FlutterPlatformView {
/// The Google Maps SDK map view managed by this controller.
let mapView: GMSMapView
/// The Pigeon callback API implementation, used to send events to the Dart side.
- let dartCallbackHandler: FGMMapsCallbackApi
- /// The map SDK event handler, which routes events to the Dart callback handler.
- let mapEventHandler: DefaultMapEventHandler
+ let dartCallbackHandler: MapsCallbackApi
/// The main Pigeon API implementation, separate to avoid lifetime extension.
let callHandler: MapCallHandler
/// The inspector API implementation, separate to avoid lifetime extension.
let inspector: MapInspector
- /// A shim to pass tile requests to `dartCallbackHandler`. This is a separate object to avoid init ordering issues.
- private let tileProvider: ConcreteTileProvider
/// Whether to send notifications about camera position changes to Dart.
var trackCameraPosition = false
@@ -140,10 +86,10 @@
/// that the observer is removed before the controller is deallocated.
private var isObservingFrame = false
- public convenience init(
+ convenience init(
frame: CGRect,
viewIdentifier viewId: Int64,
- creationParameters: FGMPlatformMapViewCreationParams,
+ creationParameters: PlatformMapViewCreationParams,
registrar: FlutterPluginRegistrar
) {
let camera = creationParameters.initialCameraPosition.toGMSCameraPosition()
@@ -167,8 +113,8 @@
init(
mapView: GMSMapView,
viewIdentifier viewId: Int64,
- creationParameters: FGMPlatformMapViewCreationParams,
- assetProvider: FGMAssetProvider,
+ creationParameters: PlatformMapViewCreationParams,
+ assetProvider: AssetProvider,
binaryMessenger: FlutterBinaryMessenger
) {
self.mapView = mapView
@@ -183,52 +129,49 @@
styleError = errorString
}
if let trackCameraPosition = creationParameters.mapConfiguration.trackCameraPosition {
- self.trackCameraPosition = trackCameraPosition.boolValue
+ self.trackCameraPosition = trackCameraPosition
}
// End duplicate code.
let pigeonSuffix = String(format: "%lld", viewId)
- dartCallbackHandler = FGMMapsCallbackApi(
+ dartCallbackHandler = MapsCallbackApi(
binaryMessenger: binaryMessenger,
messageChannelSuffix: pigeonSuffix
)
- mapEventHandler = DefaultMapEventHandler(callbackHandler: dartCallbackHandler)
-
let markerType = creationParameters.mapConfiguration.markerType
clusterManagersController = ClusterManagersController(
mapView: mapView,
- eventDelegate: mapEventHandler
+ eventDelegate: dartCallbackHandler
)
markersController = MarkersController(
mapView: mapView,
- eventDelegate: mapEventHandler,
+ eventDelegate: dartCallbackHandler,
clusterManagersController: clusterManagersController,
assetProvider: assetProvider,
markerType: markerType
)
polygonsController = PolygonsController(
mapView: mapView,
- eventDelegate: mapEventHandler
+ eventDelegate: dartCallbackHandler
)
polylinesController = PolylinesController(
mapView: mapView,
- eventDelegate: mapEventHandler
+ eventDelegate: dartCallbackHandler
)
circlesController = CirclesController(
mapView: mapView,
- eventDelegate: mapEventHandler
+ eventDelegate: dartCallbackHandler
)
heatmapsController = HeatmapsController(mapView: mapView)
- tileProvider = ConcreteTileProvider(dartCallbackHandler: dartCallbackHandler)
tileOverlaysController = TileOverlaysController(
mapView: mapView,
- tileProvider: tileProvider
+ tileProvider: dartCallbackHandler
)
groundOverlaysController = GroundOverlaysController(
mapView: mapView,
- eventDelegate: mapEventHandler,
+ eventDelegate: dartCallbackHandler,
assetProvider: assetProvider
)
@@ -253,9 +196,17 @@
super.init()
callHandler.controller = self
- SetUpFGMMapsApiWithSuffix(binaryMessenger, callHandler, pigeonSuffix)
+ MapsApiSetup.setUp(
+ binaryMessenger: binaryMessenger,
+ api: callHandler,
+ messageChannelSuffix: pigeonSuffix
+ )
inspector.controller = self
- SetUpFGMMapsInspectorApiWithSuffix(binaryMessenger, inspector, pigeonSuffix)
+ MapsInspectorApiSetup.setUp(
+ binaryMessenger: binaryMessenger,
+ api: inspector,
+ messageChannelSuffix: pigeonSuffix
+ )
mapView.delegate = self
isObservingFrame = true
@@ -269,8 +220,15 @@
if isObservingFrame {
mapView.removeObserver(self, forKeyPath: "frame")
}
- SetUpFGMMapsApiWithSuffix(callHandler.messenger, nil, callHandler.pigeonSuffix)
- SetUpFGMMapsInspectorApiWithSuffix(inspector.messenger, nil, inspector.pigeonSuffix)
+ MapsApiSetup.setUp(
+ binaryMessenger: callHandler.messenger,
+ api: nil,
+ messageChannelSuffix: callHandler.pigeonSuffix
+ )
+ MapsInspectorApiSetup.setUp(
+ binaryMessenger: inspector.messenger,
+ api: nil,
+ messageChannelSuffix: inspector.pigeonSuffix)
}
public func view() -> UIView {
@@ -355,17 +313,17 @@
// MARK: - GMSMapViewDelegate methods
public func mapView(_ mapView: GMSMapView, willMove gesture: Bool) {
- mapEventHandler.didStartCameraMove()
+ dartCallbackHandler.didStartCameraMove { _ in }
}
public func mapView(_ mapView: GMSMapView, didChange position: GMSCameraPosition) {
if trackCameraPosition {
- mapEventHandler.didMoveCamera(to: FGMPlatformCameraPosition.make(from: position))
+ dartCallbackHandler.didMoveCamera(to: PlatformCameraPosition.make(from: position)) { _ in }
}
}
public func mapView(_ mapView: GMSMapView, idleAt position: GMSCameraPosition) {
- mapEventHandler.didIdleCamera()
+ dartCallbackHandler.didIdleCamera { _ in }
}
public func mapView(_ mapView: GMSMapView, didTap marker: GMSMarker) -> Bool {
@@ -421,14 +379,14 @@
}
public func mapView(_ mapView: GMSMapView, didTapAt coordinate: CLLocationCoordinate2D) {
- mapEventHandler.didTap(atPosition: FGMPlatformLatLng.make(from: coordinate))
+ dartCallbackHandler.didTap(at: PlatformLatLng.make(from: coordinate)) { _ in }
}
public func mapView(_ mapView: GMSMapView, didLongPressAt coordinate: CLLocationCoordinate2D) {
- mapEventHandler.didLongPress(atPosition: FGMPlatformLatLng.make(from: coordinate))
+ dartCallbackHandler.didLongPress(at: PlatformLatLng.make(from: coordinate)) { _ in }
}
- func interpretMapConfiguration(_ config: FGMPlatformMapConfiguration) {
+ func interpretMapConfiguration(_ config: PlatformMapConfiguration) {
// Any changes here must also be made to the `init` method above. See the comment there for
// details.
let (styleUpdateAttempted, errorString) = GoogleMapController.updateMapView(
@@ -437,7 +395,7 @@
styleError = errorString
}
if let trackCameraPosition = config.trackCameraPosition {
- self.trackCameraPosition = trackCameraPosition.boolValue
+ self.trackCameraPosition = trackCameraPosition
}
}
@@ -447,7 +405,7 @@
/// describing any error interpreting the style in `config`. If the boolean is true, the error
/// string should be stored in `styleError` for later access.
static func updateMapView(
- _ mapView: GMSMapView, fromConfiguration config: FGMPlatformMapConfiguration
+ _ mapView: GMSMapView, fromConfiguration config: PlatformMapConfiguration
) -> (Bool, String?) {
if let cameraTargetBounds = config.cameraTargetBounds {
if let bounds = cameraTargetBounds.bounds {
@@ -457,23 +415,23 @@
}
}
if let compassEnabled = config.compassEnabled {
- mapView.settings.compassButton = compassEnabled.boolValue
+ mapView.settings.compassButton = compassEnabled
}
if let indoorEnabled = config.indoorViewEnabled {
- mapView.isIndoorEnabled = indoorEnabled.boolValue
+ mapView.isIndoorEnabled = indoorEnabled
}
if let trafficEnabled = config.trafficEnabled {
- mapView.isTrafficEnabled = trafficEnabled.boolValue
+ mapView.isTrafficEnabled = trafficEnabled
}
if let buildingsEnabled = config.buildingsEnabled {
- mapView.isBuildingsEnabled = buildingsEnabled.boolValue
+ mapView.isBuildingsEnabled = buildingsEnabled
}
if let mapType = config.mapType {
- mapView.mapType = mapType.value.gmsMapViewType
+ mapView.mapType = mapType.gmsMapViewType
}
if let zoomData = config.minMaxZoomPreference {
- let minZoom = zoomData.min?.floatValue ?? kGMSMinZoomLevel
- let maxZoom = zoomData.max?.floatValue ?? kGMSMaxZoomLevel
+ let minZoom = zoomData.min.map { Float($0) } ?? kGMSMinZoomLevel
+ let maxZoom = zoomData.max.map { Float($0) } ?? kGMSMaxZoomLevel
mapView.setMinZoom(minZoom, maxZoom: maxZoom)
}
if let padding = config.padding {
@@ -485,22 +443,22 @@
)
}
if let rotateGesturesEnabled = config.rotateGesturesEnabled {
- mapView.settings.rotateGestures = rotateGesturesEnabled.boolValue
+ mapView.settings.rotateGestures = rotateGesturesEnabled
}
if let scrollGesturesEnabled = config.scrollGesturesEnabled {
- mapView.settings.scrollGestures = scrollGesturesEnabled.boolValue
+ mapView.settings.scrollGestures = scrollGesturesEnabled
}
if let tiltGesturesEnabled = config.tiltGesturesEnabled {
- mapView.settings.tiltGestures = tiltGesturesEnabled.boolValue
+ mapView.settings.tiltGestures = tiltGesturesEnabled
}
if let zoomGesturesEnabled = config.zoomGesturesEnabled {
- mapView.settings.zoomGestures = zoomGesturesEnabled.boolValue
+ mapView.settings.zoomGestures = zoomGesturesEnabled
}
if let myLocationEnabled = config.myLocationEnabled {
- mapView.isMyLocationEnabled = myLocationEnabled.boolValue
+ mapView.isMyLocationEnabled = myLocationEnabled
}
if let myLocationButtonEnabled = config.myLocationButtonEnabled {
- mapView.settings.myLocationButton = myLocationButtonEnabled.boolValue
+ mapView.settings.myLocationButton = myLocationButtonEnabled
}
if let mapStyle = config.style {
let (style, errorString) = GoogleMapController.parseMapStyle(mapStyle)
@@ -513,36 +471,11 @@
}
}
-// TODO(stuartmorgan): Remove this in favor of an extension to add FGMTileProviderDelegate to
-// the Pigeon Flutter API object once this plugin has switched to Swift Pigeon generation
-// (adjusting the protocol to match the Swift version of the signature).
-private class ConcreteTileProvider: NSObject, TileProviderDelegate {
- let handler: FGMMapsCallbackApi
-
- init(dartCallbackHandler: FGMMapsCallbackApi) {
- handler = dartCallbackHandler
- }
-
- public func tile(
- withOverlayIdentifier tileOverlayId: String,
- location: FGMPlatformPoint,
- zoom: Int,
- completion: @escaping (FGMPlatformTile?, FlutterError?) -> Void
- ) {
- handler.tile(
- withOverlayIdentifier: tileOverlayId,
- location: location,
- zoom: zoom,
- completion: completion
- )
- }
-}
-
-class MapCallHandler: NSObject, FGMMapsApi {
+class MapCallHandler: MapsApi {
weak var controller: GoogleMapController?
let messenger: FlutterBinaryMessenger
let pigeonSuffix: String
- var transactionWrapper: FGMCATransactionProtocol
+ var transactionWrapper: MapAnimationCATransactionProtocol
init(
messenger: FlutterBinaryMessenger,
@@ -550,17 +483,17 @@
) {
self.messenger = messenger
self.pigeonSuffix = suffix
- self.transactionWrapper = FGMCATransactionWrapper()
- super.init()
+ self.transactionWrapper = DefaultMapAnimationCATransaction()
}
- func waitForMapWithError(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>) {
+ func waitForMap() {
// No-op; this call just ensures synchronization with the platform thread.
}
func updateCircles(
- byAdding toAdd: [FGMPlatformCircle], changing toChange: [FGMPlatformCircle],
- removing idsToRemove: [String], error: AutoreleasingUnsafeMutablePointer<FlutterError?>
+ adding toAdd: [PlatformCircle],
+ changing toChange: [PlatformCircle],
+ removing idsToRemove: [String]
) {
controller?.circlesController.add(toAdd)
controller?.circlesController.change(toChange)
@@ -568,24 +501,23 @@
}
func updateHeatmaps(
- byAdding toAdd: [FGMPlatformHeatmap], changing toChange: [FGMPlatformHeatmap],
- removing idsToRemove: [String], error: AutoreleasingUnsafeMutablePointer<FlutterError?>
+ adding toAdd: [PlatformHeatmap],
+ changing toChange: [PlatformHeatmap],
+ removing idsToRemove: [String]
) {
controller?.heatmapsController.add(toAdd)
controller?.heatmapsController.change(toChange)
controller?.heatmapsController.removeHeatmaps(withIdentifiers: idsToRemove)
}
- func update(
- with configuration: FGMPlatformMapConfiguration,
- error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) {
+ func updateWithMapConfiguration(_ configuration: PlatformMapConfiguration) {
controller?.interpretMapConfiguration(configuration)
}
func updateMarkers(
- byAdding toAdd: [FGMPlatformMarker], changing toChange: [FGMPlatformMarker],
- removing idsToRemove: [String], error: AutoreleasingUnsafeMutablePointer<FlutterError?>
+ adding toAdd: [PlatformMarker],
+ changing toChange: [PlatformMarker],
+ removing idsToRemove: [String]
) {
controller?.markersController.add(toAdd)
controller?.markersController.change(toChange)
@@ -595,16 +527,17 @@
}
func updateClusterManagers(
- byAdding toAdd: [FGMPlatformClusterManager], removing idsToRemove: [String],
- error: AutoreleasingUnsafeMutablePointer<FlutterError?>
+ adding toAdd: [PlatformClusterManager],
+ removing idsToRemove: [String]
) {
controller?.clusterManagersController.add(toAdd)
controller?.clusterManagersController.removeClusterManagers(withIdentifiers: idsToRemove)
}
func updatePolygons(
- byAdding toAdd: [FGMPlatformPolygon], changing toChange: [FGMPlatformPolygon],
- removing idsToRemove: [String], error: AutoreleasingUnsafeMutablePointer<FlutterError?>
+ adding toAdd: [PlatformPolygon],
+ changing toChange: [PlatformPolygon],
+ removing idsToRemove: [String]
) {
controller?.polygonsController.add(toAdd)
controller?.polygonsController.change(toChange)
@@ -612,8 +545,9 @@
}
func updatePolylines(
- byAdding toAdd: [FGMPlatformPolyline], changing toChange: [FGMPlatformPolyline],
- removing idsToRemove: [String], error: AutoreleasingUnsafeMutablePointer<FlutterError?>
+ adding toAdd: [PlatformPolyline],
+ changing toChange: [PlatformPolyline],
+ removing idsToRemove: [String]
) {
controller?.polylinesController.add(toAdd)
controller?.polylinesController.change(toChange)
@@ -621,8 +555,9 @@
}
func updateTileOverlays(
- byAdding toAdd: [FGMPlatformTileOverlay], changing toChange: [FGMPlatformTileOverlay],
- removing idsToRemove: [String], error: AutoreleasingUnsafeMutablePointer<FlutterError?>
+ adding toAdd: [PlatformTileOverlay],
+ changing toChange: [PlatformTileOverlay],
+ removing idsToRemove: [String]
) {
controller?.tileOverlaysController.add(toAdd)
controller?.tileOverlaysController.change(toChange)
@@ -630,150 +565,128 @@
}
func updateGroundOverlays(
- byAdding toAdd: [FGMPlatformGroundOverlay], changing toChange: [FGMPlatformGroundOverlay],
- removing idsToRemove: [String], error: AutoreleasingUnsafeMutablePointer<FlutterError?>
+ adding toAdd: [PlatformGroundOverlay],
+ changing toChange: [PlatformGroundOverlay],
+ removing idsToRemove: [String]
) {
controller?.groundOverlaysController.add(toAdd)
controller?.groundOverlaysController.change(toChange)
controller?.groundOverlaysController.removeGroundOverlays(withIdentifiers: idsToRemove)
}
- func latLng(
- forScreenCoordinate screenCoordinate: FGMPlatformPoint,
- error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) -> FGMPlatformLatLng? {
+ func latLng(for screenCoordinate: PlatformPoint) throws -> PlatformLatLng {
guard let mapView = controller?.mapView else {
- error.pointee = FlutterError(
+ throw PigeonError(
code: "GoogleMap uninitialized",
message: "getLatLng called prior to map initialization",
details: nil
)
- return nil
}
let point = screenCoordinate.toCGPoint()
let latlng = mapView.projection.coordinate(for: point)
- return FGMPlatformLatLng.make(from: latlng)
+ return PlatformLatLng.make(from: latlng)
}
- func screenCoordinates(
- for latLng: FGMPlatformLatLng, error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) -> FGMPlatformPoint? {
+ func screenCoordinates(for latLng: PlatformLatLng) throws -> PlatformPoint {
guard let mapView = controller?.mapView else {
- error.pointee = FlutterError(
+ throw PigeonError(
code: "GoogleMap uninitialized",
message: "getScreenCoordinate called prior to map initialization",
details: nil
)
- return nil
}
let location = latLng.toCLLocationCoordinate2D()
let point = mapView.projection.point(for: location)
- return FGMPlatformPoint.make(from: point)
+ return PlatformPoint.make(from: point)
}
- func visibleMapRegion(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>)
- -> FGMPlatformLatLngBounds?
- {
+ func visibleMapRegion() throws -> PlatformLatLngBounds {
guard let mapView = controller?.mapView else {
- error.pointee = FlutterError(
+ throw PigeonError(
code: "GoogleMap uninitialized",
message: "getVisibleRegion called prior to map initialization",
details: nil
)
- return nil
}
let visibleRegion = mapView.projection.visibleRegion()
let bounds = GMSCoordinateBounds(region: visibleRegion)
- return FGMPlatformLatLngBounds.make(from: bounds)
+ return PlatformLatLngBounds.make(from: bounds)
}
- func moveCamera(
- with cameraUpdate: FGMPlatformCameraUpdate,
- error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) {
+ func moveCamera(_ cameraUpdate: PlatformCameraUpdate) throws {
guard let update = cameraUpdate.toGMSCameraUpdate() else {
- error.pointee = FlutterError(
+ throw PigeonError(
code: "Invalid update",
message: "Unrecognized camera update",
details: nil
)
- return
}
controller?.mapView.moveCamera(update)
}
func animateCamera(
- with cameraUpdate: FGMPlatformCameraUpdate, duration durationMilliseconds: NSNumber?,
- error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) {
+ _ cameraUpdate: PlatformCameraUpdate,
+ duration durationMilliseconds: Int64?
+ ) throws {
guard let update = cameraUpdate.toGMSCameraUpdate() else {
- error.pointee = FlutterError(
+ throw PigeonError(
code: "Invalid update",
message: "Unrecognized camera update",
details: nil
)
- return
}
let transaction = durationMilliseconds != nil ? transactionWrapper : nil
transaction?.begin()
if let duration = durationMilliseconds {
- transaction?.setAnimationDuration(duration.doubleValue / 1000.0)
+ transaction?.setAnimationDuration(Double(duration) / 1000.0)
}
controller?.mapView.animate(with: update)
transaction?.commit()
}
- func currentZoomLevel(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>) -> NSNumber? {
+ func zoomLevel() throws -> Double {
guard let mapView = controller?.mapView else {
- return nil
+ throw PigeonError(
+ code: "GoogleMap uninitialized",
+ message: "getZoomLevel called prior to map initialization",
+ details: nil
+ )
}
- return NSNumber(value: mapView.camera.zoom)
+ return Double(mapView.camera.zoom)
}
- func showInfoWindowForMarker(
- withIdentifier markerId: String, error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) {
- controller?.markersController.showMarkerInfoWindow(withIdentifier: markerId, error: error)
+ func showInfoWindowForMarker(withIdentifier markerId: String) throws {
+ try controller?.markersController.showMarkerInfoWindow(withIdentifier: markerId)
}
- func hideInfoWindowForMarker(
- withIdentifier markerId: String, error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) {
- controller?.markersController.hideMarkerInfoWindow(withIdentifier: markerId, error: error)
+ func hideInfoWindowForMarker(withIdentifier markerId: String) throws {
+ try controller?.markersController.hideMarkerInfoWindow(withIdentifier: markerId)
}
- func isShowingInfoWindowForMarker(
- withIdentifier markerId: String, error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) -> NSNumber? {
- return controller?.markersController.isInfoWindowShownForMarker(
- withIdentifier: markerId, error: error)
+ func isShowingInfoWindowForMarker(withIdentifier markerId: String) throws -> Bool {
+ return try controller?.markersController.isInfoWindowShownForMarker(withIdentifier: markerId)
+ ?? false
}
- func setStyle(_ style: String, error: AutoreleasingUnsafeMutablePointer<FlutterError?>) -> String?
- {
+ func setStyle(_ style: String) -> String? {
return controller?.setMapStyle(style)
}
- func lastStyleError(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>) -> String? {
+ func lastStyleError() -> String? {
return controller?.styleError
}
- func clearTileCacheForOverlay(
- withIdentifier tileOverlayId: String, error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) {
+ func clearTileCacheForOverlay(withIdentifier tileOverlayId: String) {
controller?.tileOverlaysController.clearTileCache(withIdentifier: tileOverlayId)
}
- func takeSnapshotWithError(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>)
- -> FlutterStandardTypedData?
- {
+ func takeSnapshot() throws -> FlutterStandardTypedData? {
guard let mapView = controller?.mapView else {
- error.pointee = FlutterError(
+ throw PigeonError(
code: "GoogleMap uninitialized",
message: "takeSnapshot called prior to map initialization",
details: nil
)
- return nil
}
let renderer = UIGraphicsImageRenderer(size: mapView.bounds.size)
let image = renderer.image { context in
@@ -785,17 +698,12 @@
return nil
}
- func isAdvancedMarkersAvailable(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>)
- -> NSNumber?
- {
- guard let mapView = controller?.mapView else {
- return false
- }
- return NSNumber(value: mapView.mapCapabilities.contains(.advancedMarkers))
+ func isAdvancedMarkersAvailable() -> Bool {
+ return controller?.mapView.mapCapabilities.contains(.advancedMarkers) ?? false
}
}
-class MapInspector: NSObject, FGMMapsInspectorApi {
+class MapInspector: MapsInspectorApi {
weak var controller: GoogleMapController?
let messenger: FlutterBinaryMessenger
let pigeonSuffix: String
@@ -806,134 +714,87 @@
) {
self.messenger = messenger
self.pigeonSuffix = suffix
- super.init()
}
- func areBuildingsEnabledWithError(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>)
- -> NSNumber?
- {
- guard let mapView = controller?.mapView else {
- return nil
- }
- return NSNumber(value: mapView.isBuildingsEnabled)
+ func areBuildingsEnabled() -> Bool {
+ return controller?.mapView.isBuildingsEnabled ?? false
}
- func areRotateGesturesEnabledWithError(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>)
- -> NSNumber?
- {
- guard let mapView = controller?.mapView else {
- return nil
- }
- return NSNumber(value: mapView.settings.rotateGestures)
+ func areRotateGesturesEnabled() -> Bool {
+ return controller?.mapView.settings.rotateGestures ?? false
}
- func areScrollGesturesEnabledWithError(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>)
- -> NSNumber?
- {
- guard let mapView = controller?.mapView else {
- return nil
- }
- return NSNumber(value: mapView.settings.scrollGestures)
+ func areScrollGesturesEnabled() -> Bool {
+ return controller?.mapView.settings.scrollGestures ?? false
}
- func areTiltGesturesEnabledWithError(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>)
- -> NSNumber?
- {
- guard let mapView = controller?.mapView else {
- return nil
- }
- return NSNumber(value: mapView.settings.tiltGestures)
+ func areTiltGesturesEnabled() -> Bool {
+ return controller?.mapView.settings.tiltGestures ?? false
}
- func areZoomGesturesEnabledWithError(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>)
- -> NSNumber?
- {
- guard let mapView = controller?.mapView else {
- return nil
- }
- return NSNumber(value: mapView.settings.zoomGestures)
+ func areZoomGesturesEnabled() -> Bool {
+ return controller?.mapView.settings.zoomGestures ?? false
}
- func tileOverlay(
- withIdentifier tileOverlayId: String, error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) -> FGMPlatformTileLayer? {
+ func isCompassEnabled() -> Bool {
+ return controller?.mapView.settings.compassButton ?? false
+ }
+
+ func isMyLocationButtonEnabled() -> Bool {
+ return controller?.mapView.settings.myLocationButton ?? false
+ }
+
+ func isTrafficEnabled() -> Bool {
+ return controller?.mapView.isTrafficEnabled ?? false
+ }
+
+ func tileOverlay(withIdentifier tileOverlayId: String) -> PlatformTileLayer? {
guard let controller = controller,
let layer = controller.tileOverlaysController.tileOverlay(withIdentifier: tileOverlayId)?
.layer
else {
return nil
}
- return FGMPlatformTileLayer.make(
- withVisible: layer.map != nil,
+ return PlatformTileLayer(
+ visible: layer.map != nil,
fadeIn: layer.fadeIn,
opacity: Double(layer.opacity),
- zIndex: Int(layer.zIndex)
+ zIndex: Int64(layer.zIndex)
)
}
- func heatmap(
- withIdentifier heatmapId: String, error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) -> FGMPlatformHeatmap? {
+ func heatmap(withIdentifier heatmapId: String) -> PlatformHeatmap? {
return controller?.heatmapsController.heatmap(withIdentifier: heatmapId)
}
- func clusters(
- withIdentifier clusterManagerId: String, error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) -> [FGMPlatformCluster]? {
- return controller?.clusterManagersController.clusters(
- withIdentifier: clusterManagerId, error: error)
+ func clusters(withIdentifier clusterManagerId: String) throws -> [PlatformCluster] {
+ return try controller?.clusterManagersController.clusters(withIdentifier: clusterManagerId)
+ ?? []
}
- func isCompassEnabledWithError(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>)
- -> NSNumber?
- {
+ func zoomRange() throws -> PlatformZoomRange {
guard let mapView = controller?.mapView else {
- return nil
+ throw PigeonError(
+ code: "GoogleMap uninitialized",
+ message: "zoomRange called prior to map initialization",
+ details: nil
+ )
}
- return NSNumber(value: mapView.settings.compassButton)
+ return PlatformZoomRange(min: Double(mapView.minZoom), max: Double(mapView.maxZoom))
}
- func isMyLocationButtonEnabledWithError(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>)
- -> NSNumber?
- {
- guard let mapView = controller?.mapView else {
- return nil
- }
- return NSNumber(value: mapView.settings.myLocationButton)
- }
-
- func isTrafficEnabledWithError(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>)
- -> NSNumber?
- {
- guard let mapView = controller?.mapView else {
- return nil
- }
- return NSNumber(value: mapView.isTrafficEnabled)
- }
-
- func zoomRange(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>) -> FGMPlatformZoomRange?
- {
- guard let mapView = controller?.mapView else {
- return nil
- }
- return FGMPlatformZoomRange.make(
- withMin: NSNumber(value: mapView.minZoom),
- max: NSNumber(value: mapView.maxZoom)
- )
- }
-
- func groundOverlay(
- withIdentifier groundOverlayId: String, error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) -> FGMPlatformGroundOverlay? {
+ func groundOverlay(withIdentifier groundOverlayId: String) -> PlatformGroundOverlay? {
return controller?.groundOverlaysController.groundOverlay(withIdentifier: groundOverlayId)
}
- func cameraPosition(_ error: AutoreleasingUnsafeMutablePointer<FlutterError?>)
- -> FGMPlatformCameraPosition?
- {
+ func cameraPosition() throws -> PlatformCameraPosition {
guard let mapView = controller?.mapView else {
- return nil
+ throw PigeonError(
+ code: "GoogleMap uninitialized",
+ message: "cameraPosition called prior to map initialization",
+ details: nil
+ )
}
- return FGMPlatformCameraPosition.make(from: mapView.camera)
+ return PlatformCameraPosition.make(from: mapView.camera)
}
}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapFactory.swift b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapFactory.swift
index 516f798..5e263d2 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapFactory.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GoogleMapFactory.swift
@@ -5,10 +5,6 @@
import Flutter
import GoogleMaps
-#if canImport(google_maps_flutter_ios_objc)
- import google_maps_flutter_ios_objc
-#endif
-
class GoogleMapFactory: NSObject, FlutterPlatformViewFactory {
weak var registrar: FlutterPluginRegistrar?
static var sharedMapServices = GMSServices.sharedServices()
@@ -25,10 +21,10 @@
return GoogleMapController(
frame: frame, viewIdentifier: viewId,
- creationParameters: args as! FGMPlatformMapViewCreationParams, registrar: registrar!)
+ creationParameters: args as! PlatformMapViewCreationParams, registrar: registrar!)
}
func createArgsCodec() -> any FlutterMessageCodec & NSObjectProtocol {
- return FGMGetGoogleMapsFlutterPigeonMessagesCodec()
+ return MessagesPigeonCodec.shared
}
}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GroundOverlayController.swift b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GroundOverlayController.swift
index e9c5778..58fc283 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GroundOverlayController.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/GroundOverlayController.swift
@@ -3,18 +3,15 @@
// found in the LICENSE file.
import GoogleMaps
+import GoogleMapsUtils
import UIKit
-#if canImport(google_maps_flutter_ios_objc)
- import google_maps_flutter_ios_objc
-#endif
-
/// Controller of a single ground overlay on the map.
-class GroundOverlayController: NSObject {
+class GroundOverlayController {
let groundOverlay: GMSGroundOverlay
private weak var mapView: GMSMapView?
let createdWithBounds: Bool
- var zoomLevel: NSNumber?
+ var zoomLevel: Double?
init(
groundOverlay: GMSGroundOverlay, identifier: String, mapView: GMSMapView,
@@ -24,18 +21,18 @@
self.mapView = mapView
self.groundOverlay.userData = [identifier]
self.createdWithBounds = isCreatedWithBounds
- super.init()
}
func removeGroundOverlay() {
groundOverlay.map = nil
}
- /// Updates the controller's ground overlay with the properties from a FGMPlatformGroundOverlay.
+ /// Updates the controller's ground overlay with the properties from a PlatformGroundOverlay.
///
/// Setting the ground overlay to visible will set its map to the controller's mapView.
func update(
- from platformGroundOverlay: FGMPlatformGroundOverlay, assetProvider: FGMAssetProvider,
+ from platformGroundOverlay: PlatformGroundOverlay,
+ assetProvider: AssetProvider,
screenScale: CGFloat
) {
if let mapView = mapView {
@@ -50,14 +47,14 @@
}
}
- /// Updates the given GMSGroundOverlay with the properties from a FGMPlatformGroundOverlay.
+ /// Updates the given GMSGroundOverlay with the properties from a PlatformGroundOverlay.
///
/// Setting the ground overlay to visible will set its map to the given mapView.
static func update(
_ groundOverlay: GMSGroundOverlay,
- from platformGroundOverlay: FGMPlatformGroundOverlay,
+ from platformGroundOverlay: PlatformGroundOverlay,
mapView: GMSMapView,
- assetProvider: FGMAssetProvider,
+ assetProvider: AssetProvider,
screenScale: CGFloat,
usingBounds useBounds: Bool
) {
@@ -100,20 +97,19 @@
}
/// Controller of multiple ground overlays on the map.
-class GroundOverlaysController: NSObject {
+class GroundOverlaysController {
private var groundOverlayControllerByIdentifier: [String: GroundOverlayController] = [:]
- private weak var eventDelegate: FGMMapEventDelegate?
- private let assetProvider: FGMAssetProvider
+ private weak var eventDelegate: MapEventDelegate?
+ private let assetProvider: AssetProvider
private weak var mapView: GMSMapView?
- init(mapView: GMSMapView, eventDelegate: FGMMapEventDelegate, assetProvider: FGMAssetProvider) {
+ init(mapView: GMSMapView, eventDelegate: MapEventDelegate, assetProvider: AssetProvider) {
self.mapView = mapView
self.eventDelegate = eventDelegate
self.assetProvider = assetProvider
- super.init()
}
- func add(_ groundOverlaysToAdd: [FGMPlatformGroundOverlay]) {
+ func add(_ groundOverlaysToAdd: [PlatformGroundOverlay]) {
guard let mapView = mapView else { return }
let screenScale = getScreenScale()
for groundOverlay in groundOverlaysToAdd {
@@ -135,7 +131,7 @@
),
// The actual icon will be set in the update() call below.
icon: nil,
- zoomLevel: CGFloat(zoomLevel.doubleValue)
+ zoomLevel: CGFloat(zoomLevel)
)
} else {
isCreatedWithBounds = true
@@ -178,7 +174,7 @@
}
}
- func change(_ groundOverlaysToChange: [FGMPlatformGroundOverlay]) {
+ func change(_ groundOverlaysToChange: [PlatformGroundOverlay]) {
let screenScale = getScreenScale()
for groundOverlay in groundOverlaysToChange {
let identifier = groundOverlay.groundOverlayId
@@ -201,7 +197,7 @@
func didTapGroundOverlay(withIdentifier identifier: String) {
if hasGroundOverlays(withIdentifier: identifier) {
- eventDelegate?.didTapGroundOverlay(withIdentifier: identifier)
+ eventDelegate?.didTapGroundOverlay(withIdentifier: identifier) { _ in }
}
}
@@ -219,11 +215,11 @@
return mapView?.traitCollection.displayScale ?? 1.0
}
- func groundOverlay(withIdentifier identifier: String) -> FGMPlatformGroundOverlay? {
+ func groundOverlay(withIdentifier identifier: String) -> PlatformGroundOverlay? {
guard let controller = groundOverlayControllerByIdentifier[identifier] else {
return nil
}
- return FGMPlatformGroundOverlay.make(
+ return PlatformGroundOverlay.make(
from: controller.groundOverlay,
overlayId: identifier,
isCreatedWithBounds: controller.createdWithBounds,
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/HeatmapController.swift b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/HeatmapController.swift
index b8a3bc6..78be4c5 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/HeatmapController.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/HeatmapController.swift
@@ -3,20 +3,16 @@
// found in the LICENSE file.
import GoogleMaps
-
-#if canImport(google_maps_flutter_ios_objc)
- import google_maps_flutter_ios_objc
-#endif
+import GoogleMapsUtils
/// Controller of a single Heatmap on the map.
-class HeatmapController: NSObject {
+class HeatmapController {
let heatmapTileLayer: GMUHeatmapTileLayer
private weak var mapView: GMSMapView?
- init(heatmap: FGMPlatformHeatmap, tileLayer: GMUHeatmapTileLayer, mapView: GMSMapView) {
+ init(heatmap: PlatformHeatmap, tileLayer: GMUHeatmapTileLayer, mapView: GMSMapView) {
self.heatmapTileLayer = tileLayer
self.mapView = mapView
- super.init()
HeatmapController.update(tileLayer, from: heatmap, mapView: mapView)
}
@@ -28,7 +24,7 @@
heatmapTileLayer.clearTileCache()
}
- func update(from platformHeatmap: FGMPlatformHeatmap) {
+ func update(from platformHeatmap: PlatformHeatmap) {
if let mapView = mapView {
HeatmapController.update(heatmapTileLayer, from: platformHeatmap, mapView: mapView)
}
@@ -39,10 +35,10 @@
/// Setting the heatmap to visible will set its map to the given mapView.
static func update(
_ heatmapTileLayer: GMUHeatmapTileLayer,
- from platformHeatmap: FGMPlatformHeatmap,
+ from platformHeatmap: PlatformHeatmap,
mapView: GMSMapView
) {
- heatmapTileLayer.weightedData = platformHeatmap.data.map({ $0.toGMUWeightedLatLng() })
+ heatmapTileLayer.weightedData = platformHeatmap.data.map { $0.toGMUWeightedLatLng() }
if let gradient = platformHeatmap.gradient {
heatmapTileLayer.gradient = gradient.toGMUGradient()
}
@@ -58,16 +54,15 @@
}
/// Controller of multiple Heatmaps on the map.
-class HeatmapsController: NSObject {
+class HeatmapsController {
private var heatmapIdToController: [String: HeatmapController] = [:]
private weak var mapView: GMSMapView?
init(mapView: GMSMapView) {
self.mapView = mapView
- super.init()
}
- func add(_ heatmapsToAdd: [FGMPlatformHeatmap]) {
+ func add(_ heatmapsToAdd: [PlatformHeatmap]) {
guard let mapView = mapView else { return }
for heatmap in heatmapsToAdd {
let heatmapTileLayer = GMUHeatmapTileLayer()
@@ -80,7 +75,7 @@
}
}
- func change(_ heatmapsToChange: [FGMPlatformHeatmap]) {
+ func change(_ heatmapsToChange: [PlatformHeatmap]) {
for heatmap in heatmapsToChange {
if let controller = heatmapIdToController[heatmap.heatmapId] {
controller.update(from: heatmap)
@@ -102,17 +97,17 @@
return heatmapIdToController[identifier] != nil
}
- func heatmap(withIdentifier identifier: String) -> FGMPlatformHeatmap? {
+ func heatmap(withIdentifier identifier: String) -> PlatformHeatmap? {
guard let controller = heatmapIdToController[identifier] else { return nil }
let heatmap = controller.heatmapTileLayer
- return FGMPlatformHeatmap.make(
- withHeatmapId: identifier,
- data: heatmap.weightedData.map { FGMPlatformWeightedLatLng.make(from: $0) },
- gradient: FGMPlatformHeatmapGradient.make(from: heatmap.gradient),
+ return PlatformHeatmap(
+ heatmapId: identifier,
+ data: heatmap.weightedData.map { PlatformWeightedLatLng.make(from: $0) },
+ gradient: PlatformHeatmapGradient.make(from: heatmap.gradient),
opacity: Double(heatmap.opacity),
- radius: Int(heatmap.radius),
- minimumZoomIntensity: Int(heatmap.minimumZoomIntensity),
- maximumZoomIntensity: Int(heatmap.maximumZoomIntensity)
+ radius: Int64(heatmap.radius),
+ minimumZoomIntensity: Int64(heatmap.minimumZoomIntensity),
+ maximumZoomIntensity: Int64(heatmap.maximumZoomIntensity)
)
}
}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/ImageUtils.swift b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/ImageUtils.swift
index 75f0ea1..de6a479 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/ImageUtils.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/ImageUtils.swift
@@ -6,32 +6,25 @@
import GoogleMaps
import UIKit
-#if canImport(google_maps_flutter_ios_objc)
- import google_maps_flutter_ios_objc
-#endif
-
-extension FGMPlatformBitmap {
+extension PlatformBitmap {
/// Creates a UIImage from the Pigeon bitmap representation, suitable for use as a marker icon.
func createIcon(
- assetProvider: FGMAssetProvider,
+ assetProvider: AssetProvider,
screenScale: CGFloat
) -> UIImage? {
assert(screenScale > 0, "Screen scale must be greater than 0")
var image: UIImage?
- // See comment in messages.dart for why this is so loosely typed. See also
- // https://github.com/flutter/flutter/issues/117819.
- switch bitmap {
- case let bitmap as FGMPlatformBitmapDefaultMarker:
- let hue = bitmap.hue?.doubleValue ?? 0
+ switch self {
+ case let bitmap as PlatformBitmapDefaultMarker:
image = GMSMarker.markerImage(
with: UIColor(
- hue: CGFloat(hue) / 360.0,
+ hue: CGFloat(bitmap.hue ?? 0) / 360.0,
saturation: 1.0,
brightness: 0.7,
alpha: 1.0))
- case let bitmap as FGMPlatformBitmapAsset:
+ case let bitmap as PlatformBitmapAsset:
// Deprecated: This message handling for 'fromAsset' has been replaced by 'asset'.
// Refer to the flutter google_maps_flutter_platform_interface package for details.
if let pkg = bitmap.pkg {
@@ -43,7 +36,7 @@
image = assetProvider.imageNamed(key)
}
}
- case let bitmap as FGMPlatformBitmapAssetImage:
+ case let bitmap as PlatformBitmapAssetImage:
// Deprecated: This message handling for 'fromAssetImage' has been replaced by 'asset'.
// Refer to the flutter google_maps_flutter_platform_interface package for details.
if let key = assetProvider.lookupKey(forAsset: bitmap.name) {
@@ -51,11 +44,11 @@
image = scaledImage(assetImage, scale: bitmap.scale)
}
}
- case let bitmap as FGMPlatformBitmapBytes:
+ case let bitmap as PlatformBitmapBytes:
// Deprecated: This message handling for 'fromBytes' has been replaced by 'bytes'.
// Refer to the flutter google_maps_flutter_platform_interface package for details.
image = UIImage(data: bitmap.byteData.data, scale: screenScale)
- case let bitmap as FGMPlatformBitmapAssetMap:
+ case let bitmap as PlatformBitmapAssetMap:
if let key = assetProvider.lookupKey(forAsset: bitmap.assetName) {
image = assetProvider.imageNamed(key)
}
@@ -69,7 +62,7 @@
image = scaledImage(currentImage, scale: CGFloat(bitmap.imagePixelRatio))
}
}
- case let bitmap as FGMPlatformBitmapBytesMap:
+ case let bitmap as PlatformBitmapBytesMap:
let bytes = bitmap.byteData
image = UIImage(data: bytes.data, scale: screenScale)
if let currentImage = image {
@@ -88,7 +81,7 @@
image = UIImage(data: bytes.data)
}
}
- case let bitmap as FGMPlatformBitmapPinConfig:
+ case let bitmap as PlatformBitmapPinConfig:
let options = GMSPinImageOptions()
if let backgroundColor = bitmap.backgroundColor {
options.backgroundColor = backgroundColor.toUIColor()
@@ -209,16 +202,16 @@
/// widht and height are not given.
private func scaledImage(
_ image: UIImage,
- width: NSNumber?,
- height: NSNumber?,
+ width: Double?,
+ height: Double?,
screenScale: CGFloat
) -> UIImage {
if width == nil && height == nil {
return image
}
- let targetWidth = width == nil ? image.size.width : CGFloat(width!.doubleValue)
- let targetHeight = height == nil ? image.size.height : CGFloat(height!.doubleValue)
+ let targetWidth = width ?? image.size.width
+ let targetHeight = height ?? image.size.height
var calculatedWidth = targetWidth
var calculatedHeight = targetHeight
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/MapEventDelegate.swift b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/MapEventDelegate.swift
new file mode 100644
index 0000000..71eff89
--- /dev/null
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/MapEventDelegate.swift
@@ -0,0 +1,12 @@
+// Copyright 2013 The Flutter Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#if canImport(google_maps_flutter_ios_objc)
+ import google_maps_flutter_ios_objc
+#endif
+
+/// Delegate for map callbacks that need Dart handling.
+///
+/// This exists to add AnyObject to the requirements, so that references to it can be weak.
+protocol MapEventDelegate: AnyObject, MapsCallbackApiProtocol {}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/MarkerController.swift b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/MarkerController.swift
index c488053..8ca280b 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/MarkerController.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/MarkerController.swift
@@ -6,12 +6,8 @@
import GoogleMaps
import UIKit
-#if canImport(google_maps_flutter_ios_objc)
- import google_maps_flutter_ios_objc
-#endif
-
/// Defines marker controllable by Flutter.
-class MarkerController: NSObject {
+class MarkerController {
let marker: GMSMarker
private weak var mapView: GMSMapView?
private(set) var consumeTapEvents: Bool = false
@@ -22,7 +18,6 @@
self.marker = marker
self.markerIdentifier = markerIdentifier
self.mapView = mapView
- super.init()
}
func showInfoWindow() {
@@ -43,12 +38,12 @@
marker.map = nil
}
- /// Updates the controller's marker with the properties from a FGMPlatformMarker.
+ /// Updates the controller's marker with the properties from a PlatformMarker.
///
/// Setting the marker to visible will set its map to the controller's mapView.
func update(
- from platformMarker: FGMPlatformMarker,
- assetProvider: FGMAssetProvider,
+ from platformMarker: PlatformMarker,
+ assetProvider: AssetProvider,
screenScale: CGFloat
) {
clusterManagerIdentifier = platformMarker.clusterManagerId
@@ -71,14 +66,14 @@
)
}
- /// Updates the given GMSMarker with the properties from a FGMPlatformMarker.
+ /// Updates the given GMSMarker with the properties from a PlatformMarker.
///
/// Setting the marker to visible will set its map to the given mapView.
static func update(
_ marker: GMSMarker,
- from platformMarker: FGMPlatformMarker,
+ from platformMarker: PlatformMarker,
mapView: GMSMapView?,
- assetProvider: FGMAssetProvider,
+ assetProvider: AssetProvider,
screenScale: CGFloat,
usingOpacityForVisibility useOpacityForVisibility: Bool
) {
@@ -102,7 +97,7 @@
if let advancedMarker = marker as? GMSAdvancedMarker,
let collisionBehaviorValue = platformMarker.collisionBehavior
{
- advancedMarker.collisionBehavior = collisionBehaviorValue.value.gmsCollisionBehavior
+ advancedMarker.collisionBehavior = collisionBehaviorValue.gmsCollisionBehavior
}
// This must be done last, to avoid visual flickers of default property values.
@@ -116,36 +111,35 @@
}
/// Controller of multiple markers on the map.
-class MarkersController: NSObject {
+class MarkersController {
private(set) var markerIdentifierToController: [String: MarkerController] = [:]
- private weak var eventDelegate: FGMMapEventDelegate?
+ private weak var eventDelegate: MapEventDelegate?
private weak var clusterManagersController: ClusterManagersController?
- private let assetProvider: FGMAssetProvider
+ private let assetProvider: AssetProvider
private weak var mapView: GMSMapView?
- private let markerType: FGMPlatformMarkerType
+ private let markerType: PlatformMarkerType
init(
mapView: GMSMapView,
- eventDelegate: FGMMapEventDelegate,
+ eventDelegate: MapEventDelegate,
clusterManagersController: ClusterManagersController?,
- assetProvider: FGMAssetProvider,
- markerType: FGMPlatformMarkerType
+ assetProvider: AssetProvider,
+ markerType: PlatformMarkerType
) {
self.mapView = mapView
self.eventDelegate = eventDelegate
self.clusterManagersController = clusterManagersController
self.assetProvider = assetProvider
self.markerType = markerType
- super.init()
}
- func add(_ markersToAdd: [FGMPlatformMarker]) {
+ func add(_ markersToAdd: [PlatformMarker]) {
for marker in markersToAdd {
addMarker(marker)
}
}
- private func addMarker(_ markerToAdd: FGMPlatformMarker) {
+ private func addMarker(_ markerToAdd: PlatformMarker) {
guard let mapView = mapView else { return }
let position = markerToAdd.position.toCLLocationCoordinate2D()
let markerIdentifier = markerToAdd.markerId
@@ -175,13 +169,13 @@
markerIdentifierToController[markerIdentifier] = controller
}
- func change(_ markersToChange: [FGMPlatformMarker]) {
+ func change(_ markersToChange: [PlatformMarker]) {
for marker in markersToChange {
changeMarker(marker)
}
}
- private func changeMarker(_ markerToChange: FGMPlatformMarker) {
+ private func changeMarker(_ markerToChange: PlatformMarker) {
let markerIdentifier = markerToChange.markerId
guard let controller = markerIdentifierToController[markerIdentifier] else { return }
@@ -223,7 +217,7 @@
func didTapMarker(withIdentifier identifier: String) -> Bool {
guard let controller = markerIdentifierToController[identifier] else { return false }
- eventDelegate?.didTapMarker(withIdentifier: identifier)
+ eventDelegate?.didTapMarker(withIdentifier: identifier) { _ in }
return controller.consumeTapEvents
}
@@ -231,76 +225,63 @@
guard markerIdentifierToController[identifier] != nil else { return }
eventDelegate?.didStartDragForMarker(
withIdentifier: identifier,
- atPosition: FGMPlatformLatLng.make(from: location)
- )
+ at: PlatformLatLng.make(from: location)
+ ) { _ in }
}
func didDragMarker(withIdentifier identifier: String, location: CLLocationCoordinate2D) {
guard markerIdentifierToController[identifier] != nil else { return }
eventDelegate?.didDragMarker(
withIdentifier: identifier,
- atPosition: FGMPlatformLatLng.make(from: location)
- )
+ at: PlatformLatLng.make(from: location)
+ ) { _ in }
}
func didEndDraggingMarker(withIdentifier identifier: String, location: CLLocationCoordinate2D) {
guard markerIdentifierToController[identifier] != nil else { return }
eventDelegate?.didEndDragForMarker(
withIdentifier: identifier,
- atPosition: FGMPlatformLatLng.make(from: location)
- )
+ at: PlatformLatLng.make(from: location)
+ ) { _ in }
}
func didTapInfoWindowOfMarker(withIdentifier identifier: String) {
if markerIdentifierToController[identifier] != nil {
- eventDelegate?.didTapInfoWindowOfMarker(withIdentifier: identifier)
+ eventDelegate?.didTapInfoWindowOfMarker(withIdentifier: identifier) { _ in }
}
}
- func showMarkerInfoWindow(
- withIdentifier identifier: String,
- error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) {
- if let controller = markerIdentifierToController[identifier] {
- controller.showInfoWindow()
- } else {
- error.pointee = FlutterError(
+ func showMarkerInfoWindow(withIdentifier identifier: String) throws {
+ guard let controller = markerIdentifierToController[identifier] else {
+ throw PigeonError(
code: "Invalid markerId",
message: "showInfoWindow called with invalid markerId",
details: nil
)
}
+ controller.showInfoWindow()
}
- func hideMarkerInfoWindow(
- withIdentifier identifier: String,
- error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) {
- if let controller = markerIdentifierToController[identifier] {
- controller.hideInfoWindow()
- } else {
- error.pointee = FlutterError(
+ func hideMarkerInfoWindow(withIdentifier identifier: String) throws {
+ guard let controller = markerIdentifierToController[identifier] else {
+ throw PigeonError(
code: "Invalid markerId",
message: "hideInfoWindow called with invalid markerId",
details: nil
)
}
+ controller.hideInfoWindow()
}
- func isInfoWindowShownForMarker(
- withIdentifier identifier: String,
- error: AutoreleasingUnsafeMutablePointer<FlutterError?>
- ) -> NSNumber? {
- if let controller = markerIdentifierToController[identifier] {
- return NSNumber(value: controller.isInfoWindowShown())
- } else {
- error.pointee = FlutterError(
+ func isInfoWindowShownForMarker(withIdentifier identifier: String) throws -> Bool {
+ guard let controller = markerIdentifierToController[identifier] else {
+ throw PigeonError(
code: "Invalid markerId",
message: "isInfoWindowShown called with invalid markerId",
details: nil
)
- return nil
}
+ return controller.isInfoWindowShown()
}
func getScreenScale() -> CGFloat {
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/Messages.g.swift b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/Messages.g.swift
new file mode 100644
index 0000000..76dd15c
--- /dev/null
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/Messages.g.swift
@@ -0,0 +1,4174 @@
+// Copyright 2013 The Flutter Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+// Autogenerated from Pigeon (v27.3.2), do not edit directly.
+// See also: https://pub.dev/packages/pigeon
+
+import Foundation
+
+#if os(iOS)
+ import Flutter
+#elseif os(macOS)
+ import FlutterMacOS
+#else
+ #error("Unsupported platform.")
+#endif
+
+/// Error class for passing custom error details to Dart side.
+final class PigeonError: Error {
+ let code: String
+ let message: String?
+ let details: Sendable?
+
+ init(code: String, message: String?, details: Sendable?) {
+ self.code = code
+ self.message = message
+ self.details = details
+ }
+
+ var localizedDescription: String {
+ return
+ "PigeonError(code: \(code), message: \(message ?? "<nil>"), details: \(details ?? "<nil>")"
+ }
+}
+
+private func wrapResult(_ result: Any?) -> [Any?] {
+ return [result]
+}
+
+private func wrapError(_ error: Any) -> [Any?] {
+ if let pigeonError = error as? PigeonError {
+ return [
+ pigeonError.code,
+ pigeonError.message,
+ pigeonError.details,
+ ]
+ }
+ if let flutterError = error as? FlutterError {
+ return [
+ flutterError.code,
+ flutterError.message,
+ flutterError.details,
+ ]
+ }
+ return [
+ "\(error)",
+ "\(Swift.type(of: error))",
+ "Stacktrace: \(Thread.callStackSymbols)",
+ ]
+}
+
+private func createConnectionError(withChannelName channelName: String) -> PigeonError {
+ return PigeonError(
+ code: "channel-error", message: "Unable to establish connection on channel: '\(channelName)'.",
+ details: "")
+}
+
+enum MessagesPigeonInternal {
+ static func isNullish(_ value: Any?) -> Bool {
+ guard let innerValue = value else {
+ return true
+ }
+
+ if case Optional<Any>.some(Optional<Any>.none) = value {
+ return true
+ }
+
+ return innerValue is NSNull
+ }
+ static func doubleEquals(_ lhs: Double, _ rhs: Double) -> Bool {
+ return (lhs.isNaN && rhs.isNaN) || lhs == rhs
+ }
+
+ static func doubleHash(_ value: Double, _ hasher: inout Hasher) {
+ if value.isNaN {
+ hasher.combine(0x7FF8_0000_0000_0000)
+ } else {
+ // Normalize -0.0 to 0.0
+ hasher.combine(value == 0 ? 0 : value)
+ }
+ }
+
+ static func deepEquals(_ lhs: Any?, _ rhs: Any?) -> Bool {
+ let cleanLhs = nilOrValue(lhs) as Any?
+ let cleanRhs = nilOrValue(rhs) as Any?
+ switch (cleanLhs, cleanRhs) {
+ case (nil, nil):
+ return true
+
+ case (nil, _), (_, nil):
+ return false
+
+ case (let lhs as AnyObject, let rhs as AnyObject) where lhs === rhs:
+ return true
+
+ case is (Void, Void):
+ return true
+
+ case (let lhsArray, let rhsArray) as ([Any?], [Any?]):
+ guard lhsArray.count == rhsArray.count else { return false }
+ for (index, element) in lhsArray.enumerated() {
+ if !deepEquals(element, rhsArray[index]) {
+ return false
+ }
+ }
+ return true
+
+ case (let lhsArray, let rhsArray) as ([Double], [Double]):
+ guard lhsArray.count == rhsArray.count else { return false }
+ for (index, element) in lhsArray.enumerated() {
+ if !doubleEquals(element, rhsArray[index]) {
+ return false
+ }
+ }
+ return true
+
+ case (let lhsDictionary, let rhsDictionary) as ([AnyHashable: Any?], [AnyHashable: Any?]):
+ guard lhsDictionary.count == rhsDictionary.count else { return false }
+ for (lhsKey, lhsValue) in lhsDictionary {
+ var found = false
+ for (rhsKey, rhsValue) in rhsDictionary {
+ if deepEquals(lhsKey, rhsKey) {
+ if deepEquals(lhsValue, rhsValue) {
+ found = true
+ break
+ } else {
+ return false
+ }
+ }
+ }
+ if !found { return false }
+ }
+ return true
+
+ case (let lhs as Double, let rhs as Double):
+ return doubleEquals(lhs, rhs)
+
+ case (let lhsHashable, let rhsHashable) as (AnyHashable, AnyHashable):
+ return lhsHashable == rhsHashable
+
+ default:
+ return false
+ }
+ }
+
+ static func deepHash(value: Any?, hasher: inout Hasher) {
+ let cleanValue = nilOrValue(value) as Any?
+ if let cleanValue = cleanValue {
+ if let doubleValue = cleanValue as? Double {
+ doubleHash(doubleValue, &hasher)
+ } else if let valueList = cleanValue as? [Any?] {
+ for item in valueList {
+ deepHash(value: item, hasher: &hasher)
+ }
+ } else if let valueList = cleanValue as? [Double] {
+ for item in valueList {
+ doubleHash(item, &hasher)
+ }
+ } else if let valueDict = cleanValue as? [AnyHashable: Any?] {
+ var result = 0
+ for (key, value) in valueDict {
+ var entryKeyHasher = Hasher()
+ deepHash(value: key, hasher: &entryKeyHasher)
+ var entryValueHasher = Hasher()
+ deepHash(value: value, hasher: &entryValueHasher)
+ result = result &+ ((entryKeyHasher.finalize() &* 31) ^ entryValueHasher.finalize())
+ }
+ hasher.combine(result)
+ } else if let hashableValue = cleanValue as? AnyHashable {
+ hasher.combine(hashableValue)
+ } else {
+ hasher.combine(String(describing: cleanValue))
+ }
+ } else {
+ hasher.combine(0)
+ }
+ }
+
+}
+
+private func nilOrValue<T>(_ value: Any?) -> T? {
+ if value is NSNull { return nil }
+ return value as! T?
+}
+
+/// Pigeon equivalent of MapType
+enum PlatformMapType: Int, CaseIterable {
+ case none = 0
+ case normal = 1
+ case satellite = 2
+ case terrain = 3
+ case hybrid = 4
+}
+
+/// Pigeon equivalent of the MarkerCollisionBehavior enum.
+enum PlatformMarkerCollisionBehavior: Int, CaseIterable {
+ case requiredDisplay = 0
+ case optionalAndHidesLowerPriority = 1
+ case requiredAndHidesOptional = 2
+}
+
+/// Join types for polyline joints.
+enum PlatformJointType: Int, CaseIterable {
+ case mitered = 0
+ case bevel = 1
+ case round = 2
+}
+
+/// Enumeration of possible types for PatternItem.
+enum PlatformPatternItemType: Int, CaseIterable {
+ case dot = 0
+ case dash = 1
+ case gap = 2
+}
+
+enum PlatformMarkerType: Int, CaseIterable {
+ case marker = 0
+ case advancedMarker = 1
+}
+
+/// Pigeon equivalent of [MapBitmapScaling].
+enum PlatformMapBitmapScaling: Int, CaseIterable {
+ case auto = 0
+ case none = 1
+}
+
+/// Pigeon representatation of a CameraPosition.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformCameraPosition: Hashable, CustomStringConvertible {
+ var bearing: Double
+ var target: PlatformLatLng
+ var tilt: Double
+ var zoom: Double
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformCameraPosition? {
+ let bearing = pigeonVar_list[0] as! Double
+ let target = pigeonVar_list[1] as! PlatformLatLng
+ let tilt = pigeonVar_list[2] as! Double
+ let zoom = pigeonVar_list[3] as! Double
+
+ return PlatformCameraPosition(
+ bearing: bearing,
+ target: target,
+ tilt: tilt,
+ zoom: zoom
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ bearing,
+ target,
+ tilt,
+ zoom,
+ ]
+ }
+ static func == (lhs: PlatformCameraPosition, rhs: PlatformCameraPosition) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.bearing, rhs.bearing)
+ && MessagesPigeonInternal.deepEquals(lhs.target, rhs.target)
+ && MessagesPigeonInternal.deepEquals(lhs.tilt, rhs.tilt)
+ && MessagesPigeonInternal.deepEquals(lhs.zoom, rhs.zoom)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformCameraPosition")
+ MessagesPigeonInternal.deepHash(value: bearing, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: target, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: tilt, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: zoom, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformCameraPosition(bearing: \(String(describing: bearing)), target: \(String(describing: target)), tilt: \(String(describing: tilt)), zoom: \(String(describing: zoom)))"
+ }
+}
+
+/// Pigeon representation of a CameraUpdate.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+/// This protocol should not be extended by any user class outside of the generated file.
+protocol PlatformCameraUpdate {
+
+}
+
+/// Pigeon equivalent of NewCameraPosition
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformCameraUpdateNewCameraPosition: PlatformCameraUpdate {
+ var cameraPosition: PlatformCameraPosition
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformCameraUpdateNewCameraPosition? {
+ let cameraPosition = pigeonVar_list[0] as! PlatformCameraPosition
+
+ return PlatformCameraUpdateNewCameraPosition(
+ cameraPosition: cameraPosition
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ cameraPosition
+ ]
+ }
+ static func == (
+ lhs: PlatformCameraUpdateNewCameraPosition, rhs: PlatformCameraUpdateNewCameraPosition
+ ) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.cameraPosition, rhs.cameraPosition)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformCameraUpdateNewCameraPosition")
+ MessagesPigeonInternal.deepHash(value: cameraPosition, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformCameraUpdateNewCameraPosition(cameraPosition: \(String(describing: cameraPosition)))"
+ }
+}
+
+/// Pigeon equivalent of NewLatLng
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformCameraUpdateNewLatLng: PlatformCameraUpdate {
+ var latLng: PlatformLatLng
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformCameraUpdateNewLatLng? {
+ let latLng = pigeonVar_list[0] as! PlatformLatLng
+
+ return PlatformCameraUpdateNewLatLng(
+ latLng: latLng
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ latLng
+ ]
+ }
+ static func == (lhs: PlatformCameraUpdateNewLatLng, rhs: PlatformCameraUpdateNewLatLng) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.latLng, rhs.latLng)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformCameraUpdateNewLatLng")
+ MessagesPigeonInternal.deepHash(value: latLng, hasher: &hasher)
+ }
+
+ public var description: String {
+ return "PlatformCameraUpdateNewLatLng(latLng: \(String(describing: latLng)))"
+ }
+}
+
+/// Pigeon equivalent of NewLatLngBounds
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformCameraUpdateNewLatLngBounds: PlatformCameraUpdate {
+ var bounds: PlatformLatLngBounds
+ var padding: Double
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformCameraUpdateNewLatLngBounds? {
+ let bounds = pigeonVar_list[0] as! PlatformLatLngBounds
+ let padding = pigeonVar_list[1] as! Double
+
+ return PlatformCameraUpdateNewLatLngBounds(
+ bounds: bounds,
+ padding: padding
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ bounds,
+ padding,
+ ]
+ }
+ static func == (
+ lhs: PlatformCameraUpdateNewLatLngBounds, rhs: PlatformCameraUpdateNewLatLngBounds
+ ) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.bounds, rhs.bounds)
+ && MessagesPigeonInternal.deepEquals(lhs.padding, rhs.padding)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformCameraUpdateNewLatLngBounds")
+ MessagesPigeonInternal.deepHash(value: bounds, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: padding, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformCameraUpdateNewLatLngBounds(bounds: \(String(describing: bounds)), padding: \(String(describing: padding)))"
+ }
+}
+
+/// Pigeon equivalent of NewLatLngZoom
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformCameraUpdateNewLatLngZoom: PlatformCameraUpdate {
+ var latLng: PlatformLatLng
+ var zoom: Double
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformCameraUpdateNewLatLngZoom? {
+ let latLng = pigeonVar_list[0] as! PlatformLatLng
+ let zoom = pigeonVar_list[1] as! Double
+
+ return PlatformCameraUpdateNewLatLngZoom(
+ latLng: latLng,
+ zoom: zoom
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ latLng,
+ zoom,
+ ]
+ }
+ static func == (lhs: PlatformCameraUpdateNewLatLngZoom, rhs: PlatformCameraUpdateNewLatLngZoom)
+ -> Bool
+ {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.latLng, rhs.latLng)
+ && MessagesPigeonInternal.deepEquals(lhs.zoom, rhs.zoom)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformCameraUpdateNewLatLngZoom")
+ MessagesPigeonInternal.deepHash(value: latLng, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: zoom, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformCameraUpdateNewLatLngZoom(latLng: \(String(describing: latLng)), zoom: \(String(describing: zoom)))"
+ }
+}
+
+/// Pigeon equivalent of ScrollBy
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformCameraUpdateScrollBy: PlatformCameraUpdate {
+ var dx: Double
+ var dy: Double
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformCameraUpdateScrollBy? {
+ let dx = pigeonVar_list[0] as! Double
+ let dy = pigeonVar_list[1] as! Double
+
+ return PlatformCameraUpdateScrollBy(
+ dx: dx,
+ dy: dy
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ dx,
+ dy,
+ ]
+ }
+ static func == (lhs: PlatformCameraUpdateScrollBy, rhs: PlatformCameraUpdateScrollBy) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.dx, rhs.dx)
+ && MessagesPigeonInternal.deepEquals(lhs.dy, rhs.dy)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformCameraUpdateScrollBy")
+ MessagesPigeonInternal.deepHash(value: dx, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: dy, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformCameraUpdateScrollBy(dx: \(String(describing: dx)), dy: \(String(describing: dy)))"
+ }
+}
+
+/// Pigeon equivalent of ZoomBy
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformCameraUpdateZoomBy: PlatformCameraUpdate {
+ var amount: Double
+ var focus: PlatformPoint? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformCameraUpdateZoomBy? {
+ let amount = pigeonVar_list[0] as! Double
+ let focus: PlatformPoint? = nilOrValue(pigeonVar_list[1])
+
+ return PlatformCameraUpdateZoomBy(
+ amount: amount,
+ focus: focus
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ amount,
+ focus,
+ ]
+ }
+ static func == (lhs: PlatformCameraUpdateZoomBy, rhs: PlatformCameraUpdateZoomBy) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.amount, rhs.amount)
+ && MessagesPigeonInternal.deepEquals(lhs.focus, rhs.focus)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformCameraUpdateZoomBy")
+ MessagesPigeonInternal.deepHash(value: amount, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: focus, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformCameraUpdateZoomBy(amount: \(String(describing: amount)), focus: \(String(describing: focus)))"
+ }
+}
+
+/// Pigeon equivalent of ZoomIn/ZoomOut
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformCameraUpdateZoom: PlatformCameraUpdate {
+ var out: Bool
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformCameraUpdateZoom? {
+ let out = pigeonVar_list[0] as! Bool
+
+ return PlatformCameraUpdateZoom(
+ out: out
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ out
+ ]
+ }
+ static func == (lhs: PlatformCameraUpdateZoom, rhs: PlatformCameraUpdateZoom) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.out, rhs.out)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformCameraUpdateZoom")
+ MessagesPigeonInternal.deepHash(value: out, hasher: &hasher)
+ }
+
+ public var description: String {
+ return "PlatformCameraUpdateZoom(out: \(String(describing: out)))"
+ }
+}
+
+/// Pigeon equivalent of ZoomTo
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformCameraUpdateZoomTo: PlatformCameraUpdate {
+ var zoom: Double
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformCameraUpdateZoomTo? {
+ let zoom = pigeonVar_list[0] as! Double
+
+ return PlatformCameraUpdateZoomTo(
+ zoom: zoom
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ zoom
+ ]
+ }
+ static func == (lhs: PlatformCameraUpdateZoomTo, rhs: PlatformCameraUpdateZoomTo) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.zoom, rhs.zoom)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformCameraUpdateZoomTo")
+ MessagesPigeonInternal.deepHash(value: zoom, hasher: &hasher)
+ }
+
+ public var description: String {
+ return "PlatformCameraUpdateZoomTo(zoom: \(String(describing: zoom)))"
+ }
+}
+
+/// Pigeon equivalent of the Circle class.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformCircle: Hashable, CustomStringConvertible {
+ var consumeTapEvents: Bool
+ var fillColor: PlatformColor
+ var strokeColor: PlatformColor
+ var visible: Bool
+ var strokeWidth: Int64
+ var zIndex: Double
+ var center: PlatformLatLng
+ var radius: Double
+ var circleId: String
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformCircle? {
+ let consumeTapEvents = pigeonVar_list[0] as! Bool
+ let fillColor = pigeonVar_list[1] as! PlatformColor
+ let strokeColor = pigeonVar_list[2] as! PlatformColor
+ let visible = pigeonVar_list[3] as! Bool
+ let strokeWidth = pigeonVar_list[4] as! Int64
+ let zIndex = pigeonVar_list[5] as! Double
+ let center = pigeonVar_list[6] as! PlatformLatLng
+ let radius = pigeonVar_list[7] as! Double
+ let circleId = pigeonVar_list[8] as! String
+
+ return PlatformCircle(
+ consumeTapEvents: consumeTapEvents,
+ fillColor: fillColor,
+ strokeColor: strokeColor,
+ visible: visible,
+ strokeWidth: strokeWidth,
+ zIndex: zIndex,
+ center: center,
+ radius: radius,
+ circleId: circleId
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ consumeTapEvents,
+ fillColor,
+ strokeColor,
+ visible,
+ strokeWidth,
+ zIndex,
+ center,
+ radius,
+ circleId,
+ ]
+ }
+ static func == (lhs: PlatformCircle, rhs: PlatformCircle) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.consumeTapEvents, rhs.consumeTapEvents)
+ && MessagesPigeonInternal.deepEquals(lhs.fillColor, rhs.fillColor)
+ && MessagesPigeonInternal.deepEquals(lhs.strokeColor, rhs.strokeColor)
+ && MessagesPigeonInternal.deepEquals(lhs.visible, rhs.visible)
+ && MessagesPigeonInternal.deepEquals(lhs.strokeWidth, rhs.strokeWidth)
+ && MessagesPigeonInternal.deepEquals(lhs.zIndex, rhs.zIndex)
+ && MessagesPigeonInternal.deepEquals(lhs.center, rhs.center)
+ && MessagesPigeonInternal.deepEquals(lhs.radius, rhs.radius)
+ && MessagesPigeonInternal.deepEquals(lhs.circleId, rhs.circleId)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformCircle")
+ MessagesPigeonInternal.deepHash(value: consumeTapEvents, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: fillColor, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: strokeColor, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: visible, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: strokeWidth, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: zIndex, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: center, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: radius, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: circleId, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformCircle(consumeTapEvents: \(String(describing: consumeTapEvents)), fillColor: \(String(describing: fillColor)), strokeColor: \(String(describing: strokeColor)), visible: \(String(describing: visible)), strokeWidth: \(String(describing: strokeWidth)), zIndex: \(String(describing: zIndex)), center: \(String(describing: center)), radius: \(String(describing: radius)), circleId: \(String(describing: circleId)))"
+ }
+}
+
+/// Pigeon equivalent of the Heatmap class.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformHeatmap: Hashable, CustomStringConvertible {
+ var heatmapId: String
+ var data: [PlatformWeightedLatLng]
+ var gradient: PlatformHeatmapGradient? = nil
+ var opacity: Double
+ var radius: Int64
+ var minimumZoomIntensity: Int64
+ var maximumZoomIntensity: Int64
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformHeatmap? {
+ let heatmapId = pigeonVar_list[0] as! String
+ let data = pigeonVar_list[1] as! [PlatformWeightedLatLng]
+ let gradient: PlatformHeatmapGradient? = nilOrValue(pigeonVar_list[2])
+ let opacity = pigeonVar_list[3] as! Double
+ let radius = pigeonVar_list[4] as! Int64
+ let minimumZoomIntensity = pigeonVar_list[5] as! Int64
+ let maximumZoomIntensity = pigeonVar_list[6] as! Int64
+
+ return PlatformHeatmap(
+ heatmapId: heatmapId,
+ data: data,
+ gradient: gradient,
+ opacity: opacity,
+ radius: radius,
+ minimumZoomIntensity: minimumZoomIntensity,
+ maximumZoomIntensity: maximumZoomIntensity
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ heatmapId,
+ data,
+ gradient,
+ opacity,
+ radius,
+ minimumZoomIntensity,
+ maximumZoomIntensity,
+ ]
+ }
+ static func == (lhs: PlatformHeatmap, rhs: PlatformHeatmap) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.heatmapId, rhs.heatmapId)
+ && MessagesPigeonInternal.deepEquals(lhs.data, rhs.data)
+ && MessagesPigeonInternal.deepEquals(lhs.gradient, rhs.gradient)
+ && MessagesPigeonInternal.deepEquals(lhs.opacity, rhs.opacity)
+ && MessagesPigeonInternal.deepEquals(lhs.radius, rhs.radius)
+ && MessagesPigeonInternal.deepEquals(lhs.minimumZoomIntensity, rhs.minimumZoomIntensity)
+ && MessagesPigeonInternal.deepEquals(lhs.maximumZoomIntensity, rhs.maximumZoomIntensity)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformHeatmap")
+ MessagesPigeonInternal.deepHash(value: heatmapId, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: data, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: gradient, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: opacity, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: radius, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: minimumZoomIntensity, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: maximumZoomIntensity, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformHeatmap(heatmapId: \(String(describing: heatmapId)), data: \(String(describing: data)), gradient: \(String(describing: gradient)), opacity: \(String(describing: opacity)), radius: \(String(describing: radius)), minimumZoomIntensity: \(String(describing: minimumZoomIntensity)), maximumZoomIntensity: \(String(describing: maximumZoomIntensity)))"
+ }
+}
+
+/// Pigeon equivalent of the HeatmapGradient class.
+///
+/// The GMUGradient structure is slightly different from HeatmapGradient, so
+/// this matches the iOS API so that conversion can be done on the Dart side
+/// where the structures are easier to work with.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformHeatmapGradient: Hashable, CustomStringConvertible {
+ var colors: [PlatformColor]
+ var startPoints: [Double]
+ var colorMapSize: Int64
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformHeatmapGradient? {
+ let colors = pigeonVar_list[0] as! [PlatformColor]
+ let startPoints = pigeonVar_list[1] as! [Double]
+ let colorMapSize = pigeonVar_list[2] as! Int64
+
+ return PlatformHeatmapGradient(
+ colors: colors,
+ startPoints: startPoints,
+ colorMapSize: colorMapSize
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ colors,
+ startPoints,
+ colorMapSize,
+ ]
+ }
+ static func == (lhs: PlatformHeatmapGradient, rhs: PlatformHeatmapGradient) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.colors, rhs.colors)
+ && MessagesPigeonInternal.deepEquals(lhs.startPoints, rhs.startPoints)
+ && MessagesPigeonInternal.deepEquals(lhs.colorMapSize, rhs.colorMapSize)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformHeatmapGradient")
+ MessagesPigeonInternal.deepHash(value: colors, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: startPoints, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: colorMapSize, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformHeatmapGradient(colors: \(String(describing: colors)), startPoints: \(String(describing: startPoints)), colorMapSize: \(String(describing: colorMapSize)))"
+ }
+}
+
+/// Pigeon equivalent of the WeightedLatLng class.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformWeightedLatLng: Hashable, CustomStringConvertible {
+ var point: PlatformLatLng
+ var weight: Double
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformWeightedLatLng? {
+ let point = pigeonVar_list[0] as! PlatformLatLng
+ let weight = pigeonVar_list[1] as! Double
+
+ return PlatformWeightedLatLng(
+ point: point,
+ weight: weight
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ point,
+ weight,
+ ]
+ }
+ static func == (lhs: PlatformWeightedLatLng, rhs: PlatformWeightedLatLng) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.point, rhs.point)
+ && MessagesPigeonInternal.deepEquals(lhs.weight, rhs.weight)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformWeightedLatLng")
+ MessagesPigeonInternal.deepHash(value: point, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: weight, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformWeightedLatLng(point: \(String(describing: point)), weight: \(String(describing: weight)))"
+ }
+}
+
+/// Pigeon equivalent of the InfoWindow class.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformInfoWindow: Hashable, CustomStringConvertible {
+ var title: String? = nil
+ var snippet: String? = nil
+ var anchor: PlatformPoint
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformInfoWindow? {
+ let title: String? = nilOrValue(pigeonVar_list[0])
+ let snippet: String? = nilOrValue(pigeonVar_list[1])
+ let anchor = pigeonVar_list[2] as! PlatformPoint
+
+ return PlatformInfoWindow(
+ title: title,
+ snippet: snippet,
+ anchor: anchor
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ title,
+ snippet,
+ anchor,
+ ]
+ }
+ static func == (lhs: PlatformInfoWindow, rhs: PlatformInfoWindow) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.title, rhs.title)
+ && MessagesPigeonInternal.deepEquals(lhs.snippet, rhs.snippet)
+ && MessagesPigeonInternal.deepEquals(lhs.anchor, rhs.anchor)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformInfoWindow")
+ MessagesPigeonInternal.deepHash(value: title, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: snippet, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: anchor, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformInfoWindow(title: \(String(describing: title)), snippet: \(String(describing: snippet)), anchor: \(String(describing: anchor)))"
+ }
+}
+
+/// Pigeon equivalent of Cluster.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformCluster: Hashable, CustomStringConvertible {
+ var clusterManagerId: String
+ var position: PlatformLatLng
+ var bounds: PlatformLatLngBounds
+ var markerIds: [String]
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformCluster? {
+ let clusterManagerId = pigeonVar_list[0] as! String
+ let position = pigeonVar_list[1] as! PlatformLatLng
+ let bounds = pigeonVar_list[2] as! PlatformLatLngBounds
+ let markerIds = pigeonVar_list[3] as! [String]
+
+ return PlatformCluster(
+ clusterManagerId: clusterManagerId,
+ position: position,
+ bounds: bounds,
+ markerIds: markerIds
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ clusterManagerId,
+ position,
+ bounds,
+ markerIds,
+ ]
+ }
+ static func == (lhs: PlatformCluster, rhs: PlatformCluster) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.clusterManagerId, rhs.clusterManagerId)
+ && MessagesPigeonInternal.deepEquals(lhs.position, rhs.position)
+ && MessagesPigeonInternal.deepEquals(lhs.bounds, rhs.bounds)
+ && MessagesPigeonInternal.deepEquals(lhs.markerIds, rhs.markerIds)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformCluster")
+ MessagesPigeonInternal.deepHash(value: clusterManagerId, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: position, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: bounds, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: markerIds, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformCluster(clusterManagerId: \(String(describing: clusterManagerId)), position: \(String(describing: position)), bounds: \(String(describing: bounds)), markerIds: \(String(describing: markerIds)))"
+ }
+}
+
+/// Pigeon equivalent of the ClusterManager class.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformClusterManager: Hashable, CustomStringConvertible {
+ var identifier: String
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformClusterManager? {
+ let identifier = pigeonVar_list[0] as! String
+
+ return PlatformClusterManager(
+ identifier: identifier
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ identifier
+ ]
+ }
+ static func == (lhs: PlatformClusterManager, rhs: PlatformClusterManager) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.identifier, rhs.identifier)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformClusterManager")
+ MessagesPigeonInternal.deepHash(value: identifier, hasher: &hasher)
+ }
+
+ public var description: String {
+ return "PlatformClusterManager(identifier: \(String(describing: identifier)))"
+ }
+}
+
+/// Pigeon equivalent of the Marker class.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformMarker: Hashable, CustomStringConvertible {
+ var alpha: Double
+ var anchor: PlatformPoint
+ var consumeTapEvents: Bool
+ var draggable: Bool
+ var flat: Bool
+ var icon: PlatformBitmap
+ var infoWindow: PlatformInfoWindow
+ var position: PlatformLatLng
+ var rotation: Double
+ var visible: Bool
+ var zIndex: Int64
+ var markerId: String
+ var clusterManagerId: String? = nil
+ var collisionBehavior: PlatformMarkerCollisionBehavior? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformMarker? {
+ let alpha = pigeonVar_list[0] as! Double
+ let anchor = pigeonVar_list[1] as! PlatformPoint
+ let consumeTapEvents = pigeonVar_list[2] as! Bool
+ let draggable = pigeonVar_list[3] as! Bool
+ let flat = pigeonVar_list[4] as! Bool
+ let icon = pigeonVar_list[5] as! PlatformBitmap
+ let infoWindow = pigeonVar_list[6] as! PlatformInfoWindow
+ let position = pigeonVar_list[7] as! PlatformLatLng
+ let rotation = pigeonVar_list[8] as! Double
+ let visible = pigeonVar_list[9] as! Bool
+ let zIndex = pigeonVar_list[10] as! Int64
+ let markerId = pigeonVar_list[11] as! String
+ let clusterManagerId: String? = nilOrValue(pigeonVar_list[12])
+ let collisionBehavior: PlatformMarkerCollisionBehavior? = nilOrValue(pigeonVar_list[13])
+
+ return PlatformMarker(
+ alpha: alpha,
+ anchor: anchor,
+ consumeTapEvents: consumeTapEvents,
+ draggable: draggable,
+ flat: flat,
+ icon: icon,
+ infoWindow: infoWindow,
+ position: position,
+ rotation: rotation,
+ visible: visible,
+ zIndex: zIndex,
+ markerId: markerId,
+ clusterManagerId: clusterManagerId,
+ collisionBehavior: collisionBehavior
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ alpha,
+ anchor,
+ consumeTapEvents,
+ draggable,
+ flat,
+ icon,
+ infoWindow,
+ position,
+ rotation,
+ visible,
+ zIndex,
+ markerId,
+ clusterManagerId,
+ collisionBehavior,
+ ]
+ }
+ static func == (lhs: PlatformMarker, rhs: PlatformMarker) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.alpha, rhs.alpha)
+ && MessagesPigeonInternal.deepEquals(lhs.anchor, rhs.anchor)
+ && MessagesPigeonInternal.deepEquals(lhs.consumeTapEvents, rhs.consumeTapEvents)
+ && MessagesPigeonInternal.deepEquals(lhs.draggable, rhs.draggable)
+ && MessagesPigeonInternal.deepEquals(lhs.flat, rhs.flat)
+ && MessagesPigeonInternal.deepEquals(lhs.icon, rhs.icon)
+ && MessagesPigeonInternal.deepEquals(lhs.infoWindow, rhs.infoWindow)
+ && MessagesPigeonInternal.deepEquals(lhs.position, rhs.position)
+ && MessagesPigeonInternal.deepEquals(lhs.rotation, rhs.rotation)
+ && MessagesPigeonInternal.deepEquals(lhs.visible, rhs.visible)
+ && MessagesPigeonInternal.deepEquals(lhs.zIndex, rhs.zIndex)
+ && MessagesPigeonInternal.deepEquals(lhs.markerId, rhs.markerId)
+ && MessagesPigeonInternal.deepEquals(lhs.clusterManagerId, rhs.clusterManagerId)
+ && MessagesPigeonInternal.deepEquals(lhs.collisionBehavior, rhs.collisionBehavior)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformMarker")
+ MessagesPigeonInternal.deepHash(value: alpha, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: anchor, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: consumeTapEvents, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: draggable, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: flat, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: icon, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: infoWindow, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: position, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: rotation, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: visible, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: zIndex, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: markerId, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: clusterManagerId, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: collisionBehavior, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformMarker(alpha: \(String(describing: alpha)), anchor: \(String(describing: anchor)), consumeTapEvents: \(String(describing: consumeTapEvents)), draggable: \(String(describing: draggable)), flat: \(String(describing: flat)), icon: \(String(describing: icon)), infoWindow: \(String(describing: infoWindow)), position: \(String(describing: position)), rotation: \(String(describing: rotation)), visible: \(String(describing: visible)), zIndex: \(String(describing: zIndex)), markerId: \(String(describing: markerId)), clusterManagerId: \(String(describing: clusterManagerId)), collisionBehavior: \(String(describing: collisionBehavior)))"
+ }
+}
+
+/// Pigeon equivalent of the Polygon class.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformPolygon: Hashable, CustomStringConvertible {
+ var polygonId: String
+ var consumesTapEvents: Bool
+ var fillColor: PlatformColor
+ var geodesic: Bool
+ var points: [PlatformLatLng]
+ var holes: [[PlatformLatLng]]
+ var visible: Bool
+ var strokeColor: PlatformColor
+ var strokeWidth: Int64
+ var zIndex: Int64
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformPolygon? {
+ let polygonId = pigeonVar_list[0] as! String
+ let consumesTapEvents = pigeonVar_list[1] as! Bool
+ let fillColor = pigeonVar_list[2] as! PlatformColor
+ let geodesic = pigeonVar_list[3] as! Bool
+ let points = pigeonVar_list[4] as! [PlatformLatLng]
+ let holes = pigeonVar_list[5] as! [[PlatformLatLng]]
+ let visible = pigeonVar_list[6] as! Bool
+ let strokeColor = pigeonVar_list[7] as! PlatformColor
+ let strokeWidth = pigeonVar_list[8] as! Int64
+ let zIndex = pigeonVar_list[9] as! Int64
+
+ return PlatformPolygon(
+ polygonId: polygonId,
+ consumesTapEvents: consumesTapEvents,
+ fillColor: fillColor,
+ geodesic: geodesic,
+ points: points,
+ holes: holes,
+ visible: visible,
+ strokeColor: strokeColor,
+ strokeWidth: strokeWidth,
+ zIndex: zIndex
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ polygonId,
+ consumesTapEvents,
+ fillColor,
+ geodesic,
+ points,
+ holes,
+ visible,
+ strokeColor,
+ strokeWidth,
+ zIndex,
+ ]
+ }
+ static func == (lhs: PlatformPolygon, rhs: PlatformPolygon) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.polygonId, rhs.polygonId)
+ && MessagesPigeonInternal.deepEquals(lhs.consumesTapEvents, rhs.consumesTapEvents)
+ && MessagesPigeonInternal.deepEquals(lhs.fillColor, rhs.fillColor)
+ && MessagesPigeonInternal.deepEquals(lhs.geodesic, rhs.geodesic)
+ && MessagesPigeonInternal.deepEquals(lhs.points, rhs.points)
+ && MessagesPigeonInternal.deepEquals(lhs.holes, rhs.holes)
+ && MessagesPigeonInternal.deepEquals(lhs.visible, rhs.visible)
+ && MessagesPigeonInternal.deepEquals(lhs.strokeColor, rhs.strokeColor)
+ && MessagesPigeonInternal.deepEquals(lhs.strokeWidth, rhs.strokeWidth)
+ && MessagesPigeonInternal.deepEquals(lhs.zIndex, rhs.zIndex)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformPolygon")
+ MessagesPigeonInternal.deepHash(value: polygonId, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: consumesTapEvents, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: fillColor, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: geodesic, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: points, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: holes, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: visible, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: strokeColor, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: strokeWidth, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: zIndex, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformPolygon(polygonId: \(String(describing: polygonId)), consumesTapEvents: \(String(describing: consumesTapEvents)), fillColor: \(String(describing: fillColor)), geodesic: \(String(describing: geodesic)), points: \(String(describing: points)), holes: \(String(describing: holes)), visible: \(String(describing: visible)), strokeColor: \(String(describing: strokeColor)), strokeWidth: \(String(describing: strokeWidth)), zIndex: \(String(describing: zIndex)))"
+ }
+}
+
+/// Pigeon equivalent of the Polyline class.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformPolyline: Hashable, CustomStringConvertible {
+ var polylineId: String
+ var consumesTapEvents: Bool
+ var color: PlatformColor
+ var geodesic: Bool
+ /// The joint type.
+ var jointType: PlatformJointType
+ /// The pattern data, as a list of pattern items.
+ var patterns: [PlatformPatternItem]
+ var points: [PlatformLatLng]
+ var visible: Bool
+ var width: Int64
+ var zIndex: Int64
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformPolyline? {
+ let polylineId = pigeonVar_list[0] as! String
+ let consumesTapEvents = pigeonVar_list[1] as! Bool
+ let color = pigeonVar_list[2] as! PlatformColor
+ let geodesic = pigeonVar_list[3] as! Bool
+ let jointType = pigeonVar_list[4] as! PlatformJointType
+ let patterns = pigeonVar_list[5] as! [PlatformPatternItem]
+ let points = pigeonVar_list[6] as! [PlatformLatLng]
+ let visible = pigeonVar_list[7] as! Bool
+ let width = pigeonVar_list[8] as! Int64
+ let zIndex = pigeonVar_list[9] as! Int64
+
+ return PlatformPolyline(
+ polylineId: polylineId,
+ consumesTapEvents: consumesTapEvents,
+ color: color,
+ geodesic: geodesic,
+ jointType: jointType,
+ patterns: patterns,
+ points: points,
+ visible: visible,
+ width: width,
+ zIndex: zIndex
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ polylineId,
+ consumesTapEvents,
+ color,
+ geodesic,
+ jointType,
+ patterns,
+ points,
+ visible,
+ width,
+ zIndex,
+ ]
+ }
+ static func == (lhs: PlatformPolyline, rhs: PlatformPolyline) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.polylineId, rhs.polylineId)
+ && MessagesPigeonInternal.deepEquals(lhs.consumesTapEvents, rhs.consumesTapEvents)
+ && MessagesPigeonInternal.deepEquals(lhs.color, rhs.color)
+ && MessagesPigeonInternal.deepEquals(lhs.geodesic, rhs.geodesic)
+ && MessagesPigeonInternal.deepEquals(lhs.jointType, rhs.jointType)
+ && MessagesPigeonInternal.deepEquals(lhs.patterns, rhs.patterns)
+ && MessagesPigeonInternal.deepEquals(lhs.points, rhs.points)
+ && MessagesPigeonInternal.deepEquals(lhs.visible, rhs.visible)
+ && MessagesPigeonInternal.deepEquals(lhs.width, rhs.width)
+ && MessagesPigeonInternal.deepEquals(lhs.zIndex, rhs.zIndex)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformPolyline")
+ MessagesPigeonInternal.deepHash(value: polylineId, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: consumesTapEvents, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: color, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: geodesic, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: jointType, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: patterns, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: points, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: visible, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: width, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: zIndex, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformPolyline(polylineId: \(String(describing: polylineId)), consumesTapEvents: \(String(describing: consumesTapEvents)), color: \(String(describing: color)), geodesic: \(String(describing: geodesic)), jointType: \(String(describing: jointType)), patterns: \(String(describing: patterns)), points: \(String(describing: points)), visible: \(String(describing: visible)), width: \(String(describing: width)), zIndex: \(String(describing: zIndex)))"
+ }
+}
+
+/// Pigeon equivalent of the PatternItem class.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformPatternItem: Hashable, CustomStringConvertible {
+ var type: PlatformPatternItemType
+ var length: Double? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformPatternItem? {
+ let type = pigeonVar_list[0] as! PlatformPatternItemType
+ let length: Double? = nilOrValue(pigeonVar_list[1])
+
+ return PlatformPatternItem(
+ type: type,
+ length: length
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ type,
+ length,
+ ]
+ }
+ static func == (lhs: PlatformPatternItem, rhs: PlatformPatternItem) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.type, rhs.type)
+ && MessagesPigeonInternal.deepEquals(lhs.length, rhs.length)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformPatternItem")
+ MessagesPigeonInternal.deepHash(value: type, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: length, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformPatternItem(type: \(String(describing: type)), length: \(String(describing: length)))"
+ }
+}
+
+/// Pigeon equivalent of the Tile class.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformTile: Hashable, CustomStringConvertible {
+ var width: Int64
+ var height: Int64
+ var data: FlutterStandardTypedData? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformTile? {
+ let width = pigeonVar_list[0] as! Int64
+ let height = pigeonVar_list[1] as! Int64
+ let data: FlutterStandardTypedData? = nilOrValue(pigeonVar_list[2])
+
+ return PlatformTile(
+ width: width,
+ height: height,
+ data: data
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ width,
+ height,
+ data,
+ ]
+ }
+ static func == (lhs: PlatformTile, rhs: PlatformTile) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.width, rhs.width)
+ && MessagesPigeonInternal.deepEquals(lhs.height, rhs.height)
+ && MessagesPigeonInternal.deepEquals(lhs.data, rhs.data)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformTile")
+ MessagesPigeonInternal.deepHash(value: width, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: height, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: data, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformTile(width: \(String(describing: width)), height: \(String(describing: height)), data: \(String(describing: data)))"
+ }
+}
+
+/// Pigeon equivalent of the TileOverlay class.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformTileOverlay: Hashable, CustomStringConvertible {
+ var tileOverlayId: String
+ var fadeIn: Bool
+ var transparency: Double
+ var zIndex: Int64
+ var visible: Bool
+ var tileSize: Int64
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformTileOverlay? {
+ let tileOverlayId = pigeonVar_list[0] as! String
+ let fadeIn = pigeonVar_list[1] as! Bool
+ let transparency = pigeonVar_list[2] as! Double
+ let zIndex = pigeonVar_list[3] as! Int64
+ let visible = pigeonVar_list[4] as! Bool
+ let tileSize = pigeonVar_list[5] as! Int64
+
+ return PlatformTileOverlay(
+ tileOverlayId: tileOverlayId,
+ fadeIn: fadeIn,
+ transparency: transparency,
+ zIndex: zIndex,
+ visible: visible,
+ tileSize: tileSize
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ tileOverlayId,
+ fadeIn,
+ transparency,
+ zIndex,
+ visible,
+ tileSize,
+ ]
+ }
+ static func == (lhs: PlatformTileOverlay, rhs: PlatformTileOverlay) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.tileOverlayId, rhs.tileOverlayId)
+ && MessagesPigeonInternal.deepEquals(lhs.fadeIn, rhs.fadeIn)
+ && MessagesPigeonInternal.deepEquals(lhs.transparency, rhs.transparency)
+ && MessagesPigeonInternal.deepEquals(lhs.zIndex, rhs.zIndex)
+ && MessagesPigeonInternal.deepEquals(lhs.visible, rhs.visible)
+ && MessagesPigeonInternal.deepEquals(lhs.tileSize, rhs.tileSize)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformTileOverlay")
+ MessagesPigeonInternal.deepHash(value: tileOverlayId, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: fadeIn, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: transparency, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: zIndex, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: visible, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: tileSize, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformTileOverlay(tileOverlayId: \(String(describing: tileOverlayId)), fadeIn: \(String(describing: fadeIn)), transparency: \(String(describing: transparency)), zIndex: \(String(describing: zIndex)), visible: \(String(describing: visible)), tileSize: \(String(describing: tileSize)))"
+ }
+}
+
+/// Pigeon equivalent of Flutter's EdgeInsets.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformEdgeInsets: Hashable, CustomStringConvertible {
+ var top: Double
+ var bottom: Double
+ var left: Double
+ var right: Double
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformEdgeInsets? {
+ let top = pigeonVar_list[0] as! Double
+ let bottom = pigeonVar_list[1] as! Double
+ let left = pigeonVar_list[2] as! Double
+ let right = pigeonVar_list[3] as! Double
+
+ return PlatformEdgeInsets(
+ top: top,
+ bottom: bottom,
+ left: left,
+ right: right
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ top,
+ bottom,
+ left,
+ right,
+ ]
+ }
+ static func == (lhs: PlatformEdgeInsets, rhs: PlatformEdgeInsets) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.top, rhs.top)
+ && MessagesPigeonInternal.deepEquals(lhs.bottom, rhs.bottom)
+ && MessagesPigeonInternal.deepEquals(lhs.left, rhs.left)
+ && MessagesPigeonInternal.deepEquals(lhs.right, rhs.right)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformEdgeInsets")
+ MessagesPigeonInternal.deepHash(value: top, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: bottom, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: left, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: right, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformEdgeInsets(top: \(String(describing: top)), bottom: \(String(describing: bottom)), left: \(String(describing: left)), right: \(String(describing: right)))"
+ }
+}
+
+/// Pigeon equivalent of LatLng.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformLatLng: Hashable, CustomStringConvertible {
+ var latitude: Double
+ var longitude: Double
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformLatLng? {
+ let latitude = pigeonVar_list[0] as! Double
+ let longitude = pigeonVar_list[1] as! Double
+
+ return PlatformLatLng(
+ latitude: latitude,
+ longitude: longitude
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ latitude,
+ longitude,
+ ]
+ }
+ static func == (lhs: PlatformLatLng, rhs: PlatformLatLng) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.latitude, rhs.latitude)
+ && MessagesPigeonInternal.deepEquals(lhs.longitude, rhs.longitude)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformLatLng")
+ MessagesPigeonInternal.deepHash(value: latitude, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: longitude, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformLatLng(latitude: \(String(describing: latitude)), longitude: \(String(describing: longitude)))"
+ }
+}
+
+/// Pigeon equivalent of LatLngBounds.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformLatLngBounds: Hashable, CustomStringConvertible {
+ var northeast: PlatformLatLng
+ var southwest: PlatformLatLng
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformLatLngBounds? {
+ let northeast = pigeonVar_list[0] as! PlatformLatLng
+ let southwest = pigeonVar_list[1] as! PlatformLatLng
+
+ return PlatformLatLngBounds(
+ northeast: northeast,
+ southwest: southwest
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ northeast,
+ southwest,
+ ]
+ }
+ static func == (lhs: PlatformLatLngBounds, rhs: PlatformLatLngBounds) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.northeast, rhs.northeast)
+ && MessagesPigeonInternal.deepEquals(lhs.southwest, rhs.southwest)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformLatLngBounds")
+ MessagesPigeonInternal.deepHash(value: northeast, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: southwest, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformLatLngBounds(northeast: \(String(describing: northeast)), southwest: \(String(describing: southwest)))"
+ }
+}
+
+/// Pigeon equivalent of CameraTargetBounds.
+///
+/// As with the Dart version, it exists to distinguish between not setting a
+/// a target, and having an explicitly unbounded target (null [bounds]).
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformCameraTargetBounds: Hashable, CustomStringConvertible {
+ var bounds: PlatformLatLngBounds? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformCameraTargetBounds? {
+ let bounds: PlatformLatLngBounds? = nilOrValue(pigeonVar_list[0])
+
+ return PlatformCameraTargetBounds(
+ bounds: bounds
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ bounds
+ ]
+ }
+ static func == (lhs: PlatformCameraTargetBounds, rhs: PlatformCameraTargetBounds) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.bounds, rhs.bounds)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformCameraTargetBounds")
+ MessagesPigeonInternal.deepHash(value: bounds, hasher: &hasher)
+ }
+
+ public var description: String {
+ return "PlatformCameraTargetBounds(bounds: \(String(describing: bounds)))"
+ }
+}
+
+/// Pigeon equivalent of the GroundOverlay class.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformGroundOverlay: Hashable, CustomStringConvertible {
+ var groundOverlayId: String
+ var image: PlatformBitmap
+ var position: PlatformLatLng? = nil
+ var bounds: PlatformLatLngBounds? = nil
+ var anchor: PlatformPoint? = nil
+ var transparency: Double
+ var bearing: Double
+ var zIndex: Int64
+ var visible: Bool
+ var clickable: Bool
+ var zoomLevel: Double? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformGroundOverlay? {
+ let groundOverlayId = pigeonVar_list[0] as! String
+ let image = pigeonVar_list[1] as! PlatformBitmap
+ let position: PlatformLatLng? = nilOrValue(pigeonVar_list[2])
+ let bounds: PlatformLatLngBounds? = nilOrValue(pigeonVar_list[3])
+ let anchor: PlatformPoint? = nilOrValue(pigeonVar_list[4])
+ let transparency = pigeonVar_list[5] as! Double
+ let bearing = pigeonVar_list[6] as! Double
+ let zIndex = pigeonVar_list[7] as! Int64
+ let visible = pigeonVar_list[8] as! Bool
+ let clickable = pigeonVar_list[9] as! Bool
+ let zoomLevel: Double? = nilOrValue(pigeonVar_list[10])
+
+ return PlatformGroundOverlay(
+ groundOverlayId: groundOverlayId,
+ image: image,
+ position: position,
+ bounds: bounds,
+ anchor: anchor,
+ transparency: transparency,
+ bearing: bearing,
+ zIndex: zIndex,
+ visible: visible,
+ clickable: clickable,
+ zoomLevel: zoomLevel
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ groundOverlayId,
+ image,
+ position,
+ bounds,
+ anchor,
+ transparency,
+ bearing,
+ zIndex,
+ visible,
+ clickable,
+ zoomLevel,
+ ]
+ }
+ static func == (lhs: PlatformGroundOverlay, rhs: PlatformGroundOverlay) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.groundOverlayId, rhs.groundOverlayId)
+ && MessagesPigeonInternal.deepEquals(lhs.image, rhs.image)
+ && MessagesPigeonInternal.deepEquals(lhs.position, rhs.position)
+ && MessagesPigeonInternal.deepEquals(lhs.bounds, rhs.bounds)
+ && MessagesPigeonInternal.deepEquals(lhs.anchor, rhs.anchor)
+ && MessagesPigeonInternal.deepEquals(lhs.transparency, rhs.transparency)
+ && MessagesPigeonInternal.deepEquals(lhs.bearing, rhs.bearing)
+ && MessagesPigeonInternal.deepEquals(lhs.zIndex, rhs.zIndex)
+ && MessagesPigeonInternal.deepEquals(lhs.visible, rhs.visible)
+ && MessagesPigeonInternal.deepEquals(lhs.clickable, rhs.clickable)
+ && MessagesPigeonInternal.deepEquals(lhs.zoomLevel, rhs.zoomLevel)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformGroundOverlay")
+ MessagesPigeonInternal.deepHash(value: groundOverlayId, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: image, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: position, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: bounds, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: anchor, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: transparency, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: bearing, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: zIndex, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: visible, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: clickable, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: zoomLevel, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformGroundOverlay(groundOverlayId: \(String(describing: groundOverlayId)), image: \(String(describing: image)), position: \(String(describing: position)), bounds: \(String(describing: bounds)), anchor: \(String(describing: anchor)), transparency: \(String(describing: transparency)), bearing: \(String(describing: bearing)), zIndex: \(String(describing: zIndex)), visible: \(String(describing: visible)), clickable: \(String(describing: clickable)), zoomLevel: \(String(describing: zoomLevel)))"
+ }
+}
+
+/// Information passed to the platform view creation.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformMapViewCreationParams: Hashable, CustomStringConvertible {
+ var initialCameraPosition: PlatformCameraPosition
+ var mapConfiguration: PlatformMapConfiguration
+ var initialCircles: [PlatformCircle]
+ var initialMarkers: [PlatformMarker]
+ var initialPolygons: [PlatformPolygon]
+ var initialPolylines: [PlatformPolyline]
+ var initialHeatmaps: [PlatformHeatmap]
+ var initialTileOverlays: [PlatformTileOverlay]
+ var initialClusterManagers: [PlatformClusterManager]
+ var initialGroundOverlays: [PlatformGroundOverlay]
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformMapViewCreationParams? {
+ let initialCameraPosition = pigeonVar_list[0] as! PlatformCameraPosition
+ let mapConfiguration = pigeonVar_list[1] as! PlatformMapConfiguration
+ let initialCircles = pigeonVar_list[2] as! [PlatformCircle]
+ let initialMarkers = pigeonVar_list[3] as! [PlatformMarker]
+ let initialPolygons = pigeonVar_list[4] as! [PlatformPolygon]
+ let initialPolylines = pigeonVar_list[5] as! [PlatformPolyline]
+ let initialHeatmaps = pigeonVar_list[6] as! [PlatformHeatmap]
+ let initialTileOverlays = pigeonVar_list[7] as! [PlatformTileOverlay]
+ let initialClusterManagers = pigeonVar_list[8] as! [PlatformClusterManager]
+ let initialGroundOverlays = pigeonVar_list[9] as! [PlatformGroundOverlay]
+
+ return PlatformMapViewCreationParams(
+ initialCameraPosition: initialCameraPosition,
+ mapConfiguration: mapConfiguration,
+ initialCircles: initialCircles,
+ initialMarkers: initialMarkers,
+ initialPolygons: initialPolygons,
+ initialPolylines: initialPolylines,
+ initialHeatmaps: initialHeatmaps,
+ initialTileOverlays: initialTileOverlays,
+ initialClusterManagers: initialClusterManagers,
+ initialGroundOverlays: initialGroundOverlays
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ initialCameraPosition,
+ mapConfiguration,
+ initialCircles,
+ initialMarkers,
+ initialPolygons,
+ initialPolylines,
+ initialHeatmaps,
+ initialTileOverlays,
+ initialClusterManagers,
+ initialGroundOverlays,
+ ]
+ }
+ static func == (lhs: PlatformMapViewCreationParams, rhs: PlatformMapViewCreationParams) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.initialCameraPosition, rhs.initialCameraPosition)
+ && MessagesPigeonInternal.deepEquals(lhs.mapConfiguration, rhs.mapConfiguration)
+ && MessagesPigeonInternal.deepEquals(lhs.initialCircles, rhs.initialCircles)
+ && MessagesPigeonInternal.deepEquals(lhs.initialMarkers, rhs.initialMarkers)
+ && MessagesPigeonInternal.deepEquals(lhs.initialPolygons, rhs.initialPolygons)
+ && MessagesPigeonInternal.deepEquals(lhs.initialPolylines, rhs.initialPolylines)
+ && MessagesPigeonInternal.deepEquals(lhs.initialHeatmaps, rhs.initialHeatmaps)
+ && MessagesPigeonInternal.deepEquals(lhs.initialTileOverlays, rhs.initialTileOverlays)
+ && MessagesPigeonInternal.deepEquals(lhs.initialClusterManagers, rhs.initialClusterManagers)
+ && MessagesPigeonInternal.deepEquals(lhs.initialGroundOverlays, rhs.initialGroundOverlays)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformMapViewCreationParams")
+ MessagesPigeonInternal.deepHash(value: initialCameraPosition, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: mapConfiguration, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: initialCircles, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: initialMarkers, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: initialPolygons, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: initialPolylines, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: initialHeatmaps, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: initialTileOverlays, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: initialClusterManagers, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: initialGroundOverlays, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformMapViewCreationParams(initialCameraPosition: \(String(describing: initialCameraPosition)), mapConfiguration: \(String(describing: mapConfiguration)), initialCircles: \(String(describing: initialCircles)), initialMarkers: \(String(describing: initialMarkers)), initialPolygons: \(String(describing: initialPolygons)), initialPolylines: \(String(describing: initialPolylines)), initialHeatmaps: \(String(describing: initialHeatmaps)), initialTileOverlays: \(String(describing: initialTileOverlays)), initialClusterManagers: \(String(describing: initialClusterManagers)), initialGroundOverlays: \(String(describing: initialGroundOverlays)))"
+ }
+}
+
+/// Pigeon equivalent of MapConfiguration.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformMapConfiguration: Hashable, CustomStringConvertible {
+ var compassEnabled: Bool? = nil
+ var cameraTargetBounds: PlatformCameraTargetBounds? = nil
+ var mapType: PlatformMapType? = nil
+ var minMaxZoomPreference: PlatformZoomRange? = nil
+ var rotateGesturesEnabled: Bool? = nil
+ var scrollGesturesEnabled: Bool? = nil
+ var tiltGesturesEnabled: Bool? = nil
+ var trackCameraPosition: Bool? = nil
+ var zoomGesturesEnabled: Bool? = nil
+ var myLocationEnabled: Bool? = nil
+ var myLocationButtonEnabled: Bool? = nil
+ var padding: PlatformEdgeInsets? = nil
+ var indoorViewEnabled: Bool? = nil
+ var trafficEnabled: Bool? = nil
+ var buildingsEnabled: Bool? = nil
+ var markerType: PlatformMarkerType
+ var mapId: String? = nil
+ var style: String? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformMapConfiguration? {
+ let compassEnabled: Bool? = nilOrValue(pigeonVar_list[0])
+ let cameraTargetBounds: PlatformCameraTargetBounds? = nilOrValue(pigeonVar_list[1])
+ let mapType: PlatformMapType? = nilOrValue(pigeonVar_list[2])
+ let minMaxZoomPreference: PlatformZoomRange? = nilOrValue(pigeonVar_list[3])
+ let rotateGesturesEnabled: Bool? = nilOrValue(pigeonVar_list[4])
+ let scrollGesturesEnabled: Bool? = nilOrValue(pigeonVar_list[5])
+ let tiltGesturesEnabled: Bool? = nilOrValue(pigeonVar_list[6])
+ let trackCameraPosition: Bool? = nilOrValue(pigeonVar_list[7])
+ let zoomGesturesEnabled: Bool? = nilOrValue(pigeonVar_list[8])
+ let myLocationEnabled: Bool? = nilOrValue(pigeonVar_list[9])
+ let myLocationButtonEnabled: Bool? = nilOrValue(pigeonVar_list[10])
+ let padding: PlatformEdgeInsets? = nilOrValue(pigeonVar_list[11])
+ let indoorViewEnabled: Bool? = nilOrValue(pigeonVar_list[12])
+ let trafficEnabled: Bool? = nilOrValue(pigeonVar_list[13])
+ let buildingsEnabled: Bool? = nilOrValue(pigeonVar_list[14])
+ let markerType = pigeonVar_list[15] as! PlatformMarkerType
+ let mapId: String? = nilOrValue(pigeonVar_list[16])
+ let style: String? = nilOrValue(pigeonVar_list[17])
+
+ return PlatformMapConfiguration(
+ compassEnabled: compassEnabled,
+ cameraTargetBounds: cameraTargetBounds,
+ mapType: mapType,
+ minMaxZoomPreference: minMaxZoomPreference,
+ rotateGesturesEnabled: rotateGesturesEnabled,
+ scrollGesturesEnabled: scrollGesturesEnabled,
+ tiltGesturesEnabled: tiltGesturesEnabled,
+ trackCameraPosition: trackCameraPosition,
+ zoomGesturesEnabled: zoomGesturesEnabled,
+ myLocationEnabled: myLocationEnabled,
+ myLocationButtonEnabled: myLocationButtonEnabled,
+ padding: padding,
+ indoorViewEnabled: indoorViewEnabled,
+ trafficEnabled: trafficEnabled,
+ buildingsEnabled: buildingsEnabled,
+ markerType: markerType,
+ mapId: mapId,
+ style: style
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ compassEnabled,
+ cameraTargetBounds,
+ mapType,
+ minMaxZoomPreference,
+ rotateGesturesEnabled,
+ scrollGesturesEnabled,
+ tiltGesturesEnabled,
+ trackCameraPosition,
+ zoomGesturesEnabled,
+ myLocationEnabled,
+ myLocationButtonEnabled,
+ padding,
+ indoorViewEnabled,
+ trafficEnabled,
+ buildingsEnabled,
+ markerType,
+ mapId,
+ style,
+ ]
+ }
+ static func == (lhs: PlatformMapConfiguration, rhs: PlatformMapConfiguration) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.compassEnabled, rhs.compassEnabled)
+ && MessagesPigeonInternal.deepEquals(lhs.cameraTargetBounds, rhs.cameraTargetBounds)
+ && MessagesPigeonInternal.deepEquals(lhs.mapType, rhs.mapType)
+ && MessagesPigeonInternal.deepEquals(lhs.minMaxZoomPreference, rhs.minMaxZoomPreference)
+ && MessagesPigeonInternal.deepEquals(lhs.rotateGesturesEnabled, rhs.rotateGesturesEnabled)
+ && MessagesPigeonInternal.deepEquals(lhs.scrollGesturesEnabled, rhs.scrollGesturesEnabled)
+ && MessagesPigeonInternal.deepEquals(lhs.tiltGesturesEnabled, rhs.tiltGesturesEnabled)
+ && MessagesPigeonInternal.deepEquals(lhs.trackCameraPosition, rhs.trackCameraPosition)
+ && MessagesPigeonInternal.deepEquals(lhs.zoomGesturesEnabled, rhs.zoomGesturesEnabled)
+ && MessagesPigeonInternal.deepEquals(lhs.myLocationEnabled, rhs.myLocationEnabled)
+ && MessagesPigeonInternal.deepEquals(lhs.myLocationButtonEnabled, rhs.myLocationButtonEnabled)
+ && MessagesPigeonInternal.deepEquals(lhs.padding, rhs.padding)
+ && MessagesPigeonInternal.deepEquals(lhs.indoorViewEnabled, rhs.indoorViewEnabled)
+ && MessagesPigeonInternal.deepEquals(lhs.trafficEnabled, rhs.trafficEnabled)
+ && MessagesPigeonInternal.deepEquals(lhs.buildingsEnabled, rhs.buildingsEnabled)
+ && MessagesPigeonInternal.deepEquals(lhs.markerType, rhs.markerType)
+ && MessagesPigeonInternal.deepEquals(lhs.mapId, rhs.mapId)
+ && MessagesPigeonInternal.deepEquals(lhs.style, rhs.style)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformMapConfiguration")
+ MessagesPigeonInternal.deepHash(value: compassEnabled, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: cameraTargetBounds, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: mapType, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: minMaxZoomPreference, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: rotateGesturesEnabled, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: scrollGesturesEnabled, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: tiltGesturesEnabled, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: trackCameraPosition, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: zoomGesturesEnabled, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: myLocationEnabled, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: myLocationButtonEnabled, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: padding, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: indoorViewEnabled, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: trafficEnabled, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: buildingsEnabled, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: markerType, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: mapId, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: style, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformMapConfiguration(compassEnabled: \(String(describing: compassEnabled)), cameraTargetBounds: \(String(describing: cameraTargetBounds)), mapType: \(String(describing: mapType)), minMaxZoomPreference: \(String(describing: minMaxZoomPreference)), rotateGesturesEnabled: \(String(describing: rotateGesturesEnabled)), scrollGesturesEnabled: \(String(describing: scrollGesturesEnabled)), tiltGesturesEnabled: \(String(describing: tiltGesturesEnabled)), trackCameraPosition: \(String(describing: trackCameraPosition)), zoomGesturesEnabled: \(String(describing: zoomGesturesEnabled)), myLocationEnabled: \(String(describing: myLocationEnabled)), myLocationButtonEnabled: \(String(describing: myLocationButtonEnabled)), padding: \(String(describing: padding)), indoorViewEnabled: \(String(describing: indoorViewEnabled)), trafficEnabled: \(String(describing: trafficEnabled)), buildingsEnabled: \(String(describing: buildingsEnabled)), markerType: \(String(describing: markerType)), mapId: \(String(describing: mapId)), style: \(String(describing: style)))"
+ }
+}
+
+/// Pigeon representation of an x,y coordinate.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformPoint: Hashable, CustomStringConvertible {
+ var x: Double
+ var y: Double
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformPoint? {
+ let x = pigeonVar_list[0] as! Double
+ let y = pigeonVar_list[1] as! Double
+
+ return PlatformPoint(
+ x: x,
+ y: y
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ x,
+ y,
+ ]
+ }
+ static func == (lhs: PlatformPoint, rhs: PlatformPoint) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.x, rhs.x)
+ && MessagesPigeonInternal.deepEquals(lhs.y, rhs.y)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformPoint")
+ MessagesPigeonInternal.deepHash(value: x, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: y, hasher: &hasher)
+ }
+
+ public var description: String {
+ return "PlatformPoint(x: \(String(describing: x)), y: \(String(describing: y)))"
+ }
+}
+
+/// Pigeon representation of a size.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformSize: Hashable, CustomStringConvertible {
+ var width: Double
+ var height: Double
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformSize? {
+ let width = pigeonVar_list[0] as! Double
+ let height = pigeonVar_list[1] as! Double
+
+ return PlatformSize(
+ width: width,
+ height: height
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ width,
+ height,
+ ]
+ }
+ static func == (lhs: PlatformSize, rhs: PlatformSize) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.width, rhs.width)
+ && MessagesPigeonInternal.deepEquals(lhs.height, rhs.height)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformSize")
+ MessagesPigeonInternal.deepHash(value: width, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: height, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformSize(width: \(String(describing: width)), height: \(String(describing: height)))"
+ }
+}
+
+/// Pigeon representation of a color.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformColor: Hashable, CustomStringConvertible {
+ var red: Double
+ var green: Double
+ var blue: Double
+ var alpha: Double
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformColor? {
+ let red = pigeonVar_list[0] as! Double
+ let green = pigeonVar_list[1] as! Double
+ let blue = pigeonVar_list[2] as! Double
+ let alpha = pigeonVar_list[3] as! Double
+
+ return PlatformColor(
+ red: red,
+ green: green,
+ blue: blue,
+ alpha: alpha
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ red,
+ green,
+ blue,
+ alpha,
+ ]
+ }
+ static func == (lhs: PlatformColor, rhs: PlatformColor) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.red, rhs.red)
+ && MessagesPigeonInternal.deepEquals(lhs.green, rhs.green)
+ && MessagesPigeonInternal.deepEquals(lhs.blue, rhs.blue)
+ && MessagesPigeonInternal.deepEquals(lhs.alpha, rhs.alpha)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformColor")
+ MessagesPigeonInternal.deepHash(value: red, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: green, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: blue, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: alpha, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformColor(red: \(String(describing: red)), green: \(String(describing: green)), blue: \(String(describing: blue)), alpha: \(String(describing: alpha)))"
+ }
+}
+
+/// Pigeon equivalent of GMSTileLayer properties.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformTileLayer: Hashable, CustomStringConvertible {
+ var visible: Bool
+ var fadeIn: Bool
+ var opacity: Double
+ var zIndex: Int64
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformTileLayer? {
+ let visible = pigeonVar_list[0] as! Bool
+ let fadeIn = pigeonVar_list[1] as! Bool
+ let opacity = pigeonVar_list[2] as! Double
+ let zIndex = pigeonVar_list[3] as! Int64
+
+ return PlatformTileLayer(
+ visible: visible,
+ fadeIn: fadeIn,
+ opacity: opacity,
+ zIndex: zIndex
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ visible,
+ fadeIn,
+ opacity,
+ zIndex,
+ ]
+ }
+ static func == (lhs: PlatformTileLayer, rhs: PlatformTileLayer) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.visible, rhs.visible)
+ && MessagesPigeonInternal.deepEquals(lhs.fadeIn, rhs.fadeIn)
+ && MessagesPigeonInternal.deepEquals(lhs.opacity, rhs.opacity)
+ && MessagesPigeonInternal.deepEquals(lhs.zIndex, rhs.zIndex)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformTileLayer")
+ MessagesPigeonInternal.deepHash(value: visible, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: fadeIn, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: opacity, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: zIndex, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformTileLayer(visible: \(String(describing: visible)), fadeIn: \(String(describing: fadeIn)), opacity: \(String(describing: opacity)), zIndex: \(String(describing: zIndex)))"
+ }
+}
+
+/// Pigeon equivalent of MinMaxZoomPreference.
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformZoomRange: Hashable, CustomStringConvertible {
+ var min: Double? = nil
+ var max: Double? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformZoomRange? {
+ let min: Double? = nilOrValue(pigeonVar_list[0])
+ let max: Double? = nilOrValue(pigeonVar_list[1])
+
+ return PlatformZoomRange(
+ min: min,
+ max: max
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ min,
+ max,
+ ]
+ }
+ static func == (lhs: PlatformZoomRange, rhs: PlatformZoomRange) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.min, rhs.min)
+ && MessagesPigeonInternal.deepEquals(lhs.max, rhs.max)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformZoomRange")
+ MessagesPigeonInternal.deepHash(value: min, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: max, hasher: &hasher)
+ }
+
+ public var description: String {
+ return "PlatformZoomRange(min: \(String(describing: min)), max: \(String(describing: max)))"
+ }
+}
+
+/// Pigeon equivalent of [BitmapDescriptor].
+///
+/// Generated class from Pigeon that represents data sent in messages.
+/// This protocol should not be extended by any user class outside of the generated file.
+protocol PlatformBitmap {
+
+}
+
+/// Pigeon equivalent of [DefaultMarker].
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformBitmapDefaultMarker: PlatformBitmap {
+ var hue: Double? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformBitmapDefaultMarker? {
+ let hue: Double? = nilOrValue(pigeonVar_list[0])
+
+ return PlatformBitmapDefaultMarker(
+ hue: hue
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ hue
+ ]
+ }
+ static func == (lhs: PlatformBitmapDefaultMarker, rhs: PlatformBitmapDefaultMarker) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.hue, rhs.hue)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformBitmapDefaultMarker")
+ MessagesPigeonInternal.deepHash(value: hue, hasher: &hasher)
+ }
+
+ public var description: String {
+ return "PlatformBitmapDefaultMarker(hue: \(String(describing: hue)))"
+ }
+}
+
+/// Pigeon equivalent of [BytesBitmap].
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformBitmapBytes: PlatformBitmap {
+ var byteData: FlutterStandardTypedData
+ var size: PlatformSize? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformBitmapBytes? {
+ let byteData = pigeonVar_list[0] as! FlutterStandardTypedData
+ let size: PlatformSize? = nilOrValue(pigeonVar_list[1])
+
+ return PlatformBitmapBytes(
+ byteData: byteData,
+ size: size
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ byteData,
+ size,
+ ]
+ }
+ static func == (lhs: PlatformBitmapBytes, rhs: PlatformBitmapBytes) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.byteData, rhs.byteData)
+ && MessagesPigeonInternal.deepEquals(lhs.size, rhs.size)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformBitmapBytes")
+ MessagesPigeonInternal.deepHash(value: byteData, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: size, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformBitmapBytes(byteData: \(String(describing: byteData)), size: \(String(describing: size)))"
+ }
+}
+
+/// Pigeon equivalent of [AssetBitmap].
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformBitmapAsset: PlatformBitmap {
+ var name: String
+ var pkg: String? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformBitmapAsset? {
+ let name = pigeonVar_list[0] as! String
+ let pkg: String? = nilOrValue(pigeonVar_list[1])
+
+ return PlatformBitmapAsset(
+ name: name,
+ pkg: pkg
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ name,
+ pkg,
+ ]
+ }
+ static func == (lhs: PlatformBitmapAsset, rhs: PlatformBitmapAsset) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.name, rhs.name)
+ && MessagesPigeonInternal.deepEquals(lhs.pkg, rhs.pkg)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformBitmapAsset")
+ MessagesPigeonInternal.deepHash(value: name, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: pkg, hasher: &hasher)
+ }
+
+ public var description: String {
+ return "PlatformBitmapAsset(name: \(String(describing: name)), pkg: \(String(describing: pkg)))"
+ }
+}
+
+/// Pigeon equivalent of [AssetImageBitmap].
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformBitmapAssetImage: PlatformBitmap {
+ var name: String
+ var scale: Double
+ var size: PlatformSize? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformBitmapAssetImage? {
+ let name = pigeonVar_list[0] as! String
+ let scale = pigeonVar_list[1] as! Double
+ let size: PlatformSize? = nilOrValue(pigeonVar_list[2])
+
+ return PlatformBitmapAssetImage(
+ name: name,
+ scale: scale,
+ size: size
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ name,
+ scale,
+ size,
+ ]
+ }
+ static func == (lhs: PlatformBitmapAssetImage, rhs: PlatformBitmapAssetImage) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.name, rhs.name)
+ && MessagesPigeonInternal.deepEquals(lhs.scale, rhs.scale)
+ && MessagesPigeonInternal.deepEquals(lhs.size, rhs.size)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformBitmapAssetImage")
+ MessagesPigeonInternal.deepHash(value: name, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: scale, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: size, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformBitmapAssetImage(name: \(String(describing: name)), scale: \(String(describing: scale)), size: \(String(describing: size)))"
+ }
+}
+
+/// Pigeon equivalent of [AssetMapBitmap].
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformBitmapAssetMap: PlatformBitmap {
+ var assetName: String
+ var bitmapScaling: PlatformMapBitmapScaling
+ var imagePixelRatio: Double
+ var width: Double? = nil
+ var height: Double? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformBitmapAssetMap? {
+ let assetName = pigeonVar_list[0] as! String
+ let bitmapScaling = pigeonVar_list[1] as! PlatformMapBitmapScaling
+ let imagePixelRatio = pigeonVar_list[2] as! Double
+ let width: Double? = nilOrValue(pigeonVar_list[3])
+ let height: Double? = nilOrValue(pigeonVar_list[4])
+
+ return PlatformBitmapAssetMap(
+ assetName: assetName,
+ bitmapScaling: bitmapScaling,
+ imagePixelRatio: imagePixelRatio,
+ width: width,
+ height: height
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ assetName,
+ bitmapScaling,
+ imagePixelRatio,
+ width,
+ height,
+ ]
+ }
+ static func == (lhs: PlatformBitmapAssetMap, rhs: PlatformBitmapAssetMap) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.assetName, rhs.assetName)
+ && MessagesPigeonInternal.deepEquals(lhs.bitmapScaling, rhs.bitmapScaling)
+ && MessagesPigeonInternal.deepEquals(lhs.imagePixelRatio, rhs.imagePixelRatio)
+ && MessagesPigeonInternal.deepEquals(lhs.width, rhs.width)
+ && MessagesPigeonInternal.deepEquals(lhs.height, rhs.height)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformBitmapAssetMap")
+ MessagesPigeonInternal.deepHash(value: assetName, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: bitmapScaling, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: imagePixelRatio, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: width, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: height, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformBitmapAssetMap(assetName: \(String(describing: assetName)), bitmapScaling: \(String(describing: bitmapScaling)), imagePixelRatio: \(String(describing: imagePixelRatio)), width: \(String(describing: width)), height: \(String(describing: height)))"
+ }
+}
+
+/// Pigeon equivalent of [BytesMapBitmap].
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformBitmapBytesMap: PlatformBitmap {
+ var byteData: FlutterStandardTypedData
+ var bitmapScaling: PlatformMapBitmapScaling
+ var imagePixelRatio: Double
+ var width: Double? = nil
+ var height: Double? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformBitmapBytesMap? {
+ let byteData = pigeonVar_list[0] as! FlutterStandardTypedData
+ let bitmapScaling = pigeonVar_list[1] as! PlatformMapBitmapScaling
+ let imagePixelRatio = pigeonVar_list[2] as! Double
+ let width: Double? = nilOrValue(pigeonVar_list[3])
+ let height: Double? = nilOrValue(pigeonVar_list[4])
+
+ return PlatformBitmapBytesMap(
+ byteData: byteData,
+ bitmapScaling: bitmapScaling,
+ imagePixelRatio: imagePixelRatio,
+ width: width,
+ height: height
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ byteData,
+ bitmapScaling,
+ imagePixelRatio,
+ width,
+ height,
+ ]
+ }
+ static func == (lhs: PlatformBitmapBytesMap, rhs: PlatformBitmapBytesMap) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.byteData, rhs.byteData)
+ && MessagesPigeonInternal.deepEquals(lhs.bitmapScaling, rhs.bitmapScaling)
+ && MessagesPigeonInternal.deepEquals(lhs.imagePixelRatio, rhs.imagePixelRatio)
+ && MessagesPigeonInternal.deepEquals(lhs.width, rhs.width)
+ && MessagesPigeonInternal.deepEquals(lhs.height, rhs.height)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformBitmapBytesMap")
+ MessagesPigeonInternal.deepHash(value: byteData, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: bitmapScaling, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: imagePixelRatio, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: width, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: height, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformBitmapBytesMap(byteData: \(String(describing: byteData)), bitmapScaling: \(String(describing: bitmapScaling)), imagePixelRatio: \(String(describing: imagePixelRatio)), width: \(String(describing: width)), height: \(String(describing: height)))"
+ }
+}
+
+/// Pigeon equivalent of [PinConfig].
+///
+/// Generated class from Pigeon that represents data sent in messages.
+struct PlatformBitmapPinConfig: PlatformBitmap {
+ var backgroundColor: PlatformColor? = nil
+ var borderColor: PlatformColor? = nil
+ var glyphColor: PlatformColor? = nil
+ var glyphTextColor: PlatformColor? = nil
+ var glyphText: String? = nil
+ var glyphBitmap: PlatformBitmap? = nil
+
+ // swift-format-ignore: AlwaysUseLowerCamelCase
+ static func fromList(_ pigeonVar_list: [Any?]) -> PlatformBitmapPinConfig? {
+ let backgroundColor: PlatformColor? = nilOrValue(pigeonVar_list[0])
+ let borderColor: PlatformColor? = nilOrValue(pigeonVar_list[1])
+ let glyphColor: PlatformColor? = nilOrValue(pigeonVar_list[2])
+ let glyphTextColor: PlatformColor? = nilOrValue(pigeonVar_list[3])
+ let glyphText: String? = nilOrValue(pigeonVar_list[4])
+ let glyphBitmap: PlatformBitmap? = nilOrValue(pigeonVar_list[5])
+
+ return PlatformBitmapPinConfig(
+ backgroundColor: backgroundColor,
+ borderColor: borderColor,
+ glyphColor: glyphColor,
+ glyphTextColor: glyphTextColor,
+ glyphText: glyphText,
+ glyphBitmap: glyphBitmap
+ )
+ }
+ func toList() -> [Any?] {
+ return [
+ backgroundColor,
+ borderColor,
+ glyphColor,
+ glyphTextColor,
+ glyphText,
+ glyphBitmap,
+ ]
+ }
+ static func == (lhs: PlatformBitmapPinConfig, rhs: PlatformBitmapPinConfig) -> Bool {
+ if Swift.type(of: lhs) != Swift.type(of: rhs) {
+ return false
+ }
+ return MessagesPigeonInternal.deepEquals(lhs.backgroundColor, rhs.backgroundColor)
+ && MessagesPigeonInternal.deepEquals(lhs.borderColor, rhs.borderColor)
+ && MessagesPigeonInternal.deepEquals(lhs.glyphColor, rhs.glyphColor)
+ && MessagesPigeonInternal.deepEquals(lhs.glyphTextColor, rhs.glyphTextColor)
+ && MessagesPigeonInternal.deepEquals(lhs.glyphText, rhs.glyphText)
+ && MessagesPigeonInternal.deepEquals(lhs.glyphBitmap, rhs.glyphBitmap)
+ }
+
+ func hash(into hasher: inout Hasher) {
+ hasher.combine("PlatformBitmapPinConfig")
+ MessagesPigeonInternal.deepHash(value: backgroundColor, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: borderColor, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: glyphColor, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: glyphTextColor, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: glyphText, hasher: &hasher)
+ MessagesPigeonInternal.deepHash(value: glyphBitmap, hasher: &hasher)
+ }
+
+ public var description: String {
+ return
+ "PlatformBitmapPinConfig(backgroundColor: \(String(describing: backgroundColor)), borderColor: \(String(describing: borderColor)), glyphColor: \(String(describing: glyphColor)), glyphTextColor: \(String(describing: glyphTextColor)), glyphText: \(String(describing: glyphText)), glyphBitmap: \(String(describing: glyphBitmap)))"
+ }
+}
+
+private class MessagesPigeonCodecReader: FlutterStandardReader {
+ override func readValue(ofType type: UInt8) -> Any? {
+ switch type {
+ case 129:
+ let enumResultAsInt: Int? = nilOrValue(self.readValue() as! Int?)
+ if let enumResultAsInt = enumResultAsInt {
+ return PlatformMapType(rawValue: enumResultAsInt)
+ }
+ return nil
+ case 130:
+ let enumResultAsInt: Int? = nilOrValue(self.readValue() as! Int?)
+ if let enumResultAsInt = enumResultAsInt {
+ return PlatformMarkerCollisionBehavior(rawValue: enumResultAsInt)
+ }
+ return nil
+ case 131:
+ let enumResultAsInt: Int? = nilOrValue(self.readValue() as! Int?)
+ if let enumResultAsInt = enumResultAsInt {
+ return PlatformJointType(rawValue: enumResultAsInt)
+ }
+ return nil
+ case 132:
+ let enumResultAsInt: Int? = nilOrValue(self.readValue() as! Int?)
+ if let enumResultAsInt = enumResultAsInt {
+ return PlatformPatternItemType(rawValue: enumResultAsInt)
+ }
+ return nil
+ case 133:
+ let enumResultAsInt: Int? = nilOrValue(self.readValue() as! Int?)
+ if let enumResultAsInt = enumResultAsInt {
+ return PlatformMarkerType(rawValue: enumResultAsInt)
+ }
+ return nil
+ case 134:
+ let enumResultAsInt: Int? = nilOrValue(self.readValue() as! Int?)
+ if let enumResultAsInt = enumResultAsInt {
+ return PlatformMapBitmapScaling(rawValue: enumResultAsInt)
+ }
+ return nil
+ case 135:
+ return PlatformCameraPosition.fromList(self.readValue() as! [Any?])
+ case 136:
+ return PlatformCameraUpdateNewCameraPosition.fromList(self.readValue() as! [Any?])
+ case 137:
+ return PlatformCameraUpdateNewLatLng.fromList(self.readValue() as! [Any?])
+ case 138:
+ return PlatformCameraUpdateNewLatLngBounds.fromList(self.readValue() as! [Any?])
+ case 139:
+ return PlatformCameraUpdateNewLatLngZoom.fromList(self.readValue() as! [Any?])
+ case 140:
+ return PlatformCameraUpdateScrollBy.fromList(self.readValue() as! [Any?])
+ case 141:
+ return PlatformCameraUpdateZoomBy.fromList(self.readValue() as! [Any?])
+ case 142:
+ return PlatformCameraUpdateZoom.fromList(self.readValue() as! [Any?])
+ case 143:
+ return PlatformCameraUpdateZoomTo.fromList(self.readValue() as! [Any?])
+ case 144:
+ return PlatformCircle.fromList(self.readValue() as! [Any?])
+ case 145:
+ return PlatformHeatmap.fromList(self.readValue() as! [Any?])
+ case 146:
+ return PlatformHeatmapGradient.fromList(self.readValue() as! [Any?])
+ case 147:
+ return PlatformWeightedLatLng.fromList(self.readValue() as! [Any?])
+ case 148:
+ return PlatformInfoWindow.fromList(self.readValue() as! [Any?])
+ case 149:
+ return PlatformCluster.fromList(self.readValue() as! [Any?])
+ case 150:
+ return PlatformClusterManager.fromList(self.readValue() as! [Any?])
+ case 151:
+ return PlatformMarker.fromList(self.readValue() as! [Any?])
+ case 152:
+ return PlatformPolygon.fromList(self.readValue() as! [Any?])
+ case 153:
+ return PlatformPolyline.fromList(self.readValue() as! [Any?])
+ case 154:
+ return PlatformPatternItem.fromList(self.readValue() as! [Any?])
+ case 155:
+ return PlatformTile.fromList(self.readValue() as! [Any?])
+ case 156:
+ return PlatformTileOverlay.fromList(self.readValue() as! [Any?])
+ case 157:
+ return PlatformEdgeInsets.fromList(self.readValue() as! [Any?])
+ case 158:
+ return PlatformLatLng.fromList(self.readValue() as! [Any?])
+ case 159:
+ return PlatformLatLngBounds.fromList(self.readValue() as! [Any?])
+ case 160:
+ return PlatformCameraTargetBounds.fromList(self.readValue() as! [Any?])
+ case 161:
+ return PlatformGroundOverlay.fromList(self.readValue() as! [Any?])
+ case 162:
+ return PlatformMapViewCreationParams.fromList(self.readValue() as! [Any?])
+ case 163:
+ return PlatformMapConfiguration.fromList(self.readValue() as! [Any?])
+ case 164:
+ return PlatformPoint.fromList(self.readValue() as! [Any?])
+ case 165:
+ return PlatformSize.fromList(self.readValue() as! [Any?])
+ case 166:
+ return PlatformColor.fromList(self.readValue() as! [Any?])
+ case 167:
+ return PlatformTileLayer.fromList(self.readValue() as! [Any?])
+ case 168:
+ return PlatformZoomRange.fromList(self.readValue() as! [Any?])
+ case 169:
+ return PlatformBitmapDefaultMarker.fromList(self.readValue() as! [Any?])
+ case 170:
+ return PlatformBitmapBytes.fromList(self.readValue() as! [Any?])
+ case 171:
+ return PlatformBitmapAsset.fromList(self.readValue() as! [Any?])
+ case 172:
+ return PlatformBitmapAssetImage.fromList(self.readValue() as! [Any?])
+ case 173:
+ return PlatformBitmapAssetMap.fromList(self.readValue() as! [Any?])
+ case 174:
+ return PlatformBitmapBytesMap.fromList(self.readValue() as! [Any?])
+ case 175:
+ return PlatformBitmapPinConfig.fromList(self.readValue() as! [Any?])
+ default:
+ return super.readValue(ofType: type)
+ }
+ }
+}
+
+private class MessagesPigeonCodecWriter: FlutterStandardWriter {
+ override func writeValue(_ value: Any) {
+ if let value = value as? PlatformMapType {
+ super.writeByte(129)
+ super.writeValue(value.rawValue)
+ } else if let value = value as? PlatformMarkerCollisionBehavior {
+ super.writeByte(130)
+ super.writeValue(value.rawValue)
+ } else if let value = value as? PlatformJointType {
+ super.writeByte(131)
+ super.writeValue(value.rawValue)
+ } else if let value = value as? PlatformPatternItemType {
+ super.writeByte(132)
+ super.writeValue(value.rawValue)
+ } else if let value = value as? PlatformMarkerType {
+ super.writeByte(133)
+ super.writeValue(value.rawValue)
+ } else if let value = value as? PlatformMapBitmapScaling {
+ super.writeByte(134)
+ super.writeValue(value.rawValue)
+ } else if let value = value as? PlatformCameraPosition {
+ super.writeByte(135)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformCameraUpdateNewCameraPosition {
+ super.writeByte(136)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformCameraUpdateNewLatLng {
+ super.writeByte(137)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformCameraUpdateNewLatLngBounds {
+ super.writeByte(138)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformCameraUpdateNewLatLngZoom {
+ super.writeByte(139)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformCameraUpdateScrollBy {
+ super.writeByte(140)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformCameraUpdateZoomBy {
+ super.writeByte(141)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformCameraUpdateZoom {
+ super.writeByte(142)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformCameraUpdateZoomTo {
+ super.writeByte(143)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformCircle {
+ super.writeByte(144)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformHeatmap {
+ super.writeByte(145)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformHeatmapGradient {
+ super.writeByte(146)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformWeightedLatLng {
+ super.writeByte(147)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformInfoWindow {
+ super.writeByte(148)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformCluster {
+ super.writeByte(149)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformClusterManager {
+ super.writeByte(150)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformMarker {
+ super.writeByte(151)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformPolygon {
+ super.writeByte(152)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformPolyline {
+ super.writeByte(153)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformPatternItem {
+ super.writeByte(154)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformTile {
+ super.writeByte(155)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformTileOverlay {
+ super.writeByte(156)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformEdgeInsets {
+ super.writeByte(157)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformLatLng {
+ super.writeByte(158)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformLatLngBounds {
+ super.writeByte(159)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformCameraTargetBounds {
+ super.writeByte(160)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformGroundOverlay {
+ super.writeByte(161)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformMapViewCreationParams {
+ super.writeByte(162)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformMapConfiguration {
+ super.writeByte(163)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformPoint {
+ super.writeByte(164)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformSize {
+ super.writeByte(165)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformColor {
+ super.writeByte(166)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformTileLayer {
+ super.writeByte(167)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformZoomRange {
+ super.writeByte(168)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformBitmapDefaultMarker {
+ super.writeByte(169)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformBitmapBytes {
+ super.writeByte(170)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformBitmapAsset {
+ super.writeByte(171)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformBitmapAssetImage {
+ super.writeByte(172)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformBitmapAssetMap {
+ super.writeByte(173)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformBitmapBytesMap {
+ super.writeByte(174)
+ super.writeValue(value.toList())
+ } else if let value = value as? PlatformBitmapPinConfig {
+ super.writeByte(175)
+ super.writeValue(value.toList())
+ } else {
+ super.writeValue(value)
+ }
+ }
+}
+
+private class MessagesPigeonCodecReaderWriter: FlutterStandardReaderWriter {
+ override func reader(with data: Data) -> FlutterStandardReader {
+ return MessagesPigeonCodecReader(data: data)
+ }
+
+ override func writer(with data: NSMutableData) -> FlutterStandardWriter {
+ return MessagesPigeonCodecWriter(data: data)
+ }
+}
+
+class MessagesPigeonCodec: FlutterStandardMessageCodec, @unchecked Sendable {
+ static let shared = MessagesPigeonCodec(readerWriter: MessagesPigeonCodecReaderWriter())
+}
+
+/// Interface for non-test interactions with the native SDK.
+///
+/// For test-only state queries, see [MapsInspectorApi].
+///
+/// Generated protocol from Pigeon that represents a handler of messages from Flutter.
+protocol MapsApi {
+ /// Returns once the map instance is available.
+ func waitForMap() throws
+ /// Updates the map's configuration options.
+ ///
+ /// Only non-null configuration values will result in updates; options with
+ /// null values will remain unchanged.
+ func updateWithMapConfiguration(_ configuration: PlatformMapConfiguration) throws
+ /// Updates the set of circles on the map.
+ func updateCircles(
+ adding toAdd: [PlatformCircle], changing toChange: [PlatformCircle],
+ removing idsToRemove: [String]) throws
+ /// Updates the set of heatmaps on the map.
+ func updateHeatmaps(
+ adding toAdd: [PlatformHeatmap], changing toChange: [PlatformHeatmap],
+ removing idsToRemove: [String]) throws
+ /// Updates the set of custer managers for clusters on the map.
+ func updateClusterManagers(adding toAdd: [PlatformClusterManager], removing idsToRemove: [String])
+ throws
+ /// Updates the set of markers on the map.
+ func updateMarkers(
+ adding toAdd: [PlatformMarker], changing toChange: [PlatformMarker],
+ removing idsToRemove: [String]) throws
+ /// Updates the set of polygonss on the map.
+ func updatePolygons(
+ adding toAdd: [PlatformPolygon], changing toChange: [PlatformPolygon],
+ removing idsToRemove: [String]) throws
+ /// Updates the set of polylines on the map.
+ func updatePolylines(
+ adding toAdd: [PlatformPolyline], changing toChange: [PlatformPolyline],
+ removing idsToRemove: [String]) throws
+ /// Updates the set of tile overlays on the map.
+ func updateTileOverlays(
+ adding toAdd: [PlatformTileOverlay], changing toChange: [PlatformTileOverlay],
+ removing idsToRemove: [String]) throws
+ /// Updates the set of ground overlays on the map.
+ func updateGroundOverlays(
+ adding toAdd: [PlatformGroundOverlay], changing toChange: [PlatformGroundOverlay],
+ removing idsToRemove: [String]) throws
+ /// Gets the screen coordinate for the given map location.
+ func screenCoordinates(for latLng: PlatformLatLng) throws -> PlatformPoint
+ /// Gets the map location for the given screen coordinate.
+ func latLng(for screenCoordinate: PlatformPoint) throws -> PlatformLatLng
+ /// Gets the map region currently displayed on the map.
+ func visibleMapRegion() throws -> PlatformLatLngBounds
+ /// Moves the camera according to [cameraUpdate] immediately, with no
+ /// animation.
+ func moveCamera(_ cameraUpdate: PlatformCameraUpdate) throws
+ /// Moves the camera according to [cameraUpdate], animating the update using a
+ /// duration in milliseconds if provided.
+ func animateCamera(_ cameraUpdate: PlatformCameraUpdate, duration durationMilliseconds: Int64?)
+ throws
+ /// Gets the current map zoom level.
+ func zoomLevel() throws -> Double
+ /// Show the info window for the marker with the given ID.
+ func showInfoWindowForMarker(withIdentifier markerId: String) throws
+ /// Hide the info window for the marker with the given ID.
+ func hideInfoWindowForMarker(withIdentifier markerId: String) throws
+ /// Returns true if the marker with the given ID is currently displaying its
+ /// info window.
+ func isShowingInfoWindowForMarker(withIdentifier markerId: String) throws -> Bool
+ /// Sets the style to the given map style string, where an empty string
+ /// indicates that the style should be cleared.
+ ///
+ /// If there was an error setting the style, such as an invalid style string,
+ /// returns the error message.
+ func setStyle(_ style: String) throws -> String?
+ /// Returns the error string from the last attempt to set the map style, if
+ /// any.
+ ///
+ /// This allows checking asynchronously for initial style failures, as there
+ /// is no way to return failures from map initialization.
+ func lastStyleError() throws -> String?
+ /// Clears the cache of tiles previously requseted from the tile provider.
+ func clearTileCacheForOverlay(withIdentifier tileOverlayId: String) throws
+ /// Takes a snapshot of the map and returns its image data.
+ func takeSnapshot() throws -> FlutterStandardTypedData?
+ /// Returns true if the map supports advanced markers.
+ func isAdvancedMarkersAvailable() throws -> Bool
+}
+
+/// Generated setup class from Pigeon to handle messages through the `binaryMessenger`.
+class MapsApiSetup {
+ static var codec: FlutterStandardMessageCodec { MessagesPigeonCodec.shared }
+ /// Sets up an instance of `MapsApi` to handle messages through the `binaryMessenger`.
+ static func setUp(
+ binaryMessenger: FlutterBinaryMessenger, api: MapsApi?, messageChannelSuffix: String = ""
+ ) {
+ let channelSuffix = messageChannelSuffix.count > 0 ? ".\(messageChannelSuffix)" : ""
+ /// Returns once the map instance is available.
+ let waitForMapChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.waitForMap\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ waitForMapChannel.setMessageHandler { _, reply in
+ do {
+ try api.waitForMap()
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ waitForMapChannel.setMessageHandler(nil)
+ }
+ /// Updates the map's configuration options.
+ ///
+ /// Only non-null configuration values will result in updates; options with
+ /// null values will remain unchanged.
+ let updateMapConfigurationChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMapConfiguration\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ updateMapConfigurationChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let configurationArg = args[0] as! PlatformMapConfiguration
+ do {
+ try api.updateWithMapConfiguration(configurationArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ updateMapConfigurationChannel.setMessageHandler(nil)
+ }
+ /// Updates the set of circles on the map.
+ let updateCirclesChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateCircles\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ updateCirclesChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let toAddArg = args[0] as! [PlatformCircle]
+ let toChangeArg = args[1] as! [PlatformCircle]
+ let idsToRemoveArg = args[2] as! [String]
+ do {
+ try api.updateCircles(adding: toAddArg, changing: toChangeArg, removing: idsToRemoveArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ updateCirclesChannel.setMessageHandler(nil)
+ }
+ /// Updates the set of heatmaps on the map.
+ let updateHeatmapsChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateHeatmaps\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ updateHeatmapsChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let toAddArg = args[0] as! [PlatformHeatmap]
+ let toChangeArg = args[1] as! [PlatformHeatmap]
+ let idsToRemoveArg = args[2] as! [String]
+ do {
+ try api.updateHeatmaps(adding: toAddArg, changing: toChangeArg, removing: idsToRemoveArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ updateHeatmapsChannel.setMessageHandler(nil)
+ }
+ /// Updates the set of custer managers for clusters on the map.
+ let updateClusterManagersChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateClusterManagers\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ updateClusterManagersChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let toAddArg = args[0] as! [PlatformClusterManager]
+ let idsToRemoveArg = args[1] as! [String]
+ do {
+ try api.updateClusterManagers(adding: toAddArg, removing: idsToRemoveArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ updateClusterManagersChannel.setMessageHandler(nil)
+ }
+ /// Updates the set of markers on the map.
+ let updateMarkersChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMarkers\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ updateMarkersChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let toAddArg = args[0] as! [PlatformMarker]
+ let toChangeArg = args[1] as! [PlatformMarker]
+ let idsToRemoveArg = args[2] as! [String]
+ do {
+ try api.updateMarkers(adding: toAddArg, changing: toChangeArg, removing: idsToRemoveArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ updateMarkersChannel.setMessageHandler(nil)
+ }
+ /// Updates the set of polygonss on the map.
+ let updatePolygonsChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolygons\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ updatePolygonsChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let toAddArg = args[0] as! [PlatformPolygon]
+ let toChangeArg = args[1] as! [PlatformPolygon]
+ let idsToRemoveArg = args[2] as! [String]
+ do {
+ try api.updatePolygons(adding: toAddArg, changing: toChangeArg, removing: idsToRemoveArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ updatePolygonsChannel.setMessageHandler(nil)
+ }
+ /// Updates the set of polylines on the map.
+ let updatePolylinesChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updatePolylines\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ updatePolylinesChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let toAddArg = args[0] as! [PlatformPolyline]
+ let toChangeArg = args[1] as! [PlatformPolyline]
+ let idsToRemoveArg = args[2] as! [String]
+ do {
+ try api.updatePolylines(adding: toAddArg, changing: toChangeArg, removing: idsToRemoveArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ updatePolylinesChannel.setMessageHandler(nil)
+ }
+ /// Updates the set of tile overlays on the map.
+ let updateTileOverlaysChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateTileOverlays\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ updateTileOverlaysChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let toAddArg = args[0] as! [PlatformTileOverlay]
+ let toChangeArg = args[1] as! [PlatformTileOverlay]
+ let idsToRemoveArg = args[2] as! [String]
+ do {
+ try api.updateTileOverlays(
+ adding: toAddArg, changing: toChangeArg, removing: idsToRemoveArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ updateTileOverlaysChannel.setMessageHandler(nil)
+ }
+ /// Updates the set of ground overlays on the map.
+ let updateGroundOverlaysChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateGroundOverlays\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ updateGroundOverlaysChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let toAddArg = args[0] as! [PlatformGroundOverlay]
+ let toChangeArg = args[1] as! [PlatformGroundOverlay]
+ let idsToRemoveArg = args[2] as! [String]
+ do {
+ try api.updateGroundOverlays(
+ adding: toAddArg, changing: toChangeArg, removing: idsToRemoveArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ updateGroundOverlaysChannel.setMessageHandler(nil)
+ }
+ /// Gets the screen coordinate for the given map location.
+ let getScreenCoordinateChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getScreenCoordinate\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ getScreenCoordinateChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let latLngArg = args[0] as! PlatformLatLng
+ do {
+ let result = try api.screenCoordinates(for: latLngArg)
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ getScreenCoordinateChannel.setMessageHandler(nil)
+ }
+ /// Gets the map location for the given screen coordinate.
+ let getLatLngChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLatLng\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ getLatLngChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let screenCoordinateArg = args[0] as! PlatformPoint
+ do {
+ let result = try api.latLng(for: screenCoordinateArg)
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ getLatLngChannel.setMessageHandler(nil)
+ }
+ /// Gets the map region currently displayed on the map.
+ let getVisibleRegionChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getVisibleRegion\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ getVisibleRegionChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.visibleMapRegion()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ getVisibleRegionChannel.setMessageHandler(nil)
+ }
+ /// Moves the camera according to [cameraUpdate] immediately, with no
+ /// animation.
+ let moveCameraChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.moveCamera\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ moveCameraChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let cameraUpdateArg = args[0] as! PlatformCameraUpdate
+ do {
+ try api.moveCamera(cameraUpdateArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ moveCameraChannel.setMessageHandler(nil)
+ }
+ /// Moves the camera according to [cameraUpdate], animating the update using a
+ /// duration in milliseconds if provided.
+ let animateCameraChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.animateCamera\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ animateCameraChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let cameraUpdateArg = args[0] as! PlatformCameraUpdate
+ let durationMillisecondsArg: Int64? = nilOrValue(args[1])
+ do {
+ try api.animateCamera(cameraUpdateArg, duration: durationMillisecondsArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ animateCameraChannel.setMessageHandler(nil)
+ }
+ /// Gets the current map zoom level.
+ let getZoomLevelChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getZoomLevel\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ getZoomLevelChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.zoomLevel()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ getZoomLevelChannel.setMessageHandler(nil)
+ }
+ /// Show the info window for the marker with the given ID.
+ let showInfoWindowChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.showInfoWindow\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ showInfoWindowChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let markerIdArg = args[0] as! String
+ do {
+ try api.showInfoWindowForMarker(withIdentifier: markerIdArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ showInfoWindowChannel.setMessageHandler(nil)
+ }
+ /// Hide the info window for the marker with the given ID.
+ let hideInfoWindowChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.hideInfoWindow\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ hideInfoWindowChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let markerIdArg = args[0] as! String
+ do {
+ try api.hideInfoWindowForMarker(withIdentifier: markerIdArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ hideInfoWindowChannel.setMessageHandler(nil)
+ }
+ /// Returns true if the marker with the given ID is currently displaying its
+ /// info window.
+ let isInfoWindowShownChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isInfoWindowShown\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ isInfoWindowShownChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let markerIdArg = args[0] as! String
+ do {
+ let result = try api.isShowingInfoWindowForMarker(withIdentifier: markerIdArg)
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ isInfoWindowShownChannel.setMessageHandler(nil)
+ }
+ /// Sets the style to the given map style string, where an empty string
+ /// indicates that the style should be cleared.
+ ///
+ /// If there was an error setting the style, such as an invalid style string,
+ /// returns the error message.
+ let setStyleChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.setStyle\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ setStyleChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let styleArg = args[0] as! String
+ do {
+ let result = try api.setStyle(styleArg)
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ setStyleChannel.setMessageHandler(nil)
+ }
+ /// Returns the error string from the last attempt to set the map style, if
+ /// any.
+ ///
+ /// This allows checking asynchronously for initial style failures, as there
+ /// is no way to return failures from map initialization.
+ let getLastStyleErrorChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLastStyleError\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ getLastStyleErrorChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.lastStyleError()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ getLastStyleErrorChannel.setMessageHandler(nil)
+ }
+ /// Clears the cache of tiles previously requseted from the tile provider.
+ let clearTileCacheChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.clearTileCache\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ clearTileCacheChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let tileOverlayIdArg = args[0] as! String
+ do {
+ try api.clearTileCacheForOverlay(withIdentifier: tileOverlayIdArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ clearTileCacheChannel.setMessageHandler(nil)
+ }
+ /// Takes a snapshot of the map and returns its image data.
+ let takeSnapshotChannel = FlutterBasicMessageChannel(
+ name: "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.takeSnapshot\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ takeSnapshotChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.takeSnapshot()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ takeSnapshotChannel.setMessageHandler(nil)
+ }
+ /// Returns true if the map supports advanced markers.
+ let isAdvancedMarkersAvailableChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.isAdvancedMarkersAvailable\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ isAdvancedMarkersAvailableChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.isAdvancedMarkersAvailable()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ isAdvancedMarkersAvailableChannel.setMessageHandler(nil)
+ }
+ }
+}
+
+/// Interface for calls from the native SDK to Dart.
+///
+/// Generated protocol from Pigeon that represents Flutter messages that can be called from Swift.
+protocol MapsCallbackApiProtocol {
+ /// Called when the map camera starts moving.
+ func didStartCameraMove(completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when the map camera moves.
+ func didMoveCamera(
+ to cameraPositionArg: PlatformCameraPosition,
+ completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when the map camera stops moving.
+ func didIdleCamera(completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when the map, not a specifc map object, is tapped.
+ func didTap(
+ at positionArg: PlatformLatLng, completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when the map, not a specifc map object, is long pressed.
+ func didLongPress(
+ at positionArg: PlatformLatLng, completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when a marker is tapped.
+ func didTapMarker(
+ withIdentifier markerIdArg: String, completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when a marker drag starts.
+ func didStartDragForMarker(
+ withIdentifier markerIdArg: String, at positionArg: PlatformLatLng,
+ completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when a marker drag updates.
+ func didDragMarker(
+ withIdentifier markerIdArg: String, at positionArg: PlatformLatLng,
+ completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when a marker drag ends.
+ func didEndDragForMarker(
+ withIdentifier markerIdArg: String, at positionArg: PlatformLatLng,
+ completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when a marker's info window is tapped.
+ func didTapInfoWindowOfMarker(
+ withIdentifier markerIdArg: String, completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when a circle is tapped.
+ func didTapCircle(
+ withIdentifier circleIdArg: String, completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when a marker cluster is tapped.
+ func didTapCluster(
+ _ clusterArg: PlatformCluster, completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when a polygon is tapped.
+ func didTapPolygon(
+ withIdentifier polygonIdArg: String, completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when a polyline is tapped.
+ func didTapPolyline(
+ withIdentifier polylineIdArg: String, completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called when a ground overlay is tapped.
+ func didTapGroundOverlay(
+ withIdentifier groundOverlayIdArg: String,
+ completion: @escaping (Result<Void, PigeonError>) -> Void)
+ /// Called to get data for a map tile.
+ func tile(
+ withOverlayIdentifier tileOverlayIdArg: String, location locationArg: PlatformPoint,
+ zoom zoomArg: Int64, completion: @escaping (Result<PlatformTile, PigeonError>) -> Void)
+}
+class MapsCallbackApi: MapsCallbackApiProtocol {
+ private let binaryMessenger: FlutterBinaryMessenger
+ private let messageChannelSuffix: String
+ init(binaryMessenger: FlutterBinaryMessenger, messageChannelSuffix: String = "") {
+ self.binaryMessenger = binaryMessenger
+ self.messageChannelSuffix = messageChannelSuffix.count > 0 ? ".\(messageChannelSuffix)" : ""
+ }
+ var codec: MessagesPigeonCodec {
+ return MessagesPigeonCodec.shared
+ }
+ /// Called when the map camera starts moving.
+ func didStartCameraMove(completion: @escaping (Result<Void, PigeonError>) -> Void) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMoveStarted\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage(nil) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when the map camera moves.
+ func didMoveCamera(
+ to cameraPositionArg: PlatformCameraPosition,
+ completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([cameraPositionArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when the map camera stops moving.
+ func didIdleCamera(completion: @escaping (Result<Void, PigeonError>) -> Void) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraIdle\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage(nil) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when the map, not a specifc map object, is tapped.
+ func didTap(
+ at positionArg: PlatformLatLng, completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([positionArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when the map, not a specifc map object, is long pressed.
+ func didLongPress(
+ at positionArg: PlatformLatLng, completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([positionArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when a marker is tapped.
+ func didTapMarker(
+ withIdentifier markerIdArg: String, completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([markerIdArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when a marker drag starts.
+ func didStartDragForMarker(
+ withIdentifier markerIdArg: String, at positionArg: PlatformLatLng,
+ completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([markerIdArg, positionArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when a marker drag updates.
+ func didDragMarker(
+ withIdentifier markerIdArg: String, at positionArg: PlatformLatLng,
+ completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([markerIdArg, positionArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when a marker drag ends.
+ func didEndDragForMarker(
+ withIdentifier markerIdArg: String, at positionArg: PlatformLatLng,
+ completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([markerIdArg, positionArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when a marker's info window is tapped.
+ func didTapInfoWindowOfMarker(
+ withIdentifier markerIdArg: String, completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([markerIdArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when a circle is tapped.
+ func didTapCircle(
+ withIdentifier circleIdArg: String, completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([circleIdArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when a marker cluster is tapped.
+ func didTapCluster(
+ _ clusterArg: PlatformCluster, completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([clusterArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when a polygon is tapped.
+ func didTapPolygon(
+ withIdentifier polygonIdArg: String, completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([polygonIdArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when a polyline is tapped.
+ func didTapPolyline(
+ withIdentifier polylineIdArg: String, completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([polylineIdArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called when a ground overlay is tapped.
+ func didTapGroundOverlay(
+ withIdentifier groundOverlayIdArg: String,
+ completion: @escaping (Result<Void, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([groundOverlayIdArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else {
+ completion(.success(()))
+ }
+ }
+ }
+ /// Called to get data for a map tile.
+ func tile(
+ withOverlayIdentifier tileOverlayIdArg: String, location locationArg: PlatformPoint,
+ zoom zoomArg: Int64, completion: @escaping (Result<PlatformTile, PigeonError>) -> Void
+ ) {
+ let channelName: String =
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile\(messageChannelSuffix)"
+ let channel = FlutterBasicMessageChannel(
+ name: channelName, binaryMessenger: binaryMessenger, codec: codec)
+ channel.sendMessage([tileOverlayIdArg, locationArg, zoomArg] as [Any?]) { response in
+ guard let listResponse = response as? [Any?] else {
+ completion(.failure(createConnectionError(withChannelName: channelName)))
+ return
+ }
+ if listResponse.count > 1 {
+ let code: String = listResponse[0] as! String
+ let message: String? = nilOrValue(listResponse[1])
+ let details: String? = nilOrValue(listResponse[2])
+ completion(.failure(PigeonError(code: code, message: message, details: details)))
+ } else if listResponse[0] == nil {
+ completion(
+ .failure(
+ PigeonError(
+ code: "null-error",
+ message: "Flutter api returned null value for non-null return value.", details: "")))
+ } else {
+ let result = listResponse[0] as! PlatformTile
+ completion(.success(result))
+ }
+ }
+ }
+}
+/// Dummy interface to force generation of the platform view creation params,
+/// which are not used in any Pigeon calls, only the platform view creation
+/// call made internally by Flutter.
+///
+/// Generated protocol from Pigeon that represents a handler of messages from Flutter.
+protocol MapsPlatformViewApi {
+ func createView(type: PlatformMapViewCreationParams?) throws
+}
+
+/// Generated setup class from Pigeon to handle messages through the `binaryMessenger`.
+class MapsPlatformViewApiSetup {
+ static var codec: FlutterStandardMessageCodec { MessagesPigeonCodec.shared }
+ /// Sets up an instance of `MapsPlatformViewApi` to handle messages through the `binaryMessenger`.
+ static func setUp(
+ binaryMessenger: FlutterBinaryMessenger, api: MapsPlatformViewApi?,
+ messageChannelSuffix: String = ""
+ ) {
+ let channelSuffix = messageChannelSuffix.count > 0 ? ".\(messageChannelSuffix)" : ""
+ let createViewChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsPlatformViewApi.createView\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ createViewChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let typeArg: PlatformMapViewCreationParams? = nilOrValue(args[0])
+ do {
+ try api.createView(type: typeArg)
+ reply(wrapResult(nil))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ createViewChannel.setMessageHandler(nil)
+ }
+ }
+}
+/// Inspector API only intended for use in integration tests.
+///
+/// Generated protocol from Pigeon that represents a handler of messages from Flutter.
+protocol MapsInspectorApi {
+ func areBuildingsEnabled() throws -> Bool
+ func areRotateGesturesEnabled() throws -> Bool
+ func areScrollGesturesEnabled() throws -> Bool
+ func areTiltGesturesEnabled() throws -> Bool
+ func areZoomGesturesEnabled() throws -> Bool
+ func isCompassEnabled() throws -> Bool
+ func isMyLocationButtonEnabled() throws -> Bool
+ func isTrafficEnabled() throws -> Bool
+ func tileOverlay(withIdentifier tileOverlayId: String) throws -> PlatformTileLayer?
+ func groundOverlay(withIdentifier groundOverlayId: String) throws -> PlatformGroundOverlay?
+ func heatmap(withIdentifier heatmapId: String) throws -> PlatformHeatmap?
+ func zoomRange() throws -> PlatformZoomRange
+ func clusters(withIdentifier clusterManagerId: String) throws -> [PlatformCluster]
+ func cameraPosition() throws -> PlatformCameraPosition
+}
+
+/// Generated setup class from Pigeon to handle messages through the `binaryMessenger`.
+class MapsInspectorApiSetup {
+ static var codec: FlutterStandardMessageCodec { MessagesPigeonCodec.shared }
+ /// Sets up an instance of `MapsInspectorApi` to handle messages through the `binaryMessenger`.
+ static func setUp(
+ binaryMessenger: FlutterBinaryMessenger, api: MapsInspectorApi?,
+ messageChannelSuffix: String = ""
+ ) {
+ let channelSuffix = messageChannelSuffix.count > 0 ? ".\(messageChannelSuffix)" : ""
+ let areBuildingsEnabledChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areBuildingsEnabled\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ areBuildingsEnabledChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.areBuildingsEnabled()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ areBuildingsEnabledChannel.setMessageHandler(nil)
+ }
+ let areRotateGesturesEnabledChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areRotateGesturesEnabled\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ areRotateGesturesEnabledChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.areRotateGesturesEnabled()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ areRotateGesturesEnabledChannel.setMessageHandler(nil)
+ }
+ let areScrollGesturesEnabledChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areScrollGesturesEnabled\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ areScrollGesturesEnabledChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.areScrollGesturesEnabled()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ areScrollGesturesEnabledChannel.setMessageHandler(nil)
+ }
+ let areTiltGesturesEnabledChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areTiltGesturesEnabled\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ areTiltGesturesEnabledChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.areTiltGesturesEnabled()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ areTiltGesturesEnabledChannel.setMessageHandler(nil)
+ }
+ let areZoomGesturesEnabledChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.areZoomGesturesEnabled\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ areZoomGesturesEnabledChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.areZoomGesturesEnabled()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ areZoomGesturesEnabledChannel.setMessageHandler(nil)
+ }
+ let isCompassEnabledChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isCompassEnabled\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ isCompassEnabledChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.isCompassEnabled()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ isCompassEnabledChannel.setMessageHandler(nil)
+ }
+ let isMyLocationButtonEnabledChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isMyLocationButtonEnabled\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ isMyLocationButtonEnabledChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.isMyLocationButtonEnabled()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ isMyLocationButtonEnabledChannel.setMessageHandler(nil)
+ }
+ let isTrafficEnabledChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.isTrafficEnabled\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ isTrafficEnabledChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.isTrafficEnabled()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ isTrafficEnabledChannel.setMessageHandler(nil)
+ }
+ let getTileOverlayInfoChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getTileOverlayInfo\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ getTileOverlayInfoChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let tileOverlayIdArg = args[0] as! String
+ do {
+ let result = try api.tileOverlay(withIdentifier: tileOverlayIdArg)
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ getTileOverlayInfoChannel.setMessageHandler(nil)
+ }
+ let getGroundOverlayInfoChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getGroundOverlayInfo\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ getGroundOverlayInfoChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let groundOverlayIdArg = args[0] as! String
+ do {
+ let result = try api.groundOverlay(withIdentifier: groundOverlayIdArg)
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ getGroundOverlayInfoChannel.setMessageHandler(nil)
+ }
+ let getHeatmapInfoChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getHeatmapInfo\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ getHeatmapInfoChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let heatmapIdArg = args[0] as! String
+ do {
+ let result = try api.heatmap(withIdentifier: heatmapIdArg)
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ getHeatmapInfoChannel.setMessageHandler(nil)
+ }
+ let getZoomRangeChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getZoomRange\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ getZoomRangeChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.zoomRange()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ getZoomRangeChannel.setMessageHandler(nil)
+ }
+ let getClustersChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getClusters\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ getClustersChannel.setMessageHandler { message, reply in
+ let args = message as! [Any?]
+ let clusterManagerIdArg = args[0] as! String
+ do {
+ let result = try api.clusters(withIdentifier: clusterManagerIdArg)
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ getClustersChannel.setMessageHandler(nil)
+ }
+ let getCameraPositionChannel = FlutterBasicMessageChannel(
+ name:
+ "dev.flutter.pigeon.google_maps_flutter_ios.MapsInspectorApi.getCameraPosition\(channelSuffix)",
+ binaryMessenger: binaryMessenger, codec: codec)
+ if let api = api {
+ getCameraPositionChannel.setMessageHandler { _, reply in
+ do {
+ let result = try api.cameraPosition()
+ reply(wrapResult(result))
+ } catch {
+ reply(wrapError(error))
+ }
+ }
+ } else {
+ getCameraPositionChannel.setMessageHandler(nil)
+ }
+ }
+}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/PolygonController.swift b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/PolygonController.swift
index 9f2fcb5..2677978 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/PolygonController.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/PolygonController.swift
@@ -4,12 +4,8 @@
import GoogleMaps
-#if canImport(google_maps_flutter_ios_objc)
- import google_maps_flutter_ios_objc
-#endif
-
/// Defines polygon controllable by Flutter.
-class PolygonController: NSObject {
+class PolygonController {
let polygon: GMSPolygon
private weak var mapView: GMSMapView?
@@ -17,33 +13,34 @@
self.polygon = GMSPolygon()
self.mapView = mapView
self.polygon.userData = [identifier]
- super.init()
}
func removePolygon() {
polygon.map = nil
}
- /// Updates the controller's polygon with the properties from a FGMPlatformPolygon.
+ /// Updates the controller's polygon with the properties from a PlatformPolygon.
///
/// Setting the polygon to visible will set its map to the controller's mapView.
- func update(from platformPolygon: FGMPlatformPolygon) {
+ func update(from platformPolygon: PlatformPolygon) {
if let mapView = mapView {
PolygonController.update(polygon, from: platformPolygon, with: mapView)
}
}
- /// Updates the given GMSPolygon with the properties from a FGMPlatformPolygon.
+ /// Updates the given GMSPolygon with the properties from a PlatformPolygon.
///
/// Setting the polygon to visible will set its map to the given mapView.
static func update(
- _ polygon: GMSPolygon, from platformPolygon: FGMPlatformPolygon, with mapView: GMSMapView
+ _ polygon: GMSPolygon,
+ from platformPolygon: PlatformPolygon,
+ with mapView: GMSMapView
) {
polygon.isTappable = platformPolygon.consumesTapEvents
polygon.zIndex = Int32(platformPolygon.zIndex)
- polygon.path = makePath(from: platformPolygon.points.map({ $0.toCLLocationCoordinate2D() }))
+ polygon.path = makePath(from: platformPolygon.points.map { $0.toCLLocationCoordinate2D() })
polygon.holes = platformPolygon.holes.map {
- makePath(from: $0.map({ $0.toCLLocationCoordinate2D() }))
+ makePath(from: $0.map { $0.toCLLocationCoordinate2D() })
}
polygon.fillColor = platformPolygon.fillColor.toUIColor()
polygon.strokeColor = platformPolygon.strokeColor.toUIColor()
@@ -54,18 +51,17 @@
}
}
-class PolygonsController: NSObject {
+class PolygonsController {
private var polygonIdentifierToController: [String: PolygonController] = [:]
- private weak var eventDelegate: FGMMapEventDelegate?
+ private weak var eventDelegate: MapEventDelegate?
private weak var mapView: GMSMapView?
- init(mapView: GMSMapView, eventDelegate: FGMMapEventDelegate) {
+ init(mapView: GMSMapView, eventDelegate: MapEventDelegate) {
self.mapView = mapView
self.eventDelegate = eventDelegate
- super.init()
}
- func add(_ polygons: [FGMPlatformPolygon]) {
+ func add(_ polygons: [PlatformPolygon]) {
guard let mapView = mapView else { return }
for polygon in polygons {
let identifier = polygon.polygonId
@@ -77,7 +73,7 @@
}
}
- func change(_ polygons: [FGMPlatformPolygon]) {
+ func change(_ polygons: [PlatformPolygon]) {
for polygon in polygons {
let identifier = polygon.polygonId
polygonIdentifierToController[identifier]?.update(from: polygon)
@@ -95,7 +91,7 @@
func didTapPolygon(withIdentifier identifier: String) {
if hasPolygon(withIdentifier: identifier) {
- eventDelegate?.didTapPolygon(withIdentifier: identifier)
+ eventDelegate?.didTapPolygon(withIdentifier: identifier) { _ in }
}
}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/PolylineController.swift b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/PolylineController.swift
index 42d41ce..51c198f 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/PolylineController.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/PolylineController.swift
@@ -4,12 +4,8 @@
import GoogleMaps
-#if canImport(google_maps_flutter_ios_objc)
- import google_maps_flutter_ios_objc
-#endif
-
/// Defines polyline controllable by Flutter.
-class PolylineController: NSObject {
+class PolylineController {
let polyline: GMSPolyline
private weak var mapView: GMSMapView?
@@ -17,31 +13,32 @@
self.polyline = GMSPolyline()
self.mapView = mapView
self.polyline.userData = [identifier]
- super.init()
}
func removePolyline() {
polyline.map = nil
}
- /// Updates the controller's polyline with the properties from a FGMPlatformPolyline.
+ /// Updates the controller's polyline with the properties from a PlatformPolyline.
///
/// Setting the polyline to visible will set its map to the controller's mapView.
- func update(from platformPolyline: FGMPlatformPolyline) {
+ func update(from platformPolyline: PlatformPolyline) {
if let mapView = mapView {
PolylineController.update(polyline, from: platformPolyline, with: mapView)
}
}
- /// Updates the given GMSPolyline with the properties from a FGMPlatformPolyline.
+ /// Updates the given GMSPolyline with the properties from a PlatformPolyline.
///
/// Setting the polyline to visible will set its map to the given mapView.
static func update(
- _ polyline: GMSPolyline, from platformPolyline: FGMPlatformPolyline, with mapView: GMSMapView
+ _ polyline: GMSPolyline,
+ from platformPolyline: PlatformPolyline,
+ with mapView: GMSMapView
) {
polyline.isTappable = platformPolyline.consumesTapEvents
polyline.zIndex = Int32(platformPolyline.zIndex)
- let gmsPath = makePath(from: platformPolyline.points.map({ $0.toCLLocationCoordinate2D() }))
+ let gmsPath = makePath(from: platformPolyline.points.map { $0.toCLLocationCoordinate2D() })
polyline.path = gmsPath
let strokeColor = platformPolyline.color.toUIColor()
polyline.strokeColor = strokeColor
@@ -59,18 +56,17 @@
}
}
-class PolylinesController: NSObject {
+class PolylinesController {
private var polylineIdentifierToController: [String: PolylineController] = [:]
- private weak var eventDelegate: FGMMapEventDelegate?
+ private weak var eventDelegate: MapEventDelegate?
private weak var mapView: GMSMapView?
- init(mapView: GMSMapView, eventDelegate: FGMMapEventDelegate) {
+ init(mapView: GMSMapView, eventDelegate: MapEventDelegate) {
self.mapView = mapView
self.eventDelegate = eventDelegate
- super.init()
}
- func add(_ polylines: [FGMPlatformPolyline]) {
+ func add(_ polylines: [PlatformPolyline]) {
guard let mapView = mapView else { return }
for polyline in polylines {
let identifier = polyline.polylineId
@@ -82,7 +78,7 @@
}
}
- func change(_ polylines: [FGMPlatformPolyline]) {
+ func change(_ polylines: [PlatformPolyline]) {
for polyline in polylines {
let identifier = polyline.polylineId
polylineIdentifierToController[identifier]?.update(from: polyline)
@@ -100,7 +96,7 @@
func didTapPolyline(withIdentifier identifier: String) {
if hasPolyline(withIdentifier: identifier) {
- eventDelegate?.didTapPolyline(withIdentifier: identifier)
+ eventDelegate?.didTapPolyline(withIdentifier: identifier) { _ in }
}
}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/TileOverlayController.swift b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/TileOverlayController.swift
index c45ea4c..3dc37d4 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/TileOverlayController.swift
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/TileOverlayController.swift
@@ -6,31 +6,24 @@
import GoogleMaps
import UIKit
-#if canImport(google_maps_flutter_ios_objc)
- import google_maps_flutter_ios_objc
-#endif
-
/// Protocol for requesting tiles from the Dart side.
-// TODO(stuartmorgan): Adjust this to match the Swift API once the Pigeon
-// generation is switched to Swift.
protocol TileProviderDelegate: AnyObject {
func tile(
withOverlayIdentifier tileOverlayId: String,
- location: FGMPlatformPoint,
- zoom: Int,
- completion: @escaping (FGMPlatformTile?, FlutterError?) -> Void
+ location: PlatformPoint,
+ zoom: Int64,
+ completion: @escaping (Result<PlatformTile, PigeonError>) -> Void
)
}
/// Controller of a single tile overlay on the map.
-class TileOverlayController: NSObject {
+class TileOverlayController {
let layer: GMSTileLayer
private weak var mapView: GMSMapView?
- init(tileOverlay: FGMPlatformTileOverlay, tileLayer: GMSTileLayer, mapView: GMSMapView) {
+ init(tileOverlay: PlatformTileOverlay, tileLayer: GMSTileLayer, mapView: GMSMapView) {
self.layer = tileLayer
self.mapView = mapView
- super.init()
TileOverlayController.update(tileLayer, from: tileOverlay, with: mapView)
}
@@ -42,21 +35,21 @@
layer.clearTileCache()
}
- /// Updates the controller's tile overlay with the properties from a FGMPlatformTileOverlay.
+ /// Updates the controller's tile overlay with the properties from a PlatformTileOverlay.
///
/// Setting the tile overlay to visible will set its map to the controller's mapView.
- func update(from overlay: FGMPlatformTileOverlay) {
+ func update(from overlay: PlatformTileOverlay) {
if let mapView = mapView {
TileOverlayController.update(layer, from: overlay, with: mapView)
}
}
- /// Updates the given GMSTileLayer with the properties from a FGMPlatformTileOverlay.
+ /// Updates the given GMSTileLayer with the properties from a PlatformTileOverlay.
///
/// Setting the tile overlay to visible will set its map to the given mapView.
static func update(
_ tileLayer: GMSTileLayer,
- from platformOverlay: FGMPlatformTileOverlay,
+ from platformOverlay: PlatformTileOverlay,
with mapView: GMSMapView
) {
tileLayer.opacity = Float(1.0 - platformOverlay.transparency)
@@ -121,21 +114,20 @@
}
tileProviderDelegate.tile(
withOverlayIdentifier: self.tileOverlayIdentifier,
- location: FGMPlatformPoint.makeWith(x: Double(x), y: Double(y)),
- zoom: Int(zoom)
- ) { [weak self] tile, error in
+ location: PlatformPoint(x: Double(x), y: Double(y)),
+ zoom: Int64(zoom)
+ ) { [weak self] result in
guard let self = self else {
receiver.receiveTileWith(x: x, y: y, zoom: zoom, image: kGMSTileLayerNoTile)
return
}
- let typedData = tile?.data
- let tileImage: UIImage
- if let data = typedData?.data {
- tileImage = self.handleResultTile(UIImage(data: data)) ?? kGMSTileLayerNoTile
- } else {
- tileImage = kGMSTileLayerNoTile
- }
- if let error = error {
+ var tileImage = kGMSTileLayerNoTile
+ switch result {
+ case .success(let tile):
+ if let data = tile.data?.data {
+ tileImage = self.handleResultTile(UIImage(data: data)) ?? kGMSTileLayerNoTile
+ }
+ case .failure(let error):
NSLog(
"Can't get tile: errorCode = \(error.code), errorMessage = \(error.message ?? "nil"), details = \(error.details ?? "nil")"
)
@@ -147,7 +139,7 @@
}
/// Controller of multiple tile overlays on the map.
-class TileOverlaysController: NSObject {
+class TileOverlaysController {
private var tileOverlayIdentifierToController: [String: TileOverlayController] = [:]
private weak var tileProviderDelegate: TileProviderDelegate?
private weak var mapView: GMSMapView?
@@ -155,10 +147,9 @@
init(mapView: GMSMapView, tileProvider: TileProviderDelegate) {
self.mapView = mapView
self.tileProviderDelegate = tileProvider
- super.init()
}
- func add(_ tileOverlaysToAdd: [FGMPlatformTileOverlay]) {
+ func add(_ tileOverlaysToAdd: [PlatformTileOverlay]) {
guard let mapView = mapView, let tileProviderDelegate = tileProviderDelegate else { return }
for tileOverlay in tileOverlaysToAdd {
let identifier = tileOverlay.tileOverlayId
@@ -175,7 +166,7 @@
}
}
- func change(_ tileOverlaysToChange: [FGMPlatformTileOverlay]) {
+ func change(_ tileOverlaysToChange: [PlatformTileOverlay]) {
for tileOverlay in tileOverlaysToChange {
let identifier = tileOverlay.tileOverlayId
tileOverlayIdentifierToController[identifier]?.update(from: tileOverlay)
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios_objc/FGMCATransactionWrapper.m b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios_objc/FGMCATransactionWrapper.m
deleted file mode 100644
index 5fb79de..0000000
--- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios_objc/FGMCATransactionWrapper.m
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2013 The Flutter Authors
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#import "FGMCATransactionWrapper.h"
-
-@import QuartzCore;
-
-@implementation FGMCATransactionWrapper
-
-- (void)begin {
- [CATransaction begin];
-}
-
-- (void)commit {
- [CATransaction commit];
-}
-
-- (void)setAnimationDuration:(CFTimeInterval)duration {
- [CATransaction setAnimationDuration:duration];
-}
-
-@end
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios_objc/google_maps_flutter_pigeon_messages.g.m b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios_objc/google_maps_flutter_pigeon_messages.g.m
deleted file mode 100644
index 205bc2a..0000000
--- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios_objc/google_maps_flutter_pigeon_messages.g.m
+++ /dev/null
@@ -1,4849 +0,0 @@
-// Copyright 2013 The Flutter Authors
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-// Autogenerated from Pigeon (v27.3.2), do not edit directly.
-// See also: https://pub.dev/packages/pigeon
-
-#import "google_maps_flutter_pigeon_messages.g.h"
-
-#if TARGET_OS_OSX
-@import FlutterMacOS;
-#else
-@import Flutter;
-#endif
-
-static BOOL __attribute__((unused)) FLTPigeonDeepEquals(id _Nullable a, id _Nullable b) {
- if (a == b) {
- return YES;
- }
- if (a == nil) {
- return b == [NSNull null];
- }
- if (b == nil) {
- return a == [NSNull null];
- }
- if ([a isKindOfClass:[NSNumber class]] && [b isKindOfClass:[NSNumber class]]) {
- return
- [a isEqual:b] || (isnan([(NSNumber *)a doubleValue]) && isnan([(NSNumber *)b doubleValue]));
- }
- if ([a isKindOfClass:[NSArray class]] && [b isKindOfClass:[NSArray class]]) {
- NSArray *arrayA = (NSArray *)a;
- NSArray *arrayB = (NSArray *)b;
- if (arrayA.count != arrayB.count) {
- return NO;
- }
- for (NSUInteger i = 0; i < arrayA.count; i++) {
- if (!FLTPigeonDeepEquals(arrayA[i], arrayB[i])) {
- return NO;
- }
- }
- return YES;
- }
- if ([a isKindOfClass:[NSDictionary class]] && [b isKindOfClass:[NSDictionary class]]) {
- NSDictionary *dictA = (NSDictionary *)a;
- NSDictionary *dictB = (NSDictionary *)b;
- if (dictA.count != dictB.count) {
- return NO;
- }
- for (id keyA in dictA) {
- id valueA = dictA[keyA];
- BOOL found = NO;
- for (id keyB in dictB) {
- if (FLTPigeonDeepEquals(keyA, keyB)) {
- id valueB = dictB[keyB];
- if (FLTPigeonDeepEquals(valueA, valueB)) {
- found = YES;
- break;
- } else {
- return NO;
- }
- }
- }
- if (!found) {
- return NO;
- }
- }
- return YES;
- }
- return [a isEqual:b];
-}
-
-static NSUInteger __attribute__((unused)) FLTPigeonDeepHash(id _Nullable value) {
- if (value == nil || value == (id)[NSNull null]) {
- return 0;
- }
- if ([value isKindOfClass:[NSNumber class]]) {
- NSNumber *n = (NSNumber *)value;
- double d = n.doubleValue;
- if (isnan(d)) {
- // Normalize NaN to a consistent hash.
- return (NSUInteger)0x7FF8000000000000;
- }
- if (d == 0.0) {
- // Normalize -0.0 to 0.0 so they have the same hash code.
- d = 0.0;
- }
- return @(d).hash;
- }
- if ([value isKindOfClass:[NSArray class]]) {
- NSUInteger result = 1;
- for (id item in (NSArray *)value) {
- result = result * 31 + FLTPigeonDeepHash(item);
- }
- return result;
- }
- if ([value isKindOfClass:[NSDictionary class]]) {
- NSUInteger result = 0;
- NSDictionary *dict = (NSDictionary *)value;
- for (id key in dict) {
- result += ((FLTPigeonDeepHash(key) * 31) ^ FLTPigeonDeepHash(dict[key]));
- }
- return result;
- }
- return [value hash];
-}
-
-static NSArray<id> *wrapResult(id result, FlutterError *error) {
- if (error) {
- return @[
- error.code ?: [NSNull null], error.message ?: [NSNull null], error.details ?: [NSNull null]
- ];
- }
- return @[ result ?: [NSNull null] ];
-}
-
-static FlutterError *createConnectionError(NSString *channelName) {
- return [FlutterError
- errorWithCode:@"channel-error"
- message:[NSString stringWithFormat:@"%@/%@/%@",
- @"Unable to establish connection on channel: '",
- channelName, @"'."]
- details:@""];
-}
-
-static id GetNullableObjectAtIndex(NSArray<id> *array, NSInteger key) {
- id result = array[key];
- return (result == [NSNull null]) ? nil : result;
-}
-
-/// Pigeon equivalent of MapType
-@implementation FGMPlatformMapTypeBox
-- (instancetype)initWithValue:(FGMPlatformMapType)value {
- self = [super init];
- if (self) {
- _value = value;
- }
- return self;
-}
-@end
-
-/// Pigeon equivalent of the MarkerCollisionBehavior enum.
-@implementation FGMPlatformMarkerCollisionBehaviorBox
-- (instancetype)initWithValue:(FGMPlatformMarkerCollisionBehavior)value {
- self = [super init];
- if (self) {
- _value = value;
- }
- return self;
-}
-@end
-
-/// Join types for polyline joints.
-@implementation FGMPlatformJointTypeBox
-- (instancetype)initWithValue:(FGMPlatformJointType)value {
- self = [super init];
- if (self) {
- _value = value;
- }
- return self;
-}
-@end
-
-/// Enumeration of possible types for PatternItem.
-@implementation FGMPlatformPatternItemTypeBox
-- (instancetype)initWithValue:(FGMPlatformPatternItemType)value {
- self = [super init];
- if (self) {
- _value = value;
- }
- return self;
-}
-@end
-
-@implementation FGMPlatformMarkerTypeBox
-- (instancetype)initWithValue:(FGMPlatformMarkerType)value {
- self = [super init];
- if (self) {
- _value = value;
- }
- return self;
-}
-@end
-
-/// Pigeon equivalent of [MapBitmapScaling].
-@implementation FGMPlatformMapBitmapScalingBox
-- (instancetype)initWithValue:(FGMPlatformMapBitmapScaling)value {
- self = [super init];
- if (self) {
- _value = value;
- }
- return self;
-}
-@end
-
-@interface FGMPlatformCameraPosition ()
-+ (FGMPlatformCameraPosition *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformCameraPosition *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformCameraUpdate ()
-+ (FGMPlatformCameraUpdate *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformCameraUpdate *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformCameraUpdateNewCameraPosition ()
-+ (FGMPlatformCameraUpdateNewCameraPosition *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformCameraUpdateNewCameraPosition *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformCameraUpdateNewLatLng ()
-+ (FGMPlatformCameraUpdateNewLatLng *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformCameraUpdateNewLatLng *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformCameraUpdateNewLatLngBounds ()
-+ (FGMPlatformCameraUpdateNewLatLngBounds *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformCameraUpdateNewLatLngBounds *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformCameraUpdateNewLatLngZoom ()
-+ (FGMPlatformCameraUpdateNewLatLngZoom *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformCameraUpdateNewLatLngZoom *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformCameraUpdateScrollBy ()
-+ (FGMPlatformCameraUpdateScrollBy *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformCameraUpdateScrollBy *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformCameraUpdateZoomBy ()
-+ (FGMPlatformCameraUpdateZoomBy *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformCameraUpdateZoomBy *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformCameraUpdateZoom ()
-+ (FGMPlatformCameraUpdateZoom *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformCameraUpdateZoom *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformCameraUpdateZoomTo ()
-+ (FGMPlatformCameraUpdateZoomTo *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformCameraUpdateZoomTo *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformCircle ()
-+ (FGMPlatformCircle *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformCircle *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformHeatmap ()
-+ (FGMPlatformHeatmap *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformHeatmap *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformHeatmapGradient ()
-+ (FGMPlatformHeatmapGradient *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformHeatmapGradient *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformWeightedLatLng ()
-+ (FGMPlatformWeightedLatLng *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformWeightedLatLng *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformInfoWindow ()
-+ (FGMPlatformInfoWindow *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformInfoWindow *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformCluster ()
-+ (FGMPlatformCluster *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformCluster *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformClusterManager ()
-+ (FGMPlatformClusterManager *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformClusterManager *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformMarker ()
-+ (FGMPlatformMarker *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformMarker *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformPolygon ()
-+ (FGMPlatformPolygon *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformPolygon *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformPolyline ()
-+ (FGMPlatformPolyline *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformPolyline *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformPatternItem ()
-+ (FGMPlatformPatternItem *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformPatternItem *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformTile ()
-+ (FGMPlatformTile *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformTile *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformTileOverlay ()
-+ (FGMPlatformTileOverlay *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformTileOverlay *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformEdgeInsets ()
-+ (FGMPlatformEdgeInsets *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformEdgeInsets *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformLatLng ()
-+ (FGMPlatformLatLng *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformLatLng *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformLatLngBounds ()
-+ (FGMPlatformLatLngBounds *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformLatLngBounds *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformCameraTargetBounds ()
-+ (FGMPlatformCameraTargetBounds *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformCameraTargetBounds *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformGroundOverlay ()
-+ (FGMPlatformGroundOverlay *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformGroundOverlay *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformMapViewCreationParams ()
-+ (FGMPlatformMapViewCreationParams *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformMapViewCreationParams *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformMapConfiguration ()
-+ (FGMPlatformMapConfiguration *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformMapConfiguration *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformPoint ()
-+ (FGMPlatformPoint *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformPoint *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformSize ()
-+ (FGMPlatformSize *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformSize *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformColor ()
-+ (FGMPlatformColor *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformColor *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformTileLayer ()
-+ (FGMPlatformTileLayer *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformTileLayer *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformZoomRange ()
-+ (FGMPlatformZoomRange *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformZoomRange *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformBitmap ()
-+ (FGMPlatformBitmap *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformBitmap *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformBitmapDefaultMarker ()
-+ (FGMPlatformBitmapDefaultMarker *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformBitmapDefaultMarker *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformBitmapBytes ()
-+ (FGMPlatformBitmapBytes *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformBitmapBytes *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformBitmapAsset ()
-+ (FGMPlatformBitmapAsset *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformBitmapAsset *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformBitmapAssetImage ()
-+ (FGMPlatformBitmapAssetImage *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformBitmapAssetImage *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformBitmapAssetMap ()
-+ (FGMPlatformBitmapAssetMap *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformBitmapAssetMap *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformBitmapBytesMap ()
-+ (FGMPlatformBitmapBytesMap *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformBitmapBytesMap *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@interface FGMPlatformBitmapPinConfig ()
-+ (FGMPlatformBitmapPinConfig *)fromList:(NSArray<id> *)list;
-+ (nullable FGMPlatformBitmapPinConfig *)nullableFromList:(NSArray<id> *)list;
-- (NSArray<id> *)toList;
-@end
-
-@implementation FGMPlatformCameraPosition
-+ (instancetype)makeWithBearing:(double)bearing
- target:(FGMPlatformLatLng *)target
- tilt:(double)tilt
- zoom:(double)zoom {
- FGMPlatformCameraPosition *pigeonResult = [[FGMPlatformCameraPosition alloc] init];
- pigeonResult.bearing = bearing;
- pigeonResult.target = target;
- pigeonResult.tilt = tilt;
- pigeonResult.zoom = zoom;
- return pigeonResult;
-}
-+ (FGMPlatformCameraPosition *)fromList:(NSArray<id> *)list {
- FGMPlatformCameraPosition *pigeonResult = [[FGMPlatformCameraPosition alloc] init];
- pigeonResult.bearing = [GetNullableObjectAtIndex(list, 0) doubleValue];
- pigeonResult.target = GetNullableObjectAtIndex(list, 1);
- pigeonResult.tilt = [GetNullableObjectAtIndex(list, 2) doubleValue];
- pigeonResult.zoom = [GetNullableObjectAtIndex(list, 3) doubleValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformCameraPosition *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformCameraPosition fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.bearing),
- self.target ?: [NSNull null],
- @(self.tilt),
- @(self.zoom),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformCameraPosition *other = (FGMPlatformCameraPosition *)object;
- return (self.bearing == other.bearing || (isnan(self.bearing) && isnan(other.bearing))) &&
- FLTPigeonDeepEquals(self.target, other.target) &&
- (self.tilt == other.tilt || (isnan(self.tilt) && isnan(other.tilt))) &&
- (self.zoom == other.zoom || (isnan(self.zoom) && isnan(other.zoom)));
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result =
- result * 31 + (isnan(self.bearing) ? (NSUInteger)0x7FF8000000000000 : @(self.bearing).hash);
- result = result * 31 + FLTPigeonDeepHash(self.target);
- result = result * 31 + (isnan(self.tilt) ? (NSUInteger)0x7FF8000000000000 : @(self.tilt).hash);
- result = result * 31 + (isnan(self.zoom) ? (NSUInteger)0x7FF8000000000000 : @(self.zoom).hash);
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:@"FGMPlatformCameraPosition(bearing: %f, target: %@, tilt: %f, zoom: %f)",
- self.bearing, self.target, self.tilt, self.zoom];
-}
-@end
-
-@implementation FGMPlatformCameraUpdate
-+ (instancetype)makeWithCameraUpdate:(id)cameraUpdate {
- FGMPlatformCameraUpdate *pigeonResult = [[FGMPlatformCameraUpdate alloc] init];
- pigeonResult.cameraUpdate = cameraUpdate;
- return pigeonResult;
-}
-+ (FGMPlatformCameraUpdate *)fromList:(NSArray<id> *)list {
- FGMPlatformCameraUpdate *pigeonResult = [[FGMPlatformCameraUpdate alloc] init];
- pigeonResult.cameraUpdate = GetNullableObjectAtIndex(list, 0);
- return pigeonResult;
-}
-+ (nullable FGMPlatformCameraUpdate *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformCameraUpdate fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.cameraUpdate ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformCameraUpdate *other = (FGMPlatformCameraUpdate *)object;
- return FLTPigeonDeepEquals(self.cameraUpdate, other.cameraUpdate);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.cameraUpdate);
- return result;
-}
-- (NSString *)description {
- return
- [NSString stringWithFormat:@"FGMPlatformCameraUpdate(cameraUpdate: %@)", self.cameraUpdate];
-}
-@end
-
-@implementation FGMPlatformCameraUpdateNewCameraPosition
-+ (instancetype)makeWithCameraPosition:(FGMPlatformCameraPosition *)cameraPosition {
- FGMPlatformCameraUpdateNewCameraPosition *pigeonResult =
- [[FGMPlatformCameraUpdateNewCameraPosition alloc] init];
- pigeonResult.cameraPosition = cameraPosition;
- return pigeonResult;
-}
-+ (FGMPlatformCameraUpdateNewCameraPosition *)fromList:(NSArray<id> *)list {
- FGMPlatformCameraUpdateNewCameraPosition *pigeonResult =
- [[FGMPlatformCameraUpdateNewCameraPosition alloc] init];
- pigeonResult.cameraPosition = GetNullableObjectAtIndex(list, 0);
- return pigeonResult;
-}
-+ (nullable FGMPlatformCameraUpdateNewCameraPosition *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformCameraUpdateNewCameraPosition fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.cameraPosition ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformCameraUpdateNewCameraPosition *other =
- (FGMPlatformCameraUpdateNewCameraPosition *)object;
- return FLTPigeonDeepEquals(self.cameraPosition, other.cameraPosition);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.cameraPosition);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformCameraUpdateNewCameraPosition(cameraPosition: %@)",
- self.cameraPosition];
-}
-@end
-
-@implementation FGMPlatformCameraUpdateNewLatLng
-+ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng {
- FGMPlatformCameraUpdateNewLatLng *pigeonResult = [[FGMPlatformCameraUpdateNewLatLng alloc] init];
- pigeonResult.latLng = latLng;
- return pigeonResult;
-}
-+ (FGMPlatformCameraUpdateNewLatLng *)fromList:(NSArray<id> *)list {
- FGMPlatformCameraUpdateNewLatLng *pigeonResult = [[FGMPlatformCameraUpdateNewLatLng alloc] init];
- pigeonResult.latLng = GetNullableObjectAtIndex(list, 0);
- return pigeonResult;
-}
-+ (nullable FGMPlatformCameraUpdateNewLatLng *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformCameraUpdateNewLatLng fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.latLng ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformCameraUpdateNewLatLng *other = (FGMPlatformCameraUpdateNewLatLng *)object;
- return FLTPigeonDeepEquals(self.latLng, other.latLng);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.latLng);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformCameraUpdateNewLatLng(latLng: %@)", self.latLng];
-}
-@end
-
-@implementation FGMPlatformCameraUpdateNewLatLngBounds
-+ (instancetype)makeWithBounds:(FGMPlatformLatLngBounds *)bounds padding:(double)padding {
- FGMPlatformCameraUpdateNewLatLngBounds *pigeonResult =
- [[FGMPlatformCameraUpdateNewLatLngBounds alloc] init];
- pigeonResult.bounds = bounds;
- pigeonResult.padding = padding;
- return pigeonResult;
-}
-+ (FGMPlatformCameraUpdateNewLatLngBounds *)fromList:(NSArray<id> *)list {
- FGMPlatformCameraUpdateNewLatLngBounds *pigeonResult =
- [[FGMPlatformCameraUpdateNewLatLngBounds alloc] init];
- pigeonResult.bounds = GetNullableObjectAtIndex(list, 0);
- pigeonResult.padding = [GetNullableObjectAtIndex(list, 1) doubleValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformCameraUpdateNewLatLngBounds *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformCameraUpdateNewLatLngBounds fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.bounds ?: [NSNull null],
- @(self.padding),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformCameraUpdateNewLatLngBounds *other = (FGMPlatformCameraUpdateNewLatLngBounds *)object;
- return FLTPigeonDeepEquals(self.bounds, other.bounds) &&
- (self.padding == other.padding || (isnan(self.padding) && isnan(other.padding)));
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.bounds);
- result =
- result * 31 + (isnan(self.padding) ? (NSUInteger)0x7FF8000000000000 : @(self.padding).hash);
- return result;
-}
-- (NSString *)description {
- return
- [NSString stringWithFormat:@"FGMPlatformCameraUpdateNewLatLngBounds(bounds: %@, padding: %f)",
- self.bounds, self.padding];
-}
-@end
-
-@implementation FGMPlatformCameraUpdateNewLatLngZoom
-+ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng zoom:(double)zoom {
- FGMPlatformCameraUpdateNewLatLngZoom *pigeonResult =
- [[FGMPlatformCameraUpdateNewLatLngZoom alloc] init];
- pigeonResult.latLng = latLng;
- pigeonResult.zoom = zoom;
- return pigeonResult;
-}
-+ (FGMPlatformCameraUpdateNewLatLngZoom *)fromList:(NSArray<id> *)list {
- FGMPlatformCameraUpdateNewLatLngZoom *pigeonResult =
- [[FGMPlatformCameraUpdateNewLatLngZoom alloc] init];
- pigeonResult.latLng = GetNullableObjectAtIndex(list, 0);
- pigeonResult.zoom = [GetNullableObjectAtIndex(list, 1) doubleValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformCameraUpdateNewLatLngZoom *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformCameraUpdateNewLatLngZoom fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.latLng ?: [NSNull null],
- @(self.zoom),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformCameraUpdateNewLatLngZoom *other = (FGMPlatformCameraUpdateNewLatLngZoom *)object;
- return FLTPigeonDeepEquals(self.latLng, other.latLng) &&
- (self.zoom == other.zoom || (isnan(self.zoom) && isnan(other.zoom)));
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.latLng);
- result = result * 31 + (isnan(self.zoom) ? (NSUInteger)0x7FF8000000000000 : @(self.zoom).hash);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformCameraUpdateNewLatLngZoom(latLng: %@, zoom: %f)",
- self.latLng, self.zoom];
-}
-@end
-
-@implementation FGMPlatformCameraUpdateScrollBy
-+ (instancetype)makeWithDx:(double)dx dy:(double)dy {
- FGMPlatformCameraUpdateScrollBy *pigeonResult = [[FGMPlatformCameraUpdateScrollBy alloc] init];
- pigeonResult.dx = dx;
- pigeonResult.dy = dy;
- return pigeonResult;
-}
-+ (FGMPlatformCameraUpdateScrollBy *)fromList:(NSArray<id> *)list {
- FGMPlatformCameraUpdateScrollBy *pigeonResult = [[FGMPlatformCameraUpdateScrollBy alloc] init];
- pigeonResult.dx = [GetNullableObjectAtIndex(list, 0) doubleValue];
- pigeonResult.dy = [GetNullableObjectAtIndex(list, 1) doubleValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformCameraUpdateScrollBy *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformCameraUpdateScrollBy fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.dx),
- @(self.dy),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformCameraUpdateScrollBy *other = (FGMPlatformCameraUpdateScrollBy *)object;
- return (self.dx == other.dx || (isnan(self.dx) && isnan(other.dx))) &&
- (self.dy == other.dy || (isnan(self.dy) && isnan(other.dy)));
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + (isnan(self.dx) ? (NSUInteger)0x7FF8000000000000 : @(self.dx).hash);
- result = result * 31 + (isnan(self.dy) ? (NSUInteger)0x7FF8000000000000 : @(self.dy).hash);
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:@"FGMPlatformCameraUpdateScrollBy(dx: %f, dy: %f)", self.dx, self.dy];
-}
-@end
-
-@implementation FGMPlatformCameraUpdateZoomBy
-+ (instancetype)makeWithAmount:(double)amount focus:(nullable FGMPlatformPoint *)focus {
- FGMPlatformCameraUpdateZoomBy *pigeonResult = [[FGMPlatformCameraUpdateZoomBy alloc] init];
- pigeonResult.amount = amount;
- pigeonResult.focus = focus;
- return pigeonResult;
-}
-+ (FGMPlatformCameraUpdateZoomBy *)fromList:(NSArray<id> *)list {
- FGMPlatformCameraUpdateZoomBy *pigeonResult = [[FGMPlatformCameraUpdateZoomBy alloc] init];
- pigeonResult.amount = [GetNullableObjectAtIndex(list, 0) doubleValue];
- pigeonResult.focus = GetNullableObjectAtIndex(list, 1);
- return pigeonResult;
-}
-+ (nullable FGMPlatformCameraUpdateZoomBy *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformCameraUpdateZoomBy fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.amount),
- self.focus ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformCameraUpdateZoomBy *other = (FGMPlatformCameraUpdateZoomBy *)object;
- return (self.amount == other.amount || (isnan(self.amount) && isnan(other.amount))) &&
- FLTPigeonDeepEquals(self.focus, other.focus);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result =
- result * 31 + (isnan(self.amount) ? (NSUInteger)0x7FF8000000000000 : @(self.amount).hash);
- result = result * 31 + FLTPigeonDeepHash(self.focus);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformCameraUpdateZoomBy(amount: %f, focus: %@)",
- self.amount, self.focus];
-}
-@end
-
-@implementation FGMPlatformCameraUpdateZoom
-+ (instancetype)makeWithOut:(BOOL)out {
- FGMPlatformCameraUpdateZoom *pigeonResult = [[FGMPlatformCameraUpdateZoom alloc] init];
- pigeonResult.out = out;
- return pigeonResult;
-}
-+ (FGMPlatformCameraUpdateZoom *)fromList:(NSArray<id> *)list {
- FGMPlatformCameraUpdateZoom *pigeonResult = [[FGMPlatformCameraUpdateZoom alloc] init];
- pigeonResult.out = [GetNullableObjectAtIndex(list, 0) boolValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformCameraUpdateZoom *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformCameraUpdateZoom fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.out),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformCameraUpdateZoom *other = (FGMPlatformCameraUpdateZoom *)object;
- return self.out == other.out;
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + @(self.out).hash;
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:@"FGMPlatformCameraUpdateZoom(out: %@)", self.out ? @"true" : @"false"];
-}
-@end
-
-@implementation FGMPlatformCameraUpdateZoomTo
-+ (instancetype)makeWithZoom:(double)zoom {
- FGMPlatformCameraUpdateZoomTo *pigeonResult = [[FGMPlatformCameraUpdateZoomTo alloc] init];
- pigeonResult.zoom = zoom;
- return pigeonResult;
-}
-+ (FGMPlatformCameraUpdateZoomTo *)fromList:(NSArray<id> *)list {
- FGMPlatformCameraUpdateZoomTo *pigeonResult = [[FGMPlatformCameraUpdateZoomTo alloc] init];
- pigeonResult.zoom = [GetNullableObjectAtIndex(list, 0) doubleValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformCameraUpdateZoomTo *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformCameraUpdateZoomTo fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.zoom),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformCameraUpdateZoomTo *other = (FGMPlatformCameraUpdateZoomTo *)object;
- return (self.zoom == other.zoom || (isnan(self.zoom) && isnan(other.zoom)));
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + (isnan(self.zoom) ? (NSUInteger)0x7FF8000000000000 : @(self.zoom).hash);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformCameraUpdateZoomTo(zoom: %f)", self.zoom];
-}
-@end
-
-@implementation FGMPlatformCircle
-+ (instancetype)makeWithConsumeTapEvents:(BOOL)consumeTapEvents
- fillColor:(FGMPlatformColor *)fillColor
- strokeColor:(FGMPlatformColor *)strokeColor
- visible:(BOOL)visible
- strokeWidth:(NSInteger)strokeWidth
- zIndex:(double)zIndex
- center:(FGMPlatformLatLng *)center
- radius:(double)radius
- circleId:(NSString *)circleId {
- FGMPlatformCircle *pigeonResult = [[FGMPlatformCircle alloc] init];
- pigeonResult.consumeTapEvents = consumeTapEvents;
- pigeonResult.fillColor = fillColor;
- pigeonResult.strokeColor = strokeColor;
- pigeonResult.visible = visible;
- pigeonResult.strokeWidth = strokeWidth;
- pigeonResult.zIndex = zIndex;
- pigeonResult.center = center;
- pigeonResult.radius = radius;
- pigeonResult.circleId = circleId;
- return pigeonResult;
-}
-+ (FGMPlatformCircle *)fromList:(NSArray<id> *)list {
- FGMPlatformCircle *pigeonResult = [[FGMPlatformCircle alloc] init];
- pigeonResult.consumeTapEvents = [GetNullableObjectAtIndex(list, 0) boolValue];
- pigeonResult.fillColor = GetNullableObjectAtIndex(list, 1);
- pigeonResult.strokeColor = GetNullableObjectAtIndex(list, 2);
- pigeonResult.visible = [GetNullableObjectAtIndex(list, 3) boolValue];
- pigeonResult.strokeWidth = [GetNullableObjectAtIndex(list, 4) integerValue];
- pigeonResult.zIndex = [GetNullableObjectAtIndex(list, 5) doubleValue];
- pigeonResult.center = GetNullableObjectAtIndex(list, 6);
- pigeonResult.radius = [GetNullableObjectAtIndex(list, 7) doubleValue];
- pigeonResult.circleId = GetNullableObjectAtIndex(list, 8);
- return pigeonResult;
-}
-+ (nullable FGMPlatformCircle *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformCircle fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.consumeTapEvents),
- self.fillColor ?: [NSNull null],
- self.strokeColor ?: [NSNull null],
- @(self.visible),
- @(self.strokeWidth),
- @(self.zIndex),
- self.center ?: [NSNull null],
- @(self.radius),
- self.circleId ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformCircle *other = (FGMPlatformCircle *)object;
- return self.consumeTapEvents == other.consumeTapEvents &&
- FLTPigeonDeepEquals(self.fillColor, other.fillColor) &&
- FLTPigeonDeepEquals(self.strokeColor, other.strokeColor) &&
- self.visible == other.visible && self.strokeWidth == other.strokeWidth &&
- (self.zIndex == other.zIndex || (isnan(self.zIndex) && isnan(other.zIndex))) &&
- FLTPigeonDeepEquals(self.center, other.center) &&
- (self.radius == other.radius || (isnan(self.radius) && isnan(other.radius))) &&
- FLTPigeonDeepEquals(self.circleId, other.circleId);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + @(self.consumeTapEvents).hash;
- result = result * 31 + FLTPigeonDeepHash(self.fillColor);
- result = result * 31 + FLTPigeonDeepHash(self.strokeColor);
- result = result * 31 + @(self.visible).hash;
- result = result * 31 + @(self.strokeWidth).hash;
- result =
- result * 31 + (isnan(self.zIndex) ? (NSUInteger)0x7FF8000000000000 : @(self.zIndex).hash);
- result = result * 31 + FLTPigeonDeepHash(self.center);
- result =
- result * 31 + (isnan(self.radius) ? (NSUInteger)0x7FF8000000000000 : @(self.radius).hash);
- result = result * 31 + FLTPigeonDeepHash(self.circleId);
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:
- @"FGMPlatformCircle(consumeTapEvents: %@, fillColor: %@, strokeColor: %@, visible: %@, "
- @"strokeWidth: %ld, zIndex: %f, center: %@, radius: %f, circleId: %@)",
- self.consumeTapEvents ? @"true" : @"false", self.fillColor, self.strokeColor,
- self.visible ? @"true" : @"false", (long)self.strokeWidth, self.zIndex, self.center,
- self.radius, self.circleId];
-}
-@end
-
-@implementation FGMPlatformHeatmap
-+ (instancetype)makeWithHeatmapId:(NSString *)heatmapId
- data:(NSArray<FGMPlatformWeightedLatLng *> *)data
- gradient:(nullable FGMPlatformHeatmapGradient *)gradient
- opacity:(double)opacity
- radius:(NSInteger)radius
- minimumZoomIntensity:(NSInteger)minimumZoomIntensity
- maximumZoomIntensity:(NSInteger)maximumZoomIntensity {
- FGMPlatformHeatmap *pigeonResult = [[FGMPlatformHeatmap alloc] init];
- pigeonResult.heatmapId = heatmapId;
- pigeonResult.data = data;
- pigeonResult.gradient = gradient;
- pigeonResult.opacity = opacity;
- pigeonResult.radius = radius;
- pigeonResult.minimumZoomIntensity = minimumZoomIntensity;
- pigeonResult.maximumZoomIntensity = maximumZoomIntensity;
- return pigeonResult;
-}
-+ (FGMPlatformHeatmap *)fromList:(NSArray<id> *)list {
- FGMPlatformHeatmap *pigeonResult = [[FGMPlatformHeatmap alloc] init];
- pigeonResult.heatmapId = GetNullableObjectAtIndex(list, 0);
- pigeonResult.data = GetNullableObjectAtIndex(list, 1);
- pigeonResult.gradient = GetNullableObjectAtIndex(list, 2);
- pigeonResult.opacity = [GetNullableObjectAtIndex(list, 3) doubleValue];
- pigeonResult.radius = [GetNullableObjectAtIndex(list, 4) integerValue];
- pigeonResult.minimumZoomIntensity = [GetNullableObjectAtIndex(list, 5) integerValue];
- pigeonResult.maximumZoomIntensity = [GetNullableObjectAtIndex(list, 6) integerValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformHeatmap *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformHeatmap fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.heatmapId ?: [NSNull null],
- self.data ?: [NSNull null],
- self.gradient ?: [NSNull null],
- @(self.opacity),
- @(self.radius),
- @(self.minimumZoomIntensity),
- @(self.maximumZoomIntensity),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformHeatmap *other = (FGMPlatformHeatmap *)object;
- return FLTPigeonDeepEquals(self.heatmapId, other.heatmapId) &&
- FLTPigeonDeepEquals(self.data, other.data) &&
- FLTPigeonDeepEquals(self.gradient, other.gradient) &&
- (self.opacity == other.opacity || (isnan(self.opacity) && isnan(other.opacity))) &&
- self.radius == other.radius && self.minimumZoomIntensity == other.minimumZoomIntensity &&
- self.maximumZoomIntensity == other.maximumZoomIntensity;
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.heatmapId);
- result = result * 31 + FLTPigeonDeepHash(self.data);
- result = result * 31 + FLTPigeonDeepHash(self.gradient);
- result =
- result * 31 + (isnan(self.opacity) ? (NSUInteger)0x7FF8000000000000 : @(self.opacity).hash);
- result = result * 31 + @(self.radius).hash;
- result = result * 31 + @(self.minimumZoomIntensity).hash;
- result = result * 31 + @(self.maximumZoomIntensity).hash;
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:@"FGMPlatformHeatmap(heatmapId: %@, data: %@, gradient: %@, opacity: %f, "
- @"radius: %ld, minimumZoomIntensity: %ld, maximumZoomIntensity: %ld)",
- self.heatmapId, self.data, self.gradient, self.opacity, (long)self.radius,
- (long)self.minimumZoomIntensity, (long)self.maximumZoomIntensity];
-}
-@end
-
-@implementation FGMPlatformHeatmapGradient
-+ (instancetype)makeWithColors:(NSArray<FGMPlatformColor *> *)colors
- startPoints:(NSArray<NSNumber *> *)startPoints
- colorMapSize:(NSInteger)colorMapSize {
- FGMPlatformHeatmapGradient *pigeonResult = [[FGMPlatformHeatmapGradient alloc] init];
- pigeonResult.colors = colors;
- pigeonResult.startPoints = startPoints;
- pigeonResult.colorMapSize = colorMapSize;
- return pigeonResult;
-}
-+ (FGMPlatformHeatmapGradient *)fromList:(NSArray<id> *)list {
- FGMPlatformHeatmapGradient *pigeonResult = [[FGMPlatformHeatmapGradient alloc] init];
- pigeonResult.colors = GetNullableObjectAtIndex(list, 0);
- pigeonResult.startPoints = GetNullableObjectAtIndex(list, 1);
- pigeonResult.colorMapSize = [GetNullableObjectAtIndex(list, 2) integerValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformHeatmapGradient *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformHeatmapGradient fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.colors ?: [NSNull null],
- self.startPoints ?: [NSNull null],
- @(self.colorMapSize),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformHeatmapGradient *other = (FGMPlatformHeatmapGradient *)object;
- return FLTPigeonDeepEquals(self.colors, other.colors) &&
- FLTPigeonDeepEquals(self.startPoints, other.startPoints) &&
- self.colorMapSize == other.colorMapSize;
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.colors);
- result = result * 31 + FLTPigeonDeepHash(self.startPoints);
- result = result * 31 + @(self.colorMapSize).hash;
- return result;
-}
-- (NSString *)description {
- return
- [NSString stringWithFormat:
- @"FGMPlatformHeatmapGradient(colors: %@, startPoints: %@, colorMapSize: %ld)",
- self.colors, self.startPoints, (long)self.colorMapSize];
-}
-@end
-
-@implementation FGMPlatformWeightedLatLng
-+ (instancetype)makeWithPoint:(FGMPlatformLatLng *)point weight:(double)weight {
- FGMPlatformWeightedLatLng *pigeonResult = [[FGMPlatformWeightedLatLng alloc] init];
- pigeonResult.point = point;
- pigeonResult.weight = weight;
- return pigeonResult;
-}
-+ (FGMPlatformWeightedLatLng *)fromList:(NSArray<id> *)list {
- FGMPlatformWeightedLatLng *pigeonResult = [[FGMPlatformWeightedLatLng alloc] init];
- pigeonResult.point = GetNullableObjectAtIndex(list, 0);
- pigeonResult.weight = [GetNullableObjectAtIndex(list, 1) doubleValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformWeightedLatLng *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformWeightedLatLng fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.point ?: [NSNull null],
- @(self.weight),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformWeightedLatLng *other = (FGMPlatformWeightedLatLng *)object;
- return FLTPigeonDeepEquals(self.point, other.point) &&
- (self.weight == other.weight || (isnan(self.weight) && isnan(other.weight)));
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.point);
- result =
- result * 31 + (isnan(self.weight) ? (NSUInteger)0x7FF8000000000000 : @(self.weight).hash);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformWeightedLatLng(point: %@, weight: %f)", self.point,
- self.weight];
-}
-@end
-
-@implementation FGMPlatformInfoWindow
-+ (instancetype)makeWithTitle:(nullable NSString *)title
- snippet:(nullable NSString *)snippet
- anchor:(FGMPlatformPoint *)anchor {
- FGMPlatformInfoWindow *pigeonResult = [[FGMPlatformInfoWindow alloc] init];
- pigeonResult.title = title;
- pigeonResult.snippet = snippet;
- pigeonResult.anchor = anchor;
- return pigeonResult;
-}
-+ (FGMPlatformInfoWindow *)fromList:(NSArray<id> *)list {
- FGMPlatformInfoWindow *pigeonResult = [[FGMPlatformInfoWindow alloc] init];
- pigeonResult.title = GetNullableObjectAtIndex(list, 0);
- pigeonResult.snippet = GetNullableObjectAtIndex(list, 1);
- pigeonResult.anchor = GetNullableObjectAtIndex(list, 2);
- return pigeonResult;
-}
-+ (nullable FGMPlatformInfoWindow *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformInfoWindow fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.title ?: [NSNull null],
- self.snippet ?: [NSNull null],
- self.anchor ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformInfoWindow *other = (FGMPlatformInfoWindow *)object;
- return FLTPigeonDeepEquals(self.title, other.title) &&
- FLTPigeonDeepEquals(self.snippet, other.snippet) &&
- FLTPigeonDeepEquals(self.anchor, other.anchor);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.title);
- result = result * 31 + FLTPigeonDeepHash(self.snippet);
- result = result * 31 + FLTPigeonDeepHash(self.anchor);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformInfoWindow(title: %@, snippet: %@, anchor: %@)",
- self.title, self.snippet, self.anchor];
-}
-@end
-
-@implementation FGMPlatformCluster
-+ (instancetype)makeWithClusterManagerId:(NSString *)clusterManagerId
- position:(FGMPlatformLatLng *)position
- bounds:(FGMPlatformLatLngBounds *)bounds
- markerIds:(NSArray<NSString *> *)markerIds {
- FGMPlatformCluster *pigeonResult = [[FGMPlatformCluster alloc] init];
- pigeonResult.clusterManagerId = clusterManagerId;
- pigeonResult.position = position;
- pigeonResult.bounds = bounds;
- pigeonResult.markerIds = markerIds;
- return pigeonResult;
-}
-+ (FGMPlatformCluster *)fromList:(NSArray<id> *)list {
- FGMPlatformCluster *pigeonResult = [[FGMPlatformCluster alloc] init];
- pigeonResult.clusterManagerId = GetNullableObjectAtIndex(list, 0);
- pigeonResult.position = GetNullableObjectAtIndex(list, 1);
- pigeonResult.bounds = GetNullableObjectAtIndex(list, 2);
- pigeonResult.markerIds = GetNullableObjectAtIndex(list, 3);
- return pigeonResult;
-}
-+ (nullable FGMPlatformCluster *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformCluster fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.clusterManagerId ?: [NSNull null],
- self.position ?: [NSNull null],
- self.bounds ?: [NSNull null],
- self.markerIds ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformCluster *other = (FGMPlatformCluster *)object;
- return FLTPigeonDeepEquals(self.clusterManagerId, other.clusterManagerId) &&
- FLTPigeonDeepEquals(self.position, other.position) &&
- FLTPigeonDeepEquals(self.bounds, other.bounds) &&
- FLTPigeonDeepEquals(self.markerIds, other.markerIds);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.clusterManagerId);
- result = result * 31 + FLTPigeonDeepHash(self.position);
- result = result * 31 + FLTPigeonDeepHash(self.bounds);
- result = result * 31 + FLTPigeonDeepHash(self.markerIds);
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:
- @"FGMPlatformCluster(clusterManagerId: %@, position: %@, bounds: %@, markerIds: %@)",
- self.clusterManagerId, self.position, self.bounds, self.markerIds];
-}
-@end
-
-@implementation FGMPlatformClusterManager
-+ (instancetype)makeWithIdentifier:(NSString *)identifier {
- FGMPlatformClusterManager *pigeonResult = [[FGMPlatformClusterManager alloc] init];
- pigeonResult.identifier = identifier;
- return pigeonResult;
-}
-+ (FGMPlatformClusterManager *)fromList:(NSArray<id> *)list {
- FGMPlatformClusterManager *pigeonResult = [[FGMPlatformClusterManager alloc] init];
- pigeonResult.identifier = GetNullableObjectAtIndex(list, 0);
- return pigeonResult;
-}
-+ (nullable FGMPlatformClusterManager *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformClusterManager fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.identifier ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformClusterManager *other = (FGMPlatformClusterManager *)object;
- return FLTPigeonDeepEquals(self.identifier, other.identifier);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.identifier);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformClusterManager(identifier: %@)", self.identifier];
-}
-@end
-
-@implementation FGMPlatformMarker
-+ (instancetype)makeWithAlpha:(double)alpha
- anchor:(FGMPlatformPoint *)anchor
- consumeTapEvents:(BOOL)consumeTapEvents
- draggable:(BOOL)draggable
- flat:(BOOL)flat
- icon:(FGMPlatformBitmap *)icon
- infoWindow:(FGMPlatformInfoWindow *)infoWindow
- position:(FGMPlatformLatLng *)position
- rotation:(double)rotation
- visible:(BOOL)visible
- zIndex:(NSInteger)zIndex
- markerId:(NSString *)markerId
- clusterManagerId:(nullable NSString *)clusterManagerId
- collisionBehavior:(nullable FGMPlatformMarkerCollisionBehaviorBox *)collisionBehavior {
- FGMPlatformMarker *pigeonResult = [[FGMPlatformMarker alloc] init];
- pigeonResult.alpha = alpha;
- pigeonResult.anchor = anchor;
- pigeonResult.consumeTapEvents = consumeTapEvents;
- pigeonResult.draggable = draggable;
- pigeonResult.flat = flat;
- pigeonResult.icon = icon;
- pigeonResult.infoWindow = infoWindow;
- pigeonResult.position = position;
- pigeonResult.rotation = rotation;
- pigeonResult.visible = visible;
- pigeonResult.zIndex = zIndex;
- pigeonResult.markerId = markerId;
- pigeonResult.clusterManagerId = clusterManagerId;
- pigeonResult.collisionBehavior = collisionBehavior;
- return pigeonResult;
-}
-+ (FGMPlatformMarker *)fromList:(NSArray<id> *)list {
- FGMPlatformMarker *pigeonResult = [[FGMPlatformMarker alloc] init];
- pigeonResult.alpha = [GetNullableObjectAtIndex(list, 0) doubleValue];
- pigeonResult.anchor = GetNullableObjectAtIndex(list, 1);
- pigeonResult.consumeTapEvents = [GetNullableObjectAtIndex(list, 2) boolValue];
- pigeonResult.draggable = [GetNullableObjectAtIndex(list, 3) boolValue];
- pigeonResult.flat = [GetNullableObjectAtIndex(list, 4) boolValue];
- pigeonResult.icon = GetNullableObjectAtIndex(list, 5);
- pigeonResult.infoWindow = GetNullableObjectAtIndex(list, 6);
- pigeonResult.position = GetNullableObjectAtIndex(list, 7);
- pigeonResult.rotation = [GetNullableObjectAtIndex(list, 8) doubleValue];
- pigeonResult.visible = [GetNullableObjectAtIndex(list, 9) boolValue];
- pigeonResult.zIndex = [GetNullableObjectAtIndex(list, 10) integerValue];
- pigeonResult.markerId = GetNullableObjectAtIndex(list, 11);
- pigeonResult.clusterManagerId = GetNullableObjectAtIndex(list, 12);
- pigeonResult.collisionBehavior = GetNullableObjectAtIndex(list, 13);
- return pigeonResult;
-}
-+ (nullable FGMPlatformMarker *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformMarker fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.alpha),
- self.anchor ?: [NSNull null],
- @(self.consumeTapEvents),
- @(self.draggable),
- @(self.flat),
- self.icon ?: [NSNull null],
- self.infoWindow ?: [NSNull null],
- self.position ?: [NSNull null],
- @(self.rotation),
- @(self.visible),
- @(self.zIndex),
- self.markerId ?: [NSNull null],
- self.clusterManagerId ?: [NSNull null],
- self.collisionBehavior ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformMarker *other = (FGMPlatformMarker *)object;
- return (self.alpha == other.alpha || (isnan(self.alpha) && isnan(other.alpha))) &&
- FLTPigeonDeepEquals(self.anchor, other.anchor) &&
- self.consumeTapEvents == other.consumeTapEvents && self.draggable == other.draggable &&
- self.flat == other.flat && FLTPigeonDeepEquals(self.icon, other.icon) &&
- FLTPigeonDeepEquals(self.infoWindow, other.infoWindow) &&
- FLTPigeonDeepEquals(self.position, other.position) &&
- (self.rotation == other.rotation || (isnan(self.rotation) && isnan(other.rotation))) &&
- self.visible == other.visible && self.zIndex == other.zIndex &&
- FLTPigeonDeepEquals(self.markerId, other.markerId) &&
- FLTPigeonDeepEquals(self.clusterManagerId, other.clusterManagerId) &&
- FLTPigeonDeepEquals(self.collisionBehavior, other.collisionBehavior);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + (isnan(self.alpha) ? (NSUInteger)0x7FF8000000000000 : @(self.alpha).hash);
- result = result * 31 + FLTPigeonDeepHash(self.anchor);
- result = result * 31 + @(self.consumeTapEvents).hash;
- result = result * 31 + @(self.draggable).hash;
- result = result * 31 + @(self.flat).hash;
- result = result * 31 + FLTPigeonDeepHash(self.icon);
- result = result * 31 + FLTPigeonDeepHash(self.infoWindow);
- result = result * 31 + FLTPigeonDeepHash(self.position);
- result =
- result * 31 + (isnan(self.rotation) ? (NSUInteger)0x7FF8000000000000 : @(self.rotation).hash);
- result = result * 31 + @(self.visible).hash;
- result = result * 31 + @(self.zIndex).hash;
- result = result * 31 + FLTPigeonDeepHash(self.markerId);
- result = result * 31 + FLTPigeonDeepHash(self.clusterManagerId);
- result = result * 31 + FLTPigeonDeepHash(self.collisionBehavior);
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:
- @"FGMPlatformMarker(alpha: %f, anchor: %@, consumeTapEvents: %@, draggable: %@, flat: "
- @"%@, icon: %@, infoWindow: %@, position: %@, rotation: %f, visible: %@, zIndex: %ld, "
- @"markerId: %@, clusterManagerId: %@, collisionBehavior: %@)",
- self.alpha, self.anchor, self.consumeTapEvents ? @"true" : @"false",
- self.draggable ? @"true" : @"false", self.flat ? @"true" : @"false", self.icon,
- self.infoWindow, self.position, self.rotation, self.visible ? @"true" : @"false",
- (long)self.zIndex, self.markerId, self.clusterManagerId, self.collisionBehavior];
-}
-@end
-
-@implementation FGMPlatformPolygon
-+ (instancetype)makeWithPolygonId:(NSString *)polygonId
- consumesTapEvents:(BOOL)consumesTapEvents
- fillColor:(FGMPlatformColor *)fillColor
- geodesic:(BOOL)geodesic
- points:(NSArray<FGMPlatformLatLng *> *)points
- holes:(NSArray<NSArray<FGMPlatformLatLng *> *> *)holes
- visible:(BOOL)visible
- strokeColor:(FGMPlatformColor *)strokeColor
- strokeWidth:(NSInteger)strokeWidth
- zIndex:(NSInteger)zIndex {
- FGMPlatformPolygon *pigeonResult = [[FGMPlatformPolygon alloc] init];
- pigeonResult.polygonId = polygonId;
- pigeonResult.consumesTapEvents = consumesTapEvents;
- pigeonResult.fillColor = fillColor;
- pigeonResult.geodesic = geodesic;
- pigeonResult.points = points;
- pigeonResult.holes = holes;
- pigeonResult.visible = visible;
- pigeonResult.strokeColor = strokeColor;
- pigeonResult.strokeWidth = strokeWidth;
- pigeonResult.zIndex = zIndex;
- return pigeonResult;
-}
-+ (FGMPlatformPolygon *)fromList:(NSArray<id> *)list {
- FGMPlatformPolygon *pigeonResult = [[FGMPlatformPolygon alloc] init];
- pigeonResult.polygonId = GetNullableObjectAtIndex(list, 0);
- pigeonResult.consumesTapEvents = [GetNullableObjectAtIndex(list, 1) boolValue];
- pigeonResult.fillColor = GetNullableObjectAtIndex(list, 2);
- pigeonResult.geodesic = [GetNullableObjectAtIndex(list, 3) boolValue];
- pigeonResult.points = GetNullableObjectAtIndex(list, 4);
- pigeonResult.holes = GetNullableObjectAtIndex(list, 5);
- pigeonResult.visible = [GetNullableObjectAtIndex(list, 6) boolValue];
- pigeonResult.strokeColor = GetNullableObjectAtIndex(list, 7);
- pigeonResult.strokeWidth = [GetNullableObjectAtIndex(list, 8) integerValue];
- pigeonResult.zIndex = [GetNullableObjectAtIndex(list, 9) integerValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformPolygon *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformPolygon fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.polygonId ?: [NSNull null],
- @(self.consumesTapEvents),
- self.fillColor ?: [NSNull null],
- @(self.geodesic),
- self.points ?: [NSNull null],
- self.holes ?: [NSNull null],
- @(self.visible),
- self.strokeColor ?: [NSNull null],
- @(self.strokeWidth),
- @(self.zIndex),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformPolygon *other = (FGMPlatformPolygon *)object;
- return FLTPigeonDeepEquals(self.polygonId, other.polygonId) &&
- self.consumesTapEvents == other.consumesTapEvents &&
- FLTPigeonDeepEquals(self.fillColor, other.fillColor) && self.geodesic == other.geodesic &&
- FLTPigeonDeepEquals(self.points, other.points) &&
- FLTPigeonDeepEquals(self.holes, other.holes) && self.visible == other.visible &&
- FLTPigeonDeepEquals(self.strokeColor, other.strokeColor) &&
- self.strokeWidth == other.strokeWidth && self.zIndex == other.zIndex;
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.polygonId);
- result = result * 31 + @(self.consumesTapEvents).hash;
- result = result * 31 + FLTPigeonDeepHash(self.fillColor);
- result = result * 31 + @(self.geodesic).hash;
- result = result * 31 + FLTPigeonDeepHash(self.points);
- result = result * 31 + FLTPigeonDeepHash(self.holes);
- result = result * 31 + @(self.visible).hash;
- result = result * 31 + FLTPigeonDeepHash(self.strokeColor);
- result = result * 31 + @(self.strokeWidth).hash;
- result = result * 31 + @(self.zIndex).hash;
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:
- @"FGMPlatformPolygon(polygonId: %@, consumesTapEvents: %@, fillColor: %@, geodesic: %@, "
- @"points: %@, holes: %@, visible: %@, strokeColor: %@, strokeWidth: %ld, zIndex: %ld)",
- self.polygonId, self.consumesTapEvents ? @"true" : @"false", self.fillColor,
- self.geodesic ? @"true" : @"false", self.points, self.holes,
- self.visible ? @"true" : @"false", self.strokeColor, (long)self.strokeWidth,
- (long)self.zIndex];
-}
-@end
-
-@implementation FGMPlatformPolyline
-+ (instancetype)makeWithPolylineId:(NSString *)polylineId
- consumesTapEvents:(BOOL)consumesTapEvents
- color:(FGMPlatformColor *)color
- geodesic:(BOOL)geodesic
- jointType:(FGMPlatformJointType)jointType
- patterns:(NSArray<FGMPlatformPatternItem *> *)patterns
- points:(NSArray<FGMPlatformLatLng *> *)points
- visible:(BOOL)visible
- width:(NSInteger)width
- zIndex:(NSInteger)zIndex {
- FGMPlatformPolyline *pigeonResult = [[FGMPlatformPolyline alloc] init];
- pigeonResult.polylineId = polylineId;
- pigeonResult.consumesTapEvents = consumesTapEvents;
- pigeonResult.color = color;
- pigeonResult.geodesic = geodesic;
- pigeonResult.jointType = jointType;
- pigeonResult.patterns = patterns;
- pigeonResult.points = points;
- pigeonResult.visible = visible;
- pigeonResult.width = width;
- pigeonResult.zIndex = zIndex;
- return pigeonResult;
-}
-+ (FGMPlatformPolyline *)fromList:(NSArray<id> *)list {
- FGMPlatformPolyline *pigeonResult = [[FGMPlatformPolyline alloc] init];
- pigeonResult.polylineId = GetNullableObjectAtIndex(list, 0);
- pigeonResult.consumesTapEvents = [GetNullableObjectAtIndex(list, 1) boolValue];
- pigeonResult.color = GetNullableObjectAtIndex(list, 2);
- pigeonResult.geodesic = [GetNullableObjectAtIndex(list, 3) boolValue];
- FGMPlatformJointTypeBox *boxedFGMPlatformJointType = GetNullableObjectAtIndex(list, 4);
- pigeonResult.jointType = boxedFGMPlatformJointType.value;
- pigeonResult.patterns = GetNullableObjectAtIndex(list, 5);
- pigeonResult.points = GetNullableObjectAtIndex(list, 6);
- pigeonResult.visible = [GetNullableObjectAtIndex(list, 7) boolValue];
- pigeonResult.width = [GetNullableObjectAtIndex(list, 8) integerValue];
- pigeonResult.zIndex = [GetNullableObjectAtIndex(list, 9) integerValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformPolyline *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformPolyline fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.polylineId ?: [NSNull null],
- @(self.consumesTapEvents),
- self.color ?: [NSNull null],
- @(self.geodesic),
- [[FGMPlatformJointTypeBox alloc] initWithValue:self.jointType],
- self.patterns ?: [NSNull null],
- self.points ?: [NSNull null],
- @(self.visible),
- @(self.width),
- @(self.zIndex),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformPolyline *other = (FGMPlatformPolyline *)object;
- return FLTPigeonDeepEquals(self.polylineId, other.polylineId) &&
- self.consumesTapEvents == other.consumesTapEvents &&
- FLTPigeonDeepEquals(self.color, other.color) && self.geodesic == other.geodesic &&
- self.jointType == other.jointType && FLTPigeonDeepEquals(self.patterns, other.patterns) &&
- FLTPigeonDeepEquals(self.points, other.points) && self.visible == other.visible &&
- self.width == other.width && self.zIndex == other.zIndex;
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.polylineId);
- result = result * 31 + @(self.consumesTapEvents).hash;
- result = result * 31 + FLTPigeonDeepHash(self.color);
- result = result * 31 + @(self.geodesic).hash;
- result = result * 31 + @(self.jointType).hash;
- result = result * 31 + FLTPigeonDeepHash(self.patterns);
- result = result * 31 + FLTPigeonDeepHash(self.points);
- result = result * 31 + @(self.visible).hash;
- result = result * 31 + @(self.width).hash;
- result = result * 31 + @(self.zIndex).hash;
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:
- @"FGMPlatformPolyline(polylineId: %@, consumesTapEvents: %@, color: %@, geodesic: %@, "
- @"jointType: %ld, patterns: %@, points: %@, visible: %@, width: %ld, zIndex: %ld)",
- self.polylineId, self.consumesTapEvents ? @"true" : @"false", self.color,
- self.geodesic ? @"true" : @"false", (long)self.jointType, self.patterns, self.points,
- self.visible ? @"true" : @"false", (long)self.width, (long)self.zIndex];
-}
-@end
-
-@implementation FGMPlatformPatternItem
-+ (instancetype)makeWithType:(FGMPlatformPatternItemType)type length:(nullable NSNumber *)length {
- FGMPlatformPatternItem *pigeonResult = [[FGMPlatformPatternItem alloc] init];
- pigeonResult.type = type;
- pigeonResult.length = length;
- return pigeonResult;
-}
-+ (FGMPlatformPatternItem *)fromList:(NSArray<id> *)list {
- FGMPlatformPatternItem *pigeonResult = [[FGMPlatformPatternItem alloc] init];
- FGMPlatformPatternItemTypeBox *boxedFGMPlatformPatternItemType =
- GetNullableObjectAtIndex(list, 0);
- pigeonResult.type = boxedFGMPlatformPatternItemType.value;
- pigeonResult.length = GetNullableObjectAtIndex(list, 1);
- return pigeonResult;
-}
-+ (nullable FGMPlatformPatternItem *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformPatternItem fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- [[FGMPlatformPatternItemTypeBox alloc] initWithValue:self.type],
- self.length ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformPatternItem *other = (FGMPlatformPatternItem *)object;
- return self.type == other.type && FLTPigeonDeepEquals(self.length, other.length);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + @(self.type).hash;
- result = result * 31 + FLTPigeonDeepHash(self.length);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformPatternItem(type: %ld, length: %@)",
- (long)self.type, self.length];
-}
-@end
-
-@implementation FGMPlatformTile
-+ (instancetype)makeWithWidth:(NSInteger)width
- height:(NSInteger)height
- data:(nullable FlutterStandardTypedData *)data {
- FGMPlatformTile *pigeonResult = [[FGMPlatformTile alloc] init];
- pigeonResult.width = width;
- pigeonResult.height = height;
- pigeonResult.data = data;
- return pigeonResult;
-}
-+ (FGMPlatformTile *)fromList:(NSArray<id> *)list {
- FGMPlatformTile *pigeonResult = [[FGMPlatformTile alloc] init];
- pigeonResult.width = [GetNullableObjectAtIndex(list, 0) integerValue];
- pigeonResult.height = [GetNullableObjectAtIndex(list, 1) integerValue];
- pigeonResult.data = GetNullableObjectAtIndex(list, 2);
- return pigeonResult;
-}
-+ (nullable FGMPlatformTile *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformTile fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.width),
- @(self.height),
- self.data ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformTile *other = (FGMPlatformTile *)object;
- return self.width == other.width && self.height == other.height &&
- FLTPigeonDeepEquals(self.data, other.data);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + @(self.width).hash;
- result = result * 31 + @(self.height).hash;
- result = result * 31 + FLTPigeonDeepHash(self.data);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformTile(width: %ld, height: %ld, data: %@)",
- (long)self.width, (long)self.height, self.data];
-}
-@end
-
-@implementation FGMPlatformTileOverlay
-+ (instancetype)makeWithTileOverlayId:(NSString *)tileOverlayId
- fadeIn:(BOOL)fadeIn
- transparency:(double)transparency
- zIndex:(NSInteger)zIndex
- visible:(BOOL)visible
- tileSize:(NSInteger)tileSize {
- FGMPlatformTileOverlay *pigeonResult = [[FGMPlatformTileOverlay alloc] init];
- pigeonResult.tileOverlayId = tileOverlayId;
- pigeonResult.fadeIn = fadeIn;
- pigeonResult.transparency = transparency;
- pigeonResult.zIndex = zIndex;
- pigeonResult.visible = visible;
- pigeonResult.tileSize = tileSize;
- return pigeonResult;
-}
-+ (FGMPlatformTileOverlay *)fromList:(NSArray<id> *)list {
- FGMPlatformTileOverlay *pigeonResult = [[FGMPlatformTileOverlay alloc] init];
- pigeonResult.tileOverlayId = GetNullableObjectAtIndex(list, 0);
- pigeonResult.fadeIn = [GetNullableObjectAtIndex(list, 1) boolValue];
- pigeonResult.transparency = [GetNullableObjectAtIndex(list, 2) doubleValue];
- pigeonResult.zIndex = [GetNullableObjectAtIndex(list, 3) integerValue];
- pigeonResult.visible = [GetNullableObjectAtIndex(list, 4) boolValue];
- pigeonResult.tileSize = [GetNullableObjectAtIndex(list, 5) integerValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformTileOverlay *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformTileOverlay fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.tileOverlayId ?: [NSNull null],
- @(self.fadeIn),
- @(self.transparency),
- @(self.zIndex),
- @(self.visible),
- @(self.tileSize),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformTileOverlay *other = (FGMPlatformTileOverlay *)object;
- return FLTPigeonDeepEquals(self.tileOverlayId, other.tileOverlayId) &&
- self.fadeIn == other.fadeIn &&
- (self.transparency == other.transparency ||
- (isnan(self.transparency) && isnan(other.transparency))) &&
- self.zIndex == other.zIndex && self.visible == other.visible &&
- self.tileSize == other.tileSize;
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.tileOverlayId);
- result = result * 31 + @(self.fadeIn).hash;
- result = result * 31 +
- (isnan(self.transparency) ? (NSUInteger)0x7FF8000000000000 : @(self.transparency).hash);
- result = result * 31 + @(self.zIndex).hash;
- result = result * 31 + @(self.visible).hash;
- result = result * 31 + @(self.tileSize).hash;
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformTileOverlay(tileOverlayId: %@, fadeIn: %@, "
- @"transparency: %f, zIndex: %ld, visible: %@, tileSize: %ld)",
- self.tileOverlayId, self.fadeIn ? @"true" : @"false",
- self.transparency, (long)self.zIndex,
- self.visible ? @"true" : @"false", (long)self.tileSize];
-}
-@end
-
-@implementation FGMPlatformEdgeInsets
-+ (instancetype)makeWithTop:(double)top
- bottom:(double)bottom
- left:(double)left
- right:(double)right {
- FGMPlatformEdgeInsets *pigeonResult = [[FGMPlatformEdgeInsets alloc] init];
- pigeonResult.top = top;
- pigeonResult.bottom = bottom;
- pigeonResult.left = left;
- pigeonResult.right = right;
- return pigeonResult;
-}
-+ (FGMPlatformEdgeInsets *)fromList:(NSArray<id> *)list {
- FGMPlatformEdgeInsets *pigeonResult = [[FGMPlatformEdgeInsets alloc] init];
- pigeonResult.top = [GetNullableObjectAtIndex(list, 0) doubleValue];
- pigeonResult.bottom = [GetNullableObjectAtIndex(list, 1) doubleValue];
- pigeonResult.left = [GetNullableObjectAtIndex(list, 2) doubleValue];
- pigeonResult.right = [GetNullableObjectAtIndex(list, 3) doubleValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformEdgeInsets *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformEdgeInsets fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.top),
- @(self.bottom),
- @(self.left),
- @(self.right),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformEdgeInsets *other = (FGMPlatformEdgeInsets *)object;
- return (self.top == other.top || (isnan(self.top) && isnan(other.top))) &&
- (self.bottom == other.bottom || (isnan(self.bottom) && isnan(other.bottom))) &&
- (self.left == other.left || (isnan(self.left) && isnan(other.left))) &&
- (self.right == other.right || (isnan(self.right) && isnan(other.right)));
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + (isnan(self.top) ? (NSUInteger)0x7FF8000000000000 : @(self.top).hash);
- result =
- result * 31 + (isnan(self.bottom) ? (NSUInteger)0x7FF8000000000000 : @(self.bottom).hash);
- result = result * 31 + (isnan(self.left) ? (NSUInteger)0x7FF8000000000000 : @(self.left).hash);
- result = result * 31 + (isnan(self.right) ? (NSUInteger)0x7FF8000000000000 : @(self.right).hash);
- return result;
-}
-- (NSString *)description {
- return
- [NSString stringWithFormat:@"FGMPlatformEdgeInsets(top: %f, bottom: %f, left: %f, right: %f)",
- self.top, self.bottom, self.left, self.right];
-}
-@end
-
-@implementation FGMPlatformLatLng
-+ (instancetype)makeWithLatitude:(double)latitude longitude:(double)longitude {
- FGMPlatformLatLng *pigeonResult = [[FGMPlatformLatLng alloc] init];
- pigeonResult.latitude = latitude;
- pigeonResult.longitude = longitude;
- return pigeonResult;
-}
-+ (FGMPlatformLatLng *)fromList:(NSArray<id> *)list {
- FGMPlatformLatLng *pigeonResult = [[FGMPlatformLatLng alloc] init];
- pigeonResult.latitude = [GetNullableObjectAtIndex(list, 0) doubleValue];
- pigeonResult.longitude = [GetNullableObjectAtIndex(list, 1) doubleValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformLatLng *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformLatLng fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.latitude),
- @(self.longitude),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformLatLng *other = (FGMPlatformLatLng *)object;
- return (self.latitude == other.latitude || (isnan(self.latitude) && isnan(other.latitude))) &&
- (self.longitude == other.longitude || (isnan(self.longitude) && isnan(other.longitude)));
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result =
- result * 31 + (isnan(self.latitude) ? (NSUInteger)0x7FF8000000000000 : @(self.latitude).hash);
- result = result * 31 +
- (isnan(self.longitude) ? (NSUInteger)0x7FF8000000000000 : @(self.longitude).hash);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformLatLng(latitude: %f, longitude: %f)",
- self.latitude, self.longitude];
-}
-@end
-
-@implementation FGMPlatformLatLngBounds
-+ (instancetype)makeWithNortheast:(FGMPlatformLatLng *)northeast
- southwest:(FGMPlatformLatLng *)southwest {
- FGMPlatformLatLngBounds *pigeonResult = [[FGMPlatformLatLngBounds alloc] init];
- pigeonResult.northeast = northeast;
- pigeonResult.southwest = southwest;
- return pigeonResult;
-}
-+ (FGMPlatformLatLngBounds *)fromList:(NSArray<id> *)list {
- FGMPlatformLatLngBounds *pigeonResult = [[FGMPlatformLatLngBounds alloc] init];
- pigeonResult.northeast = GetNullableObjectAtIndex(list, 0);
- pigeonResult.southwest = GetNullableObjectAtIndex(list, 1);
- return pigeonResult;
-}
-+ (nullable FGMPlatformLatLngBounds *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformLatLngBounds fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.northeast ?: [NSNull null],
- self.southwest ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformLatLngBounds *other = (FGMPlatformLatLngBounds *)object;
- return FLTPigeonDeepEquals(self.northeast, other.northeast) &&
- FLTPigeonDeepEquals(self.southwest, other.southwest);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.northeast);
- result = result * 31 + FLTPigeonDeepHash(self.southwest);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformLatLngBounds(northeast: %@, southwest: %@)",
- self.northeast, self.southwest];
-}
-@end
-
-@implementation FGMPlatformCameraTargetBounds
-+ (instancetype)makeWithBounds:(nullable FGMPlatformLatLngBounds *)bounds {
- FGMPlatformCameraTargetBounds *pigeonResult = [[FGMPlatformCameraTargetBounds alloc] init];
- pigeonResult.bounds = bounds;
- return pigeonResult;
-}
-+ (FGMPlatformCameraTargetBounds *)fromList:(NSArray<id> *)list {
- FGMPlatformCameraTargetBounds *pigeonResult = [[FGMPlatformCameraTargetBounds alloc] init];
- pigeonResult.bounds = GetNullableObjectAtIndex(list, 0);
- return pigeonResult;
-}
-+ (nullable FGMPlatformCameraTargetBounds *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformCameraTargetBounds fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.bounds ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformCameraTargetBounds *other = (FGMPlatformCameraTargetBounds *)object;
- return FLTPigeonDeepEquals(self.bounds, other.bounds);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.bounds);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformCameraTargetBounds(bounds: %@)", self.bounds];
-}
-@end
-
-@implementation FGMPlatformGroundOverlay
-+ (instancetype)makeWithGroundOverlayId:(NSString *)groundOverlayId
- image:(FGMPlatformBitmap *)image
- position:(nullable FGMPlatformLatLng *)position
- bounds:(nullable FGMPlatformLatLngBounds *)bounds
- anchor:(nullable FGMPlatformPoint *)anchor
- transparency:(double)transparency
- bearing:(double)bearing
- zIndex:(NSInteger)zIndex
- visible:(BOOL)visible
- clickable:(BOOL)clickable
- zoomLevel:(nullable NSNumber *)zoomLevel {
- FGMPlatformGroundOverlay *pigeonResult = [[FGMPlatformGroundOverlay alloc] init];
- pigeonResult.groundOverlayId = groundOverlayId;
- pigeonResult.image = image;
- pigeonResult.position = position;
- pigeonResult.bounds = bounds;
- pigeonResult.anchor = anchor;
- pigeonResult.transparency = transparency;
- pigeonResult.bearing = bearing;
- pigeonResult.zIndex = zIndex;
- pigeonResult.visible = visible;
- pigeonResult.clickable = clickable;
- pigeonResult.zoomLevel = zoomLevel;
- return pigeonResult;
-}
-+ (FGMPlatformGroundOverlay *)fromList:(NSArray<id> *)list {
- FGMPlatformGroundOverlay *pigeonResult = [[FGMPlatformGroundOverlay alloc] init];
- pigeonResult.groundOverlayId = GetNullableObjectAtIndex(list, 0);
- pigeonResult.image = GetNullableObjectAtIndex(list, 1);
- pigeonResult.position = GetNullableObjectAtIndex(list, 2);
- pigeonResult.bounds = GetNullableObjectAtIndex(list, 3);
- pigeonResult.anchor = GetNullableObjectAtIndex(list, 4);
- pigeonResult.transparency = [GetNullableObjectAtIndex(list, 5) doubleValue];
- pigeonResult.bearing = [GetNullableObjectAtIndex(list, 6) doubleValue];
- pigeonResult.zIndex = [GetNullableObjectAtIndex(list, 7) integerValue];
- pigeonResult.visible = [GetNullableObjectAtIndex(list, 8) boolValue];
- pigeonResult.clickable = [GetNullableObjectAtIndex(list, 9) boolValue];
- pigeonResult.zoomLevel = GetNullableObjectAtIndex(list, 10);
- return pigeonResult;
-}
-+ (nullable FGMPlatformGroundOverlay *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformGroundOverlay fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.groundOverlayId ?: [NSNull null],
- self.image ?: [NSNull null],
- self.position ?: [NSNull null],
- self.bounds ?: [NSNull null],
- self.anchor ?: [NSNull null],
- @(self.transparency),
- @(self.bearing),
- @(self.zIndex),
- @(self.visible),
- @(self.clickable),
- self.zoomLevel ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformGroundOverlay *other = (FGMPlatformGroundOverlay *)object;
- return FLTPigeonDeepEquals(self.groundOverlayId, other.groundOverlayId) &&
- FLTPigeonDeepEquals(self.image, other.image) &&
- FLTPigeonDeepEquals(self.position, other.position) &&
- FLTPigeonDeepEquals(self.bounds, other.bounds) &&
- FLTPigeonDeepEquals(self.anchor, other.anchor) &&
- (self.transparency == other.transparency ||
- (isnan(self.transparency) && isnan(other.transparency))) &&
- (self.bearing == other.bearing || (isnan(self.bearing) && isnan(other.bearing))) &&
- self.zIndex == other.zIndex && self.visible == other.visible &&
- self.clickable == other.clickable && FLTPigeonDeepEquals(self.zoomLevel, other.zoomLevel);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.groundOverlayId);
- result = result * 31 + FLTPigeonDeepHash(self.image);
- result = result * 31 + FLTPigeonDeepHash(self.position);
- result = result * 31 + FLTPigeonDeepHash(self.bounds);
- result = result * 31 + FLTPigeonDeepHash(self.anchor);
- result = result * 31 +
- (isnan(self.transparency) ? (NSUInteger)0x7FF8000000000000 : @(self.transparency).hash);
- result =
- result * 31 + (isnan(self.bearing) ? (NSUInteger)0x7FF8000000000000 : @(self.bearing).hash);
- result = result * 31 + @(self.zIndex).hash;
- result = result * 31 + @(self.visible).hash;
- result = result * 31 + @(self.clickable).hash;
- result = result * 31 + FLTPigeonDeepHash(self.zoomLevel);
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:@"FGMPlatformGroundOverlay(groundOverlayId: %@, image: %@, position: %@, "
- @"bounds: %@, anchor: %@, transparency: %f, bearing: %f, zIndex: %ld, "
- @"visible: %@, clickable: %@, zoomLevel: %@)",
- self.groundOverlayId, self.image, self.position, self.bounds, self.anchor,
- self.transparency, self.bearing, (long)self.zIndex,
- self.visible ? @"true" : @"false", self.clickable ? @"true" : @"false",
- self.zoomLevel];
-}
-@end
-
-@implementation FGMPlatformMapViewCreationParams
-+ (instancetype)
- makeWithInitialCameraPosition:(FGMPlatformCameraPosition *)initialCameraPosition
- mapConfiguration:(FGMPlatformMapConfiguration *)mapConfiguration
- initialCircles:(NSArray<FGMPlatformCircle *> *)initialCircles
- initialMarkers:(NSArray<FGMPlatformMarker *> *)initialMarkers
- initialPolygons:(NSArray<FGMPlatformPolygon *> *)initialPolygons
- initialPolylines:(NSArray<FGMPlatformPolyline *> *)initialPolylines
- initialHeatmaps:(NSArray<FGMPlatformHeatmap *> *)initialHeatmaps
- initialTileOverlays:(NSArray<FGMPlatformTileOverlay *> *)initialTileOverlays
- initialClusterManagers:(NSArray<FGMPlatformClusterManager *> *)initialClusterManagers
- initialGroundOverlays:(NSArray<FGMPlatformGroundOverlay *> *)initialGroundOverlays {
- FGMPlatformMapViewCreationParams *pigeonResult = [[FGMPlatformMapViewCreationParams alloc] init];
- pigeonResult.initialCameraPosition = initialCameraPosition;
- pigeonResult.mapConfiguration = mapConfiguration;
- pigeonResult.initialCircles = initialCircles;
- pigeonResult.initialMarkers = initialMarkers;
- pigeonResult.initialPolygons = initialPolygons;
- pigeonResult.initialPolylines = initialPolylines;
- pigeonResult.initialHeatmaps = initialHeatmaps;
- pigeonResult.initialTileOverlays = initialTileOverlays;
- pigeonResult.initialClusterManagers = initialClusterManagers;
- pigeonResult.initialGroundOverlays = initialGroundOverlays;
- return pigeonResult;
-}
-+ (FGMPlatformMapViewCreationParams *)fromList:(NSArray<id> *)list {
- FGMPlatformMapViewCreationParams *pigeonResult = [[FGMPlatformMapViewCreationParams alloc] init];
- pigeonResult.initialCameraPosition = GetNullableObjectAtIndex(list, 0);
- pigeonResult.mapConfiguration = GetNullableObjectAtIndex(list, 1);
- pigeonResult.initialCircles = GetNullableObjectAtIndex(list, 2);
- pigeonResult.initialMarkers = GetNullableObjectAtIndex(list, 3);
- pigeonResult.initialPolygons = GetNullableObjectAtIndex(list, 4);
- pigeonResult.initialPolylines = GetNullableObjectAtIndex(list, 5);
- pigeonResult.initialHeatmaps = GetNullableObjectAtIndex(list, 6);
- pigeonResult.initialTileOverlays = GetNullableObjectAtIndex(list, 7);
- pigeonResult.initialClusterManagers = GetNullableObjectAtIndex(list, 8);
- pigeonResult.initialGroundOverlays = GetNullableObjectAtIndex(list, 9);
- return pigeonResult;
-}
-+ (nullable FGMPlatformMapViewCreationParams *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformMapViewCreationParams fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.initialCameraPosition ?: [NSNull null],
- self.mapConfiguration ?: [NSNull null],
- self.initialCircles ?: [NSNull null],
- self.initialMarkers ?: [NSNull null],
- self.initialPolygons ?: [NSNull null],
- self.initialPolylines ?: [NSNull null],
- self.initialHeatmaps ?: [NSNull null],
- self.initialTileOverlays ?: [NSNull null],
- self.initialClusterManagers ?: [NSNull null],
- self.initialGroundOverlays ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformMapViewCreationParams *other = (FGMPlatformMapViewCreationParams *)object;
- return FLTPigeonDeepEquals(self.initialCameraPosition, other.initialCameraPosition) &&
- FLTPigeonDeepEquals(self.mapConfiguration, other.mapConfiguration) &&
- FLTPigeonDeepEquals(self.initialCircles, other.initialCircles) &&
- FLTPigeonDeepEquals(self.initialMarkers, other.initialMarkers) &&
- FLTPigeonDeepEquals(self.initialPolygons, other.initialPolygons) &&
- FLTPigeonDeepEquals(self.initialPolylines, other.initialPolylines) &&
- FLTPigeonDeepEquals(self.initialHeatmaps, other.initialHeatmaps) &&
- FLTPigeonDeepEquals(self.initialTileOverlays, other.initialTileOverlays) &&
- FLTPigeonDeepEquals(self.initialClusterManagers, other.initialClusterManagers) &&
- FLTPigeonDeepEquals(self.initialGroundOverlays, other.initialGroundOverlays);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.initialCameraPosition);
- result = result * 31 + FLTPigeonDeepHash(self.mapConfiguration);
- result = result * 31 + FLTPigeonDeepHash(self.initialCircles);
- result = result * 31 + FLTPigeonDeepHash(self.initialMarkers);
- result = result * 31 + FLTPigeonDeepHash(self.initialPolygons);
- result = result * 31 + FLTPigeonDeepHash(self.initialPolylines);
- result = result * 31 + FLTPigeonDeepHash(self.initialHeatmaps);
- result = result * 31 + FLTPigeonDeepHash(self.initialTileOverlays);
- result = result * 31 + FLTPigeonDeepHash(self.initialClusterManagers);
- result = result * 31 + FLTPigeonDeepHash(self.initialGroundOverlays);
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:
- @"FGMPlatformMapViewCreationParams(initialCameraPosition: %@, mapConfiguration: %@, "
- @"initialCircles: %@, initialMarkers: %@, initialPolygons: %@, initialPolylines: %@, "
- @"initialHeatmaps: %@, initialTileOverlays: %@, initialClusterManagers: %@, "
- @"initialGroundOverlays: %@)",
- self.initialCameraPosition, self.mapConfiguration, self.initialCircles,
- self.initialMarkers, self.initialPolygons, self.initialPolylines, self.initialHeatmaps,
- self.initialTileOverlays, self.initialClusterManagers, self.initialGroundOverlays];
-}
-@end
-
-@implementation FGMPlatformMapConfiguration
-+ (instancetype)makeWithCompassEnabled:(nullable NSNumber *)compassEnabled
- cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds
- mapType:(nullable FGMPlatformMapTypeBox *)mapType
- minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference
- rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled
- scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled
- tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled
- trackCameraPosition:(nullable NSNumber *)trackCameraPosition
- zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled
- myLocationEnabled:(nullable NSNumber *)myLocationEnabled
- myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled
- padding:(nullable FGMPlatformEdgeInsets *)padding
- indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled
- trafficEnabled:(nullable NSNumber *)trafficEnabled
- buildingsEnabled:(nullable NSNumber *)buildingsEnabled
- markerType:(FGMPlatformMarkerType)markerType
- mapId:(nullable NSString *)mapId
- style:(nullable NSString *)style {
- FGMPlatformMapConfiguration *pigeonResult = [[FGMPlatformMapConfiguration alloc] init];
- pigeonResult.compassEnabled = compassEnabled;
- pigeonResult.cameraTargetBounds = cameraTargetBounds;
- pigeonResult.mapType = mapType;
- pigeonResult.minMaxZoomPreference = minMaxZoomPreference;
- pigeonResult.rotateGesturesEnabled = rotateGesturesEnabled;
- pigeonResult.scrollGesturesEnabled = scrollGesturesEnabled;
- pigeonResult.tiltGesturesEnabled = tiltGesturesEnabled;
- pigeonResult.trackCameraPosition = trackCameraPosition;
- pigeonResult.zoomGesturesEnabled = zoomGesturesEnabled;
- pigeonResult.myLocationEnabled = myLocationEnabled;
- pigeonResult.myLocationButtonEnabled = myLocationButtonEnabled;
- pigeonResult.padding = padding;
- pigeonResult.indoorViewEnabled = indoorViewEnabled;
- pigeonResult.trafficEnabled = trafficEnabled;
- pigeonResult.buildingsEnabled = buildingsEnabled;
- pigeonResult.markerType = markerType;
- pigeonResult.mapId = mapId;
- pigeonResult.style = style;
- return pigeonResult;
-}
-+ (FGMPlatformMapConfiguration *)fromList:(NSArray<id> *)list {
- FGMPlatformMapConfiguration *pigeonResult = [[FGMPlatformMapConfiguration alloc] init];
- pigeonResult.compassEnabled = GetNullableObjectAtIndex(list, 0);
- pigeonResult.cameraTargetBounds = GetNullableObjectAtIndex(list, 1);
- pigeonResult.mapType = GetNullableObjectAtIndex(list, 2);
- pigeonResult.minMaxZoomPreference = GetNullableObjectAtIndex(list, 3);
- pigeonResult.rotateGesturesEnabled = GetNullableObjectAtIndex(list, 4);
- pigeonResult.scrollGesturesEnabled = GetNullableObjectAtIndex(list, 5);
- pigeonResult.tiltGesturesEnabled = GetNullableObjectAtIndex(list, 6);
- pigeonResult.trackCameraPosition = GetNullableObjectAtIndex(list, 7);
- pigeonResult.zoomGesturesEnabled = GetNullableObjectAtIndex(list, 8);
- pigeonResult.myLocationEnabled = GetNullableObjectAtIndex(list, 9);
- pigeonResult.myLocationButtonEnabled = GetNullableObjectAtIndex(list, 10);
- pigeonResult.padding = GetNullableObjectAtIndex(list, 11);
- pigeonResult.indoorViewEnabled = GetNullableObjectAtIndex(list, 12);
- pigeonResult.trafficEnabled = GetNullableObjectAtIndex(list, 13);
- pigeonResult.buildingsEnabled = GetNullableObjectAtIndex(list, 14);
- FGMPlatformMarkerTypeBox *boxedFGMPlatformMarkerType = GetNullableObjectAtIndex(list, 15);
- pigeonResult.markerType = boxedFGMPlatformMarkerType.value;
- pigeonResult.mapId = GetNullableObjectAtIndex(list, 16);
- pigeonResult.style = GetNullableObjectAtIndex(list, 17);
- return pigeonResult;
-}
-+ (nullable FGMPlatformMapConfiguration *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformMapConfiguration fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.compassEnabled ?: [NSNull null],
- self.cameraTargetBounds ?: [NSNull null],
- self.mapType ?: [NSNull null],
- self.minMaxZoomPreference ?: [NSNull null],
- self.rotateGesturesEnabled ?: [NSNull null],
- self.scrollGesturesEnabled ?: [NSNull null],
- self.tiltGesturesEnabled ?: [NSNull null],
- self.trackCameraPosition ?: [NSNull null],
- self.zoomGesturesEnabled ?: [NSNull null],
- self.myLocationEnabled ?: [NSNull null],
- self.myLocationButtonEnabled ?: [NSNull null],
- self.padding ?: [NSNull null],
- self.indoorViewEnabled ?: [NSNull null],
- self.trafficEnabled ?: [NSNull null],
- self.buildingsEnabled ?: [NSNull null],
- [[FGMPlatformMarkerTypeBox alloc] initWithValue:self.markerType],
- self.mapId ?: [NSNull null],
- self.style ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformMapConfiguration *other = (FGMPlatformMapConfiguration *)object;
- return FLTPigeonDeepEquals(self.compassEnabled, other.compassEnabled) &&
- FLTPigeonDeepEquals(self.cameraTargetBounds, other.cameraTargetBounds) &&
- FLTPigeonDeepEquals(self.mapType, other.mapType) &&
- FLTPigeonDeepEquals(self.minMaxZoomPreference, other.minMaxZoomPreference) &&
- FLTPigeonDeepEquals(self.rotateGesturesEnabled, other.rotateGesturesEnabled) &&
- FLTPigeonDeepEquals(self.scrollGesturesEnabled, other.scrollGesturesEnabled) &&
- FLTPigeonDeepEquals(self.tiltGesturesEnabled, other.tiltGesturesEnabled) &&
- FLTPigeonDeepEquals(self.trackCameraPosition, other.trackCameraPosition) &&
- FLTPigeonDeepEquals(self.zoomGesturesEnabled, other.zoomGesturesEnabled) &&
- FLTPigeonDeepEquals(self.myLocationEnabled, other.myLocationEnabled) &&
- FLTPigeonDeepEquals(self.myLocationButtonEnabled, other.myLocationButtonEnabled) &&
- FLTPigeonDeepEquals(self.padding, other.padding) &&
- FLTPigeonDeepEquals(self.indoorViewEnabled, other.indoorViewEnabled) &&
- FLTPigeonDeepEquals(self.trafficEnabled, other.trafficEnabled) &&
- FLTPigeonDeepEquals(self.buildingsEnabled, other.buildingsEnabled) &&
- self.markerType == other.markerType && FLTPigeonDeepEquals(self.mapId, other.mapId) &&
- FLTPigeonDeepEquals(self.style, other.style);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.compassEnabled);
- result = result * 31 + FLTPigeonDeepHash(self.cameraTargetBounds);
- result = result * 31 + FLTPigeonDeepHash(self.mapType);
- result = result * 31 + FLTPigeonDeepHash(self.minMaxZoomPreference);
- result = result * 31 + FLTPigeonDeepHash(self.rotateGesturesEnabled);
- result = result * 31 + FLTPigeonDeepHash(self.scrollGesturesEnabled);
- result = result * 31 + FLTPigeonDeepHash(self.tiltGesturesEnabled);
- result = result * 31 + FLTPigeonDeepHash(self.trackCameraPosition);
- result = result * 31 + FLTPigeonDeepHash(self.zoomGesturesEnabled);
- result = result * 31 + FLTPigeonDeepHash(self.myLocationEnabled);
- result = result * 31 + FLTPigeonDeepHash(self.myLocationButtonEnabled);
- result = result * 31 + FLTPigeonDeepHash(self.padding);
- result = result * 31 + FLTPigeonDeepHash(self.indoorViewEnabled);
- result = result * 31 + FLTPigeonDeepHash(self.trafficEnabled);
- result = result * 31 + FLTPigeonDeepHash(self.buildingsEnabled);
- result = result * 31 + @(self.markerType).hash;
- result = result * 31 + FLTPigeonDeepHash(self.mapId);
- result = result * 31 + FLTPigeonDeepHash(self.style);
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:
- @"FGMPlatformMapConfiguration(compassEnabled: %@, cameraTargetBounds: %@, mapType: %@, "
- @"minMaxZoomPreference: %@, rotateGesturesEnabled: %@, scrollGesturesEnabled: %@, "
- @"tiltGesturesEnabled: %@, trackCameraPosition: %@, zoomGesturesEnabled: %@, "
- @"myLocationEnabled: %@, myLocationButtonEnabled: %@, padding: %@, indoorViewEnabled: "
- @"%@, trafficEnabled: %@, buildingsEnabled: %@, markerType: %ld, mapId: %@, style: %@)",
- self.compassEnabled, self.cameraTargetBounds, self.mapType, self.minMaxZoomPreference,
- self.rotateGesturesEnabled, self.scrollGesturesEnabled, self.tiltGesturesEnabled,
- self.trackCameraPosition, self.zoomGesturesEnabled, self.myLocationEnabled,
- self.myLocationButtonEnabled, self.padding, self.indoorViewEnabled, self.trafficEnabled,
- self.buildingsEnabled, (long)self.markerType, self.mapId, self.style];
-}
-@end
-
-@implementation FGMPlatformPoint
-+ (instancetype)makeWithX:(double)x y:(double)y {
- FGMPlatformPoint *pigeonResult = [[FGMPlatformPoint alloc] init];
- pigeonResult.x = x;
- pigeonResult.y = y;
- return pigeonResult;
-}
-+ (FGMPlatformPoint *)fromList:(NSArray<id> *)list {
- FGMPlatformPoint *pigeonResult = [[FGMPlatformPoint alloc] init];
- pigeonResult.x = [GetNullableObjectAtIndex(list, 0) doubleValue];
- pigeonResult.y = [GetNullableObjectAtIndex(list, 1) doubleValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformPoint *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformPoint fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.x),
- @(self.y),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformPoint *other = (FGMPlatformPoint *)object;
- return (self.x == other.x || (isnan(self.x) && isnan(other.x))) &&
- (self.y == other.y || (isnan(self.y) && isnan(other.y)));
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + (isnan(self.x) ? (NSUInteger)0x7FF8000000000000 : @(self.x).hash);
- result = result * 31 + (isnan(self.y) ? (NSUInteger)0x7FF8000000000000 : @(self.y).hash);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformPoint(x: %f, y: %f)", self.x, self.y];
-}
-@end
-
-@implementation FGMPlatformSize
-+ (instancetype)makeWithWidth:(double)width height:(double)height {
- FGMPlatformSize *pigeonResult = [[FGMPlatformSize alloc] init];
- pigeonResult.width = width;
- pigeonResult.height = height;
- return pigeonResult;
-}
-+ (FGMPlatformSize *)fromList:(NSArray<id> *)list {
- FGMPlatformSize *pigeonResult = [[FGMPlatformSize alloc] init];
- pigeonResult.width = [GetNullableObjectAtIndex(list, 0) doubleValue];
- pigeonResult.height = [GetNullableObjectAtIndex(list, 1) doubleValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformSize *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformSize fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.width),
- @(self.height),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformSize *other = (FGMPlatformSize *)object;
- return (self.width == other.width || (isnan(self.width) && isnan(other.width))) &&
- (self.height == other.height || (isnan(self.height) && isnan(other.height)));
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + (isnan(self.width) ? (NSUInteger)0x7FF8000000000000 : @(self.width).hash);
- result =
- result * 31 + (isnan(self.height) ? (NSUInteger)0x7FF8000000000000 : @(self.height).hash);
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:@"FGMPlatformSize(width: %f, height: %f)", self.width, self.height];
-}
-@end
-
-@implementation FGMPlatformColor
-+ (instancetype)makeWithRed:(double)red green:(double)green blue:(double)blue alpha:(double)alpha {
- FGMPlatformColor *pigeonResult = [[FGMPlatformColor alloc] init];
- pigeonResult.red = red;
- pigeonResult.green = green;
- pigeonResult.blue = blue;
- pigeonResult.alpha = alpha;
- return pigeonResult;
-}
-+ (FGMPlatformColor *)fromList:(NSArray<id> *)list {
- FGMPlatformColor *pigeonResult = [[FGMPlatformColor alloc] init];
- pigeonResult.red = [GetNullableObjectAtIndex(list, 0) doubleValue];
- pigeonResult.green = [GetNullableObjectAtIndex(list, 1) doubleValue];
- pigeonResult.blue = [GetNullableObjectAtIndex(list, 2) doubleValue];
- pigeonResult.alpha = [GetNullableObjectAtIndex(list, 3) doubleValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformColor *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformColor fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.red),
- @(self.green),
- @(self.blue),
- @(self.alpha),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformColor *other = (FGMPlatformColor *)object;
- return (self.red == other.red || (isnan(self.red) && isnan(other.red))) &&
- (self.green == other.green || (isnan(self.green) && isnan(other.green))) &&
- (self.blue == other.blue || (isnan(self.blue) && isnan(other.blue))) &&
- (self.alpha == other.alpha || (isnan(self.alpha) && isnan(other.alpha)));
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + (isnan(self.red) ? (NSUInteger)0x7FF8000000000000 : @(self.red).hash);
- result = result * 31 + (isnan(self.green) ? (NSUInteger)0x7FF8000000000000 : @(self.green).hash);
- result = result * 31 + (isnan(self.blue) ? (NSUInteger)0x7FF8000000000000 : @(self.blue).hash);
- result = result * 31 + (isnan(self.alpha) ? (NSUInteger)0x7FF8000000000000 : @(self.alpha).hash);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformColor(red: %f, green: %f, blue: %f, alpha: %f)",
- self.red, self.green, self.blue, self.alpha];
-}
-@end
-
-@implementation FGMPlatformTileLayer
-+ (instancetype)makeWithVisible:(BOOL)visible
- fadeIn:(BOOL)fadeIn
- opacity:(double)opacity
- zIndex:(NSInteger)zIndex {
- FGMPlatformTileLayer *pigeonResult = [[FGMPlatformTileLayer alloc] init];
- pigeonResult.visible = visible;
- pigeonResult.fadeIn = fadeIn;
- pigeonResult.opacity = opacity;
- pigeonResult.zIndex = zIndex;
- return pigeonResult;
-}
-+ (FGMPlatformTileLayer *)fromList:(NSArray<id> *)list {
- FGMPlatformTileLayer *pigeonResult = [[FGMPlatformTileLayer alloc] init];
- pigeonResult.visible = [GetNullableObjectAtIndex(list, 0) boolValue];
- pigeonResult.fadeIn = [GetNullableObjectAtIndex(list, 1) boolValue];
- pigeonResult.opacity = [GetNullableObjectAtIndex(list, 2) doubleValue];
- pigeonResult.zIndex = [GetNullableObjectAtIndex(list, 3) integerValue];
- return pigeonResult;
-}
-+ (nullable FGMPlatformTileLayer *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformTileLayer fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- @(self.visible),
- @(self.fadeIn),
- @(self.opacity),
- @(self.zIndex),
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformTileLayer *other = (FGMPlatformTileLayer *)object;
- return self.visible == other.visible && self.fadeIn == other.fadeIn &&
- (self.opacity == other.opacity || (isnan(self.opacity) && isnan(other.opacity))) &&
- self.zIndex == other.zIndex;
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + @(self.visible).hash;
- result = result * 31 + @(self.fadeIn).hash;
- result =
- result * 31 + (isnan(self.opacity) ? (NSUInteger)0x7FF8000000000000 : @(self.opacity).hash);
- result = result * 31 + @(self.zIndex).hash;
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:@"FGMPlatformTileLayer(visible: %@, fadeIn: %@, opacity: %f, zIndex: %ld)",
- self.visible ? @"true" : @"false", self.fadeIn ? @"true" : @"false",
- self.opacity, (long)self.zIndex];
-}
-@end
-
-@implementation FGMPlatformZoomRange
-+ (instancetype)makeWithMin:(nullable NSNumber *)min max:(nullable NSNumber *)max {
- FGMPlatformZoomRange *pigeonResult = [[FGMPlatformZoomRange alloc] init];
- pigeonResult.min = min;
- pigeonResult.max = max;
- return pigeonResult;
-}
-+ (FGMPlatformZoomRange *)fromList:(NSArray<id> *)list {
- FGMPlatformZoomRange *pigeonResult = [[FGMPlatformZoomRange alloc] init];
- pigeonResult.min = GetNullableObjectAtIndex(list, 0);
- pigeonResult.max = GetNullableObjectAtIndex(list, 1);
- return pigeonResult;
-}
-+ (nullable FGMPlatformZoomRange *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformZoomRange fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.min ?: [NSNull null],
- self.max ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformZoomRange *other = (FGMPlatformZoomRange *)object;
- return FLTPigeonDeepEquals(self.min, other.min) && FLTPigeonDeepEquals(self.max, other.max);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.min);
- result = result * 31 + FLTPigeonDeepHash(self.max);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformZoomRange(min: %@, max: %@)", self.min, self.max];
-}
-@end
-
-@implementation FGMPlatformBitmap
-+ (instancetype)makeWithBitmap:(id)bitmap {
- FGMPlatformBitmap *pigeonResult = [[FGMPlatformBitmap alloc] init];
- pigeonResult.bitmap = bitmap;
- return pigeonResult;
-}
-+ (FGMPlatformBitmap *)fromList:(NSArray<id> *)list {
- FGMPlatformBitmap *pigeonResult = [[FGMPlatformBitmap alloc] init];
- pigeonResult.bitmap = GetNullableObjectAtIndex(list, 0);
- return pigeonResult;
-}
-+ (nullable FGMPlatformBitmap *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformBitmap fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.bitmap ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformBitmap *other = (FGMPlatformBitmap *)object;
- return FLTPigeonDeepEquals(self.bitmap, other.bitmap);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.bitmap);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformBitmap(bitmap: %@)", self.bitmap];
-}
-@end
-
-@implementation FGMPlatformBitmapDefaultMarker
-+ (instancetype)makeWithHue:(nullable NSNumber *)hue {
- FGMPlatformBitmapDefaultMarker *pigeonResult = [[FGMPlatformBitmapDefaultMarker alloc] init];
- pigeonResult.hue = hue;
- return pigeonResult;
-}
-+ (FGMPlatformBitmapDefaultMarker *)fromList:(NSArray<id> *)list {
- FGMPlatformBitmapDefaultMarker *pigeonResult = [[FGMPlatformBitmapDefaultMarker alloc] init];
- pigeonResult.hue = GetNullableObjectAtIndex(list, 0);
- return pigeonResult;
-}
-+ (nullable FGMPlatformBitmapDefaultMarker *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformBitmapDefaultMarker fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.hue ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformBitmapDefaultMarker *other = (FGMPlatformBitmapDefaultMarker *)object;
- return FLTPigeonDeepEquals(self.hue, other.hue);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.hue);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformBitmapDefaultMarker(hue: %@)", self.hue];
-}
-@end
-
-@implementation FGMPlatformBitmapBytes
-+ (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData
- size:(nullable FGMPlatformSize *)size {
- FGMPlatformBitmapBytes *pigeonResult = [[FGMPlatformBitmapBytes alloc] init];
- pigeonResult.byteData = byteData;
- pigeonResult.size = size;
- return pigeonResult;
-}
-+ (FGMPlatformBitmapBytes *)fromList:(NSArray<id> *)list {
- FGMPlatformBitmapBytes *pigeonResult = [[FGMPlatformBitmapBytes alloc] init];
- pigeonResult.byteData = GetNullableObjectAtIndex(list, 0);
- pigeonResult.size = GetNullableObjectAtIndex(list, 1);
- return pigeonResult;
-}
-+ (nullable FGMPlatformBitmapBytes *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformBitmapBytes fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.byteData ?: [NSNull null],
- self.size ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformBitmapBytes *other = (FGMPlatformBitmapBytes *)object;
- return FLTPigeonDeepEquals(self.byteData, other.byteData) &&
- FLTPigeonDeepEquals(self.size, other.size);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.byteData);
- result = result * 31 + FLTPigeonDeepHash(self.size);
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:@"FGMPlatformBitmapBytes(byteData: %@, size: %@)", self.byteData, self.size];
-}
-@end
-
-@implementation FGMPlatformBitmapAsset
-+ (instancetype)makeWithName:(NSString *)name pkg:(nullable NSString *)pkg {
- FGMPlatformBitmapAsset *pigeonResult = [[FGMPlatformBitmapAsset alloc] init];
- pigeonResult.name = name;
- pigeonResult.pkg = pkg;
- return pigeonResult;
-}
-+ (FGMPlatformBitmapAsset *)fromList:(NSArray<id> *)list {
- FGMPlatformBitmapAsset *pigeonResult = [[FGMPlatformBitmapAsset alloc] init];
- pigeonResult.name = GetNullableObjectAtIndex(list, 0);
- pigeonResult.pkg = GetNullableObjectAtIndex(list, 1);
- return pigeonResult;
-}
-+ (nullable FGMPlatformBitmapAsset *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformBitmapAsset fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.name ?: [NSNull null],
- self.pkg ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformBitmapAsset *other = (FGMPlatformBitmapAsset *)object;
- return FLTPigeonDeepEquals(self.name, other.name) && FLTPigeonDeepEquals(self.pkg, other.pkg);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.name);
- result = result * 31 + FLTPigeonDeepHash(self.pkg);
- return result;
-}
-- (NSString *)description {
- return
- [NSString stringWithFormat:@"FGMPlatformBitmapAsset(name: %@, pkg: %@)", self.name, self.pkg];
-}
-@end
-
-@implementation FGMPlatformBitmapAssetImage
-+ (instancetype)makeWithName:(NSString *)name
- scale:(double)scale
- size:(nullable FGMPlatformSize *)size {
- FGMPlatformBitmapAssetImage *pigeonResult = [[FGMPlatformBitmapAssetImage alloc] init];
- pigeonResult.name = name;
- pigeonResult.scale = scale;
- pigeonResult.size = size;
- return pigeonResult;
-}
-+ (FGMPlatformBitmapAssetImage *)fromList:(NSArray<id> *)list {
- FGMPlatformBitmapAssetImage *pigeonResult = [[FGMPlatformBitmapAssetImage alloc] init];
- pigeonResult.name = GetNullableObjectAtIndex(list, 0);
- pigeonResult.scale = [GetNullableObjectAtIndex(list, 1) doubleValue];
- pigeonResult.size = GetNullableObjectAtIndex(list, 2);
- return pigeonResult;
-}
-+ (nullable FGMPlatformBitmapAssetImage *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformBitmapAssetImage fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.name ?: [NSNull null],
- @(self.scale),
- self.size ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformBitmapAssetImage *other = (FGMPlatformBitmapAssetImage *)object;
- return FLTPigeonDeepEquals(self.name, other.name) &&
- (self.scale == other.scale || (isnan(self.scale) && isnan(other.scale))) &&
- FLTPigeonDeepEquals(self.size, other.size);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.name);
- result = result * 31 + (isnan(self.scale) ? (NSUInteger)0x7FF8000000000000 : @(self.scale).hash);
- result = result * 31 + FLTPigeonDeepHash(self.size);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformBitmapAssetImage(name: %@, scale: %f, size: %@)",
- self.name, self.scale, self.size];
-}
-@end
-
-@implementation FGMPlatformBitmapAssetMap
-+ (instancetype)makeWithAssetName:(NSString *)assetName
- bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling
- imagePixelRatio:(double)imagePixelRatio
- width:(nullable NSNumber *)width
- height:(nullable NSNumber *)height {
- FGMPlatformBitmapAssetMap *pigeonResult = [[FGMPlatformBitmapAssetMap alloc] init];
- pigeonResult.assetName = assetName;
- pigeonResult.bitmapScaling = bitmapScaling;
- pigeonResult.imagePixelRatio = imagePixelRatio;
- pigeonResult.width = width;
- pigeonResult.height = height;
- return pigeonResult;
-}
-+ (FGMPlatformBitmapAssetMap *)fromList:(NSArray<id> *)list {
- FGMPlatformBitmapAssetMap *pigeonResult = [[FGMPlatformBitmapAssetMap alloc] init];
- pigeonResult.assetName = GetNullableObjectAtIndex(list, 0);
- FGMPlatformMapBitmapScalingBox *boxedFGMPlatformMapBitmapScaling =
- GetNullableObjectAtIndex(list, 1);
- pigeonResult.bitmapScaling = boxedFGMPlatformMapBitmapScaling.value;
- pigeonResult.imagePixelRatio = [GetNullableObjectAtIndex(list, 2) doubleValue];
- pigeonResult.width = GetNullableObjectAtIndex(list, 3);
- pigeonResult.height = GetNullableObjectAtIndex(list, 4);
- return pigeonResult;
-}
-+ (nullable FGMPlatformBitmapAssetMap *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformBitmapAssetMap fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.assetName ?: [NSNull null],
- [[FGMPlatformMapBitmapScalingBox alloc] initWithValue:self.bitmapScaling],
- @(self.imagePixelRatio),
- self.width ?: [NSNull null],
- self.height ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformBitmapAssetMap *other = (FGMPlatformBitmapAssetMap *)object;
- return FLTPigeonDeepEquals(self.assetName, other.assetName) &&
- self.bitmapScaling == other.bitmapScaling &&
- (self.imagePixelRatio == other.imagePixelRatio ||
- (isnan(self.imagePixelRatio) && isnan(other.imagePixelRatio))) &&
- FLTPigeonDeepEquals(self.width, other.width) &&
- FLTPigeonDeepEquals(self.height, other.height);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.assetName);
- result = result * 31 + @(self.bitmapScaling).hash;
- result = result * 31 + (isnan(self.imagePixelRatio) ? (NSUInteger)0x7FF8000000000000
- : @(self.imagePixelRatio).hash);
- result = result * 31 + FLTPigeonDeepHash(self.width);
- result = result * 31 + FLTPigeonDeepHash(self.height);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformBitmapAssetMap(assetName: %@, bitmapScaling: %ld, "
- @"imagePixelRatio: %f, width: %@, height: %@)",
- self.assetName, (long)self.bitmapScaling, self.imagePixelRatio,
- self.width, self.height];
-}
-@end
-
-@implementation FGMPlatformBitmapBytesMap
-+ (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData
- bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling
- imagePixelRatio:(double)imagePixelRatio
- width:(nullable NSNumber *)width
- height:(nullable NSNumber *)height {
- FGMPlatformBitmapBytesMap *pigeonResult = [[FGMPlatformBitmapBytesMap alloc] init];
- pigeonResult.byteData = byteData;
- pigeonResult.bitmapScaling = bitmapScaling;
- pigeonResult.imagePixelRatio = imagePixelRatio;
- pigeonResult.width = width;
- pigeonResult.height = height;
- return pigeonResult;
-}
-+ (FGMPlatformBitmapBytesMap *)fromList:(NSArray<id> *)list {
- FGMPlatformBitmapBytesMap *pigeonResult = [[FGMPlatformBitmapBytesMap alloc] init];
- pigeonResult.byteData = GetNullableObjectAtIndex(list, 0);
- FGMPlatformMapBitmapScalingBox *boxedFGMPlatformMapBitmapScaling =
- GetNullableObjectAtIndex(list, 1);
- pigeonResult.bitmapScaling = boxedFGMPlatformMapBitmapScaling.value;
- pigeonResult.imagePixelRatio = [GetNullableObjectAtIndex(list, 2) doubleValue];
- pigeonResult.width = GetNullableObjectAtIndex(list, 3);
- pigeonResult.height = GetNullableObjectAtIndex(list, 4);
- return pigeonResult;
-}
-+ (nullable FGMPlatformBitmapBytesMap *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformBitmapBytesMap fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.byteData ?: [NSNull null],
- [[FGMPlatformMapBitmapScalingBox alloc] initWithValue:self.bitmapScaling],
- @(self.imagePixelRatio),
- self.width ?: [NSNull null],
- self.height ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformBitmapBytesMap *other = (FGMPlatformBitmapBytesMap *)object;
- return FLTPigeonDeepEquals(self.byteData, other.byteData) &&
- self.bitmapScaling == other.bitmapScaling &&
- (self.imagePixelRatio == other.imagePixelRatio ||
- (isnan(self.imagePixelRatio) && isnan(other.imagePixelRatio))) &&
- FLTPigeonDeepEquals(self.width, other.width) &&
- FLTPigeonDeepEquals(self.height, other.height);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.byteData);
- result = result * 31 + @(self.bitmapScaling).hash;
- result = result * 31 + (isnan(self.imagePixelRatio) ? (NSUInteger)0x7FF8000000000000
- : @(self.imagePixelRatio).hash);
- result = result * 31 + FLTPigeonDeepHash(self.width);
- result = result * 31 + FLTPigeonDeepHash(self.height);
- return result;
-}
-- (NSString *)description {
- return [NSString stringWithFormat:@"FGMPlatformBitmapBytesMap(byteData: %@, bitmapScaling: %ld, "
- @"imagePixelRatio: %f, width: %@, height: %@)",
- self.byteData, (long)self.bitmapScaling, self.imagePixelRatio,
- self.width, self.height];
-}
-@end
-
-@implementation FGMPlatformBitmapPinConfig
-+ (instancetype)makeWithBackgroundColor:(nullable FGMPlatformColor *)backgroundColor
- borderColor:(nullable FGMPlatformColor *)borderColor
- glyphColor:(nullable FGMPlatformColor *)glyphColor
- glyphTextColor:(nullable FGMPlatformColor *)glyphTextColor
- glyphText:(nullable NSString *)glyphText
- glyphBitmap:(nullable FGMPlatformBitmap *)glyphBitmap {
- FGMPlatformBitmapPinConfig *pigeonResult = [[FGMPlatformBitmapPinConfig alloc] init];
- pigeonResult.backgroundColor = backgroundColor;
- pigeonResult.borderColor = borderColor;
- pigeonResult.glyphColor = glyphColor;
- pigeonResult.glyphTextColor = glyphTextColor;
- pigeonResult.glyphText = glyphText;
- pigeonResult.glyphBitmap = glyphBitmap;
- return pigeonResult;
-}
-+ (FGMPlatformBitmapPinConfig *)fromList:(NSArray<id> *)list {
- FGMPlatformBitmapPinConfig *pigeonResult = [[FGMPlatformBitmapPinConfig alloc] init];
- pigeonResult.backgroundColor = GetNullableObjectAtIndex(list, 0);
- pigeonResult.borderColor = GetNullableObjectAtIndex(list, 1);
- pigeonResult.glyphColor = GetNullableObjectAtIndex(list, 2);
- pigeonResult.glyphTextColor = GetNullableObjectAtIndex(list, 3);
- pigeonResult.glyphText = GetNullableObjectAtIndex(list, 4);
- pigeonResult.glyphBitmap = GetNullableObjectAtIndex(list, 5);
- return pigeonResult;
-}
-+ (nullable FGMPlatformBitmapPinConfig *)nullableFromList:(NSArray<id> *)list {
- return (list) ? [FGMPlatformBitmapPinConfig fromList:list] : nil;
-}
-- (NSArray<id> *)toList {
- return @[
- self.backgroundColor ?: [NSNull null],
- self.borderColor ?: [NSNull null],
- self.glyphColor ?: [NSNull null],
- self.glyphTextColor ?: [NSNull null],
- self.glyphText ?: [NSNull null],
- self.glyphBitmap ?: [NSNull null],
- ];
-}
-- (BOOL)isEqual:(id)object {
- if (self == object) {
- return YES;
- }
- if (![object isKindOfClass:[self class]]) {
- return NO;
- }
- FGMPlatformBitmapPinConfig *other = (FGMPlatformBitmapPinConfig *)object;
- return FLTPigeonDeepEquals(self.backgroundColor, other.backgroundColor) &&
- FLTPigeonDeepEquals(self.borderColor, other.borderColor) &&
- FLTPigeonDeepEquals(self.glyphColor, other.glyphColor) &&
- FLTPigeonDeepEquals(self.glyphTextColor, other.glyphTextColor) &&
- FLTPigeonDeepEquals(self.glyphText, other.glyphText) &&
- FLTPigeonDeepEquals(self.glyphBitmap, other.glyphBitmap);
-}
-
-- (NSUInteger)hash {
- NSUInteger result = [self class].hash;
- result = result * 31 + FLTPigeonDeepHash(self.backgroundColor);
- result = result * 31 + FLTPigeonDeepHash(self.borderColor);
- result = result * 31 + FLTPigeonDeepHash(self.glyphColor);
- result = result * 31 + FLTPigeonDeepHash(self.glyphTextColor);
- result = result * 31 + FLTPigeonDeepHash(self.glyphText);
- result = result * 31 + FLTPigeonDeepHash(self.glyphBitmap);
- return result;
-}
-- (NSString *)description {
- return [NSString
- stringWithFormat:@"FGMPlatformBitmapPinConfig(backgroundColor: %@, borderColor: %@, "
- @"glyphColor: %@, glyphTextColor: %@, glyphText: %@, glyphBitmap: %@)",
- self.backgroundColor, self.borderColor, self.glyphColor, self.glyphTextColor,
- self.glyphText, self.glyphBitmap];
-}
-@end
-
-@interface FGMGoogleMapsFlutterPigeonMessagesPigeonCodecReader : FlutterStandardReader
-@end
-@implementation FGMGoogleMapsFlutterPigeonMessagesPigeonCodecReader
-- (nullable id)readValueOfType:(UInt8)type {
- switch (type) {
- case 129: {
- NSNumber *enumAsNumber = [self readValue];
- return enumAsNumber == nil
- ? nil
- : [[FGMPlatformMapTypeBox alloc] initWithValue:[enumAsNumber integerValue]];
- }
- case 130: {
- NSNumber *enumAsNumber = [self readValue];
- return enumAsNumber == nil ? nil
- : [[FGMPlatformMarkerCollisionBehaviorBox alloc]
- initWithValue:[enumAsNumber integerValue]];
- }
- case 131: {
- NSNumber *enumAsNumber = [self readValue];
- return enumAsNumber == nil
- ? nil
- : [[FGMPlatformJointTypeBox alloc] initWithValue:[enumAsNumber integerValue]];
- }
- case 132: {
- NSNumber *enumAsNumber = [self readValue];
- return enumAsNumber == nil ? nil
- : [[FGMPlatformPatternItemTypeBox alloc]
- initWithValue:[enumAsNumber integerValue]];
- }
- case 133: {
- NSNumber *enumAsNumber = [self readValue];
- return enumAsNumber == nil
- ? nil
- : [[FGMPlatformMarkerTypeBox alloc] initWithValue:[enumAsNumber integerValue]];
- }
- case 134: {
- NSNumber *enumAsNumber = [self readValue];
- return enumAsNumber == nil ? nil
- : [[FGMPlatformMapBitmapScalingBox alloc]
- initWithValue:[enumAsNumber integerValue]];
- }
- case 135:
- return [FGMPlatformCameraPosition fromList:[self readValue]];
- case 136:
- return [FGMPlatformCameraUpdate fromList:[self readValue]];
- case 137:
- return [FGMPlatformCameraUpdateNewCameraPosition fromList:[self readValue]];
- case 138:
- return [FGMPlatformCameraUpdateNewLatLng fromList:[self readValue]];
- case 139:
- return [FGMPlatformCameraUpdateNewLatLngBounds fromList:[self readValue]];
- case 140:
- return [FGMPlatformCameraUpdateNewLatLngZoom fromList:[self readValue]];
- case 141:
- return [FGMPlatformCameraUpdateScrollBy fromList:[self readValue]];
- case 142:
- return [FGMPlatformCameraUpdateZoomBy fromList:[self readValue]];
- case 143:
- return [FGMPlatformCameraUpdateZoom fromList:[self readValue]];
- case 144:
- return [FGMPlatformCameraUpdateZoomTo fromList:[self readValue]];
- case 145:
- return [FGMPlatformCircle fromList:[self readValue]];
- case 146:
- return [FGMPlatformHeatmap fromList:[self readValue]];
- case 147:
- return [FGMPlatformHeatmapGradient fromList:[self readValue]];
- case 148:
- return [FGMPlatformWeightedLatLng fromList:[self readValue]];
- case 149:
- return [FGMPlatformInfoWindow fromList:[self readValue]];
- case 150:
- return [FGMPlatformCluster fromList:[self readValue]];
- case 151:
- return [FGMPlatformClusterManager fromList:[self readValue]];
- case 152:
- return [FGMPlatformMarker fromList:[self readValue]];
- case 153:
- return [FGMPlatformPolygon fromList:[self readValue]];
- case 154:
- return [FGMPlatformPolyline fromList:[self readValue]];
- case 155:
- return [FGMPlatformPatternItem fromList:[self readValue]];
- case 156:
- return [FGMPlatformTile fromList:[self readValue]];
- case 157:
- return [FGMPlatformTileOverlay fromList:[self readValue]];
- case 158:
- return [FGMPlatformEdgeInsets fromList:[self readValue]];
- case 159:
- return [FGMPlatformLatLng fromList:[self readValue]];
- case 160:
- return [FGMPlatformLatLngBounds fromList:[self readValue]];
- case 161:
- return [FGMPlatformCameraTargetBounds fromList:[self readValue]];
- case 162:
- return [FGMPlatformGroundOverlay fromList:[self readValue]];
- case 163:
- return [FGMPlatformMapViewCreationParams fromList:[self readValue]];
- case 164:
- return [FGMPlatformMapConfiguration fromList:[self readValue]];
- case 165:
- return [FGMPlatformPoint fromList:[self readValue]];
- case 166:
- return [FGMPlatformSize fromList:[self readValue]];
- case 167:
- return [FGMPlatformColor fromList:[self readValue]];
- case 168:
- return [FGMPlatformTileLayer fromList:[self readValue]];
- case 169:
- return [FGMPlatformZoomRange fromList:[self readValue]];
- case 170:
- return [FGMPlatformBitmap fromList:[self readValue]];
- case 171:
- return [FGMPlatformBitmapDefaultMarker fromList:[self readValue]];
- case 172:
- return [FGMPlatformBitmapBytes fromList:[self readValue]];
- case 173:
- return [FGMPlatformBitmapAsset fromList:[self readValue]];
- case 174:
- return [FGMPlatformBitmapAssetImage fromList:[self readValue]];
- case 175:
- return [FGMPlatformBitmapAssetMap fromList:[self readValue]];
- case 176:
- return [FGMPlatformBitmapBytesMap fromList:[self readValue]];
- case 177:
- return [FGMPlatformBitmapPinConfig fromList:[self readValue]];
- default:
- return [super readValueOfType:type];
- }
-}
-@end
-
-@interface FGMGoogleMapsFlutterPigeonMessagesPigeonCodecWriter : FlutterStandardWriter
-@end
-@implementation FGMGoogleMapsFlutterPigeonMessagesPigeonCodecWriter
-- (void)writeValue:(id)value {
- if ([value isKindOfClass:[FGMPlatformMapTypeBox class]]) {
- FGMPlatformMapTypeBox *box = (FGMPlatformMapTypeBox *)value;
- [self writeByte:129];
- [self writeValue:(value == nil ? [NSNull null] : [NSNumber numberWithInteger:box.value])];
- } else if ([value isKindOfClass:[FGMPlatformMarkerCollisionBehaviorBox class]]) {
- FGMPlatformMarkerCollisionBehaviorBox *box = (FGMPlatformMarkerCollisionBehaviorBox *)value;
- [self writeByte:130];
- [self writeValue:(value == nil ? [NSNull null] : [NSNumber numberWithInteger:box.value])];
- } else if ([value isKindOfClass:[FGMPlatformJointTypeBox class]]) {
- FGMPlatformJointTypeBox *box = (FGMPlatformJointTypeBox *)value;
- [self writeByte:131];
- [self writeValue:(value == nil ? [NSNull null] : [NSNumber numberWithInteger:box.value])];
- } else if ([value isKindOfClass:[FGMPlatformPatternItemTypeBox class]]) {
- FGMPlatformPatternItemTypeBox *box = (FGMPlatformPatternItemTypeBox *)value;
- [self writeByte:132];
- [self writeValue:(value == nil ? [NSNull null] : [NSNumber numberWithInteger:box.value])];
- } else if ([value isKindOfClass:[FGMPlatformMarkerTypeBox class]]) {
- FGMPlatformMarkerTypeBox *box = (FGMPlatformMarkerTypeBox *)value;
- [self writeByte:133];
- [self writeValue:(value == nil ? [NSNull null] : [NSNumber numberWithInteger:box.value])];
- } else if ([value isKindOfClass:[FGMPlatformMapBitmapScalingBox class]]) {
- FGMPlatformMapBitmapScalingBox *box = (FGMPlatformMapBitmapScalingBox *)value;
- [self writeByte:134];
- [self writeValue:(value == nil ? [NSNull null] : [NSNumber numberWithInteger:box.value])];
- } else if ([value isKindOfClass:[FGMPlatformCameraPosition class]]) {
- [self writeByte:135];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformCameraUpdate class]]) {
- [self writeByte:136];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformCameraUpdateNewCameraPosition class]]) {
- [self writeByte:137];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformCameraUpdateNewLatLng class]]) {
- [self writeByte:138];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformCameraUpdateNewLatLngBounds class]]) {
- [self writeByte:139];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformCameraUpdateNewLatLngZoom class]]) {
- [self writeByte:140];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformCameraUpdateScrollBy class]]) {
- [self writeByte:141];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformCameraUpdateZoomBy class]]) {
- [self writeByte:142];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformCameraUpdateZoom class]]) {
- [self writeByte:143];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformCameraUpdateZoomTo class]]) {
- [self writeByte:144];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformCircle class]]) {
- [self writeByte:145];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformHeatmap class]]) {
- [self writeByte:146];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformHeatmapGradient class]]) {
- [self writeByte:147];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformWeightedLatLng class]]) {
- [self writeByte:148];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformInfoWindow class]]) {
- [self writeByte:149];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformCluster class]]) {
- [self writeByte:150];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformClusterManager class]]) {
- [self writeByte:151];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformMarker class]]) {
- [self writeByte:152];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformPolygon class]]) {
- [self writeByte:153];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformPolyline class]]) {
- [self writeByte:154];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformPatternItem class]]) {
- [self writeByte:155];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformTile class]]) {
- [self writeByte:156];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformTileOverlay class]]) {
- [self writeByte:157];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformEdgeInsets class]]) {
- [self writeByte:158];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformLatLng class]]) {
- [self writeByte:159];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformLatLngBounds class]]) {
- [self writeByte:160];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformCameraTargetBounds class]]) {
- [self writeByte:161];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformGroundOverlay class]]) {
- [self writeByte:162];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformMapViewCreationParams class]]) {
- [self writeByte:163];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformMapConfiguration class]]) {
- [self writeByte:164];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformPoint class]]) {
- [self writeByte:165];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformSize class]]) {
- [self writeByte:166];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformColor class]]) {
- [self writeByte:167];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformTileLayer class]]) {
- [self writeByte:168];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformZoomRange class]]) {
- [self writeByte:169];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformBitmap class]]) {
- [self writeByte:170];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformBitmapDefaultMarker class]]) {
- [self writeByte:171];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformBitmapBytes class]]) {
- [self writeByte:172];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformBitmapAsset class]]) {
- [self writeByte:173];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformBitmapAssetImage class]]) {
- [self writeByte:174];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformBitmapAssetMap class]]) {
- [self writeByte:175];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformBitmapBytesMap class]]) {
- [self writeByte:176];
- [self writeValue:[value toList]];
- } else if ([value isKindOfClass:[FGMPlatformBitmapPinConfig class]]) {
- [self writeByte:177];
- [self writeValue:[value toList]];
- } else {
- [super writeValue:value];
- }
-}
-@end
-
-@interface FGMGoogleMapsFlutterPigeonMessagesPigeonCodecReaderWriter : FlutterStandardReaderWriter
-@end
-@implementation FGMGoogleMapsFlutterPigeonMessagesPigeonCodecReaderWriter
-- (FlutterStandardWriter *)writerWithData:(NSMutableData *)data {
- return [[FGMGoogleMapsFlutterPigeonMessagesPigeonCodecWriter alloc] initWithData:data];
-}
-- (FlutterStandardReader *)readerWithData:(NSData *)data {
- return [[FGMGoogleMapsFlutterPigeonMessagesPigeonCodecReader alloc] initWithData:data];
-}
-@end
-
-NSObject<FlutterMessageCodec> *FGMGetGoogleMapsFlutterPigeonMessagesCodec(void) {
- static FlutterStandardMessageCodec *sSharedObject = nil;
- static dispatch_once_t sPred = 0;
- dispatch_once(&sPred, ^{
- FGMGoogleMapsFlutterPigeonMessagesPigeonCodecReaderWriter *readerWriter =
- [[FGMGoogleMapsFlutterPigeonMessagesPigeonCodecReaderWriter alloc] init];
- sSharedObject = [FlutterStandardMessageCodec codecWithReaderWriter:readerWriter];
- });
- return sSharedObject;
-}
-void SetUpFGMMapsApi(id<FlutterBinaryMessenger> binaryMessenger, NSObject<FGMMapsApi> *api) {
- SetUpFGMMapsApiWithSuffix(binaryMessenger, api, @"");
-}
-
-void SetUpFGMMapsApiWithSuffix(id<FlutterBinaryMessenger> binaryMessenger,
- NSObject<FGMMapsApi> *api, NSString *messageChannelSuffix) {
- messageChannelSuffix = messageChannelSuffix.length > 0
- ? [NSString stringWithFormat:@".%@", messageChannelSuffix]
- : @"";
- /// Returns once the map instance is available.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString
- stringWithFormat:
- @"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.waitForMap",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(waitForMapWithError:)],
- @"FGMMapsApi api (%@) doesn't respond to @selector(waitForMapWithError:)", api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- [api waitForMapWithError:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Updates the map's configuration options.
- ///
- /// Only non-null configuration values will result in updates; options with
- /// null values will remain unchanged.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.updateMapConfiguration",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert(
- [api respondsToSelector:@selector(updateWithMapConfiguration:error:)],
- @"FGMMapsApi api (%@) doesn't respond to @selector(updateWithMapConfiguration:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- FGMPlatformMapConfiguration *arg_configuration = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- [api updateWithMapConfiguration:arg_configuration error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Updates the set of circles on the map.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString
- stringWithFormat:
- @"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateCircles",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(updateCirclesByAdding:changing:removing:error:)],
- @"FGMMapsApi api (%@) doesn't respond to "
- @"@selector(updateCirclesByAdding:changing:removing:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSArray<FGMPlatformCircle *> *arg_toAdd = GetNullableObjectAtIndex(args, 0);
- NSArray<FGMPlatformCircle *> *arg_toChange = GetNullableObjectAtIndex(args, 1);
- NSArray<NSString *> *arg_idsToRemove = GetNullableObjectAtIndex(args, 2);
- FlutterError *error;
- [api updateCirclesByAdding:arg_toAdd
- changing:arg_toChange
- removing:arg_idsToRemove
- error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Updates the set of heatmaps on the map.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.updateHeatmaps",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(updateHeatmapsByAdding:changing:removing:error:)],
- @"FGMMapsApi api (%@) doesn't respond to "
- @"@selector(updateHeatmapsByAdding:changing:removing:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSArray<FGMPlatformHeatmap *> *arg_toAdd = GetNullableObjectAtIndex(args, 0);
- NSArray<FGMPlatformHeatmap *> *arg_toChange = GetNullableObjectAtIndex(args, 1);
- NSArray<NSString *> *arg_idsToRemove = GetNullableObjectAtIndex(args, 2);
- FlutterError *error;
- [api updateHeatmapsByAdding:arg_toAdd
- changing:arg_toChange
- removing:arg_idsToRemove
- error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Updates the set of custer managers for clusters on the map.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.updateClusterManagers",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(updateClusterManagersByAdding:removing:error:)],
- @"FGMMapsApi api (%@) doesn't respond to "
- @"@selector(updateClusterManagersByAdding:removing:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSArray<FGMPlatformClusterManager *> *arg_toAdd = GetNullableObjectAtIndex(args, 0);
- NSArray<NSString *> *arg_idsToRemove = GetNullableObjectAtIndex(args, 1);
- FlutterError *error;
- [api updateClusterManagersByAdding:arg_toAdd removing:arg_idsToRemove error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Updates the set of markers on the map.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString
- stringWithFormat:
- @"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.updateMarkers",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(updateMarkersByAdding:changing:removing:error:)],
- @"FGMMapsApi api (%@) doesn't respond to "
- @"@selector(updateMarkersByAdding:changing:removing:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSArray<FGMPlatformMarker *> *arg_toAdd = GetNullableObjectAtIndex(args, 0);
- NSArray<FGMPlatformMarker *> *arg_toChange = GetNullableObjectAtIndex(args, 1);
- NSArray<NSString *> *arg_idsToRemove = GetNullableObjectAtIndex(args, 2);
- FlutterError *error;
- [api updateMarkersByAdding:arg_toAdd
- changing:arg_toChange
- removing:arg_idsToRemove
- error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Updates the set of polygonss on the map.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.updatePolygons",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(updatePolygonsByAdding:changing:removing:error:)],
- @"FGMMapsApi api (%@) doesn't respond to "
- @"@selector(updatePolygonsByAdding:changing:removing:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSArray<FGMPlatformPolygon *> *arg_toAdd = GetNullableObjectAtIndex(args, 0);
- NSArray<FGMPlatformPolygon *> *arg_toChange = GetNullableObjectAtIndex(args, 1);
- NSArray<NSString *> *arg_idsToRemove = GetNullableObjectAtIndex(args, 2);
- FlutterError *error;
- [api updatePolygonsByAdding:arg_toAdd
- changing:arg_toChange
- removing:arg_idsToRemove
- error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Updates the set of polylines on the map.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.updatePolylines",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(updatePolylinesByAdding:
- changing:removing:error:)],
- @"FGMMapsApi api (%@) doesn't respond to "
- @"@selector(updatePolylinesByAdding:changing:removing:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSArray<FGMPlatformPolyline *> *arg_toAdd = GetNullableObjectAtIndex(args, 0);
- NSArray<FGMPlatformPolyline *> *arg_toChange = GetNullableObjectAtIndex(args, 1);
- NSArray<NSString *> *arg_idsToRemove = GetNullableObjectAtIndex(args, 2);
- FlutterError *error;
- [api updatePolylinesByAdding:arg_toAdd
- changing:arg_toChange
- removing:arg_idsToRemove
- error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Updates the set of tile overlays on the map.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.updateTileOverlays",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(updateTileOverlaysByAdding:
- changing:removing:error:)],
- @"FGMMapsApi api (%@) doesn't respond to "
- @"@selector(updateTileOverlaysByAdding:changing:removing:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSArray<FGMPlatformTileOverlay *> *arg_toAdd = GetNullableObjectAtIndex(args, 0);
- NSArray<FGMPlatformTileOverlay *> *arg_toChange = GetNullableObjectAtIndex(args, 1);
- NSArray<NSString *> *arg_idsToRemove = GetNullableObjectAtIndex(args, 2);
- FlutterError *error;
- [api updateTileOverlaysByAdding:arg_toAdd
- changing:arg_toChange
- removing:arg_idsToRemove
- error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Updates the set of ground overlays on the map.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.updateGroundOverlays",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(updateGroundOverlaysByAdding:
- changing:removing:error:)],
- @"FGMMapsApi api (%@) doesn't respond to "
- @"@selector(updateGroundOverlaysByAdding:changing:removing:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSArray<FGMPlatformGroundOverlay *> *arg_toAdd = GetNullableObjectAtIndex(args, 0);
- NSArray<FGMPlatformGroundOverlay *> *arg_toChange = GetNullableObjectAtIndex(args, 1);
- NSArray<NSString *> *arg_idsToRemove = GetNullableObjectAtIndex(args, 2);
- FlutterError *error;
- [api updateGroundOverlaysByAdding:arg_toAdd
- changing:arg_toChange
- removing:arg_idsToRemove
- error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Gets the screen coordinate for the given map location.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.getScreenCoordinate",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert(
- [api respondsToSelector:@selector(screenCoordinatesForLatLng:error:)],
- @"FGMMapsApi api (%@) doesn't respond to @selector(screenCoordinatesForLatLng:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- FGMPlatformLatLng *arg_latLng = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- FGMPlatformPoint *output = [api screenCoordinatesForLatLng:arg_latLng error:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Gets the map location for the given screen coordinate.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:
- [NSString
- stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getLatLng",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert(
- [api respondsToSelector:@selector(latLngForScreenCoordinate:error:)],
- @"FGMMapsApi api (%@) doesn't respond to @selector(latLngForScreenCoordinate:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- FGMPlatformPoint *arg_screenCoordinate = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- FGMPlatformLatLng *output = [api latLngForScreenCoordinate:arg_screenCoordinate
- error:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Gets the map region currently displayed on the map.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.getVisibleRegion",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(visibleMapRegion:)],
- @"FGMMapsApi api (%@) doesn't respond to @selector(visibleMapRegion:)", api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- FGMPlatformLatLngBounds *output = [api visibleMapRegion:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Moves the camera according to [cameraUpdate] immediately, with no
- /// animation.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString
- stringWithFormat:
- @"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.moveCamera",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(moveCameraWithUpdate:error:)],
- @"FGMMapsApi api (%@) doesn't respond to @selector(moveCameraWithUpdate:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- FGMPlatformCameraUpdate *arg_cameraUpdate = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- [api moveCameraWithUpdate:arg_cameraUpdate error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Moves the camera according to [cameraUpdate], animating the update using a
- /// duration in milliseconds if provided.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString
- stringWithFormat:
- @"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.animateCamera",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(animateCameraWithUpdate:duration:error:)],
- @"FGMMapsApi api (%@) doesn't respond to "
- @"@selector(animateCameraWithUpdate:duration:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- FGMPlatformCameraUpdate *arg_cameraUpdate = GetNullableObjectAtIndex(args, 0);
- NSNumber *arg_durationMilliseconds = GetNullableObjectAtIndex(args, 1);
- FlutterError *error;
- [api animateCameraWithUpdate:arg_cameraUpdate
- duration:arg_durationMilliseconds
- error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Gets the current map zoom level.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString
- stringWithFormat:
- @"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.getZoomLevel",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(currentZoomLevel:)],
- @"FGMMapsApi api (%@) doesn't respond to @selector(currentZoomLevel:)", api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- NSNumber *output = [api currentZoomLevel:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Show the info window for the marker with the given ID.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.showInfoWindow",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(showInfoWindowForMarkerWithIdentifier:error:)],
- @"FGMMapsApi api (%@) doesn't respond to "
- @"@selector(showInfoWindowForMarkerWithIdentifier:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSString *arg_markerId = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- [api showInfoWindowForMarkerWithIdentifier:arg_markerId error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Hide the info window for the marker with the given ID.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.hideInfoWindow",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(hideInfoWindowForMarkerWithIdentifier:error:)],
- @"FGMMapsApi api (%@) doesn't respond to "
- @"@selector(hideInfoWindowForMarkerWithIdentifier:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSString *arg_markerId = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- [api hideInfoWindowForMarkerWithIdentifier:arg_markerId error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Returns true if the marker with the given ID is currently displaying its
- /// info window.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.isInfoWindowShown",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(isShowingInfoWindowForMarkerWithIdentifier:
- error:)],
- @"FGMMapsApi api (%@) doesn't respond to "
- @"@selector(isShowingInfoWindowForMarkerWithIdentifier:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSString *arg_markerId = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- NSNumber *output = [api isShowingInfoWindowForMarkerWithIdentifier:arg_markerId
- error:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Sets the style to the given map style string, where an empty string
- /// indicates that the style should be cleared.
- ///
- /// If there was an error setting the style, such as an invalid style string,
- /// returns the error message.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:
- [NSString
- stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.setStyle",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(setStyle:error:)],
- @"FGMMapsApi api (%@) doesn't respond to @selector(setStyle:error:)", api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSString *arg_style = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- NSString *output = [api setStyle:arg_style error:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Returns the error string from the last attempt to set the map style, if
- /// any.
- ///
- /// This allows checking asynchronously for initial style failures, as there
- /// is no way to return failures from map initialization.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.getLastStyleError",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(lastStyleError:)],
- @"FGMMapsApi api (%@) doesn't respond to @selector(lastStyleError:)", api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- NSString *output = [api lastStyleError:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Clears the cache of tiles previously requseted from the tile provider.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.clearTileCache",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(clearTileCacheForOverlayWithIdentifier:error:)],
- @"FGMMapsApi api (%@) doesn't respond to "
- @"@selector(clearTileCacheForOverlayWithIdentifier:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSString *arg_tileOverlayId = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- [api clearTileCacheForOverlayWithIdentifier:arg_tileOverlayId error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Takes a snapshot of the map and returns its image data.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString
- stringWithFormat:
- @"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsApi.takeSnapshot",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(takeSnapshotWithError:)],
- @"FGMMapsApi api (%@) doesn't respond to @selector(takeSnapshotWithError:)", api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- FlutterStandardTypedData *output = [api takeSnapshotWithError:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- /// Returns true if the map supports advanced markers.
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsApi.isAdvancedMarkersAvailable",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(isAdvancedMarkersAvailable:)],
- @"FGMMapsApi api (%@) doesn't respond to @selector(isAdvancedMarkersAvailable:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- NSNumber *output = [api isAdvancedMarkersAvailable:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
-}
-@interface FGMMapsCallbackApi ()
-@property(nonatomic, strong) NSObject<FlutterBinaryMessenger> *binaryMessenger;
-@property(nonatomic, strong) NSString *messageChannelSuffix;
-@end
-
-@implementation FGMMapsCallbackApi
-
-- (instancetype)initWithBinaryMessenger:(NSObject<FlutterBinaryMessenger> *)binaryMessenger {
- return [self initWithBinaryMessenger:binaryMessenger messageChannelSuffix:@""];
-}
-- (instancetype)initWithBinaryMessenger:(NSObject<FlutterBinaryMessenger> *)binaryMessenger
- messageChannelSuffix:(nullable NSString *)messageChannelSuffix {
- self = [self init];
- if (self) {
- _binaryMessenger = binaryMessenger;
- _messageChannelSuffix = [messageChannelSuffix length] == 0
- ? @""
- : [NSString stringWithFormat:@".%@", messageChannelSuffix];
- }
- return self;
-}
-- (void)didStartCameraMoveWithCompletion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:
- @"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMoveStarted",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:nil
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didMoveCameraToPosition:(FGMPlatformCameraPosition *)arg_cameraPosition
- completion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraMove",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[ arg_cameraPosition ?: [NSNull null] ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didIdleCameraWithCompletion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCameraIdle",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:nil
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didTapAtPosition:(FGMPlatformLatLng *)arg_position
- completion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:@"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onTap",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[ arg_position ?: [NSNull null] ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didLongPressAtPosition:(FGMPlatformLatLng *)arg_position
- completion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onLongPress",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[ arg_position ?: [NSNull null] ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didTapMarkerWithIdentifier:(NSString *)arg_markerId
- completion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerTap",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[ arg_markerId ?: [NSNull null] ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didStartDragForMarkerWithIdentifier:(NSString *)arg_markerId
- atPosition:(FGMPlatformLatLng *)arg_position
- completion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:
- @"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragStart",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[ arg_markerId ?: [NSNull null], arg_position ?: [NSNull null] ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didDragMarkerWithIdentifier:(NSString *)arg_markerId
- atPosition:(FGMPlatformLatLng *)arg_position
- completion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDrag",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[ arg_markerId ?: [NSNull null], arg_position ?: [NSNull null] ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didEndDragForMarkerWithIdentifier:(NSString *)arg_markerId
- atPosition:(FGMPlatformLatLng *)arg_position
- completion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:
- @"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onMarkerDragEnd",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[ arg_markerId ?: [NSNull null], arg_position ?: [NSNull null] ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)arg_markerId
- completion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:
- @"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onInfoWindowTap",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[ arg_markerId ?: [NSNull null] ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didTapCircleWithIdentifier:(NSString *)arg_circleId
- completion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onCircleTap",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[ arg_circleId ?: [NSNull null] ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didTapCluster:(FGMPlatformCluster *)arg_cluster
- completion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onClusterTap",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[ arg_cluster ?: [NSNull null] ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didTapPolygonWithIdentifier:(NSString *)arg_polygonId
- completion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolygonTap",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[ arg_polygonId ?: [NSNull null] ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didTapPolylineWithIdentifier:(NSString *)arg_polylineId
- completion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onPolylineTap",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[ arg_polylineId ?: [NSNull null] ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)didTapGroundOverlayWithIdentifier:(NSString *)arg_groundOverlayId
- completion:(void (^)(FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:
- @"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.onGroundOverlayTap",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[ arg_groundOverlayId ?: [NSNull null] ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion([FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- completion(nil);
- }
- } else {
- completion(createConnectionError(channelName));
- }
- }];
-}
-- (void)tileWithOverlayIdentifier:(NSString *)arg_tileOverlayId
- location:(FGMPlatformPoint *)arg_location
- zoom:(NSInteger)arg_zoom
- completion:(void (^)(FGMPlatformTile *_Nullable,
- FlutterError *_Nullable))completion {
- NSString *channelName = [NSString
- stringWithFormat:
- @"%@%@", @"dev.flutter.pigeon.google_maps_flutter_ios.MapsCallbackApi.getTileOverlayTile",
- _messageChannelSuffix];
- FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel
- messageChannelWithName:channelName
- binaryMessenger:self.binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- [channel sendMessage:@[
- arg_tileOverlayId ?: [NSNull null], arg_location ?: [NSNull null], @(arg_zoom)
- ]
- reply:^(NSArray<id> *reply) {
- if (reply != nil) {
- if (reply.count > 1) {
- completion(nil, [FlutterError errorWithCode:reply[0]
- message:reply[1]
- details:reply[2]]);
- } else {
- FGMPlatformTile *output = reply[0] == [NSNull null] ? nil : reply[0];
- completion(output, nil);
- }
- } else {
- completion(nil, createConnectionError(channelName));
- }
- }];
-}
-@end
-
-void SetUpFGMMapsPlatformViewApi(id<FlutterBinaryMessenger> binaryMessenger,
- NSObject<FGMMapsPlatformViewApi> *api) {
- SetUpFGMMapsPlatformViewApiWithSuffix(binaryMessenger, api, @"");
-}
-
-void SetUpFGMMapsPlatformViewApiWithSuffix(id<FlutterBinaryMessenger> binaryMessenger,
- NSObject<FGMMapsPlatformViewApi> *api,
- NSString *messageChannelSuffix) {
- messageChannelSuffix = messageChannelSuffix.length > 0
- ? [NSString stringWithFormat:@".%@", messageChannelSuffix]
- : @"";
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsPlatformViewApi.createView",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert(
- [api respondsToSelector:@selector(createViewType:error:)],
- @"FGMMapsPlatformViewApi api (%@) doesn't respond to @selector(createViewType:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- FGMPlatformMapViewCreationParams *arg_type = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- [api createViewType:arg_type error:&error];
- callback(wrapResult(nil, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
-}
-void SetUpFGMMapsInspectorApi(id<FlutterBinaryMessenger> binaryMessenger,
- NSObject<FGMMapsInspectorApi> *api) {
- SetUpFGMMapsInspectorApiWithSuffix(binaryMessenger, api, @"");
-}
-
-void SetUpFGMMapsInspectorApiWithSuffix(id<FlutterBinaryMessenger> binaryMessenger,
- NSObject<FGMMapsInspectorApi> *api,
- NSString *messageChannelSuffix) {
- messageChannelSuffix = messageChannelSuffix.length > 0
- ? [NSString stringWithFormat:@".%@", messageChannelSuffix]
- : @"";
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.areBuildingsEnabled",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(areBuildingsEnabledWithError:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to "
- @"@selector(areBuildingsEnabledWithError:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- NSNumber *output = [api areBuildingsEnabledWithError:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.areRotateGesturesEnabled",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(areRotateGesturesEnabledWithError:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to "
- @"@selector(areRotateGesturesEnabledWithError:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- NSNumber *output = [api areRotateGesturesEnabledWithError:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.areScrollGesturesEnabled",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(areScrollGesturesEnabledWithError:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to "
- @"@selector(areScrollGesturesEnabledWithError:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- NSNumber *output = [api areScrollGesturesEnabledWithError:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.areTiltGesturesEnabled",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(areTiltGesturesEnabledWithError:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to "
- @"@selector(areTiltGesturesEnabledWithError:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- NSNumber *output = [api areTiltGesturesEnabledWithError:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.areZoomGesturesEnabled",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(areZoomGesturesEnabledWithError:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to "
- @"@selector(areZoomGesturesEnabledWithError:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- NSNumber *output = [api areZoomGesturesEnabledWithError:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.isCompassEnabled",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert(
- [api respondsToSelector:@selector(isCompassEnabledWithError:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(isCompassEnabledWithError:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- NSNumber *output = [api isCompassEnabledWithError:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.isMyLocationButtonEnabled",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(isMyLocationButtonEnabledWithError:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to "
- @"@selector(isMyLocationButtonEnabledWithError:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- NSNumber *output = [api isMyLocationButtonEnabledWithError:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.isTrafficEnabled",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert(
- [api respondsToSelector:@selector(isTrafficEnabledWithError:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(isTrafficEnabledWithError:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- NSNumber *output = [api isTrafficEnabledWithError:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.getTileOverlayInfo",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(tileOverlayWithIdentifier:error:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to "
- @"@selector(tileOverlayWithIdentifier:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSString *arg_tileOverlayId = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- FGMPlatformTileLayer *output = [api tileOverlayWithIdentifier:arg_tileOverlayId
- error:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.getGroundOverlayInfo",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(groundOverlayWithIdentifier:error:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to "
- @"@selector(groundOverlayWithIdentifier:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSString *arg_groundOverlayId = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- FGMPlatformGroundOverlay *output = [api groundOverlayWithIdentifier:arg_groundOverlayId
- error:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.getHeatmapInfo",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(heatmapWithIdentifier:error:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to "
- @"@selector(heatmapWithIdentifier:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSString *arg_heatmapId = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- FGMPlatformHeatmap *output = [api heatmapWithIdentifier:arg_heatmapId error:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.getZoomRange",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(zoomRange:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(zoomRange:)", api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- FGMPlatformZoomRange *output = [api zoomRange:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.getClusters",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(clustersWithIdentifier:error:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to "
- @"@selector(clustersWithIdentifier:error:)",
- api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- NSArray<id> *args = message;
- NSString *arg_clusterManagerId = GetNullableObjectAtIndex(args, 0);
- FlutterError *error;
- NSArray<FGMPlatformCluster *> *output = [api clustersWithIdentifier:arg_clusterManagerId
- error:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
- {
- FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc]
- initWithName:[NSString stringWithFormat:@"%@%@",
- @"dev.flutter.pigeon.google_maps_flutter_ios."
- @"MapsInspectorApi.getCameraPosition",
- messageChannelSuffix]
- binaryMessenger:binaryMessenger
- codec:FGMGetGoogleMapsFlutterPigeonMessagesCodec()];
- if (api) {
- NSCAssert([api respondsToSelector:@selector(cameraPosition:)],
- @"FGMMapsInspectorApi api (%@) doesn't respond to @selector(cameraPosition:)", api);
- [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) {
- FlutterError *error;
- FGMPlatformCameraPosition *output = [api cameraPosition:&error];
- callback(wrapResult(output, error));
- }];
- } else {
- [channel setMessageHandler:nil];
- }
- }
-}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios_objc/include/google_maps_flutter_ios_objc/FGMAssetProvider.h b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios_objc/include/google_maps_flutter_ios_objc/FGMAssetProvider.h
deleted file mode 100644
index 2254ec7..0000000
--- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios_objc/include/google_maps_flutter_ios_objc/FGMAssetProvider.h
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2013 The Flutter Authors
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-@import UIKit;
-
-NS_ASSUME_NONNULL_BEGIN
-
-/// Protocol for looking up Flutter assets and resolving them to images.
-///
-/// This is used to allow testing with mock assets without mocking the entire
-/// Flutter plugin registrar and UIImage class.
-@protocol FGMAssetProvider <NSObject>
-
-/// Returns the key for the given asset.
-///
-/// Wraps the FlutterPluginRegistrar method of the same name.
-///
-/// @param asset The name of the asset.
-/// @return The key for the asset, or nil if not found.
-- (nullable NSString *)lookupKeyForAsset:(NSString *)asset;
-
-/// Returns the key for the given asset from the given package.
-///
-/// Wraps the FlutterPluginRegistrar method of the same name.
-///
-/// @param asset The name of the asset.
-/// @param package The name of the package to load the asset from.
-/// @return The key for the asset, or nil if not found.
-- (nullable NSString *)lookupKeyForAsset:(NSString *)asset fromPackage:(NSString *)package;
-
-/// Returns the image for the given named asset.
-///
-/// Wraps the UIImage method of the same name.
-///
-/// @param name The name of the image asset or file.
-/// @return The image, or nil if not found.
-- (nullable UIImage *)imageNamed:(NSString *)name;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios_objc/include/google_maps_flutter_ios_objc/FGMCATransactionWrapper.h b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios_objc/include/google_maps_flutter_ios_objc/FGMCATransactionWrapper.h
deleted file mode 100644
index 41df2de..0000000
--- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios_objc/include/google_maps_flutter_ios_objc/FGMCATransactionWrapper.h
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2013 The Flutter Authors
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-@import Foundation;
-
-NS_ASSUME_NONNULL_BEGIN
-
-/// Protocol for CATransaction to allow mocking in tests.
-@protocol FGMCATransactionProtocol <NSObject>
-- (void)begin;
-- (void)commit;
-- (void)setAnimationDuration:(CFTimeInterval)duration;
-@end
-
-/// Wrapper for CATransaction to allow mocking in tests.
-@interface FGMCATransactionWrapper : NSObject <FGMCATransactionProtocol>
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios_objc/include/google_maps_flutter_ios_objc/FGMMapEventDelegate.h b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios_objc/include/google_maps_flutter_ios_objc/FGMMapEventDelegate.h
deleted file mode 100644
index f93f1ad..0000000
--- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios_objc/include/google_maps_flutter_ios_objc/FGMMapEventDelegate.h
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2013 The Flutter Authors
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-@import Foundation;
-
-#import "google_maps_flutter_pigeon_messages.g.h"
-
-NS_ASSUME_NONNULL_BEGIN
-
-/// Delegate for map event notifications.
-///
-/// This is abstraction of the map event portions of FGMMapsCallbackApi, to
-/// avoid coupling all the individual controllers to the Pigeon implementation
-/// of event handling, and to allow for mocks/fakes in unit tests.
-@protocol FGMMapEventDelegate <NSObject>
-
-/// Called when the map camera starts moving.
-- (void)didStartCameraMove;
-
-/// Called when the map camera moves.
-- (void)didMoveCameraToPosition:(FGMPlatformCameraPosition *)cameraPosition;
-
-/// Called when the map camera stops moving.
-- (void)didIdleCamera;
-
-/// Called when the map, not a specifc map object, is tapped.
-- (void)didTapAtPosition:(FGMPlatformLatLng *)position;
-
-/// Called when the map, not a specifc map object, is long pressed.
-- (void)didLongPressAtPosition:(FGMPlatformLatLng *)position;
-
-/// Called when a marker is tapped.
-- (void)didTapMarkerWithIdentifier:(NSString *)markerId;
-
-/// Called when a marker drag starts.
-- (void)didStartDragForMarkerWithIdentifier:(NSString *)markerId
- atPosition:(FGMPlatformLatLng *)position;
-
-/// Called when a marker drag updates.
-- (void)didDragMarkerWithIdentifier:(NSString *)markerId atPosition:(FGMPlatformLatLng *)position;
-
-/// Called when a marker drag ends.
-- (void)didEndDragForMarkerWithIdentifier:(NSString *)markerId
- atPosition:(FGMPlatformLatLng *)position;
-
-/// Called when a marker's info window is tapped.
-- (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)markerId;
-
-/// Called when a circle is tapped.
-- (void)didTapCircleWithIdentifier:(NSString *)circleId;
-
-/// Called when a marker cluster is tapped.
-- (void)didTapCluster:(FGMPlatformCluster *)cluster;
-
-/// Called when a polygon is tapped.
-- (void)didTapPolygonWithIdentifier:(NSString *)polygonId;
-
-/// Called when a polyline is tapped.
-- (void)didTapPolylineWithIdentifier:(NSString *)polylineId;
-
-/// Called when a ground overlay is tapped.
-- (void)didTapGroundOverlayWithIdentifier:(NSString *)groundOverlayId;
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios_objc/include/google_maps_flutter_ios_objc/google_maps_flutter_pigeon_messages.g.h b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios_objc/include/google_maps_flutter_ios_objc/google_maps_flutter_pigeon_messages.g.h
deleted file mode 100644
index fbd78a7..0000000
--- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios_objc/include/google_maps_flutter_ios_objc/google_maps_flutter_pigeon_messages.g.h
+++ /dev/null
@@ -1,991 +0,0 @@
-// Copyright 2013 The Flutter Authors
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-// Autogenerated from Pigeon (v27.3.2), do not edit directly.
-// See also: https://pub.dev/packages/pigeon
-
-@import Foundation;
-
-@protocol FlutterBinaryMessenger;
-@protocol FlutterMessageCodec;
-@class FlutterError;
-@class FlutterStandardTypedData;
-
-NS_ASSUME_NONNULL_BEGIN
-
-/// Pigeon equivalent of MapType
-typedef NS_ENUM(NSUInteger, FGMPlatformMapType) {
- FGMPlatformMapTypeNone = 0,
- FGMPlatformMapTypeNormal = 1,
- FGMPlatformMapTypeSatellite = 2,
- FGMPlatformMapTypeTerrain = 3,
- FGMPlatformMapTypeHybrid = 4,
-};
-
-/// Wrapper for FGMPlatformMapType to allow for nullability.
-@interface FGMPlatformMapTypeBox : NSObject
-@property(nonatomic, assign) FGMPlatformMapType value;
-- (instancetype)initWithValue:(FGMPlatformMapType)value;
-@end
-
-/// Pigeon equivalent of the MarkerCollisionBehavior enum.
-typedef NS_ENUM(NSUInteger, FGMPlatformMarkerCollisionBehavior) {
- FGMPlatformMarkerCollisionBehaviorRequiredDisplay = 0,
- FGMPlatformMarkerCollisionBehaviorOptionalAndHidesLowerPriority = 1,
- FGMPlatformMarkerCollisionBehaviorRequiredAndHidesOptional = 2,
-};
-
-/// Wrapper for FGMPlatformMarkerCollisionBehavior to allow for nullability.
-@interface FGMPlatformMarkerCollisionBehaviorBox : NSObject
-@property(nonatomic, assign) FGMPlatformMarkerCollisionBehavior value;
-- (instancetype)initWithValue:(FGMPlatformMarkerCollisionBehavior)value;
-@end
-
-/// Join types for polyline joints.
-typedef NS_ENUM(NSUInteger, FGMPlatformJointType) {
- FGMPlatformJointTypeMitered = 0,
- FGMPlatformJointTypeBevel = 1,
- FGMPlatformJointTypeRound = 2,
-};
-
-/// Wrapper for FGMPlatformJointType to allow for nullability.
-@interface FGMPlatformJointTypeBox : NSObject
-@property(nonatomic, assign) FGMPlatformJointType value;
-- (instancetype)initWithValue:(FGMPlatformJointType)value;
-@end
-
-/// Enumeration of possible types for PatternItem.
-typedef NS_ENUM(NSUInteger, FGMPlatformPatternItemType) {
- FGMPlatformPatternItemTypeDot = 0,
- FGMPlatformPatternItemTypeDash = 1,
- FGMPlatformPatternItemTypeGap = 2,
-};
-
-/// Wrapper for FGMPlatformPatternItemType to allow for nullability.
-@interface FGMPlatformPatternItemTypeBox : NSObject
-@property(nonatomic, assign) FGMPlatformPatternItemType value;
-- (instancetype)initWithValue:(FGMPlatformPatternItemType)value;
-@end
-
-typedef NS_ENUM(NSUInteger, FGMPlatformMarkerType) {
- FGMPlatformMarkerTypeMarker = 0,
- FGMPlatformMarkerTypeAdvancedMarker = 1,
-};
-
-/// Wrapper for FGMPlatformMarkerType to allow for nullability.
-@interface FGMPlatformMarkerTypeBox : NSObject
-@property(nonatomic, assign) FGMPlatformMarkerType value;
-- (instancetype)initWithValue:(FGMPlatformMarkerType)value;
-@end
-
-/// Pigeon equivalent of [MapBitmapScaling].
-typedef NS_ENUM(NSUInteger, FGMPlatformMapBitmapScaling) {
- FGMPlatformMapBitmapScalingAuto = 0,
- FGMPlatformMapBitmapScalingNone = 1,
-};
-
-/// Wrapper for FGMPlatformMapBitmapScaling to allow for nullability.
-@interface FGMPlatformMapBitmapScalingBox : NSObject
-@property(nonatomic, assign) FGMPlatformMapBitmapScaling value;
-- (instancetype)initWithValue:(FGMPlatformMapBitmapScaling)value;
-@end
-
-@class FGMPlatformCameraPosition;
-@class FGMPlatformCameraUpdate;
-@class FGMPlatformCameraUpdateNewCameraPosition;
-@class FGMPlatformCameraUpdateNewLatLng;
-@class FGMPlatformCameraUpdateNewLatLngBounds;
-@class FGMPlatformCameraUpdateNewLatLngZoom;
-@class FGMPlatformCameraUpdateScrollBy;
-@class FGMPlatformCameraUpdateZoomBy;
-@class FGMPlatformCameraUpdateZoom;
-@class FGMPlatformCameraUpdateZoomTo;
-@class FGMPlatformCircle;
-@class FGMPlatformHeatmap;
-@class FGMPlatformHeatmapGradient;
-@class FGMPlatformWeightedLatLng;
-@class FGMPlatformInfoWindow;
-@class FGMPlatformCluster;
-@class FGMPlatformClusterManager;
-@class FGMPlatformMarker;
-@class FGMPlatformPolygon;
-@class FGMPlatformPolyline;
-@class FGMPlatformPatternItem;
-@class FGMPlatformTile;
-@class FGMPlatformTileOverlay;
-@class FGMPlatformEdgeInsets;
-@class FGMPlatformLatLng;
-@class FGMPlatformLatLngBounds;
-@class FGMPlatformCameraTargetBounds;
-@class FGMPlatformGroundOverlay;
-@class FGMPlatformMapViewCreationParams;
-@class FGMPlatformMapConfiguration;
-@class FGMPlatformPoint;
-@class FGMPlatformSize;
-@class FGMPlatformColor;
-@class FGMPlatformTileLayer;
-@class FGMPlatformZoomRange;
-@class FGMPlatformBitmap;
-@class FGMPlatformBitmapDefaultMarker;
-@class FGMPlatformBitmapBytes;
-@class FGMPlatformBitmapAsset;
-@class FGMPlatformBitmapAssetImage;
-@class FGMPlatformBitmapAssetMap;
-@class FGMPlatformBitmapBytesMap;
-@class FGMPlatformBitmapPinConfig;
-
-/// Pigeon representatation of a CameraPosition.
-@interface FGMPlatformCameraPosition : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithBearing:(double)bearing
- target:(FGMPlatformLatLng *)target
- tilt:(double)tilt
- zoom:(double)zoom;
-@property(nonatomic, assign) double bearing;
-@property(nonatomic, strong) FGMPlatformLatLng *target;
-@property(nonatomic, assign) double tilt;
-@property(nonatomic, assign) double zoom;
-@end
-
-/// Pigeon representation of a CameraUpdate.
-@interface FGMPlatformCameraUpdate : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithCameraUpdate:(id)cameraUpdate;
-/// This Object must be one of the classes below prefixed with
-/// PlatformCameraUpdate. Each such class represents a different type of
-/// camera update, and each holds a different set of data, preventing the
-/// use of a single unified class.
-@property(nonatomic, strong) id cameraUpdate;
-@end
-
-/// Pigeon equivalent of NewCameraPosition
-@interface FGMPlatformCameraUpdateNewCameraPosition : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithCameraPosition:(FGMPlatformCameraPosition *)cameraPosition;
-@property(nonatomic, strong) FGMPlatformCameraPosition *cameraPosition;
-@end
-
-/// Pigeon equivalent of NewLatLng
-@interface FGMPlatformCameraUpdateNewLatLng : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng;
-@property(nonatomic, strong) FGMPlatformLatLng *latLng;
-@end
-
-/// Pigeon equivalent of NewLatLngBounds
-@interface FGMPlatformCameraUpdateNewLatLngBounds : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithBounds:(FGMPlatformLatLngBounds *)bounds padding:(double)padding;
-@property(nonatomic, strong) FGMPlatformLatLngBounds *bounds;
-@property(nonatomic, assign) double padding;
-@end
-
-/// Pigeon equivalent of NewLatLngZoom
-@interface FGMPlatformCameraUpdateNewLatLngZoom : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithLatLng:(FGMPlatformLatLng *)latLng zoom:(double)zoom;
-@property(nonatomic, strong) FGMPlatformLatLng *latLng;
-@property(nonatomic, assign) double zoom;
-@end
-
-/// Pigeon equivalent of ScrollBy
-@interface FGMPlatformCameraUpdateScrollBy : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithDx:(double)dx dy:(double)dy;
-@property(nonatomic, assign) double dx;
-@property(nonatomic, assign) double dy;
-@end
-
-/// Pigeon equivalent of ZoomBy
-@interface FGMPlatformCameraUpdateZoomBy : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithAmount:(double)amount focus:(nullable FGMPlatformPoint *)focus;
-@property(nonatomic, assign) double amount;
-@property(nonatomic, strong, nullable) FGMPlatformPoint *focus;
-@end
-
-/// Pigeon equivalent of ZoomIn/ZoomOut
-@interface FGMPlatformCameraUpdateZoom : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithOut:(BOOL)out;
-@property(nonatomic, assign) BOOL out;
-@end
-
-/// Pigeon equivalent of ZoomTo
-@interface FGMPlatformCameraUpdateZoomTo : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithZoom:(double)zoom;
-@property(nonatomic, assign) double zoom;
-@end
-
-/// Pigeon equivalent of the Circle class.
-@interface FGMPlatformCircle : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithConsumeTapEvents:(BOOL)consumeTapEvents
- fillColor:(FGMPlatformColor *)fillColor
- strokeColor:(FGMPlatformColor *)strokeColor
- visible:(BOOL)visible
- strokeWidth:(NSInteger)strokeWidth
- zIndex:(double)zIndex
- center:(FGMPlatformLatLng *)center
- radius:(double)radius
- circleId:(NSString *)circleId;
-@property(nonatomic, assign) BOOL consumeTapEvents;
-@property(nonatomic, strong) FGMPlatformColor *fillColor;
-@property(nonatomic, strong) FGMPlatformColor *strokeColor;
-@property(nonatomic, assign) BOOL visible;
-@property(nonatomic, assign) NSInteger strokeWidth;
-@property(nonatomic, assign) double zIndex;
-@property(nonatomic, strong) FGMPlatformLatLng *center;
-@property(nonatomic, assign) double radius;
-@property(nonatomic, copy) NSString *circleId;
-@end
-
-/// Pigeon equivalent of the Heatmap class.
-@interface FGMPlatformHeatmap : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithHeatmapId:(NSString *)heatmapId
- data:(NSArray<FGMPlatformWeightedLatLng *> *)data
- gradient:(nullable FGMPlatformHeatmapGradient *)gradient
- opacity:(double)opacity
- radius:(NSInteger)radius
- minimumZoomIntensity:(NSInteger)minimumZoomIntensity
- maximumZoomIntensity:(NSInteger)maximumZoomIntensity;
-@property(nonatomic, copy) NSString *heatmapId;
-@property(nonatomic, copy) NSArray<FGMPlatformWeightedLatLng *> *data;
-@property(nonatomic, strong, nullable) FGMPlatformHeatmapGradient *gradient;
-@property(nonatomic, assign) double opacity;
-@property(nonatomic, assign) NSInteger radius;
-@property(nonatomic, assign) NSInteger minimumZoomIntensity;
-@property(nonatomic, assign) NSInteger maximumZoomIntensity;
-@end
-
-/// Pigeon equivalent of the HeatmapGradient class.
-///
-/// The GMUGradient structure is slightly different from HeatmapGradient, so
-/// this matches the iOS API so that conversion can be done on the Dart side
-/// where the structures are easier to work with.
-@interface FGMPlatformHeatmapGradient : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithColors:(NSArray<FGMPlatformColor *> *)colors
- startPoints:(NSArray<NSNumber *> *)startPoints
- colorMapSize:(NSInteger)colorMapSize;
-@property(nonatomic, copy) NSArray<FGMPlatformColor *> *colors;
-@property(nonatomic, copy) NSArray<NSNumber *> *startPoints;
-@property(nonatomic, assign) NSInteger colorMapSize;
-@end
-
-/// Pigeon equivalent of the WeightedLatLng class.
-@interface FGMPlatformWeightedLatLng : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithPoint:(FGMPlatformLatLng *)point weight:(double)weight;
-@property(nonatomic, strong) FGMPlatformLatLng *point;
-@property(nonatomic, assign) double weight;
-@end
-
-/// Pigeon equivalent of the InfoWindow class.
-@interface FGMPlatformInfoWindow : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithTitle:(nullable NSString *)title
- snippet:(nullable NSString *)snippet
- anchor:(FGMPlatformPoint *)anchor;
-@property(nonatomic, copy, nullable) NSString *title;
-@property(nonatomic, copy, nullable) NSString *snippet;
-@property(nonatomic, strong) FGMPlatformPoint *anchor;
-@end
-
-/// Pigeon equivalent of Cluster.
-@interface FGMPlatformCluster : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithClusterManagerId:(NSString *)clusterManagerId
- position:(FGMPlatformLatLng *)position
- bounds:(FGMPlatformLatLngBounds *)bounds
- markerIds:(NSArray<NSString *> *)markerIds;
-@property(nonatomic, copy) NSString *clusterManagerId;
-@property(nonatomic, strong) FGMPlatformLatLng *position;
-@property(nonatomic, strong) FGMPlatformLatLngBounds *bounds;
-@property(nonatomic, copy) NSArray<NSString *> *markerIds;
-@end
-
-/// Pigeon equivalent of the ClusterManager class.
-@interface FGMPlatformClusterManager : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithIdentifier:(NSString *)identifier;
-@property(nonatomic, copy) NSString *identifier;
-@end
-
-/// Pigeon equivalent of the Marker class.
-@interface FGMPlatformMarker : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithAlpha:(double)alpha
- anchor:(FGMPlatformPoint *)anchor
- consumeTapEvents:(BOOL)consumeTapEvents
- draggable:(BOOL)draggable
- flat:(BOOL)flat
- icon:(FGMPlatformBitmap *)icon
- infoWindow:(FGMPlatformInfoWindow *)infoWindow
- position:(FGMPlatformLatLng *)position
- rotation:(double)rotation
- visible:(BOOL)visible
- zIndex:(NSInteger)zIndex
- markerId:(NSString *)markerId
- clusterManagerId:(nullable NSString *)clusterManagerId
- collisionBehavior:(nullable FGMPlatformMarkerCollisionBehaviorBox *)collisionBehavior;
-@property(nonatomic, assign) double alpha;
-@property(nonatomic, strong) FGMPlatformPoint *anchor;
-@property(nonatomic, assign) BOOL consumeTapEvents;
-@property(nonatomic, assign) BOOL draggable;
-@property(nonatomic, assign) BOOL flat;
-@property(nonatomic, strong) FGMPlatformBitmap *icon;
-@property(nonatomic, strong) FGMPlatformInfoWindow *infoWindow;
-@property(nonatomic, strong) FGMPlatformLatLng *position;
-@property(nonatomic, assign) double rotation;
-@property(nonatomic, assign) BOOL visible;
-@property(nonatomic, assign) NSInteger zIndex;
-@property(nonatomic, copy) NSString *markerId;
-@property(nonatomic, copy, nullable) NSString *clusterManagerId;
-@property(nonatomic, strong, nullable) FGMPlatformMarkerCollisionBehaviorBox *collisionBehavior;
-@end
-
-/// Pigeon equivalent of the Polygon class.
-@interface FGMPlatformPolygon : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithPolygonId:(NSString *)polygonId
- consumesTapEvents:(BOOL)consumesTapEvents
- fillColor:(FGMPlatformColor *)fillColor
- geodesic:(BOOL)geodesic
- points:(NSArray<FGMPlatformLatLng *> *)points
- holes:(NSArray<NSArray<FGMPlatformLatLng *> *> *)holes
- visible:(BOOL)visible
- strokeColor:(FGMPlatformColor *)strokeColor
- strokeWidth:(NSInteger)strokeWidth
- zIndex:(NSInteger)zIndex;
-@property(nonatomic, copy) NSString *polygonId;
-@property(nonatomic, assign) BOOL consumesTapEvents;
-@property(nonatomic, strong) FGMPlatformColor *fillColor;
-@property(nonatomic, assign) BOOL geodesic;
-@property(nonatomic, copy) NSArray<FGMPlatformLatLng *> *points;
-@property(nonatomic, copy) NSArray<NSArray<FGMPlatformLatLng *> *> *holes;
-@property(nonatomic, assign) BOOL visible;
-@property(nonatomic, strong) FGMPlatformColor *strokeColor;
-@property(nonatomic, assign) NSInteger strokeWidth;
-@property(nonatomic, assign) NSInteger zIndex;
-@end
-
-/// Pigeon equivalent of the Polyline class.
-@interface FGMPlatformPolyline : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithPolylineId:(NSString *)polylineId
- consumesTapEvents:(BOOL)consumesTapEvents
- color:(FGMPlatformColor *)color
- geodesic:(BOOL)geodesic
- jointType:(FGMPlatformJointType)jointType
- patterns:(NSArray<FGMPlatformPatternItem *> *)patterns
- points:(NSArray<FGMPlatformLatLng *> *)points
- visible:(BOOL)visible
- width:(NSInteger)width
- zIndex:(NSInteger)zIndex;
-@property(nonatomic, copy) NSString *polylineId;
-@property(nonatomic, assign) BOOL consumesTapEvents;
-@property(nonatomic, strong) FGMPlatformColor *color;
-@property(nonatomic, assign) BOOL geodesic;
-/// The joint type.
-@property(nonatomic, assign) FGMPlatformJointType jointType;
-/// The pattern data, as a list of pattern items.
-@property(nonatomic, copy) NSArray<FGMPlatformPatternItem *> *patterns;
-@property(nonatomic, copy) NSArray<FGMPlatformLatLng *> *points;
-@property(nonatomic, assign) BOOL visible;
-@property(nonatomic, assign) NSInteger width;
-@property(nonatomic, assign) NSInteger zIndex;
-@end
-
-/// Pigeon equivalent of the PatternItem class.
-@interface FGMPlatformPatternItem : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithType:(FGMPlatformPatternItemType)type length:(nullable NSNumber *)length;
-@property(nonatomic, assign) FGMPlatformPatternItemType type;
-@property(nonatomic, strong, nullable) NSNumber *length;
-@end
-
-/// Pigeon equivalent of the Tile class.
-@interface FGMPlatformTile : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithWidth:(NSInteger)width
- height:(NSInteger)height
- data:(nullable FlutterStandardTypedData *)data;
-@property(nonatomic, assign) NSInteger width;
-@property(nonatomic, assign) NSInteger height;
-@property(nonatomic, strong, nullable) FlutterStandardTypedData *data;
-@end
-
-/// Pigeon equivalent of the TileOverlay class.
-@interface FGMPlatformTileOverlay : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithTileOverlayId:(NSString *)tileOverlayId
- fadeIn:(BOOL)fadeIn
- transparency:(double)transparency
- zIndex:(NSInteger)zIndex
- visible:(BOOL)visible
- tileSize:(NSInteger)tileSize;
-@property(nonatomic, copy) NSString *tileOverlayId;
-@property(nonatomic, assign) BOOL fadeIn;
-@property(nonatomic, assign) double transparency;
-@property(nonatomic, assign) NSInteger zIndex;
-@property(nonatomic, assign) BOOL visible;
-@property(nonatomic, assign) NSInteger tileSize;
-@end
-
-/// Pigeon equivalent of Flutter's EdgeInsets.
-@interface FGMPlatformEdgeInsets : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithTop:(double)top bottom:(double)bottom left:(double)left right:(double)right;
-@property(nonatomic, assign) double top;
-@property(nonatomic, assign) double bottom;
-@property(nonatomic, assign) double left;
-@property(nonatomic, assign) double right;
-@end
-
-/// Pigeon equivalent of LatLng.
-@interface FGMPlatformLatLng : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithLatitude:(double)latitude longitude:(double)longitude;
-@property(nonatomic, assign) double latitude;
-@property(nonatomic, assign) double longitude;
-@end
-
-/// Pigeon equivalent of LatLngBounds.
-@interface FGMPlatformLatLngBounds : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithNortheast:(FGMPlatformLatLng *)northeast
- southwest:(FGMPlatformLatLng *)southwest;
-@property(nonatomic, strong) FGMPlatformLatLng *northeast;
-@property(nonatomic, strong) FGMPlatformLatLng *southwest;
-@end
-
-/// Pigeon equivalent of CameraTargetBounds.
-///
-/// As with the Dart version, it exists to distinguish between not setting a
-/// a target, and having an explicitly unbounded target (null [bounds]).
-@interface FGMPlatformCameraTargetBounds : NSObject
-+ (instancetype)makeWithBounds:(nullable FGMPlatformLatLngBounds *)bounds;
-@property(nonatomic, strong, nullable) FGMPlatformLatLngBounds *bounds;
-@end
-
-/// Pigeon equivalent of the GroundOverlay class.
-@interface FGMPlatformGroundOverlay : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithGroundOverlayId:(NSString *)groundOverlayId
- image:(FGMPlatformBitmap *)image
- position:(nullable FGMPlatformLatLng *)position
- bounds:(nullable FGMPlatformLatLngBounds *)bounds
- anchor:(nullable FGMPlatformPoint *)anchor
- transparency:(double)transparency
- bearing:(double)bearing
- zIndex:(NSInteger)zIndex
- visible:(BOOL)visible
- clickable:(BOOL)clickable
- zoomLevel:(nullable NSNumber *)zoomLevel;
-@property(nonatomic, copy) NSString *groundOverlayId;
-@property(nonatomic, strong) FGMPlatformBitmap *image;
-@property(nonatomic, strong, nullable) FGMPlatformLatLng *position;
-@property(nonatomic, strong, nullable) FGMPlatformLatLngBounds *bounds;
-@property(nonatomic, strong, nullable) FGMPlatformPoint *anchor;
-@property(nonatomic, assign) double transparency;
-@property(nonatomic, assign) double bearing;
-@property(nonatomic, assign) NSInteger zIndex;
-@property(nonatomic, assign) BOOL visible;
-@property(nonatomic, assign) BOOL clickable;
-@property(nonatomic, strong, nullable) NSNumber *zoomLevel;
-@end
-
-/// Information passed to the platform view creation.
-@interface FGMPlatformMapViewCreationParams : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)
- makeWithInitialCameraPosition:(FGMPlatformCameraPosition *)initialCameraPosition
- mapConfiguration:(FGMPlatformMapConfiguration *)mapConfiguration
- initialCircles:(NSArray<FGMPlatformCircle *> *)initialCircles
- initialMarkers:(NSArray<FGMPlatformMarker *> *)initialMarkers
- initialPolygons:(NSArray<FGMPlatformPolygon *> *)initialPolygons
- initialPolylines:(NSArray<FGMPlatformPolyline *> *)initialPolylines
- initialHeatmaps:(NSArray<FGMPlatformHeatmap *> *)initialHeatmaps
- initialTileOverlays:(NSArray<FGMPlatformTileOverlay *> *)initialTileOverlays
- initialClusterManagers:(NSArray<FGMPlatformClusterManager *> *)initialClusterManagers
- initialGroundOverlays:(NSArray<FGMPlatformGroundOverlay *> *)initialGroundOverlays;
-@property(nonatomic, strong) FGMPlatformCameraPosition *initialCameraPosition;
-@property(nonatomic, strong) FGMPlatformMapConfiguration *mapConfiguration;
-@property(nonatomic, copy) NSArray<FGMPlatformCircle *> *initialCircles;
-@property(nonatomic, copy) NSArray<FGMPlatformMarker *> *initialMarkers;
-@property(nonatomic, copy) NSArray<FGMPlatformPolygon *> *initialPolygons;
-@property(nonatomic, copy) NSArray<FGMPlatformPolyline *> *initialPolylines;
-@property(nonatomic, copy) NSArray<FGMPlatformHeatmap *> *initialHeatmaps;
-@property(nonatomic, copy) NSArray<FGMPlatformTileOverlay *> *initialTileOverlays;
-@property(nonatomic, copy) NSArray<FGMPlatformClusterManager *> *initialClusterManagers;
-@property(nonatomic, copy) NSArray<FGMPlatformGroundOverlay *> *initialGroundOverlays;
-@end
-
-/// Pigeon equivalent of MapConfiguration.
-@interface FGMPlatformMapConfiguration : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithCompassEnabled:(nullable NSNumber *)compassEnabled
- cameraTargetBounds:(nullable FGMPlatformCameraTargetBounds *)cameraTargetBounds
- mapType:(nullable FGMPlatformMapTypeBox *)mapType
- minMaxZoomPreference:(nullable FGMPlatformZoomRange *)minMaxZoomPreference
- rotateGesturesEnabled:(nullable NSNumber *)rotateGesturesEnabled
- scrollGesturesEnabled:(nullable NSNumber *)scrollGesturesEnabled
- tiltGesturesEnabled:(nullable NSNumber *)tiltGesturesEnabled
- trackCameraPosition:(nullable NSNumber *)trackCameraPosition
- zoomGesturesEnabled:(nullable NSNumber *)zoomGesturesEnabled
- myLocationEnabled:(nullable NSNumber *)myLocationEnabled
- myLocationButtonEnabled:(nullable NSNumber *)myLocationButtonEnabled
- padding:(nullable FGMPlatformEdgeInsets *)padding
- indoorViewEnabled:(nullable NSNumber *)indoorViewEnabled
- trafficEnabled:(nullable NSNumber *)trafficEnabled
- buildingsEnabled:(nullable NSNumber *)buildingsEnabled
- markerType:(FGMPlatformMarkerType)markerType
- mapId:(nullable NSString *)mapId
- style:(nullable NSString *)style;
-@property(nonatomic, strong, nullable) NSNumber *compassEnabled;
-@property(nonatomic, strong, nullable) FGMPlatformCameraTargetBounds *cameraTargetBounds;
-@property(nonatomic, strong, nullable) FGMPlatformMapTypeBox *mapType;
-@property(nonatomic, strong, nullable) FGMPlatformZoomRange *minMaxZoomPreference;
-@property(nonatomic, strong, nullable) NSNumber *rotateGesturesEnabled;
-@property(nonatomic, strong, nullable) NSNumber *scrollGesturesEnabled;
-@property(nonatomic, strong, nullable) NSNumber *tiltGesturesEnabled;
-@property(nonatomic, strong, nullable) NSNumber *trackCameraPosition;
-@property(nonatomic, strong, nullable) NSNumber *zoomGesturesEnabled;
-@property(nonatomic, strong, nullable) NSNumber *myLocationEnabled;
-@property(nonatomic, strong, nullable) NSNumber *myLocationButtonEnabled;
-@property(nonatomic, strong, nullable) FGMPlatformEdgeInsets *padding;
-@property(nonatomic, strong, nullable) NSNumber *indoorViewEnabled;
-@property(nonatomic, strong, nullable) NSNumber *trafficEnabled;
-@property(nonatomic, strong, nullable) NSNumber *buildingsEnabled;
-@property(nonatomic, assign) FGMPlatformMarkerType markerType;
-@property(nonatomic, copy, nullable) NSString *mapId;
-@property(nonatomic, copy, nullable) NSString *style;
-@end
-
-/// Pigeon representation of an x,y coordinate.
-@interface FGMPlatformPoint : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithX:(double)x y:(double)y;
-@property(nonatomic, assign) double x;
-@property(nonatomic, assign) double y;
-@end
-
-/// Pigeon representation of a size.
-@interface FGMPlatformSize : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithWidth:(double)width height:(double)height;
-@property(nonatomic, assign) double width;
-@property(nonatomic, assign) double height;
-@end
-
-/// Pigeon representation of a color.
-@interface FGMPlatformColor : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithRed:(double)red green:(double)green blue:(double)blue alpha:(double)alpha;
-@property(nonatomic, assign) double red;
-@property(nonatomic, assign) double green;
-@property(nonatomic, assign) double blue;
-@property(nonatomic, assign) double alpha;
-@end
-
-/// Pigeon equivalent of GMSTileLayer properties.
-@interface FGMPlatformTileLayer : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithVisible:(BOOL)visible
- fadeIn:(BOOL)fadeIn
- opacity:(double)opacity
- zIndex:(NSInteger)zIndex;
-@property(nonatomic, assign) BOOL visible;
-@property(nonatomic, assign) BOOL fadeIn;
-@property(nonatomic, assign) double opacity;
-@property(nonatomic, assign) NSInteger zIndex;
-@end
-
-/// Pigeon equivalent of MinMaxZoomPreference.
-@interface FGMPlatformZoomRange : NSObject
-+ (instancetype)makeWithMin:(nullable NSNumber *)min max:(nullable NSNumber *)max;
-@property(nonatomic, strong, nullable) NSNumber *min;
-@property(nonatomic, strong, nullable) NSNumber *max;
-@end
-
-/// Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint
-/// types of [BitmapDescriptor], [PlatformBitmap] contains a single field which
-/// may hold the pigeon equivalent type of any of them.
-@interface FGMPlatformBitmap : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithBitmap:(id)bitmap;
-/// One of [PlatformBitmapAssetMap], [PlatformBitmapAsset],
-/// [PlatformBitmapAssetImage], [PlatformBitmapBytesMap],
-/// [PlatformBitmapBytes], or [PlatformBitmapDefaultMarker].
-/// As Pigeon does not currently support data class inheritance, this
-/// approach allows for the different bitmap implementations to be valid
-/// argument and return types of the API methods. See
-/// https://github.com/flutter/flutter/issues/117819.
-@property(nonatomic, strong) id bitmap;
-@end
-
-/// Pigeon equivalent of [DefaultMarker].
-@interface FGMPlatformBitmapDefaultMarker : NSObject
-+ (instancetype)makeWithHue:(nullable NSNumber *)hue;
-@property(nonatomic, strong, nullable) NSNumber *hue;
-@end
-
-/// Pigeon equivalent of [BytesBitmap].
-@interface FGMPlatformBitmapBytes : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData
- size:(nullable FGMPlatformSize *)size;
-@property(nonatomic, strong) FlutterStandardTypedData *byteData;
-@property(nonatomic, strong, nullable) FGMPlatformSize *size;
-@end
-
-/// Pigeon equivalent of [AssetBitmap].
-@interface FGMPlatformBitmapAsset : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithName:(NSString *)name pkg:(nullable NSString *)pkg;
-@property(nonatomic, copy) NSString *name;
-@property(nonatomic, copy, nullable) NSString *pkg;
-@end
-
-/// Pigeon equivalent of [AssetImageBitmap].
-@interface FGMPlatformBitmapAssetImage : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithName:(NSString *)name
- scale:(double)scale
- size:(nullable FGMPlatformSize *)size;
-@property(nonatomic, copy) NSString *name;
-@property(nonatomic, assign) double scale;
-@property(nonatomic, strong, nullable) FGMPlatformSize *size;
-@end
-
-/// Pigeon equivalent of [AssetMapBitmap].
-@interface FGMPlatformBitmapAssetMap : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithAssetName:(NSString *)assetName
- bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling
- imagePixelRatio:(double)imagePixelRatio
- width:(nullable NSNumber *)width
- height:(nullable NSNumber *)height;
-@property(nonatomic, copy) NSString *assetName;
-@property(nonatomic, assign) FGMPlatformMapBitmapScaling bitmapScaling;
-@property(nonatomic, assign) double imagePixelRatio;
-@property(nonatomic, strong, nullable) NSNumber *width;
-@property(nonatomic, strong, nullable) NSNumber *height;
-@end
-
-/// Pigeon equivalent of [BytesMapBitmap].
-@interface FGMPlatformBitmapBytesMap : NSObject
-/// `init` unavailable to enforce nonnull fields, see the `make` class method.
-- (instancetype)init NS_UNAVAILABLE;
-+ (instancetype)makeWithByteData:(FlutterStandardTypedData *)byteData
- bitmapScaling:(FGMPlatformMapBitmapScaling)bitmapScaling
- imagePixelRatio:(double)imagePixelRatio
- width:(nullable NSNumber *)width
- height:(nullable NSNumber *)height;
-@property(nonatomic, strong) FlutterStandardTypedData *byteData;
-@property(nonatomic, assign) FGMPlatformMapBitmapScaling bitmapScaling;
-@property(nonatomic, assign) double imagePixelRatio;
-@property(nonatomic, strong, nullable) NSNumber *width;
-@property(nonatomic, strong, nullable) NSNumber *height;
-@end
-
-/// Pigeon equivalent of [PinConfig].
-@interface FGMPlatformBitmapPinConfig : NSObject
-+ (instancetype)makeWithBackgroundColor:(nullable FGMPlatformColor *)backgroundColor
- borderColor:(nullable FGMPlatformColor *)borderColor
- glyphColor:(nullable FGMPlatformColor *)glyphColor
- glyphTextColor:(nullable FGMPlatformColor *)glyphTextColor
- glyphText:(nullable NSString *)glyphText
- glyphBitmap:(nullable FGMPlatformBitmap *)glyphBitmap;
-@property(nonatomic, strong, nullable) FGMPlatformColor *backgroundColor;
-@property(nonatomic, strong, nullable) FGMPlatformColor *borderColor;
-@property(nonatomic, strong, nullable) FGMPlatformColor *glyphColor;
-@property(nonatomic, strong, nullable) FGMPlatformColor *glyphTextColor;
-@property(nonatomic, copy, nullable) NSString *glyphText;
-@property(nonatomic, strong, nullable) FGMPlatformBitmap *glyphBitmap;
-@end
-
-/// The codec used by all APIs.
-NSObject<FlutterMessageCodec> *FGMGetGoogleMapsFlutterPigeonMessagesCodec(void);
-
-/// Interface for non-test interactions with the native SDK.
-///
-/// For test-only state queries, see [MapsInspectorApi].
-@protocol FGMMapsApi
-/// Returns once the map instance is available.
-- (void)waitForMapWithError:(FlutterError *_Nullable *_Nonnull)error;
-/// Updates the map's configuration options.
-///
-/// Only non-null configuration values will result in updates; options with
-/// null values will remain unchanged.
-- (void)updateWithMapConfiguration:(FGMPlatformMapConfiguration *)configuration
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Updates the set of circles on the map.
-- (void)updateCirclesByAdding:(NSArray<FGMPlatformCircle *> *)toAdd
- changing:(NSArray<FGMPlatformCircle *> *)toChange
- removing:(NSArray<NSString *> *)idsToRemove
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Updates the set of heatmaps on the map.
-- (void)updateHeatmapsByAdding:(NSArray<FGMPlatformHeatmap *> *)toAdd
- changing:(NSArray<FGMPlatformHeatmap *> *)toChange
- removing:(NSArray<NSString *> *)idsToRemove
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Updates the set of custer managers for clusters on the map.
-- (void)updateClusterManagersByAdding:(NSArray<FGMPlatformClusterManager *> *)toAdd
- removing:(NSArray<NSString *> *)idsToRemove
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Updates the set of markers on the map.
-- (void)updateMarkersByAdding:(NSArray<FGMPlatformMarker *> *)toAdd
- changing:(NSArray<FGMPlatformMarker *> *)toChange
- removing:(NSArray<NSString *> *)idsToRemove
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Updates the set of polygonss on the map.
-- (void)updatePolygonsByAdding:(NSArray<FGMPlatformPolygon *> *)toAdd
- changing:(NSArray<FGMPlatformPolygon *> *)toChange
- removing:(NSArray<NSString *> *)idsToRemove
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Updates the set of polylines on the map.
-- (void)updatePolylinesByAdding:(NSArray<FGMPlatformPolyline *> *)toAdd
- changing:(NSArray<FGMPlatformPolyline *> *)toChange
- removing:(NSArray<NSString *> *)idsToRemove
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Updates the set of tile overlays on the map.
-- (void)updateTileOverlaysByAdding:(NSArray<FGMPlatformTileOverlay *> *)toAdd
- changing:(NSArray<FGMPlatformTileOverlay *> *)toChange
- removing:(NSArray<NSString *> *)idsToRemove
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Updates the set of ground overlays on the map.
-- (void)updateGroundOverlaysByAdding:(NSArray<FGMPlatformGroundOverlay *> *)toAdd
- changing:(NSArray<FGMPlatformGroundOverlay *> *)toChange
- removing:(NSArray<NSString *> *)idsToRemove
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Gets the screen coordinate for the given map location.
-///
-/// @return `nil` only when `error != nil`.
-- (nullable FGMPlatformPoint *)screenCoordinatesForLatLng:(FGMPlatformLatLng *)latLng
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Gets the map location for the given screen coordinate.
-///
-/// @return `nil` only when `error != nil`.
-- (nullable FGMPlatformLatLng *)latLngForScreenCoordinate:(FGMPlatformPoint *)screenCoordinate
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Gets the map region currently displayed on the map.
-///
-/// @return `nil` only when `error != nil`.
-- (nullable FGMPlatformLatLngBounds *)visibleMapRegion:(FlutterError *_Nullable *_Nonnull)error;
-/// Moves the camera according to [cameraUpdate] immediately, with no
-/// animation.
-- (void)moveCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Moves the camera according to [cameraUpdate], animating the update using a
-/// duration in milliseconds if provided.
-- (void)animateCameraWithUpdate:(FGMPlatformCameraUpdate *)cameraUpdate
- duration:(nullable NSNumber *)durationMilliseconds
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Gets the current map zoom level.
-///
-/// @return `nil` only when `error != nil`.
-- (nullable NSNumber *)currentZoomLevel:(FlutterError *_Nullable *_Nonnull)error;
-/// Show the info window for the marker with the given ID.
-- (void)showInfoWindowForMarkerWithIdentifier:(NSString *)markerId
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Hide the info window for the marker with the given ID.
-- (void)hideInfoWindowForMarkerWithIdentifier:(NSString *)markerId
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Returns true if the marker with the given ID is currently displaying its
-/// info window.
-///
-/// @return `nil` only when `error != nil`.
-- (nullable NSNumber *)
- isShowingInfoWindowForMarkerWithIdentifier:(NSString *)markerId
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Sets the style to the given map style string, where an empty string
-/// indicates that the style should be cleared.
-///
-/// If there was an error setting the style, such as an invalid style string,
-/// returns the error message.
-- (nullable NSString *)setStyle:(NSString *)style error:(FlutterError *_Nullable *_Nonnull)error;
-/// Returns the error string from the last attempt to set the map style, if
-/// any.
-///
-/// This allows checking asynchronously for initial style failures, as there
-/// is no way to return failures from map initialization.
-- (nullable NSString *)lastStyleError:(FlutterError *_Nullable *_Nonnull)error;
-/// Clears the cache of tiles previously requseted from the tile provider.
-- (void)clearTileCacheForOverlayWithIdentifier:(NSString *)tileOverlayId
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// Takes a snapshot of the map and returns its image data.
-- (nullable FlutterStandardTypedData *)takeSnapshotWithError:
- (FlutterError *_Nullable *_Nonnull)error;
-/// Returns true if the map supports advanced markers.
-///
-/// @return `nil` only when `error != nil`.
-- (nullable NSNumber *)isAdvancedMarkersAvailable:(FlutterError *_Nullable *_Nonnull)error;
-@end
-
-extern void SetUpFGMMapsApi(id<FlutterBinaryMessenger> binaryMessenger,
- NSObject<FGMMapsApi> *_Nullable api);
-
-extern void SetUpFGMMapsApiWithSuffix(id<FlutterBinaryMessenger> binaryMessenger,
- NSObject<FGMMapsApi> *_Nullable api,
- NSString *messageChannelSuffix);
-
-/// Interface for calls from the native SDK to Dart.
-@interface FGMMapsCallbackApi : NSObject
-- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger;
-- (instancetype)initWithBinaryMessenger:(id<FlutterBinaryMessenger>)binaryMessenger
- messageChannelSuffix:(nullable NSString *)messageChannelSuffix;
-/// Called when the map camera starts moving.
-- (void)didStartCameraMoveWithCompletion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when the map camera moves.
-- (void)didMoveCameraToPosition:(FGMPlatformCameraPosition *)cameraPosition
- completion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when the map camera stops moving.
-- (void)didIdleCameraWithCompletion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when the map, not a specifc map object, is tapped.
-- (void)didTapAtPosition:(FGMPlatformLatLng *)position
- completion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when the map, not a specifc map object, is long pressed.
-- (void)didLongPressAtPosition:(FGMPlatformLatLng *)position
- completion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when a marker is tapped.
-- (void)didTapMarkerWithIdentifier:(NSString *)markerId
- completion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when a marker drag starts.
-- (void)didStartDragForMarkerWithIdentifier:(NSString *)markerId
- atPosition:(FGMPlatformLatLng *)position
- completion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when a marker drag updates.
-- (void)didDragMarkerWithIdentifier:(NSString *)markerId
- atPosition:(FGMPlatformLatLng *)position
- completion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when a marker drag ends.
-- (void)didEndDragForMarkerWithIdentifier:(NSString *)markerId
- atPosition:(FGMPlatformLatLng *)position
- completion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when a marker's info window is tapped.
-- (void)didTapInfoWindowOfMarkerWithIdentifier:(NSString *)markerId
- completion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when a circle is tapped.
-- (void)didTapCircleWithIdentifier:(NSString *)circleId
- completion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when a marker cluster is tapped.
-- (void)didTapCluster:(FGMPlatformCluster *)cluster
- completion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when a polygon is tapped.
-- (void)didTapPolygonWithIdentifier:(NSString *)polygonId
- completion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when a polyline is tapped.
-- (void)didTapPolylineWithIdentifier:(NSString *)polylineId
- completion:(void (^)(FlutterError *_Nullable))completion;
-/// Called when a ground overlay is tapped.
-- (void)didTapGroundOverlayWithIdentifier:(NSString *)groundOverlayId
- completion:(void (^)(FlutterError *_Nullable))completion;
-/// Called to get data for a map tile.
-- (void)tileWithOverlayIdentifier:(NSString *)tileOverlayId
- location:(FGMPlatformPoint *)location
- zoom:(NSInteger)zoom
- completion:(void (^)(FGMPlatformTile *_Nullable,
- FlutterError *_Nullable))completion;
-@end
-
-/// Dummy interface to force generation of the platform view creation params,
-/// which are not used in any Pigeon calls, only the platform view creation
-/// call made internally by Flutter.
-@protocol FGMMapsPlatformViewApi
-- (void)createViewType:(nullable FGMPlatformMapViewCreationParams *)type
- error:(FlutterError *_Nullable *_Nonnull)error;
-@end
-
-extern void SetUpFGMMapsPlatformViewApi(id<FlutterBinaryMessenger> binaryMessenger,
- NSObject<FGMMapsPlatformViewApi> *_Nullable api);
-
-extern void SetUpFGMMapsPlatformViewApiWithSuffix(id<FlutterBinaryMessenger> binaryMessenger,
- NSObject<FGMMapsPlatformViewApi> *_Nullable api,
- NSString *messageChannelSuffix);
-
-/// Inspector API only intended for use in integration tests.
-@protocol FGMMapsInspectorApi
-/// @return `nil` only when `error != nil`.
-- (nullable NSNumber *)areBuildingsEnabledWithError:(FlutterError *_Nullable *_Nonnull)error;
-/// @return `nil` only when `error != nil`.
-- (nullable NSNumber *)areRotateGesturesEnabledWithError:(FlutterError *_Nullable *_Nonnull)error;
-/// @return `nil` only when `error != nil`.
-- (nullable NSNumber *)areScrollGesturesEnabledWithError:(FlutterError *_Nullable *_Nonnull)error;
-/// @return `nil` only when `error != nil`.
-- (nullable NSNumber *)areTiltGesturesEnabledWithError:(FlutterError *_Nullable *_Nonnull)error;
-/// @return `nil` only when `error != nil`.
-- (nullable NSNumber *)areZoomGesturesEnabledWithError:(FlutterError *_Nullable *_Nonnull)error;
-/// @return `nil` only when `error != nil`.
-- (nullable NSNumber *)isCompassEnabledWithError:(FlutterError *_Nullable *_Nonnull)error;
-/// @return `nil` only when `error != nil`.
-- (nullable NSNumber *)isMyLocationButtonEnabledWithError:(FlutterError *_Nullable *_Nonnull)error;
-/// @return `nil` only when `error != nil`.
-- (nullable NSNumber *)isTrafficEnabledWithError:(FlutterError *_Nullable *_Nonnull)error;
-- (nullable FGMPlatformTileLayer *)tileOverlayWithIdentifier:(NSString *)tileOverlayId
- error:
- (FlutterError *_Nullable *_Nonnull)error;
-- (nullable FGMPlatformGroundOverlay *)
- groundOverlayWithIdentifier:(NSString *)groundOverlayId
- error:(FlutterError *_Nullable *_Nonnull)error;
-- (nullable FGMPlatformHeatmap *)heatmapWithIdentifier:(NSString *)heatmapId
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// @return `nil` only when `error != nil`.
-- (nullable FGMPlatformZoomRange *)zoomRange:(FlutterError *_Nullable *_Nonnull)error;
-/// @return `nil` only when `error != nil`.
-- (nullable NSArray<FGMPlatformCluster *> *)
- clustersWithIdentifier:(NSString *)clusterManagerId
- error:(FlutterError *_Nullable *_Nonnull)error;
-/// @return `nil` only when `error != nil`.
-- (nullable FGMPlatformCameraPosition *)cameraPosition:(FlutterError *_Nullable *_Nonnull)error;
-@end
-
-extern void SetUpFGMMapsInspectorApi(id<FlutterBinaryMessenger> binaryMessenger,
- NSObject<FGMMapsInspectorApi> *_Nullable api);
-
-extern void SetUpFGMMapsInspectorApiWithSuffix(id<FlutterBinaryMessenger> binaryMessenger,
- NSObject<FGMMapsInspectorApi> *_Nullable api,
- NSString *messageChannelSuffix);
-
-NS_ASSUME_NONNULL_END
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/lib/src/google_maps_flutter_ios.dart b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/lib/src/google_maps_flutter_ios.dart
index c0c8db0..11df181 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/lib/src/google_maps_flutter_ios.dart
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/lib/src/google_maps_flutter_ios.dart
@@ -714,57 +714,43 @@
switch (update.updateType) {
case CameraUpdateType.newCameraPosition:
update as CameraUpdateNewCameraPosition;
- return PlatformCameraUpdate(
- cameraUpdate: PlatformCameraUpdateNewCameraPosition(
- cameraPosition: _platformCameraPositionFromCameraPosition(update.cameraPosition),
- ),
+ return PlatformCameraUpdateNewCameraPosition(
+ cameraPosition: _platformCameraPositionFromCameraPosition(update.cameraPosition),
);
case CameraUpdateType.newLatLng:
update as CameraUpdateNewLatLng;
- return PlatformCameraUpdate(
- cameraUpdate: PlatformCameraUpdateNewLatLng(
- latLng: _platformLatLngFromLatLng(update.latLng),
- ),
- );
+ return PlatformCameraUpdateNewLatLng(latLng: _platformLatLngFromLatLng(update.latLng));
case CameraUpdateType.newLatLngZoom:
update as CameraUpdateNewLatLngZoom;
- return PlatformCameraUpdate(
- cameraUpdate: PlatformCameraUpdateNewLatLngZoom(
- latLng: _platformLatLngFromLatLng(update.latLng),
- zoom: update.zoom,
- ),
+ return PlatformCameraUpdateNewLatLngZoom(
+ latLng: _platformLatLngFromLatLng(update.latLng),
+ zoom: update.zoom,
);
case CameraUpdateType.newLatLngBounds:
update as CameraUpdateNewLatLngBounds;
- return PlatformCameraUpdate(
- cameraUpdate: PlatformCameraUpdateNewLatLngBounds(
- bounds: _platformLatLngBoundsFromLatLngBounds(update.bounds)!,
- padding: update.padding,
- ),
+ return PlatformCameraUpdateNewLatLngBounds(
+ bounds: _platformLatLngBoundsFromLatLngBounds(update.bounds)!,
+ padding: update.padding,
);
case CameraUpdateType.zoomTo:
update as CameraUpdateZoomTo;
- return PlatformCameraUpdate(cameraUpdate: PlatformCameraUpdateZoomTo(zoom: update.zoom));
+ return PlatformCameraUpdateZoomTo(zoom: update.zoom);
case CameraUpdateType.zoomBy:
update as CameraUpdateZoomBy;
final Offset? focus = update.focus;
- return PlatformCameraUpdate(
- cameraUpdate: PlatformCameraUpdateZoomBy(
- amount: update.amount,
- focus: focus == null ? null : _platformPointFromOffset(focus),
- ),
+ return PlatformCameraUpdateZoomBy(
+ amount: update.amount,
+ focus: focus == null ? null : _platformPointFromOffset(focus),
);
case CameraUpdateType.zoomIn:
update as CameraUpdateZoomIn;
- return PlatformCameraUpdate(cameraUpdate: PlatformCameraUpdateZoom(out: false));
+ return PlatformCameraUpdateZoom(out: false);
case CameraUpdateType.zoomOut:
update as CameraUpdateZoomOut;
- return PlatformCameraUpdate(cameraUpdate: PlatformCameraUpdateZoom(out: true));
+ return PlatformCameraUpdateZoom(out: true);
case CameraUpdateType.scrollBy:
update as CameraUpdateScrollBy;
- return PlatformCameraUpdate(
- cameraUpdate: PlatformCameraUpdateScrollBy(dx: update.dx, dy: update.dy),
- );
+ return PlatformCameraUpdateScrollBy(dx: update.dx, dy: update.dy);
}
}
@@ -816,51 +802,41 @@
static PlatformBitmap platformBitmapFromBitmapDescriptor(BitmapDescriptor bitmap) {
switch (bitmap) {
case final DefaultMarker marker:
- return PlatformBitmap(bitmap: PlatformBitmapDefaultMarker(hue: marker.hue?.toDouble()));
+ return PlatformBitmapDefaultMarker(hue: marker.hue?.toDouble());
// Clients may still use this deprecated format, so it must be supported.
// ignore: deprecated_member_use
case final BytesBitmap bytes:
final Size? size = bytes.size;
- return PlatformBitmap(
- bitmap: PlatformBitmapBytes(
- byteData: bytes.byteData,
- size: (size == null) ? null : _platformSizeFromSize(size),
- ),
+ return PlatformBitmapBytes(
+ byteData: bytes.byteData,
+ size: (size == null) ? null : _platformSizeFromSize(size),
);
case final AssetBitmap asset:
- return PlatformBitmap(
- bitmap: PlatformBitmapAsset(name: asset.name, pkg: asset.package),
- );
+ return PlatformBitmapAsset(name: asset.name, pkg: asset.package);
// Clients may still use this deprecated format, so it must be supported.
// ignore: deprecated_member_use
case final AssetImageBitmap asset:
final Size? size = asset.size;
- return PlatformBitmap(
- bitmap: PlatformBitmapAssetImage(
- name: asset.name,
- scale: asset.scale,
- size: (size == null) ? null : _platformSizeFromSize(size),
- ),
+ return PlatformBitmapAssetImage(
+ name: asset.name,
+ scale: asset.scale,
+ size: (size == null) ? null : _platformSizeFromSize(size),
);
case final AssetMapBitmap asset:
- return PlatformBitmap(
- bitmap: PlatformBitmapAssetMap(
- assetName: asset.assetName,
- bitmapScaling: platformMapBitmapScalingFromScaling(asset.bitmapScaling),
- imagePixelRatio: asset.imagePixelRatio,
- width: asset.width,
- height: asset.height,
- ),
+ return PlatformBitmapAssetMap(
+ assetName: asset.assetName,
+ bitmapScaling: platformMapBitmapScalingFromScaling(asset.bitmapScaling),
+ imagePixelRatio: asset.imagePixelRatio,
+ width: asset.width,
+ height: asset.height,
);
case final BytesMapBitmap bytes:
- return PlatformBitmap(
- bitmap: PlatformBitmapBytesMap(
- byteData: bytes.byteData,
- bitmapScaling: platformMapBitmapScalingFromScaling(bytes.bitmapScaling),
- imagePixelRatio: bytes.imagePixelRatio,
- width: bytes.width,
- height: bytes.height,
- ),
+ return PlatformBitmapBytesMap(
+ byteData: bytes.byteData,
+ bitmapScaling: platformMapBitmapScalingFromScaling(bytes.bitmapScaling),
+ imagePixelRatio: bytes.imagePixelRatio,
+ width: bytes.width,
+ height: bytes.height,
);
case final PinConfig pinConfig:
final PlatformColor? backgroundColor = pinConfig.backgroundColor != null
@@ -871,38 +847,30 @@
: null;
switch (pinConfig.glyph) {
case final CircleGlyph circleGlyph:
- return PlatformBitmap(
- bitmap: PlatformBitmapPinConfig(
- backgroundColor: backgroundColor,
- borderColor: borderColor,
- glyphColor: _platformColorFromColor(circleGlyph.color),
- ),
+ return PlatformBitmapPinConfig(
+ backgroundColor: backgroundColor,
+ borderColor: borderColor,
+ glyphColor: _platformColorFromColor(circleGlyph.color),
);
case final TextGlyph textGlyph:
- return PlatformBitmap(
- bitmap: PlatformBitmapPinConfig(
- backgroundColor: backgroundColor,
- borderColor: borderColor,
- glyphText: textGlyph.text,
- glyphTextColor: textGlyph.textColor != null
- ? _platformColorFromColor(textGlyph.textColor!)
- : null,
- ),
+ return PlatformBitmapPinConfig(
+ backgroundColor: backgroundColor,
+ borderColor: borderColor,
+ glyphText: textGlyph.text,
+ glyphTextColor: textGlyph.textColor != null
+ ? _platformColorFromColor(textGlyph.textColor!)
+ : null,
);
case final BitmapGlyph bitmapGlyph:
- return PlatformBitmap(
- bitmap: PlatformBitmapPinConfig(
- backgroundColor: backgroundColor,
- borderColor: borderColor,
- glyphBitmap: platformBitmapFromBitmapDescriptor(bitmapGlyph.bitmap),
- ),
+ return PlatformBitmapPinConfig(
+ backgroundColor: backgroundColor,
+ borderColor: borderColor,
+ glyphBitmap: platformBitmapFromBitmapDescriptor(bitmapGlyph.bitmap),
);
case null:
- return PlatformBitmap(
- bitmap: PlatformBitmapPinConfig(
- backgroundColor: backgroundColor,
- borderColor: borderColor,
- ),
+ return PlatformBitmapPinConfig(
+ backgroundColor: backgroundColor,
+ borderColor: borderColor,
);
}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/lib/src/messages.g.dart b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/lib/src/messages.g.dart
index ee3002a..0d4c1db 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/lib/src/messages.g.dart
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/lib/src/messages.g.dart
@@ -190,52 +190,10 @@
}
/// Pigeon representation of a CameraUpdate.
-class PlatformCameraUpdate {
- PlatformCameraUpdate({required this.cameraUpdate});
-
- /// This Object must be one of the classes below prefixed with
- /// PlatformCameraUpdate. Each such class represents a different type of
- /// camera update, and each holds a different set of data, preventing the
- /// use of a single unified class.
- Object cameraUpdate;
-
- List<Object?> _toList() {
- return <Object?>[cameraUpdate];
- }
-
- Object encode() {
- return _toList();
- }
-
- static PlatformCameraUpdate decode(Object result) {
- result as List<Object?>;
- return PlatformCameraUpdate(cameraUpdate: result[0]!);
- }
-
- @override
- // ignore: avoid_equals_and_hash_code_on_mutable_classes
- bool operator ==(Object other) {
- if (other is! PlatformCameraUpdate || other.runtimeType != runtimeType) {
- return false;
- }
- if (identical(this, other)) {
- return true;
- }
- return _deepEquals(cameraUpdate, other.cameraUpdate);
- }
-
- @override
- // ignore: avoid_equals_and_hash_code_on_mutable_classes
- int get hashCode => _deepHash(<Object?>[runtimeType, ..._toList()]);
-
- @override
- String toString() {
- return 'PlatformCameraUpdate(cameraUpdate: $cameraUpdate)';
- }
-}
+sealed class PlatformCameraUpdate {}
/// Pigeon equivalent of NewCameraPosition
-class PlatformCameraUpdateNewCameraPosition {
+class PlatformCameraUpdateNewCameraPosition extends PlatformCameraUpdate {
PlatformCameraUpdateNewCameraPosition({required this.cameraPosition});
PlatformCameraPosition cameraPosition;
@@ -278,7 +236,7 @@
}
/// Pigeon equivalent of NewLatLng
-class PlatformCameraUpdateNewLatLng {
+class PlatformCameraUpdateNewLatLng extends PlatformCameraUpdate {
PlatformCameraUpdateNewLatLng({required this.latLng});
PlatformLatLng latLng;
@@ -319,7 +277,7 @@
}
/// Pigeon equivalent of NewLatLngBounds
-class PlatformCameraUpdateNewLatLngBounds {
+class PlatformCameraUpdateNewLatLngBounds extends PlatformCameraUpdate {
PlatformCameraUpdateNewLatLngBounds({required this.bounds, required this.padding});
PlatformLatLngBounds bounds;
@@ -365,7 +323,7 @@
}
/// Pigeon equivalent of NewLatLngZoom
-class PlatformCameraUpdateNewLatLngZoom {
+class PlatformCameraUpdateNewLatLngZoom extends PlatformCameraUpdate {
PlatformCameraUpdateNewLatLngZoom({required this.latLng, required this.zoom});
PlatformLatLng latLng;
@@ -411,7 +369,7 @@
}
/// Pigeon equivalent of ScrollBy
-class PlatformCameraUpdateScrollBy {
+class PlatformCameraUpdateScrollBy extends PlatformCameraUpdate {
PlatformCameraUpdateScrollBy({required this.dx, required this.dy});
double dx;
@@ -454,7 +412,7 @@
}
/// Pigeon equivalent of ZoomBy
-class PlatformCameraUpdateZoomBy {
+class PlatformCameraUpdateZoomBy extends PlatformCameraUpdate {
PlatformCameraUpdateZoomBy({required this.amount, this.focus});
double amount;
@@ -500,7 +458,7 @@
}
/// Pigeon equivalent of ZoomIn/ZoomOut
-class PlatformCameraUpdateZoom {
+class PlatformCameraUpdateZoom extends PlatformCameraUpdate {
PlatformCameraUpdateZoom({required this.out});
bool out;
@@ -541,7 +499,7 @@
}
/// Pigeon equivalent of ZoomTo
-class PlatformCameraUpdateZoomTo {
+class PlatformCameraUpdateZoomTo extends PlatformCameraUpdate {
PlatformCameraUpdateZoomTo({required this.zoom});
double zoom;
@@ -2306,58 +2264,11 @@
}
}
-/// Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint
-/// types of [BitmapDescriptor], [PlatformBitmap] contains a single field which
-/// may hold the pigeon equivalent type of any of them.
-class PlatformBitmap {
- PlatformBitmap({required this.bitmap});
-
- /// One of [PlatformBitmapAssetMap], [PlatformBitmapAsset],
- /// [PlatformBitmapAssetImage], [PlatformBitmapBytesMap],
- /// [PlatformBitmapBytes], or [PlatformBitmapDefaultMarker].
- /// As Pigeon does not currently support data class inheritance, this
- /// approach allows for the different bitmap implementations to be valid
- /// argument and return types of the API methods. See
- /// https://github.com/flutter/flutter/issues/117819.
- Object bitmap;
-
- List<Object?> _toList() {
- return <Object?>[bitmap];
- }
-
- Object encode() {
- return _toList();
- }
-
- static PlatformBitmap decode(Object result) {
- result as List<Object?>;
- return PlatformBitmap(bitmap: result[0]!);
- }
-
- @override
- // ignore: avoid_equals_and_hash_code_on_mutable_classes
- bool operator ==(Object other) {
- if (other is! PlatformBitmap || other.runtimeType != runtimeType) {
- return false;
- }
- if (identical(this, other)) {
- return true;
- }
- return _deepEquals(bitmap, other.bitmap);
- }
-
- @override
- // ignore: avoid_equals_and_hash_code_on_mutable_classes
- int get hashCode => _deepHash(<Object?>[runtimeType, ..._toList()]);
-
- @override
- String toString() {
- return 'PlatformBitmap(bitmap: $bitmap)';
- }
-}
+/// Pigeon equivalent of [BitmapDescriptor].
+sealed class PlatformBitmap {}
/// Pigeon equivalent of [DefaultMarker].
-class PlatformBitmapDefaultMarker {
+class PlatformBitmapDefaultMarker extends PlatformBitmap {
PlatformBitmapDefaultMarker({this.hue});
double? hue;
@@ -2398,7 +2309,7 @@
}
/// Pigeon equivalent of [BytesBitmap].
-class PlatformBitmapBytes {
+class PlatformBitmapBytes extends PlatformBitmap {
PlatformBitmapBytes({required this.byteData, this.size});
Uint8List byteData;
@@ -2441,7 +2352,7 @@
}
/// Pigeon equivalent of [AssetBitmap].
-class PlatformBitmapAsset {
+class PlatformBitmapAsset extends PlatformBitmap {
PlatformBitmapAsset({required this.name, this.pkg});
String name;
@@ -2484,7 +2395,7 @@
}
/// Pigeon equivalent of [AssetImageBitmap].
-class PlatformBitmapAssetImage {
+class PlatformBitmapAssetImage extends PlatformBitmap {
PlatformBitmapAssetImage({required this.name, required this.scale, this.size});
String name;
@@ -2535,7 +2446,7 @@
}
/// Pigeon equivalent of [AssetMapBitmap].
-class PlatformBitmapAssetMap {
+class PlatformBitmapAssetMap extends PlatformBitmap {
PlatformBitmapAssetMap({
required this.assetName,
required this.bitmapScaling,
@@ -2600,7 +2511,7 @@
}
/// Pigeon equivalent of [BytesMapBitmap].
-class PlatformBitmapBytesMap {
+class PlatformBitmapBytesMap extends PlatformBitmap {
PlatformBitmapBytesMap({
required this.byteData,
required this.bitmapScaling,
@@ -2665,7 +2576,7 @@
}
/// Pigeon equivalent of [PinConfig].
-class PlatformBitmapPinConfig {
+class PlatformBitmapPinConfig extends PlatformBitmap {
PlatformBitmapPinConfig({
this.backgroundColor,
this.borderColor,
@@ -2769,131 +2680,125 @@
} else if (value is PlatformCameraPosition) {
buffer.putUint8(135);
writeValue(buffer, value.encode());
- } else if (value is PlatformCameraUpdate) {
+ } else if (value is PlatformCameraUpdateNewCameraPosition) {
buffer.putUint8(136);
writeValue(buffer, value.encode());
- } else if (value is PlatformCameraUpdateNewCameraPosition) {
+ } else if (value is PlatformCameraUpdateNewLatLng) {
buffer.putUint8(137);
writeValue(buffer, value.encode());
- } else if (value is PlatformCameraUpdateNewLatLng) {
+ } else if (value is PlatformCameraUpdateNewLatLngBounds) {
buffer.putUint8(138);
writeValue(buffer, value.encode());
- } else if (value is PlatformCameraUpdateNewLatLngBounds) {
+ } else if (value is PlatformCameraUpdateNewLatLngZoom) {
buffer.putUint8(139);
writeValue(buffer, value.encode());
- } else if (value is PlatformCameraUpdateNewLatLngZoom) {
+ } else if (value is PlatformCameraUpdateScrollBy) {
buffer.putUint8(140);
writeValue(buffer, value.encode());
- } else if (value is PlatformCameraUpdateScrollBy) {
+ } else if (value is PlatformCameraUpdateZoomBy) {
buffer.putUint8(141);
writeValue(buffer, value.encode());
- } else if (value is PlatformCameraUpdateZoomBy) {
+ } else if (value is PlatformCameraUpdateZoom) {
buffer.putUint8(142);
writeValue(buffer, value.encode());
- } else if (value is PlatformCameraUpdateZoom) {
+ } else if (value is PlatformCameraUpdateZoomTo) {
buffer.putUint8(143);
writeValue(buffer, value.encode());
- } else if (value is PlatformCameraUpdateZoomTo) {
+ } else if (value is PlatformCircle) {
buffer.putUint8(144);
writeValue(buffer, value.encode());
- } else if (value is PlatformCircle) {
+ } else if (value is PlatformHeatmap) {
buffer.putUint8(145);
writeValue(buffer, value.encode());
- } else if (value is PlatformHeatmap) {
+ } else if (value is PlatformHeatmapGradient) {
buffer.putUint8(146);
writeValue(buffer, value.encode());
- } else if (value is PlatformHeatmapGradient) {
+ } else if (value is PlatformWeightedLatLng) {
buffer.putUint8(147);
writeValue(buffer, value.encode());
- } else if (value is PlatformWeightedLatLng) {
+ } else if (value is PlatformInfoWindow) {
buffer.putUint8(148);
writeValue(buffer, value.encode());
- } else if (value is PlatformInfoWindow) {
+ } else if (value is PlatformCluster) {
buffer.putUint8(149);
writeValue(buffer, value.encode());
- } else if (value is PlatformCluster) {
+ } else if (value is PlatformClusterManager) {
buffer.putUint8(150);
writeValue(buffer, value.encode());
- } else if (value is PlatformClusterManager) {
+ } else if (value is PlatformMarker) {
buffer.putUint8(151);
writeValue(buffer, value.encode());
- } else if (value is PlatformMarker) {
+ } else if (value is PlatformPolygon) {
buffer.putUint8(152);
writeValue(buffer, value.encode());
- } else if (value is PlatformPolygon) {
+ } else if (value is PlatformPolyline) {
buffer.putUint8(153);
writeValue(buffer, value.encode());
- } else if (value is PlatformPolyline) {
+ } else if (value is PlatformPatternItem) {
buffer.putUint8(154);
writeValue(buffer, value.encode());
- } else if (value is PlatformPatternItem) {
+ } else if (value is PlatformTile) {
buffer.putUint8(155);
writeValue(buffer, value.encode());
- } else if (value is PlatformTile) {
+ } else if (value is PlatformTileOverlay) {
buffer.putUint8(156);
writeValue(buffer, value.encode());
- } else if (value is PlatformTileOverlay) {
+ } else if (value is PlatformEdgeInsets) {
buffer.putUint8(157);
writeValue(buffer, value.encode());
- } else if (value is PlatformEdgeInsets) {
+ } else if (value is PlatformLatLng) {
buffer.putUint8(158);
writeValue(buffer, value.encode());
- } else if (value is PlatformLatLng) {
+ } else if (value is PlatformLatLngBounds) {
buffer.putUint8(159);
writeValue(buffer, value.encode());
- } else if (value is PlatformLatLngBounds) {
+ } else if (value is PlatformCameraTargetBounds) {
buffer.putUint8(160);
writeValue(buffer, value.encode());
- } else if (value is PlatformCameraTargetBounds) {
+ } else if (value is PlatformGroundOverlay) {
buffer.putUint8(161);
writeValue(buffer, value.encode());
- } else if (value is PlatformGroundOverlay) {
+ } else if (value is PlatformMapViewCreationParams) {
buffer.putUint8(162);
writeValue(buffer, value.encode());
- } else if (value is PlatformMapViewCreationParams) {
+ } else if (value is PlatformMapConfiguration) {
buffer.putUint8(163);
writeValue(buffer, value.encode());
- } else if (value is PlatformMapConfiguration) {
+ } else if (value is PlatformPoint) {
buffer.putUint8(164);
writeValue(buffer, value.encode());
- } else if (value is PlatformPoint) {
+ } else if (value is PlatformSize) {
buffer.putUint8(165);
writeValue(buffer, value.encode());
- } else if (value is PlatformSize) {
+ } else if (value is PlatformColor) {
buffer.putUint8(166);
writeValue(buffer, value.encode());
- } else if (value is PlatformColor) {
+ } else if (value is PlatformTileLayer) {
buffer.putUint8(167);
writeValue(buffer, value.encode());
- } else if (value is PlatformTileLayer) {
+ } else if (value is PlatformZoomRange) {
buffer.putUint8(168);
writeValue(buffer, value.encode());
- } else if (value is PlatformZoomRange) {
+ } else if (value is PlatformBitmapDefaultMarker) {
buffer.putUint8(169);
writeValue(buffer, value.encode());
- } else if (value is PlatformBitmap) {
+ } else if (value is PlatformBitmapBytes) {
buffer.putUint8(170);
writeValue(buffer, value.encode());
- } else if (value is PlatformBitmapDefaultMarker) {
+ } else if (value is PlatformBitmapAsset) {
buffer.putUint8(171);
writeValue(buffer, value.encode());
- } else if (value is PlatformBitmapBytes) {
+ } else if (value is PlatformBitmapAssetImage) {
buffer.putUint8(172);
writeValue(buffer, value.encode());
- } else if (value is PlatformBitmapAsset) {
+ } else if (value is PlatformBitmapAssetMap) {
buffer.putUint8(173);
writeValue(buffer, value.encode());
- } else if (value is PlatformBitmapAssetImage) {
+ } else if (value is PlatformBitmapBytesMap) {
buffer.putUint8(174);
writeValue(buffer, value.encode());
- } else if (value is PlatformBitmapAssetMap) {
- buffer.putUint8(175);
- writeValue(buffer, value.encode());
- } else if (value is PlatformBitmapBytesMap) {
- buffer.putUint8(176);
- writeValue(buffer, value.encode());
} else if (value is PlatformBitmapPinConfig) {
- buffer.putUint8(177);
+ buffer.putUint8(175);
writeValue(buffer, value.encode());
} else {
super.writeValue(buffer, value);
@@ -2924,88 +2829,84 @@
case 135:
return PlatformCameraPosition.decode(readValue(buffer)!);
case 136:
- return PlatformCameraUpdate.decode(readValue(buffer)!);
- case 137:
return PlatformCameraUpdateNewCameraPosition.decode(readValue(buffer)!);
- case 138:
+ case 137:
return PlatformCameraUpdateNewLatLng.decode(readValue(buffer)!);
- case 139:
+ case 138:
return PlatformCameraUpdateNewLatLngBounds.decode(readValue(buffer)!);
- case 140:
+ case 139:
return PlatformCameraUpdateNewLatLngZoom.decode(readValue(buffer)!);
- case 141:
+ case 140:
return PlatformCameraUpdateScrollBy.decode(readValue(buffer)!);
- case 142:
+ case 141:
return PlatformCameraUpdateZoomBy.decode(readValue(buffer)!);
- case 143:
+ case 142:
return PlatformCameraUpdateZoom.decode(readValue(buffer)!);
- case 144:
+ case 143:
return PlatformCameraUpdateZoomTo.decode(readValue(buffer)!);
- case 145:
+ case 144:
return PlatformCircle.decode(readValue(buffer)!);
- case 146:
+ case 145:
return PlatformHeatmap.decode(readValue(buffer)!);
- case 147:
+ case 146:
return PlatformHeatmapGradient.decode(readValue(buffer)!);
- case 148:
+ case 147:
return PlatformWeightedLatLng.decode(readValue(buffer)!);
- case 149:
+ case 148:
return PlatformInfoWindow.decode(readValue(buffer)!);
- case 150:
+ case 149:
return PlatformCluster.decode(readValue(buffer)!);
- case 151:
+ case 150:
return PlatformClusterManager.decode(readValue(buffer)!);
- case 152:
+ case 151:
return PlatformMarker.decode(readValue(buffer)!);
- case 153:
+ case 152:
return PlatformPolygon.decode(readValue(buffer)!);
- case 154:
+ case 153:
return PlatformPolyline.decode(readValue(buffer)!);
- case 155:
+ case 154:
return PlatformPatternItem.decode(readValue(buffer)!);
- case 156:
+ case 155:
return PlatformTile.decode(readValue(buffer)!);
- case 157:
+ case 156:
return PlatformTileOverlay.decode(readValue(buffer)!);
- case 158:
+ case 157:
return PlatformEdgeInsets.decode(readValue(buffer)!);
- case 159:
+ case 158:
return PlatformLatLng.decode(readValue(buffer)!);
- case 160:
+ case 159:
return PlatformLatLngBounds.decode(readValue(buffer)!);
- case 161:
+ case 160:
return PlatformCameraTargetBounds.decode(readValue(buffer)!);
- case 162:
+ case 161:
return PlatformGroundOverlay.decode(readValue(buffer)!);
- case 163:
+ case 162:
return PlatformMapViewCreationParams.decode(readValue(buffer)!);
- case 164:
+ case 163:
return PlatformMapConfiguration.decode(readValue(buffer)!);
- case 165:
+ case 164:
return PlatformPoint.decode(readValue(buffer)!);
- case 166:
+ case 165:
return PlatformSize.decode(readValue(buffer)!);
- case 167:
+ case 166:
return PlatformColor.decode(readValue(buffer)!);
- case 168:
+ case 167:
return PlatformTileLayer.decode(readValue(buffer)!);
- case 169:
+ case 168:
return PlatformZoomRange.decode(readValue(buffer)!);
- case 170:
- return PlatformBitmap.decode(readValue(buffer)!);
- case 171:
+ case 169:
return PlatformBitmapDefaultMarker.decode(readValue(buffer)!);
- case 172:
+ case 170:
return PlatformBitmapBytes.decode(readValue(buffer)!);
- case 173:
+ case 171:
return PlatformBitmapAsset.decode(readValue(buffer)!);
- case 174:
+ case 172:
return PlatformBitmapAssetImage.decode(readValue(buffer)!);
- case 175:
+ case 173:
return PlatformBitmapAssetMap.decode(readValue(buffer)!);
- case 176:
+ case 174:
return PlatformBitmapBytesMap.decode(readValue(buffer)!);
- case 177:
+ case 175:
return PlatformBitmapPinConfig.decode(readValue(buffer)!);
default:
return super.readValueOfType(type, buffer);
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/pigeons/messages.dart b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/pigeons/messages.dart
index cb2f853..5a87863 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/pigeons/messages.dart
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/pigeons/messages.dart
@@ -7,14 +7,8 @@
@ConfigurePigeon(
PigeonOptions(
dartOut: 'lib/src/messages.g.dart',
- // This uses a different output name to avoid conflicts with the pigeon
- // files in other packages, without having to use full relative paths
- // in #includes (which would make source sharing harder to manage).
- objcHeaderOut:
- 'ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios_objc/include/google_maps_flutter_ios_objc/google_maps_flutter_pigeon_messages.g.h',
- objcSourceOut:
- 'ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios_objc/google_maps_flutter_pigeon_messages.g.m',
- objcOptions: ObjcOptions(prefix: 'FGM'),
+ swiftOut:
+ 'ios/google_maps_flutter_ios/Sources/google_maps_flutter_ios/Messages.g.swift',
copyrightHeader: 'pigeons/copyright.txt',
// Use the base package name so that the generated code can be shared
// across the implementation copies.
@@ -40,66 +34,56 @@
}
/// Pigeon representation of a CameraUpdate.
-class PlatformCameraUpdate {
- PlatformCameraUpdate(this.cameraUpdate);
-
- /// This Object must be one of the classes below prefixed with
- /// PlatformCameraUpdate. Each such class represents a different type of
- /// camera update, and each holds a different set of data, preventing the
- /// use of a single unified class.
- // Pigeon does not support inheritance, which prevents a more strict type
- // bound. See https://github.com/flutter/flutter/issues/117819.
- final Object cameraUpdate;
-}
+sealed class PlatformCameraUpdate {}
/// Pigeon equivalent of NewCameraPosition
-class PlatformCameraUpdateNewCameraPosition {
+class PlatformCameraUpdateNewCameraPosition extends PlatformCameraUpdate {
PlatformCameraUpdateNewCameraPosition(this.cameraPosition);
final PlatformCameraPosition cameraPosition;
}
/// Pigeon equivalent of NewLatLng
-class PlatformCameraUpdateNewLatLng {
+class PlatformCameraUpdateNewLatLng extends PlatformCameraUpdate {
PlatformCameraUpdateNewLatLng(this.latLng);
final PlatformLatLng latLng;
}
/// Pigeon equivalent of NewLatLngBounds
-class PlatformCameraUpdateNewLatLngBounds {
+class PlatformCameraUpdateNewLatLngBounds extends PlatformCameraUpdate {
PlatformCameraUpdateNewLatLngBounds(this.bounds, this.padding);
final PlatformLatLngBounds bounds;
final double padding;
}
/// Pigeon equivalent of NewLatLngZoom
-class PlatformCameraUpdateNewLatLngZoom {
+class PlatformCameraUpdateNewLatLngZoom extends PlatformCameraUpdate {
PlatformCameraUpdateNewLatLngZoom(this.latLng, this.zoom);
final PlatformLatLng latLng;
final double zoom;
}
/// Pigeon equivalent of ScrollBy
-class PlatformCameraUpdateScrollBy {
+class PlatformCameraUpdateScrollBy extends PlatformCameraUpdate {
PlatformCameraUpdateScrollBy(this.dx, this.dy);
final double dx;
final double dy;
}
/// Pigeon equivalent of ZoomBy
-class PlatformCameraUpdateZoomBy {
+class PlatformCameraUpdateZoomBy extends PlatformCameraUpdate {
PlatformCameraUpdateZoomBy(this.amount, [this.focus]);
final double amount;
final PlatformPoint? focus;
}
/// Pigeon equivalent of ZoomIn/ZoomOut
-class PlatformCameraUpdateZoom {
+class PlatformCameraUpdateZoom extends PlatformCameraUpdate {
PlatformCameraUpdateZoom(this.out);
final bool out;
}
/// Pigeon equivalent of ZoomTo
-class PlatformCameraUpdateZoomTo {
+class PlatformCameraUpdateZoomTo extends PlatformCameraUpdate {
PlatformCameraUpdateZoomTo(this.zoom);
final double zoom;
}
@@ -541,31 +525,18 @@
final double? max;
}
-/// Pigeon equivalent of [BitmapDescriptor]. As there are multiple disjoint
-/// types of [BitmapDescriptor], [PlatformBitmap] contains a single field which
-/// may hold the pigeon equivalent type of any of them.
-class PlatformBitmap {
- PlatformBitmap({required this.bitmap});
-
- /// One of [PlatformBitmapAssetMap], [PlatformBitmapAsset],
- /// [PlatformBitmapAssetImage], [PlatformBitmapBytesMap],
- /// [PlatformBitmapBytes], or [PlatformBitmapDefaultMarker].
- /// As Pigeon does not currently support data class inheritance, this
- /// approach allows for the different bitmap implementations to be valid
- /// argument and return types of the API methods. See
- /// https://github.com/flutter/flutter/issues/117819.
- final Object bitmap;
-}
+/// Pigeon equivalent of [BitmapDescriptor].
+sealed class PlatformBitmap {}
/// Pigeon equivalent of [DefaultMarker].
-class PlatformBitmapDefaultMarker {
+class PlatformBitmapDefaultMarker extends PlatformBitmap {
PlatformBitmapDefaultMarker({this.hue});
final double? hue;
}
/// Pigeon equivalent of [BytesBitmap].
-class PlatformBitmapBytes {
+class PlatformBitmapBytes extends PlatformBitmap {
PlatformBitmapBytes({required this.byteData, this.size});
final Uint8List byteData;
@@ -573,7 +544,7 @@
}
/// Pigeon equivalent of [AssetBitmap].
-class PlatformBitmapAsset {
+class PlatformBitmapAsset extends PlatformBitmap {
PlatformBitmapAsset({required this.name, this.pkg});
final String name;
@@ -581,7 +552,7 @@
}
/// Pigeon equivalent of [AssetImageBitmap].
-class PlatformBitmapAssetImage {
+class PlatformBitmapAssetImage extends PlatformBitmap {
PlatformBitmapAssetImage({required this.name, required this.scale, this.size});
final String name;
final double scale;
@@ -589,7 +560,7 @@
}
/// Pigeon equivalent of [AssetMapBitmap].
-class PlatformBitmapAssetMap {
+class PlatformBitmapAssetMap extends PlatformBitmap {
PlatformBitmapAssetMap({
required this.assetName,
required this.bitmapScaling,
@@ -605,7 +576,7 @@
}
/// Pigeon equivalent of [BytesMapBitmap].
-class PlatformBitmapBytesMap {
+class PlatformBitmapBytesMap extends PlatformBitmap {
PlatformBitmapBytesMap({
required this.byteData,
required this.bitmapScaling,
@@ -624,7 +595,7 @@
enum PlatformMapBitmapScaling { auto, none }
/// Pigeon equivalent of [PinConfig].
-class PlatformBitmapPinConfig {
+class PlatformBitmapPinConfig extends PlatformBitmap {
PlatformBitmapPinConfig({
required this.backgroundColor,
required this.borderColor,
@@ -655,11 +626,11 @@
///
/// Only non-null configuration values will result in updates; options with
/// null values will remain unchanged.
- @ObjCSelector('updateWithMapConfiguration:')
+ @SwiftFunction('updateWithMapConfiguration(_:)')
void updateMapConfiguration(PlatformMapConfiguration configuration);
/// Updates the set of circles on the map.
- @ObjCSelector('updateCirclesByAdding:changing:removing:')
+ @SwiftFunction('updateCircles(adding:changing:removing:)')
void updateCircles(
List<PlatformCircle> toAdd,
List<PlatformCircle> toChange,
@@ -667,7 +638,7 @@
);
/// Updates the set of heatmaps on the map.
- @ObjCSelector('updateHeatmapsByAdding:changing:removing:')
+ @SwiftFunction('updateHeatmaps(adding:changing:removing:)')
void updateHeatmaps(
List<PlatformHeatmap> toAdd,
List<PlatformHeatmap> toChange,
@@ -675,11 +646,11 @@
);
/// Updates the set of custer managers for clusters on the map.
- @ObjCSelector('updateClusterManagersByAdding:removing:')
+ @SwiftFunction('updateClusterManagers(adding:removing:)')
void updateClusterManagers(List<PlatformClusterManager> toAdd, List<String> idsToRemove);
/// Updates the set of markers on the map.
- @ObjCSelector('updateMarkersByAdding:changing:removing:')
+ @SwiftFunction('updateMarkers(adding:changing:removing:)')
void updateMarkers(
List<PlatformMarker> toAdd,
List<PlatformMarker> toChange,
@@ -687,7 +658,7 @@
);
/// Updates the set of polygonss on the map.
- @ObjCSelector('updatePolygonsByAdding:changing:removing:')
+ @SwiftFunction('updatePolygons(adding:changing:removing:)')
void updatePolygons(
List<PlatformPolygon> toAdd,
List<PlatformPolygon> toChange,
@@ -695,7 +666,7 @@
);
/// Updates the set of polylines on the map.
- @ObjCSelector('updatePolylinesByAdding:changing:removing:')
+ @SwiftFunction('updatePolylines(adding:changing:removing:)')
void updatePolylines(
List<PlatformPolyline> toAdd,
List<PlatformPolyline> toChange,
@@ -703,7 +674,7 @@
);
/// Updates the set of tile overlays on the map.
- @ObjCSelector('updateTileOverlaysByAdding:changing:removing:')
+ @SwiftFunction('updateTileOverlays(adding:changing:removing:)')
void updateTileOverlays(
List<PlatformTileOverlay> toAdd,
List<PlatformTileOverlay> toChange,
@@ -711,7 +682,7 @@
);
/// Updates the set of ground overlays on the map.
- @ObjCSelector('updateGroundOverlaysByAdding:changing:removing:')
+ @SwiftFunction('updateGroundOverlays(adding:changing:removing:)')
void updateGroundOverlays(
List<PlatformGroundOverlay> toAdd,
List<PlatformGroundOverlay> toChange,
@@ -719,42 +690,42 @@
);
/// Gets the screen coordinate for the given map location.
- @ObjCSelector('screenCoordinatesForLatLng:')
+ @SwiftFunction('screenCoordinates(for:)')
PlatformPoint getScreenCoordinate(PlatformLatLng latLng);
/// Gets the map location for the given screen coordinate.
- @ObjCSelector('latLngForScreenCoordinate:')
+ @SwiftFunction('latLng(for:)')
PlatformLatLng getLatLng(PlatformPoint screenCoordinate);
/// Gets the map region currently displayed on the map.
- @ObjCSelector('visibleMapRegion')
+ @SwiftFunction('visibleMapRegion()')
PlatformLatLngBounds getVisibleRegion();
/// Moves the camera according to [cameraUpdate] immediately, with no
/// animation.
- @ObjCSelector('moveCameraWithUpdate:')
+ @SwiftFunction('moveCamera(_:)')
void moveCamera(PlatformCameraUpdate cameraUpdate);
/// Moves the camera according to [cameraUpdate], animating the update using a
/// duration in milliseconds if provided.
- @ObjCSelector('animateCameraWithUpdate:duration:')
+ @SwiftFunction('animateCamera(_:duration:)')
void animateCamera(PlatformCameraUpdate cameraUpdate, int? durationMilliseconds);
/// Gets the current map zoom level.
- @ObjCSelector('currentZoomLevel')
+ @SwiftFunction('zoomLevel()')
double getZoomLevel();
/// Show the info window for the marker with the given ID.
- @ObjCSelector('showInfoWindowForMarkerWithIdentifier:')
+ @SwiftFunction('showInfoWindowForMarker(withIdentifier:)')
void showInfoWindow(String markerId);
/// Hide the info window for the marker with the given ID.
- @ObjCSelector('hideInfoWindowForMarkerWithIdentifier:')
+ @SwiftFunction('hideInfoWindowForMarker(withIdentifier:)')
void hideInfoWindow(String markerId);
/// Returns true if the marker with the given ID is currently displaying its
/// info window.
- @ObjCSelector('isShowingInfoWindowForMarkerWithIdentifier:')
+ @SwiftFunction('isShowingInfoWindowForMarker(withIdentifier:)')
bool isInfoWindowShown(String markerId);
/// Sets the style to the given map style string, where an empty string
@@ -762,7 +733,7 @@
///
/// If there was an error setting the style, such as an invalid style string,
/// returns the error message.
- @ObjCSelector('setStyle:')
+ @SwiftFunction('setStyle(_:)')
String? setStyle(String style);
/// Returns the error string from the last attempt to set the map style, if
@@ -770,18 +741,18 @@
///
/// This allows checking asynchronously for initial style failures, as there
/// is no way to return failures from map initialization.
- @ObjCSelector('lastStyleError')
+ @SwiftFunction('lastStyleError()')
String? getLastStyleError();
/// Clears the cache of tiles previously requseted from the tile provider.
- @ObjCSelector('clearTileCacheForOverlayWithIdentifier:')
+ @SwiftFunction('clearTileCacheForOverlay(withIdentifier:)')
void clearTileCache(String tileOverlayId);
/// Takes a snapshot of the map and returns its image data.
Uint8List? takeSnapshot();
/// Returns true if the map supports advanced markers.
- @ObjCSelector('isAdvancedMarkersAvailable')
+ @SwiftFunction('isAdvancedMarkersAvailable()')
bool isAdvancedMarkersAvailable();
}
@@ -789,68 +760,68 @@
@FlutterApi()
abstract class MapsCallbackApi {
/// Called when the map camera starts moving.
- @ObjCSelector('didStartCameraMoveWithCompletion')
+ @SwiftFunction('didStartCameraMove()')
void onCameraMoveStarted();
/// Called when the map camera moves.
- @ObjCSelector('didMoveCameraToPosition:')
+ @SwiftFunction('didMoveCamera(to:)')
void onCameraMove(PlatformCameraPosition cameraPosition);
/// Called when the map camera stops moving.
- @ObjCSelector('didIdleCameraWithCompletion')
+ @SwiftFunction('didIdleCamera()')
void onCameraIdle();
/// Called when the map, not a specifc map object, is tapped.
- @ObjCSelector('didTapAtPosition:')
+ @SwiftFunction('didTap(at:)')
void onTap(PlatformLatLng position);
/// Called when the map, not a specifc map object, is long pressed.
- @ObjCSelector('didLongPressAtPosition:')
+ @SwiftFunction('didLongPress(at:)')
void onLongPress(PlatformLatLng position);
/// Called when a marker is tapped.
- @ObjCSelector('didTapMarkerWithIdentifier:')
+ @SwiftFunction('didTapMarker(withIdentifier:)')
void onMarkerTap(String markerId);
/// Called when a marker drag starts.
- @ObjCSelector('didStartDragForMarkerWithIdentifier:atPosition:')
+ @SwiftFunction('didStartDragForMarker(withIdentifier:at:)')
void onMarkerDragStart(String markerId, PlatformLatLng position);
/// Called when a marker drag updates.
- @ObjCSelector('didDragMarkerWithIdentifier:atPosition:')
+ @SwiftFunction('didDragMarker(withIdentifier:at:)')
void onMarkerDrag(String markerId, PlatformLatLng position);
/// Called when a marker drag ends.
- @ObjCSelector('didEndDragForMarkerWithIdentifier:atPosition:')
+ @SwiftFunction('didEndDragForMarker(withIdentifier:at:)')
void onMarkerDragEnd(String markerId, PlatformLatLng position);
/// Called when a marker's info window is tapped.
- @ObjCSelector('didTapInfoWindowOfMarkerWithIdentifier:')
+ @SwiftFunction('didTapInfoWindowOfMarker(withIdentifier:)')
void onInfoWindowTap(String markerId);
/// Called when a circle is tapped.
- @ObjCSelector('didTapCircleWithIdentifier:')
+ @SwiftFunction('didTapCircle(withIdentifier:)')
void onCircleTap(String circleId);
/// Called when a marker cluster is tapped.
- @ObjCSelector('didTapCluster:')
+ @SwiftFunction('didTapCluster(_:)')
void onClusterTap(PlatformCluster cluster);
/// Called when a polygon is tapped.
- @ObjCSelector('didTapPolygonWithIdentifier:')
+ @SwiftFunction('didTapPolygon(withIdentifier:)')
void onPolygonTap(String polygonId);
/// Called when a polyline is tapped.
- @ObjCSelector('didTapPolylineWithIdentifier:')
+ @SwiftFunction('didTapPolyline(withIdentifier:)')
void onPolylineTap(String polylineId);
/// Called when a ground overlay is tapped.
- @ObjCSelector('didTapGroundOverlayWithIdentifier:')
+ @SwiftFunction('didTapGroundOverlay(withIdentifier:)')
void onGroundOverlayTap(String groundOverlayId);
/// Called to get data for a map tile.
@async
- @ObjCSelector('tileWithOverlayIdentifier:location:zoom:')
+ @SwiftFunction('tile(withOverlayIdentifier:location:zoom:)')
PlatformTile getTileOverlayTile(String tileOverlayId, PlatformPoint location, int zoom);
}
@@ -874,16 +845,16 @@
bool isCompassEnabled();
bool isMyLocationButtonEnabled();
bool isTrafficEnabled();
- @ObjCSelector('tileOverlayWithIdentifier:')
+ @SwiftFunction('tileOverlay(withIdentifier:)')
PlatformTileLayer? getTileOverlayInfo(String tileOverlayId);
- @ObjCSelector('groundOverlayWithIdentifier:')
+ @SwiftFunction('groundOverlay(withIdentifier:)')
PlatformGroundOverlay? getGroundOverlayInfo(String groundOverlayId);
- @ObjCSelector('heatmapWithIdentifier:')
+ @SwiftFunction('heatmap(withIdentifier:)')
PlatformHeatmap? getHeatmapInfo(String heatmapId);
- @ObjCSelector('zoomRange')
+ @SwiftFunction('zoomRange()')
PlatformZoomRange getZoomRange();
- @ObjCSelector('clustersWithIdentifier:')
+ @SwiftFunction('clusters(withIdentifier:)')
List<PlatformCluster> getClusters(String clusterManagerId);
- @ObjCSelector('cameraPosition')
+ @SwiftFunction('cameraPosition()')
PlatformCameraPosition getCameraPosition();
}
diff --git a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/test/google_maps_flutter_ios_test.dart b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/test/google_maps_flutter_ios_test.dart
index da996d1..6d21a3e 100644
--- a/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/test/google_maps_flutter_ios_test.dart
+++ b/packages/google_maps_flutter/google_maps_flutter_ios_shared_code/test/google_maps_flutter_ios_test.dart
@@ -115,7 +115,7 @@
final VerificationResult verification = verify(api.moveCamera(captureAny));
final passedUpdate = verification.captured[0] as PlatformCameraUpdate;
- final scroll = passedUpdate.cameraUpdate as PlatformCameraUpdateScrollBy;
+ final scroll = passedUpdate as PlatformCameraUpdateScrollBy;
update as CameraUpdateScrollBy;
expect(scroll.dx, update.dx);
expect(scroll.dy, update.dy);
@@ -130,7 +130,7 @@
final VerificationResult verification = verify(api.animateCamera(captureAny, captureAny));
final passedUpdate = verification.captured[0] as PlatformCameraUpdate;
- final scroll = passedUpdate.cameraUpdate as PlatformCameraUpdateScrollBy;
+ final scroll = passedUpdate as PlatformCameraUpdateScrollBy;
update as CameraUpdateScrollBy;
expect(scroll.dx, update.dx);
expect(scroll.dy, update.dy);
@@ -148,7 +148,7 @@
final VerificationResult verification = verify(api.animateCamera(captureAny, captureAny));
final passedUpdate = verification.captured[0] as PlatformCameraUpdate;
- final scroll = passedUpdate.cameraUpdate as PlatformCameraUpdateScrollBy;
+ final scroll = passedUpdate as PlatformCameraUpdateScrollBy;
update as CameraUpdateScrollBy;
expect(scroll.dx, update.dx);
expect(scroll.dy, update.dy);
@@ -415,8 +415,8 @@
expect(firstChanged.draggable, object2new.draggable);
expect(firstChanged.flat, object2new.flat);
expect(
- firstChanged.icon.bitmap.runtimeType,
- GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(object2new.icon).bitmap.runtimeType,
+ firstChanged.icon.runtimeType,
+ GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(object2new.icon).runtimeType,
);
expect(firstChanged.infoWindow.title, object2new.infoWindow.title);
expect(firstChanged.infoWindow.snippet, object2new.infoWindow.snippet);
@@ -441,8 +441,8 @@
expect(firstAdded.draggable, object3.draggable);
expect(firstAdded.flat, object3.flat);
expect(
- firstAdded.icon.bitmap.runtimeType,
- GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(object3.icon).bitmap.runtimeType,
+ firstAdded.icon.runtimeType,
+ GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(object3.icon).runtimeType,
);
expect(firstAdded.infoWindow.title, object3.infoWindow.title);
expect(firstAdded.infoWindow.snippet, object3.infoWindow.snippet);
@@ -500,8 +500,8 @@
expect(firstChanged.draggable, object2new.draggable);
expect(firstChanged.flat, object2new.flat);
expect(
- firstChanged.icon.bitmap.runtimeType,
- GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(object2new.icon).bitmap.runtimeType,
+ firstChanged.icon.runtimeType,
+ GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(object2new.icon).runtimeType,
);
expect(firstChanged.infoWindow.title, object2new.infoWindow.title);
expect(firstChanged.infoWindow.snippet, object2new.infoWindow.snippet);
@@ -532,8 +532,8 @@
expect(firstAdded.draggable, object3.draggable);
expect(firstAdded.flat, object3.flat);
expect(
- firstAdded.icon.bitmap.runtimeType,
- GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(object3.icon).bitmap.runtimeType,
+ firstAdded.icon.runtimeType,
+ GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(object3.icon).runtimeType,
);
expect(firstAdded.infoWindow.title, object3.infoWindow.title);
expect(firstAdded.infoWindow.snippet, object3.infoWindow.snippet);
@@ -789,10 +789,8 @@
expect(firstChanged.zoomLevel, object2new.zoomLevel);
expect(firstChanged.transparency, object2new.transparency);
expect(
- firstChanged.image.bitmap.runtimeType,
- GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(
- object2new.image,
- ).bitmap.runtimeType,
+ firstChanged.image.runtimeType,
+ GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(object2new.image).runtimeType,
);
}
// Object three should be added.
@@ -814,8 +812,8 @@
expect(firstAdded.zoomLevel, object3.zoomLevel);
expect(firstAdded.transparency, object3.transparency);
expect(
- firstAdded.image.bitmap.runtimeType,
- GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(object3.image).bitmap.runtimeType,
+ firstAdded.image.runtimeType,
+ GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(object3.image).runtimeType,
);
}
});
@@ -997,7 +995,7 @@
final VerificationResult verification = verify(api.moveCamera(captureAny));
final passedUpdate = verification.captured[0] as PlatformCameraUpdate;
- final typedUpdate = passedUpdate.cameraUpdate as PlatformCameraUpdateNewCameraPosition;
+ final typedUpdate = passedUpdate as PlatformCameraUpdateNewCameraPosition;
update as CameraUpdateNewCameraPosition;
expect(typedUpdate.cameraPosition.target.latitude, update.cameraPosition.target.latitude);
expect(typedUpdate.cameraPosition.target.longitude, update.cameraPosition.target.longitude);
@@ -1013,7 +1011,7 @@
final VerificationResult verification = verify(api.moveCamera(captureAny));
final passedUpdate = verification.captured[0] as PlatformCameraUpdate;
- final typedUpdate = passedUpdate.cameraUpdate as PlatformCameraUpdateNewLatLng;
+ final typedUpdate = passedUpdate as PlatformCameraUpdateNewLatLng;
update as CameraUpdateNewLatLng;
expect(typedUpdate.latLng.latitude, update.latLng.latitude);
expect(typedUpdate.latLng.longitude, update.latLng.longitude);
@@ -1032,7 +1030,7 @@
final VerificationResult verification = verify(api.moveCamera(captureAny));
final passedUpdate = verification.captured[0] as PlatformCameraUpdate;
- final typedUpdate = passedUpdate.cameraUpdate as PlatformCameraUpdateNewLatLngBounds;
+ final typedUpdate = passedUpdate as PlatformCameraUpdateNewLatLngBounds;
update as CameraUpdateNewLatLngBounds;
expect(typedUpdate.bounds.northeast.latitude, update.bounds.northeast.latitude);
expect(typedUpdate.bounds.northeast.longitude, update.bounds.northeast.longitude);
@@ -1051,7 +1049,7 @@
final VerificationResult verification = verify(api.moveCamera(captureAny));
final passedUpdate = verification.captured[0] as PlatformCameraUpdate;
- final typedUpdate = passedUpdate.cameraUpdate as PlatformCameraUpdateNewLatLngZoom;
+ final typedUpdate = passedUpdate as PlatformCameraUpdateNewLatLngZoom;
update as CameraUpdateNewLatLngZoom;
expect(typedUpdate.latLng.latitude, update.latLng.latitude);
expect(typedUpdate.latLng.longitude, update.latLng.longitude);
@@ -1068,7 +1066,7 @@
final VerificationResult verification = verify(api.moveCamera(captureAny));
final passedUpdate = verification.captured[0] as PlatformCameraUpdate;
- final typedUpdate = passedUpdate.cameraUpdate as PlatformCameraUpdateZoomBy;
+ final typedUpdate = passedUpdate as PlatformCameraUpdateZoomBy;
update as CameraUpdateZoomBy;
expect(typedUpdate.focus?.x, update.focus?.dx);
expect(typedUpdate.focus?.y, update.focus?.dy);
@@ -1084,7 +1082,7 @@
final VerificationResult verification = verify(api.moveCamera(captureAny));
final passedUpdate = verification.captured[0] as PlatformCameraUpdate;
- final typedUpdate = passedUpdate.cameraUpdate as PlatformCameraUpdateZoomTo;
+ final typedUpdate = passedUpdate as PlatformCameraUpdateZoomTo;
update as CameraUpdateZoomTo;
expect(typedUpdate.zoom, update.zoom);
});
@@ -1098,7 +1096,7 @@
final VerificationResult verification = verify(api.moveCamera(captureAny));
final passedUpdate = verification.captured[0] as PlatformCameraUpdate;
- final typedUpdate = passedUpdate.cameraUpdate as PlatformCameraUpdateZoom;
+ final typedUpdate = passedUpdate as PlatformCameraUpdateZoom;
expect(typedUpdate.out, false);
});
@@ -1111,7 +1109,7 @@
final VerificationResult verification = verify(api.moveCamera(captureAny));
final passedUpdate = verification.captured[0] as PlatformCameraUpdate;
- final typedUpdate = passedUpdate.cameraUpdate as PlatformCameraUpdateZoom;
+ final typedUpdate = passedUpdate as PlatformCameraUpdateZoom;
expect(typedUpdate.out, true);
});
@@ -1131,8 +1129,8 @@
final PlatformBitmap platformBitmap = GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(
bitmap,
);
- expect(platformBitmap.bitmap, isA<PlatformBitmapDefaultMarker>());
- final typedBitmap = platformBitmap.bitmap as PlatformBitmapDefaultMarker;
+ expect(platformBitmap, isA<PlatformBitmapDefaultMarker>());
+ final typedBitmap = platformBitmap as PlatformBitmapDefaultMarker;
expect(typedBitmap.hue, 10.0);
});
@@ -1147,8 +1145,8 @@
final PlatformBitmap platformBitmap = GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(
bitmap,
);
- expect(platformBitmap.bitmap, isA<PlatformBitmapBytesMap>());
- final typedBitmap = platformBitmap.bitmap as PlatformBitmapBytesMap;
+ expect(platformBitmap, isA<PlatformBitmapBytesMap>());
+ final typedBitmap = platformBitmap as PlatformBitmapBytesMap;
expect(typedBitmap.byteData, data);
expect(typedBitmap.bitmapScaling, PlatformMapBitmapScaling.auto);
expect(typedBitmap.imagePixelRatio, 2.0);
@@ -1162,8 +1160,8 @@
final PlatformBitmap platformBitmap = GoogleMapsFlutterIOS.platformBitmapFromBitmapDescriptor(
bitmap,
);
- expect(platformBitmap.bitmap, isA<PlatformBitmapAssetMap>());
- final typedBitmap = platformBitmap.bitmap as PlatformBitmapAssetMap;
+ expect(platformBitmap, isA<PlatformBitmapAssetMap>());
+ final typedBitmap = platformBitmap as PlatformBitmapAssetMap;
expect(typedBitmap.assetName, assetName);
expect(typedBitmap.bitmapScaling, PlatformMapBitmapScaling.auto);
expect(typedBitmap.imagePixelRatio, 2.0);