Coder Social home page Coder Social logo

rn-maps-polyline's Introduction

rn-maps-polyline

npm npm npm

A tiny library to use polyline in react-native-maps (MapView.Polyline), based in google-polyline

v2.0.0

Now decoding is almost 3x times faster than before

Install via npm

$ npm install --save rn-maps-polyline

Usage

import RNPolyline  from 'rn-maps-polyline'
//or
import { decode, encode } from 'rn-maps-polyline'

or

var RNPolyline  = require('rn-maps-polyline')
RNPolyline.encode([
  { latitude: 37.772, longitude: -122.214 },
  { latitude: 21.291, longitude: -157.821 },
  { latitude: -18.142, longitude: 178.431 },
  { latitude: -27.467, longitude: 153.027 }
])

> '_jpeFn||hVf}qcBvnixEfwtoF_fic_Afh|w@~u`zC'
RNPolyline.decode('_jpeFn||hVf}qcBvnixEfwtoF_fic_Afh|w@~u`zC')

> [
  { latitude: 37.772, longitude: -122.214 },
  { latitude: 21.291, longitude: -157.821 },
  { latitude: -18.142, longitude: 178.431 },
  { latitude: -27.467, longitude: 153.027 }
  ]

Contribute

The project is using babel and uglifyjs to compile so make sure you have both if you want to clone the repo

rn-maps-polyline's People

Contributors

yhozen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.