react-native-ptv-navigator
TypeScript icon, indicating that this package has built-in type declarations

1.2.2 • Public • Published

react-native-ptv-navigator

Getting started

$ npm install react-native-ptv-navigator --save

Mostly automatic installation

$ react-native link react-native-ptv-navigator

Manual installation

iOS

  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesreact-native-ptv-navigator and add RNReactNativePtvNavigator.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNReactNativePtvNavigator.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)<

Android

  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.reactlibrary.RNReactNativePtvNavigatorPackage; to the imports at the top of the file
  • Add new RNReactNativePtvNavigatorPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-ptv-navigator'
    project(':react-native-ptv-navigator').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-ptv-navigator/android')
    
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-ptv-navigator')
    

Windows

Read it! :D

  1. In Visual Studio add the RNReactNativePtvNavigator.sln in node_modules/react-native-ptv-navigator/windows/RNReactNativePtvNavigator.sln folder to their solution, reference from their app.
  2. Open up your MainPage.cs app
  • Add using React.Native.Ptv.Navigator.RNReactNativePtvNavigator; to the usings at the top of the file
  • Add new RNReactNativePtvNavigatorPackage() to the List<IReactPackage> returned by the Packages method

Usage

import PtvNavigator from "react-native-ptv-navigator";

return (
 <PtvNavigator
      destinationCoords={coords}
      path={[path, ptvCountryCode!]}
      onManeuverInfoChanged={handleManeuverInfoChange}
      onNavigationInfoChanged={handleNavigationInfoChange}
      style={styles.navContainer}
      is3d={is3d}
      isFocused={isFocused}
    />);

Readme

Keywords

Package Sidebar

Install

npm i react-native-ptv-navigator

Weekly Downloads

1

Version

1.2.2

License

MIT

Unpacked Size

60.4 MB

Total Files

148

Last publish

Collaborators

  • bigcheeseh