Skip to content

yasaricli/react-native-here-maps-ios

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-here-maps-ios

Getting started

$ npm install react-native-here-maps-ios --save

Mostly automatic installation

$ react-native link react-native-here-maps-ios

Usage

import RNHereMapsIos from 'react-native-here-maps-ios';

<RNHereMapsIos
  style={{ flex: 1 }}
  mapCenter={{
    latitude: 40.89962,
    longitude: 29.22657
  }}
  markersList={[
    {
      latitude: 40.89962,
      longitude: 29.22657
    }
  ]}
/>

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-here-maps-ios and add RNHereMapsIos.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNHereMapsIos.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)<
  5. Add the following lines to the ios/Podfile file.

## add line
pod 'HEREMapsStarter'

and install

> pod install

Android

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

Windows

Read it! :D

  1. In Visual Studio add the RNHereMapsIos.sln in node_modules/react-native-here-maps-ios/windows/RNHereMapsIos.sln folder to their solution, reference from their app.
  2. Open up your MainPage.cs app
  • Add using Here.Maps.Ios.RNHereMapsIos; to the usings at the top of the file
  • Add new RNHereMapsIosPackage() to the List<IReactPackage> returned by the Packages method

About

Here maps (Ios) package for React Native

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 45.1%
  • C# 28.4%
  • Java 12.9%
  • Ruby 8.2%
  • JavaScript 5.4%