Skip to content
Merged
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
15 changes: 12 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ matrix:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
before_cache:
- rm -f example/node_modules/\@react-native-mapbox/
- rm -f example/node_modules/\@react-native-mapbox-gl/
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
- os: osx
Expand All @@ -35,7 +35,7 @@ matrix:
- example/node_modules
- $HOME/Library/Caches/Homebrew
before_cache:
- rm -f example/node_modules/\@react-native-mapbox/
- rm -f example/node_modules/\@react-native-mapbox-gl/
- brew cleanup
podfile: example/ios/Podfile

Expand All @@ -47,7 +47,7 @@ install:
- cd $TRAVIS_BUILD_DIR/example
- echo $MAPBOX_ACCESS_TOKEN > ./accesstoken
- find node_modules -name ".git" -exec rm -r "{}" \; || true
- rm -rf example/node_modules/\@react-native-mapbox/
- rm -rf example/node_modules/\@react-native-mapbox-gl/
- yarn install
- echo $TRAVIS_OS_NAME
- |
Expand All @@ -74,3 +74,12 @@ script:
- yarn global add -g 'jest@24.8.0'
- yarn install
- yarn run unittest
deploy:
provider: npm
email: kristfallro@gmail.com
api_key:
secure: B2hTPnT+8dWEbpBc8c2/8rwlmha8iVkRXzj88W+bgsg3k1c+tX+fNTJtbHqtahMuLfkBn6iSxfL9Bv70pXUSkdjyArlE7QdddzMx6UOO9vjoReuh1lyWNTHDx2u9iOSFYX1zsEJrf6wXkfhAtrBqF/tg2pu2NdHcaTy9grhPGnQgFpVCYKrQ67uoursqavd0nUiXVAteLH12zo0Nn1LhchogWA6CZPzz5PNgOv/KuiGIt/fmcg/Y7nlwI5BL0R29MmTIDR33tP509lFwyFTgqY/Xv4jWy0Miw+r0WQFYllkncj6dpuJ7FTdmOMfwL5vJX7B+kpZAtiBlXWtuIetRAfa/1KIWqeSIAYZTNFoEOymOXQM6DWklB3guGkAMnXNZslUvUevPzAY4SUL5fcoD+3FO8H4VAm328+hCtQWkyZbNLrU4X1FHd3BVY19YiHONHLGND9jzyzM/z0JocV0VG5azaIpPQDFVOjxhrWzTMAgwA+hNKtvQJegXIbW/sQJp12zPLv0dHJuIKjwXrnQtlSdr8JResHPFcLScuAWJ4QTSU2khcn0Ul5RnhCSGD3ic45nt46AzABqBhD6rMLesH+gbJ/i9v3LbiU7+r5JSTPfZ4ntJs168AeXy27hnWck54OjKIHp6JZ25jbJwTRCEZH1i7ETYKcheyTRR4sDiUxI=
on:
tags: true
repo: react-native-mapbox-gl/maps
branch: master
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
1. `cd` into your project
1. You have 2 options for linking `react-native-mapbox-gl`
* Use `react-native link`
* Clone `@react-native-mapbox/maps` into the `node_modules` folder
* Clone `@react-native-mapbox-gl/maps` into the `node_modules` folder
1. Go through a normal install process for your platform

Once installed, you can edit any file in `@react-native-mapbox/maps`,
Once installed, you can edit any file in `@react-native-mapbox-gl/maps`,
commit the changes and push them to a fork for creating a pull request.

## Best practices for PR's
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
_An unofficial React Native library for building maps with the [Mapbox Maps SDK for iOS](https://www.mapbox.com/ios-sdk/) and [Mapbox Maps SDK for Android](https://www.mapbox.com/android-sdk/)_

[![npm version](https://badge.fury.io/js/%40mapbox%2Freact-native-mapbox-gl.svg)](https://badge.fury.io/js/%40mapbox%2Freact-native-mapbox-gl)
![build_status](https://travis-ci.org/react-native-mapbox/maps.svg?branch=master)
![build_status](https://travis-ci.org/react-native-mapbox-gl/maps.svg?branch=master)

## Installation

Expand All @@ -15,18 +15,18 @@ _An unofficial React Native library for building maps with the [Mapbox Maps SDK

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

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

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

## Installation Guides
Expand Down
4 changes: 2 additions & 2 deletions android/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation "com.facebook.react:react-native:+" // From node_modules
+ implementation project(':react-native-mapbox/maps')
+ implementation project(':react-native-mapbox-gl/maps')
}
```

Expand All @@ -60,7 +60,7 @@ Include project, so gradle knows where to find the project
rootProject.name = <YOUR_PROJECT_NAME>

+include ':@react-native-mapbox_maps'
+project(':@react-native-mapbox_maps').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-mapbox/maps/android/rctmgl')
+project(':@react-native-mapbox_maps').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-mapbox-gl/maps/android/rctmgl')

include ':app'¬
```
Expand Down
16 changes: 5 additions & 11 deletions docs/GettingStarted.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Getting Started

Congratulations, you successfully installed react-native-mapbox/maps! 🎉
Congratulations, you successfully installed react-native-mapbox-gl/maps! 🎉
Where to go from here?
You can head straight to [examples](/example) folder if you want to jump into the deep end.
However, if you prefer an easier ramp-up, then make sure to stick around and check out the guides below.
Expand All @@ -13,7 +13,7 @@ You can create and manage your access tokens on your [Mapbox Account page](https
Once you have your accessToken, set it like this

```js
import MapboxGL from "@react-native-mapbox/maps";
import MapboxGL from "@react-native-mapbox-gl/maps";

MapboxGL.setAccessToken("<YOUR_ACCESSTOKEN>");
```
Expand All @@ -23,13 +23,9 @@ MapboxGL.setAccessToken("<YOUR_ACCESSTOKEN>");
By default mapbox collects telemetry.
If you would like to programmatically disable this within your app add the code below.

Notice that `isTelemetryEnabled` returns a Promise.

```js
componentDidMount() {
MapboxGL.isTelemetryEnabled().then(isEnabled => {
isEnabled && MapboxGL.setTelemetryEnabled(false);
});
MapboxGL.setTelemetryEnabled(false);
}
```

Expand All @@ -40,7 +36,7 @@ For more information on mapbox and telemetry: [https://www.mapbox.com/telemetry]
```js
import React, { Component } from "react";
import { StyleSheet, View } from "react-native";
import MapboxGL from "@react-native-mapbox/maps";
import MapboxGL from "@react-native-mapbox-gl/maps";

MapboxGL.setAccessToken("<YOUR_ACCESSTOKEN>");

Expand All @@ -63,9 +59,7 @@ const styles = StyleSheet.create({

export default class App extends Component {
componentDidMount() {
MapboxGL.isTelemetryEnabled().then(isEnabled => {
isEnabled && MapboxGL.setTelemetryEnabled(false);
});
MapboxGL.setTelemetryEnabled(false);
}

render() {
Expand Down
2 changes: 1 addition & 1 deletion example/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ rootProject.name = 'RNMapboxGLExample'
include ':app'

include ':android-mapbox-react-native-mapbox-gl'
project(':android-mapbox-react-native-mapbox-gl').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-mapbox/maps/android/rctmgl')
project(':android-mapbox-react-native-mapbox-gl').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-mapbox-gl/maps/android/rctmgl')

include ':react-native-vector-icons'
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
2 changes: 1 addition & 1 deletion example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ target 'RNMapboxGLExample' do
pod 'Folly', :podspec => "#{rn_path}/third-party-podspecs/Folly.podspec"

# Mapbox
pod 'react-native-mapbox-gl', :path => '../node_modules/@react-native-mapbox/maps'
pod 'react-native-mapbox-gl', :path => '../node_modules/@react-native-mapbox-gl/maps'

# RN-Vector-Icons
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
Expand Down
8 changes: 4 additions & 4 deletions example/ios/RNMapboxGLExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1252,7 +1252,7 @@
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-RNMapboxGLExample/Pods-RNMapboxGLExample-frameworks.sh",
"${PODS_ROOT}/../../node_modules/@react-native-mapbox/maps/ios/Mapbox.framework",
"${PODS_ROOT}/../../node_modules/@react-native-mapbox-gl/maps/ios/Mapbox.framework",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
Expand Down Expand Up @@ -1350,7 +1350,7 @@
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-RNMapboxGLExample/Pods-RNMapboxGLExample-frameworks.sh",
"${PODS_ROOT}/../../node_modules/@react-native-mapbox/maps/ios/Mapbox.framework",
"${PODS_ROOT}/../../node_modules/@react-native-mapbox-gl/maps/ios/Mapbox.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
Expand Down Expand Up @@ -1476,7 +1476,7 @@
DEAD_CODE_STRIPPING = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/../node_modules/@mapbox/react-native-mapbox-gl/ios",
"$(PROJECT_DIR)/../node_modules/@react-native-mapbox-gl/maps/ios",
);
HEADER_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = RNMapboxGLExample/Info.plist;
Expand All @@ -1503,7 +1503,7 @@
CURRENT_PROJECT_VERSION = 1;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/../node_modules/@mapbox/react-native-mapbox-gl/ios",
"$(PROJECT_DIR)/../node_modules/@react-native-mapbox-gl/maps/ios",
);
HEADER_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = RNMapboxGLExample/Info.plist;
Expand Down
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"dependencies": {
"@mapbox/geo-viewport": "^0.4.0",
"@react-native-mapbox/maps": "file:../react-native-mapbox-maps-7.0.0.tgz",
"@react-native-mapbox-gl/maps": "file:../react-native-mapbox-gl-maps-7.0.0.tgz",
"@turf/along": "^5.1.5",
"@turf/bearing": "^5.1.5",
"@turf/distance": "^5.1.5",
Expand Down
2 changes: 1 addition & 1 deletion example/scripts/watch_rngl.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const path = require('path');
const fs = require('fs-extra');

const RNGL_DIR = path.join('..');
const RNGL_EXAMPLE_DIR = path.join('node_modules', '@mapbox', 'react-native-mapbox-gl');
const RNGL_EXAMPLE_DIR = path.join('node_modules', '@react-native-mapbox-gl', 'maps');

function copyFile(source, dest) {
return new Promise((resolve, reject) => {
Expand Down
2 changes: 1 addition & 1 deletion example/src/App.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import MapboxGL from '@react-native-mapbox/maps';
import MapboxGL from '@react-native-mapbox-gl/maps';
import {
FlatList,
Modal,
Expand Down
2 changes: 1 addition & 1 deletion example/src/examples/ChoroplethLayerByZoomLevel.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import MapboxGL from '@react-native-mapbox/maps';
import MapboxGL from '@react-native-mapbox-gl/maps';

import sheet from '../styles/sheet';

Expand Down
2 changes: 1 addition & 1 deletion example/src/examples/CreateOfflineRegion.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
Dimensions,
StyleSheet,
} from 'react-native';
import MapboxGL from '@react-native-mapbox/maps';
import MapboxGL from '@react-native-mapbox-gl/maps';
import geoViewport from '@mapbox/geo-viewport';

import sheet from '../styles/sheet';
Expand Down
2 changes: 1 addition & 1 deletion example/src/examples/CustomIcon.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import {Text} from 'react-native';
import MapboxGL from '@react-native-mapbox/maps';
import MapboxGL from '@react-native-mapbox-gl/maps';

import sheet from '../styles/sheet';
import exampleIcon from '../assets/example.png';
Expand Down
2 changes: 1 addition & 1 deletion example/src/examples/CustomVectorSource.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import MapboxGL from '@react-native-mapbox/maps';
import MapboxGL from '@react-native-mapbox-gl/maps';

import sheet from '../styles/sheet';

Expand Down
2 changes: 1 addition & 1 deletion example/src/examples/DataDrivenCircleColors.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import MapboxGL from '@react-native-mapbox/maps';
import MapboxGL from '@react-native-mapbox-gl/maps';

import sheet from '../styles/sheet';

Expand Down
2 changes: 1 addition & 1 deletion example/src/examples/DriveTheLine.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import MapboxGL from '@react-native-mapbox/maps';
import MapboxGL from '@react-native-mapbox-gl/maps';
import {View, StyleSheet} from 'react-native';
import {Button} from 'react-native-elements';
import {lineString as makeLineString} from '@turf/helpers';
Expand Down
2 changes: 1 addition & 1 deletion example/src/examples/EarthQuakes.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import MapboxGL from '@react-native-mapbox/maps';
import MapboxGL from '@react-native-mapbox-gl/maps';

import sheet from '../styles/sheet';
import {SF_OFFICE_COORDINATE} from '../utils';
Expand Down
2 changes: 1 addition & 1 deletion example/src/examples/FitBounds.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import MapboxGL from '@react-native-mapbox/maps';
import MapboxGL from '@react-native-mapbox-gl/maps';

import sheet from '../styles/sheet';

Expand Down
2 changes: 1 addition & 1 deletion example/src/examples/FlyTo.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import {Alert} from 'react-native';
import MapboxGL from '@react-native-mapbox/maps';
import MapboxGL from '@react-native-mapbox-gl/maps';

import sheet from '../styles/sheet';

Expand Down
2 changes: 1 addition & 1 deletion example/src/examples/GeoJSONSource.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import MapboxGL from '@react-native-mapbox/maps';
import MapboxGL from '@react-native-mapbox-gl/maps';

import sheet from '../styles/sheet';
import gridPattern from '../assets/grid_pattern.png';
Expand Down
2 changes: 1 addition & 1 deletion example/src/examples/GetCenter.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import {Text} from 'react-native';
import MapboxGL from '@react-native-mapbox/maps';
import MapboxGL from '@react-native-mapbox-gl/maps';

import BaseExamplePropTypes from './common/BaseExamplePropTypes';
import Page from './common/Page';
Expand Down
2 changes: 1 addition & 1 deletion example/src/examples/GetZoom.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import {Text} from 'react-native';
import MapboxGL from '@react-native-mapbox/maps';
import MapboxGL from '@react-native-mapbox-gl/maps';

import BaseExamplePropTypes from './common/BaseExamplePropTypes';
import Page from './common/Page';
Expand Down
2 changes: 1 addition & 1 deletion example/src/examples/ImageOverlay.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import MapboxGL from '@react-native-mapbox/maps';
import MapboxGL from '@react-native-mapbox-gl/maps';

import sheet from '../styles/sheet';
import radar0 from '../assets/radar.png';
Expand Down
2 changes: 1 addition & 1 deletion example/src/examples/IndoorBuilding.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import {View, StyleSheet} from 'react-native';
import MapboxGL from '@react-native-mapbox/maps';
import MapboxGL from '@react-native-mapbox-gl/maps';
import {Slider} from 'react-native-elements';

import sheet from '../styles/sheet';
Expand Down
2 changes: 1 addition & 1 deletion example/src/examples/PointInMapView.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import {Text} from 'react-native';
import MapboxGL from '@react-native-mapbox/maps';
import MapboxGL from '@react-native-mapbox-gl/maps';

import BaseExamplePropTypes from './common/BaseExamplePropTypes';
import Page from './common/Page';
Expand Down
2 changes: 1 addition & 1 deletion example/src/examples/QueryAtPoint.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import {Text} from 'react-native';
import MapboxGL from '@react-native-mapbox/maps';
import MapboxGL from '@react-native-mapbox-gl/maps';

import sheet from '../styles/sheet';
import nycJSON from '../assets/nyc_geojson.json';
Expand Down
2 changes: 1 addition & 1 deletion example/src/examples/QueryWithRect.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import {Text} from 'react-native';
import MapboxGL from '@react-native-mapbox/maps';
import MapboxGL from '@react-native-mapbox-gl/maps';

import sheet from '../styles/sheet';
import nycJSON from '../assets/nyc_geojson.json';
Expand Down
2 changes: 1 addition & 1 deletion example/src/examples/SetHeading.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import MapboxGL from '@react-native-mapbox/maps';
import MapboxGL from '@react-native-mapbox-gl/maps';

import sheet from '../styles/sheet';

Expand Down
2 changes: 1 addition & 1 deletion example/src/examples/SetPitch.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import MapboxGL from '@react-native-mapbox/maps';
import MapboxGL from '@react-native-mapbox-gl/maps';

import sheet from '../styles/sheet';

Expand Down
2 changes: 1 addition & 1 deletion example/src/examples/SetUserLocationVerticalAlignment.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import MapboxGL from '@react-native-mapbox/maps';
import MapboxGL from '@react-native-mapbox-gl/maps';

import sheet from '../styles/sheet';
import {onSortOptions} from '../utils';
Expand Down
2 changes: 1 addition & 1 deletion example/src/examples/SetUserTrackingModes.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import {Text} from 'react-native';
import MapboxGL from '@react-native-mapbox/maps';
import MapboxGL from '@react-native-mapbox-gl/maps';

import sheet from '../styles/sheet';
import {onSortOptions} from '../utils';
Expand Down
2 changes: 1 addition & 1 deletion example/src/examples/ShapeSourceIcon.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import MapboxGL from '@react-native-mapbox/maps';
import MapboxGL from '@react-native-mapbox-gl/maps';

import sheet from '../styles/sheet';
import exampleIcon from '../assets/example.png';
Expand Down
Loading