2018-05-26 15:53:51 +03:00
2016-07-24 13:11:16 +03:00
2017-12-17 22:09:08 +02:00
2017-01-22 14:05:18 +02:00
2017-10-09 08:35:45 +03:00
2016-06-25 10:56:08 +03:00
2016-06-25 10:56:08 +03:00
2016-06-25 10:56:08 +03:00
2017-09-04 14:02:16 +03:00
2016-06-25 10:56:08 +03:00
2016-05-29 10:02:47 +03:00
2018-05-26 15:53:51 +03:00
2018-05-26 15:52:40 +03:00

react-leaflet-google npm version

GoogleMaps layer as React component for Leaflet build on top of React-Leaflet.

The google maps layer is using the plugin from Leaflet.GridLayer.GoogleMutant

Also it uses google-maps, a wrapper for asynchronously download Google Maps API in the browser.

Example

supported versions

  • "react-leaflet": "^1.0.1"
  • "leaflet": "^1.0.3"
  • "react": "^15.5.0"

Getting started

import { Map, TileLayer, LayersControl } from 'react-leaflet'
import {GoogleLayer} from '../src'
const { BaseLayer } = LayersControl;
const key = 'Your Key goes here';
const terrain = 'TERRAIN';
const road = 'ROADMAP';


....

  <BaseLayer checked name='Google Maps Roads'>
     <GoogleLayer googlekey={key}  maptype={road}/>
  </BaseLayer>
  <BaseLayer  name='Google Maps Terrain'>
     <GoogleLayer googlekey={key}  maptype={terrain} />
  </BaseLayer>


For more details on how to use this plugin check the example.

S
Description
Mirror of github.com/RustyRaptor/react-leaflet-google — GoogleMaps layer as React component for Leaflet
Readme MIT
7.1 MiB
0 Stars 1 Watchers 0 Forks
Languages
JavaScript 98.1%
HTML 1.9%