Skip to content

Commit

Permalink
[7.2.0] Use pods for mapbox iOS SDK (rnmapbox#637)
Browse files Browse the repository at this point in the history
* Use pods for installing native SDK

* Update iOS framework install

* Update readme and installation documentation
  • Loading branch information
kristfal authored Jan 23, 2020
1 parent c4f28aa commit 1bd2976
Show file tree
Hide file tree
Showing 12 changed files with 545 additions and 684 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,4 @@ coverage
*.core.prefs
*.iml

react-native-mapbox-gl-maps.tgz
185 changes: 100 additions & 85 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,95 +1,110 @@
## 7.2.0

- Upstream changes in Mapbox iOS SDK 5.6.0 has made installing the SDK as an embedded framework difficult. We have therefore discontinued supporting manual installations. To update, follow the iOS installation instructions using cocoapods.

## 7.0.0

### Breaking changes:

* iOS mapbox libraries updated to [5.5.0](https://github.com/mapbox/mapbox-gl-native/releases/tag/ios-v5.3.2) android libraries updated to [8.2.1](https://github.com/mapbox/mapbox-gl-native/releases/tag/android-v8.2.1)
* `StyleSheet.create` removed.
Mapbox styles are now just a map no need for `StyleSheet.create`.
`StylesSheet.identity` also removed, use expressions array instead:
```jsx
mapboxStyle=MapboxGL.Stylesheet.create({..., fillColor: MapboxGL.Stylesheet.identity('color') ...})
...
<MapView
...
<FillLayer style={mapboxStyle}... />
</MapView>
```

is now:
```jsx
mapboxStyle={..., fillColor: ['get', 'color'] ...}
...
<MapView
...
<FillLayer style={mapboxStyle}... />
</MapView>
```
- iOS mapbox libraries updated to [5.5.0](https://github.com/mapbox/mapbox-gl-native/releases/tag/ios-v5.3.2) android libraries updated to [8.2.1](https://github.com/mapbox/mapbox-gl-native/releases/tag/android-v8.2.1)
- `StyleSheet.create` removed.
Mapbox styles are now just a map no need for `StyleSheet.create`.
`StylesSheet.identity` also removed, use expressions array instead:

```jsx
mapboxStyle=MapboxGL.Stylesheet.create({..., fillColor: MapboxGL.Stylesheet.identity('color') ...})
...
<MapView
...
<FillLayer style={mapboxStyle}... />
</MapView>
```

is now:

```jsx
mapboxStyle={..., fillColor: ['get', 'color'] ...}
...
<MapView
...
<FillLayer style={mapboxStyle}... />
</MapView>
```

See [docs/StyleSheet.md](docs/StyleSheet.md) for more examples
* `isTelemetryEnabled` removed (as no longer supported on android) [#1](https://github.com/mfazekas/maps/pull/1)
* MapView#flyTo, MapView#bitBounds, MapView#flyTo, MapView#moveTo, MapView#zoomTo, MapView#setCamera moved to Camera. There is also experimantal properties, to replace those. See [docs/Camera.md](docs/Camera.md)
* Camera related properties on `MapView` now have to be specified on a camera object:
```jsx
<MapView
zoomLevel={8}
centerCoordinate={[-111.8678, 40.2866]}
...
>
...
</MapView>
```

is now:

```jsx
<MapView
...
>
<Camera
zoomLevel={8}
centerCoordinate={[-111.8678, 40.2866]}
/>
</MapView>
```
See [docs/Camera.md](docs/Camera.md) for more examples
* User tracking properties moved from `MapView` to `Camera`
```jsx
<MapView
userTrackingMode={UserTrackingModes.Follow}
...
>
...
</MapView>
```

is now:

```jsx
<MapView

- `isTelemetryEnabled` removed (as no longer supported on android) [#1](https://github.com/mfazekas/maps/pull/1)
- MapView#flyTo, MapView#bitBounds, MapView#flyTo, MapView#moveTo, MapView#zoomTo, MapView#setCamera moved to Camera. There is also experimantal properties, to replace those. See [docs/Camera.md](docs/Camera.md)
- Camera related properties on `MapView` now have to be specified on a camera object:

```jsx
<MapView
zoomLevel={8}
centerCoordinate={[-111.8678, 40.2866]}
...
>
<Camera
followUserLocation=true
followUserMode="normal"
/>
</MapView>
```
The following properties were changed:
* MapView#userTrackingMode is now Camera#followUserMode and Camera#followUserLocation
* followUserMode is now a string with ('normal','compass','course'), and UserTrackingModes enum is deprecated
* MapView#onUserTrackingModeChange is now Camera#onUserTrackingModeChange and payload contains followUserMode and followUserLocation.

* ShapeSource#images was depreacted, use Images#images instead.
```jsx
<MapView
>
...
>
</MapView>
```

is now:

```jsx
<MapView
...
>
<Camera
zoomLevel={8}
centerCoordinate={[-111.8678, 40.2866]}
/>
</MapView>
```

See [docs/Camera.md](docs/Camera.md) for more examples

- User tracking properties moved from `MapView` to `Camera`

```jsx
<MapView
userTrackingMode={UserTrackingModes.Follow}
...
<Images images={{pin, dot}} />
>
...
<ShapeSource ... >
<SymbolLayer ...>
</ShapeSource>
</MapView>
```
</MapView>
```

is now:

```jsx
<MapView
...
>
<Camera
followUserLocation=true
followUserMode="normal"
/>
</MapView>
```

The following properties were changed:

- MapView#userTrackingMode is now Camera#followUserMode and Camera#followUserLocation
- followUserMode is now a string with ('normal','compass','course'), and UserTrackingModes enum is deprecated
- MapView#onUserTrackingModeChange is now Camera#onUserTrackingModeChange and payload contains followUserMode and followUserLocation.

- ShapeSource#images was depreacted, use Images#images instead.

```jsx
<MapView
...
>
...
<Images images={{pin, dot}} />
...
<ShapeSource ... >
<SymbolLayer ...>
</ShapeSource>
</MapView>
```

* TODO document all changes
- TODO document all changes
64 changes: 36 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,70 +10,78 @@ _An unofficial React Native library for building maps with the [Mapbox Maps SDK

**Dependencies**

* [node](https://nodejs.org)
* [npm](https://www.npmjs.com/)
* [React Native](https://facebook.github.io/react-native/) (0.59+)
- [node](https://nodejs.org)
- [npm](https://www.npmjs.com/)
- [React Native](https://facebook.github.io/react-native/) (0.60+)

**Git**

```
git clone git@github.com:react-native-mapbox-gl/maps.git
cd maps
```

**Yarn**

```
yarn add @react-native-mapbox-gl/maps
```

**Npm**

```
npm install @react-native-mapbox-gl/maps --save
```

## Installation Guides

* [Android](/android/install.md)
* [iOS](/ios/install.md)
* [Example](/example)
- [Android](/android/install.md)
- [iOS](/ios/install.md)
- [Example](/example)

## [Getting Started](/docs/GettingStarted.md)

## Documentation

### Components
* [MapView](/docs/MapView.md)
* [Light](/docs/Light.md)
* [StyleSheet](/docs/StyleSheet.md)
* [PointAnnotation](/docs/PointAnnotation.md)
* [Callout](/docs/Callout.md)
* [Camera](docs/Camera.md)
* [UserLocation](docs/UserLocation.md)
* [Images](docs/Images.md)

- [MapView](/docs/MapView.md)
- [Light](/docs/Light.md)
- [StyleSheet](/docs/StyleSheet.md)
- [PointAnnotation](/docs/PointAnnotation.md)
- [Callout](/docs/Callout.md)
- [Camera](docs/Camera.md)
- [UserLocation](docs/UserLocation.md)
- [Images](docs/Images.md)

### Sources
* [VectorSource](/docs/VectorSource.md)
* [ShapeSource](/docs/ShapeSource.md)
* [RasterSource](/docs/RasterSource.md)

- [VectorSource](/docs/VectorSource.md)
- [ShapeSource](/docs/ShapeSource.md)
- [RasterSource](/docs/RasterSource.md)

### Layers
* [BackgroundLayer](/docs/BackgroundLayer.md)
* [CircleLayer](/docs/CircleLayer.md)
* [FillExtrusionLayer](/docs/FillExtrusionLayer.md)
* [FillLayer](/docs/FillLayer.md)
* [LineLayer](/docs/LineLayer.md)
* [RasterLayer](/docs/RasterLayer.md)
* [SymbolLayer](/docs/SymbolLayer.md)
* [HeatmapLayer](/docs/HeatmapLayer.md)

- [BackgroundLayer](/docs/BackgroundLayer.md)
- [CircleLayer](/docs/CircleLayer.md)
- [FillExtrusionLayer](/docs/FillExtrusionLayer.md)
- [FillLayer](/docs/FillLayer.md)
- [LineLayer](/docs/LineLayer.md)
- [RasterLayer](/docs/RasterLayer.md)
- [SymbolLayer](/docs/SymbolLayer.md)
- [HeatmapLayer](/docs/HeatmapLayer.md)

### Offline
* [OfflineManager](/docs/OfflineManager.md)
* [SnapshotManager](/docs/snapshotManager.md)

- [OfflineManager](/docs/OfflineManager.md)
- [SnapshotManager](/docs/snapshotManager.md)

### Misc
* [CustomHttpHeaders](/docs/CustomHttpHeaders.md)

- [CustomHttpHeaders](/docs/CustomHttpHeaders.md)

## Expo Support

We have a feature request open with Expo if you want to see it get in show your support https://expo.canny.io/feature-requests/p/add-mapbox-gl-support

## Developer Group
Expand Down
4 changes: 3 additions & 1 deletion example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

target 'RNMapboxGLExample' do
# Pods for RNMapboxGLExample
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
Expand Down Expand Up @@ -33,12 +32,15 @@ target 'RNMapboxGLExample' do
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
pod 'react-native-mapbox-gl', :path => '../node_modules/@react-native-mapbox-gl/maps'


target 'RNMapboxGLExampleTests' do
inherit! :search_paths
# Pods for testing
end

use_frameworks!
use_native_modules!
end

Expand Down
Loading

0 comments on commit 1bd2976

Please sign in to comment.