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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import GoogleMaps
import Testing
import google_maps_flutter_ios_sdk10_objc

@testable import google_maps_flutter_ios_sdk10

Expand All @@ -14,14 +13,14 @@ import google_maps_flutter_ios_sdk10_objc
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"
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import Flutter
import GoogleMaps
import Testing
import google_maps_flutter_ios_sdk10_objc

@testable import google_maps_flutter_ios_sdk10

Expand Down Expand Up @@ -36,7 +35,7 @@ import google_maps_flutter_ios_sdk10_objc

// 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
Expand All @@ -47,18 +46,16 @@ import google_maps_flutter_ios_sdk10_objc
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,
Expand All @@ -73,8 +70,8 @@ import google_maps_flutter_ios_sdk10_objc
clusterManagerId: clusterManagerId,
collisionBehavior: nil
)
let marker2 = FGMPlatformMarker.make(
withAlpha: 1,
let marker2 = PlatformMarker(
alpha: 1,
anchor: zeroPoint,
consumeTapEvents: false,
draggable: false,
Expand All @@ -96,11 +93,7 @@ import google_maps_flutter_ios_sdk10_objc
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 })
)
Expand All @@ -111,11 +104,7 @@ import google_maps_flutter_ios_sdk10_objc
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 })
)
Expand All @@ -125,11 +114,7 @@ import google_maps_flutter_ios_sdk10_objc
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
Expand Down
Loading
Loading