React Native Maps 1.0 released with breaking changes and new features
updated
React Native Maps version 1.0.0 was released on 2022-07-07, following v0.31.1. Its release notes list features, bug fixes and breaking changes.
Features
- The codebase was migrated to typescript.
- Deprecated MapView methods have been removed.
- react-native >= 0.64.3 is now required.
- package.json is used as the source of truth for podspecs.
- Android: internet and location permissions were removed from AndroidManifest, and LocalTile now supports files from AssetManager.
- iOS: the google maps sdk was bumped to 6.2.1. The deprecated snapshot method was removed, and
showsUserLocationno longer requests location permissions. - iOS (Google): the maps sdk was bumped to 7.0.0, initial region logic moved to
layoutSubviews, and the camera is no longer set iflayoutSubviewswasn't triggered.
Bug fixes
- Android: a
longLogTagdebug error and wrong coordinates when pressing a polyline. - iOS: the camera being set repeatedly in
didPrepareMap, an icon flash glitch,initialRegionon Google Maps,onMapReadynot always being called with the Google provider, and wrong coordinates when pressing a polyline. - MapKit:
onRegionChangeCompletebeing called before the region change completed. - A missing context provider.
- Types: types present before v1 are exported again, and the
showsBuildingprop on MapView was fixed.
Breaking changes
- iOS: polyline
onPressreturnstapLocationinstead of the first point in the polyline. - Android: polyline
onPressreturnstapLocationin the same way. - Using Google Maps on iOS now requires iOS >= 13.0 and XCode >= 13.
- On iOS, location permissions must now be requested manually for
showsUserLocation. - Android: internet and location permissions were removed from AndroidManifest.
- The legacy iOS snapshot method was removed.
animateTo{Navigation,Coordinate,Bearing,ViewingAngle}were removed.- Types are now emitted automatically, and some might have changed.
- react-native-maps now requires react-native >= 0.64.3.
- Components are no longer exported as members of MapView. They should be imported directly instead, for example:
import MapView, {Marker} from 'react-native-maps';
Links
Source: github.com