Skip to content

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 showsUserLocation no 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 if layoutSubviews wasn't triggered.

Bug fixes

  • Android: a longLogTag debug error and wrong coordinates when pressing a polyline.
  • iOS: the camera being set repeatedly in didPrepareMap, an icon flash glitch, initialRegion on Google Maps, onMapReady not always being called with the Google provider, and wrong coordinates when pressing a polyline.
  • MapKit: onRegionChangeComplete being called before the region change completed.
  • A missing context provider.
  • Types: types present before v1 are exported again, and the showsBuilding prop on MapView was fixed.

Breaking changes

  • iOS: polyline onPress returns tapLocation instead of the first point in the polyline.
  • Android: polyline onPress returns tapLocation in 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';

Source: github.com