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.3

* Prevents iOS marker position updates from being implicitly animated.

## 2.18.2

* Adds attribution ID for Google Maps SDK usage.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

@import google_maps_flutter_ios;
@import GoogleMaps;
@import QuartzCore;
@import XCTest;

#import "TestUtils/PartiallyMockedMapView.h"
Expand All @@ -16,6 +17,13 @@ @interface PropertyOrderValidatingAdvancedMarker : GMSAdvancedMarker {
@property(nonatomic) BOOL hasSetMap;
@end

/// A GMSMarker that ensures position changes have implicit animations disabled.
@interface PositionAnimationValidatingMarker : GMSMarker {
}
@property(nonatomic) BOOL hasSetPosition;
@property(nonatomic) BOOL wereActionsDisabledWhenSettingPosition;
@end
Comment thread
Gibbo97 marked this conversation as resolved.

@interface MarkerControllerTests : XCTestCase
@end

Expand Down Expand Up @@ -276,6 +284,40 @@ - (void)testUpdateMarkerSetsVisibilityLast {
XCTAssertTrue(marker.hasSetMap);
}

- (void)testUpdateMarkerDisablesPositionAnimation {
PositionAnimationValidatingMarker *marker = [[PositionAnimationValidatingMarker alloc] init];
[FGMMarkerController updateMarker:marker
fromPlatformMarker:[FGMPlatformMarker
makeWithAlpha:1.0
anchor:[FGMPlatformPoint makeWithX:0 y:0]
consumeTapEvents:YES
draggable:YES
flat:YES
icon:[self placeholderBitmap]
infoWindow:[FGMPlatformInfoWindow
makeWithTitle:@"info title"
snippet:@"info snippet"
anchor:[FGMPlatformPoint
makeWithX:0
y:0]]
position:[FGMPlatformLatLng makeWithLatitude:0
longitude:0]
rotation:0
visible:YES
zIndex:0
markerId:@"marker"
clusterManagerId:nil
collisionBehavior:nil]
withMapView:[MarkerControllerTests mapView]
assetProvider:[[TestAssetProvider alloc] init]
screenScale:1
usingOpacityForVisibility:NO];

XCTAssertTrue(marker.hasSetPosition);
XCTAssertTrue(marker.wereActionsDisabledWhenSettingPosition,
@"Position animation should be disabled.");
}
Comment thread
Gibbo97 marked this conversation as resolved.

- (void)testAssetProviderIsRetained {
FGMMarkersController *markerController;
__weak TestAssetProvider *weakAssetProvider;
Expand All @@ -296,6 +338,16 @@ - (void)testAssetProviderIsRetained {

@end

@implementation PositionAnimationValidatingMarker

- (void)setPosition:(CLLocationCoordinate2D)position {
self.wereActionsDisabledWhenSettingPosition = [CATransaction disableActions];
self.hasSetPosition = YES;
super.position = position;
}

@end
Comment thread
Gibbo97 marked this conversation as resolved.

@implementation PropertyOrderValidatingAdvancedMarker

- (void)setPosition:(CLLocationCoordinate2D)position {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

@import QuartzCore;

#import "FGMMarkerController.h"
#import "FGMMarkerController_Test.h"

Expand Down Expand Up @@ -85,7 +87,10 @@ + (void)updateMarker:(GMSMarker *)marker
UIImage *image = FGMIconFromBitmap(platformMarker.icon, assetProvider, screenScale);
marker.icon = image;
marker.flat = platformMarker.flat;
[CATransaction begin];
[CATransaction setDisableActions:YES];
marker.position = FGMGetCoordinateForPigeonLatLng(platformMarker.position);
[CATransaction commit];
Comment thread
Gibbo97 marked this conversation as resolved.
marker.rotation = platformMarker.rotation;
marker.zIndex = (int)platformMarker.zIndex;
FGMPlatformInfoWindow *infoWindow = platformMarker.infoWindow;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: google_maps_flutter_ios
description: iOS implementation of the google_maps_flutter plugin.
repository: https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter_ios
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22
version: 2.18.2
version: 2.18.3

environment:
sdk: ^3.10.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.18.3

* Prevents iOS marker position updates from being implicitly animated.

## 2.18.2

* Adds attribution ID for Google Maps SDK usage.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

@import google_maps_flutter_ios_sdk10;
@import GoogleMaps;
@import QuartzCore;
@import XCTest;

#import "TestUtils/PartiallyMockedMapView.h"
Expand All @@ -16,6 +17,13 @@ @interface PropertyOrderValidatingAdvancedMarker : GMSAdvancedMarker {
@property(nonatomic) BOOL hasSetMap;
@end

/// A GMSMarker that ensures position changes have implicit animations disabled.
@interface PositionAnimationValidatingMarker : GMSMarker {
}
@property(nonatomic) BOOL hasSetPosition;
@property(nonatomic) BOOL wereActionsDisabledWhenSettingPosition;
@end
Comment thread
Gibbo97 marked this conversation as resolved.

@interface MarkerControllerTests : XCTestCase
@end

Expand Down Expand Up @@ -276,6 +284,40 @@ - (void)testUpdateMarkerSetsVisibilityLast {
XCTAssertTrue(marker.hasSetMap);
}

- (void)testUpdateMarkerDisablesPositionAnimation {
PositionAnimationValidatingMarker *marker = [[PositionAnimationValidatingMarker alloc] init];
[FGMMarkerController updateMarker:marker
fromPlatformMarker:[FGMPlatformMarker
makeWithAlpha:1.0
anchor:[FGMPlatformPoint makeWithX:0 y:0]
consumeTapEvents:YES
draggable:YES
flat:YES
icon:[self placeholderBitmap]
infoWindow:[FGMPlatformInfoWindow
makeWithTitle:@"info title"
snippet:@"info snippet"
anchor:[FGMPlatformPoint
makeWithX:0
y:0]]
position:[FGMPlatformLatLng makeWithLatitude:0
longitude:0]
rotation:0
visible:YES
zIndex:0
markerId:@"marker"
clusterManagerId:nil
collisionBehavior:nil]
withMapView:[MarkerControllerTests mapView]
assetProvider:[[TestAssetProvider alloc] init]
screenScale:1
usingOpacityForVisibility:NO];

XCTAssertTrue(marker.hasSetPosition);
XCTAssertTrue(marker.wereActionsDisabledWhenSettingPosition,
@"Position animation should be disabled.");
}
Comment thread
Gibbo97 marked this conversation as resolved.

- (void)testAssetProviderIsRetained {
FGMMarkersController *markerController;
__weak TestAssetProvider *weakAssetProvider;
Expand All @@ -296,6 +338,16 @@ - (void)testAssetProviderIsRetained {

@end

@implementation PositionAnimationValidatingMarker

- (void)setPosition:(CLLocationCoordinate2D)position {
self.wereActionsDisabledWhenSettingPosition = [CATransaction disableActions];
self.hasSetPosition = YES;
super.position = position;
}

@end
Comment thread
Gibbo97 marked this conversation as resolved.

@implementation PropertyOrderValidatingAdvancedMarker

- (void)setPosition:(CLLocationCoordinate2D)position {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

@import QuartzCore;

#import "FGMMarkerController.h"
#import "FGMMarkerController_Test.h"

Expand Down Expand Up @@ -85,7 +87,10 @@ + (void)updateMarker:(GMSMarker *)marker
UIImage *image = FGMIconFromBitmap(platformMarker.icon, assetProvider, screenScale);
marker.icon = image;
marker.flat = platformMarker.flat;
[CATransaction begin];
[CATransaction setDisableActions:YES];
marker.position = FGMGetCoordinateForPigeonLatLng(platformMarker.position);
[CATransaction commit];
Comment thread
Gibbo97 marked this conversation as resolved.
marker.rotation = platformMarker.rotation;
marker.zIndex = (int)platformMarker.zIndex;
FGMPlatformInfoWindow *infoWindow = platformMarker.infoWindow;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: google_maps_flutter_ios_sdk10
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.2
version: 2.18.3

environment:
sdk: ^3.10.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.18.3

* Prevents iOS marker position updates from being implicitly animated.

## 2.18.2

* Adds attribution ID for Google Maps SDK usage.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

@import google_maps_flutter_ios_sdk9;
@import GoogleMaps;
@import QuartzCore;
@import XCTest;

#import "TestUtils/PartiallyMockedMapView.h"
Expand All @@ -16,6 +17,13 @@ @interface PropertyOrderValidatingAdvancedMarker : GMSAdvancedMarker {
@property(nonatomic) BOOL hasSetMap;
@end

/// A GMSMarker that ensures position changes have implicit animations disabled.
@interface PositionAnimationValidatingMarker : GMSMarker {
}
@property(nonatomic) BOOL hasSetPosition;
@property(nonatomic) BOOL wereActionsDisabledWhenSettingPosition;
@end
Comment thread
Gibbo97 marked this conversation as resolved.

@interface MarkerControllerTests : XCTestCase
@end

Expand Down Expand Up @@ -276,6 +284,40 @@ - (void)testUpdateMarkerSetsVisibilityLast {
XCTAssertTrue(marker.hasSetMap);
}

- (void)testUpdateMarkerDisablesPositionAnimation {
PositionAnimationValidatingMarker *marker = [[PositionAnimationValidatingMarker alloc] init];
[FGMMarkerController updateMarker:marker
fromPlatformMarker:[FGMPlatformMarker
makeWithAlpha:1.0
anchor:[FGMPlatformPoint makeWithX:0 y:0]
consumeTapEvents:YES
draggable:YES
flat:YES
icon:[self placeholderBitmap]
infoWindow:[FGMPlatformInfoWindow
makeWithTitle:@"info title"
snippet:@"info snippet"
anchor:[FGMPlatformPoint
makeWithX:0
y:0]]
position:[FGMPlatformLatLng makeWithLatitude:0
longitude:0]
rotation:0
visible:YES
zIndex:0
markerId:@"marker"
clusterManagerId:nil
collisionBehavior:nil]
withMapView:[MarkerControllerTests mapView]
assetProvider:[[TestAssetProvider alloc] init]
screenScale:1
usingOpacityForVisibility:NO];

XCTAssertTrue(marker.hasSetPosition);
XCTAssertTrue(marker.wereActionsDisabledWhenSettingPosition,
@"Position animation should be disabled.");
}
Comment thread
Gibbo97 marked this conversation as resolved.

- (void)testAssetProviderIsRetained {
FGMMarkersController *markerController;
__weak TestAssetProvider *weakAssetProvider;
Expand All @@ -296,6 +338,16 @@ - (void)testAssetProviderIsRetained {

@end

@implementation PositionAnimationValidatingMarker

- (void)setPosition:(CLLocationCoordinate2D)position {
self.wereActionsDisabledWhenSettingPosition = [CATransaction disableActions];
self.hasSetPosition = YES;
super.position = position;
}

@end
Comment thread
Gibbo97 marked this conversation as resolved.

@implementation PropertyOrderValidatingAdvancedMarker

- (void)setPosition:(CLLocationCoordinate2D)position {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

@import QuartzCore;

#import "FGMMarkerController.h"
#import "FGMMarkerController_Test.h"

Expand Down Expand Up @@ -85,7 +87,10 @@ + (void)updateMarker:(GMSMarker *)marker
UIImage *image = FGMIconFromBitmap(platformMarker.icon, assetProvider, screenScale);
marker.icon = image;
marker.flat = platformMarker.flat;
[CATransaction begin];
[CATransaction setDisableActions:YES];
marker.position = FGMGetCoordinateForPigeonLatLng(platformMarker.position);
[CATransaction commit];
Comment thread
Gibbo97 marked this conversation as resolved.
marker.rotation = platformMarker.rotation;
marker.zIndex = (int)platformMarker.zIndex;
FGMPlatformInfoWindow *infoWindow = platformMarker.infoWindow;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: google_maps_flutter_ios_sdk9
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.2
version: 2.18.3

environment:
sdk: ^3.10.0
Expand Down
Loading