Skip to content

aldogint/react-native-google-matrix

 
 

Repository files navigation

Google Distance Matrix API for react-native

This repository is forked from react-native-google-matrix which as forked from node-google-distance.
A simple wrapper for the Google Distance Matrix API that uses the fetch api and es6 syntax used in modern browsers and react native.

Installation

git clone https://github.com/SKalt/react-native-google-matrix.git [path/to/where/you/want/it]

or

git submodule add https://github.com/SKalt/react-native-google-matrix.git [path/to/where/you/want/it]

Usage

var distance = require('path/to/google-distance/dist/index.common.js');

or

import distance from 'path/to/google-distance/dist/index.mjs';

distance.get(
  {
    origin: '-7.841879,110.409193',
    destination: '-7.741194,110.342588'
  },
  function(err, data) {
    if (err) return console.log(err);
    console.log(data);
});

About

Easily get distance data between locations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%