Collin Donahue-Oponski 0aa18ee7ae Add transformRequest prop to map components. (#426)
* Add map prop/option `transformRequest`.

* Upgrade sinon package to webpack-compatible version.

* Fix test for map onLoad prop.

* Add test for new Map prop `transformRequest`.

* Document and cleanup new `tranformRequest` prop on Map component.
2017-12-19 00:54:34 -08:00
..

version build downloads

Introduction

react-map-gl is a suite of React components for Mapbox GL JS, a WebGL-powered vector and raster tile mapping library. In addition to exposing MapboxGL functionality to React apps, react-map-gl also integrates seamlessly with deck.gl.

Example

import ReactMapGL from 'react-map-gl';

<ReactMapGL
  width={400}
  height={400}
  latitude={37.7577}
  longitude={-122.4376}
  zoom={8}
  onViewportChange={(viewport) => {
    const {width, height, latitude, longitude, zoom} = viewport;
    // Optionally call `setState` and use the state to update the map.
  }}
/>