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
4 changes: 2 additions & 2 deletions example/shared/src/screens/HomeScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,14 @@ const HomeContent = ({ onMarkerPress: onMarkerPressProp }: HomeProps) => {
const moveToRandomMarker = () => {
if (markers.length === 0) return;
const marker = randomFrom(markers);
mapRef.current?.moveCamera(marker.coordinate);
mapRef.current?.moveCamera(marker.coordinate, { duration: 2000 });
mapRef.current?.showMarkerCallout(marker.id);
};

const fitAllMarkers = () => {
mapRef.current?.fitCoordinates(
markers.map((m) => m.coordinate),
{ padding: { top: 60, left: 40, right: 40, bottom: 40 } }
{ duration: 2000, padding: { top: 60, left: 40, right: 40, bottom: 40 } }
);
};

Expand Down
4 changes: 2 additions & 2 deletions ios/core/AppleMapProvider.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1778,7 +1778,7 @@ - (void)moveCamera:(double)latitude
zoomLevel:targetZoom];
[UIView animateWithDuration:duration / 1000.0
animations:^{
[self->_mapView setRegion:region animated:NO];
[self->_mapView setRegion:region animated:YES];
}];
} else {
[_mapView
Expand Down Expand Up @@ -1823,7 +1823,7 @@ - (void)fitCoordinates:(NSArray *)coordinates
animations:^{
[self->_mapView setVisibleMapRect:mapRect
edgePadding:insets
animated:NO];
animated:YES];
}];
} else {
[_mapView setVisibleMapRect:mapRect edgePadding:insets animated:NO];
Expand Down