How to use the react-map-gl.autobind function in react-map-gl

To help you get started, we’ve selected a few react-map-gl examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github uber / react-map-gl / examples / main / views / geodata-creator-example.js View on Github external
constructor(props) {
    super(props);
    this.state = {
      viewport: {
        longitude: -122.40677,
        latitude: 37.78949,
        zoom: 12.76901,
        startDragLngLat: null,
        isDragging: false
      },
      points: Immutable.fromJS(initialPoints)
    };
    autobind(this);
  }
github uber / react-map-gl / examples / main / views / tilt-example.js View on Github external
constructor(props) {
    super(props);
    this.state = {
      viewport: {
        latitude: location.latitude,
        longitude: location.longitude,
        zoom: 11,
        bearing: 180,
        pitch: 60,
        startDragLngLat: null,
        isDragging: false
      },
      mapStyle: buildStyle({stroke: '#FF00FF', fill: 'green'})
    };
    autobind(this);
  }
github uber / react-map-gl / examples / additional-overlays / choropleth-overlay-example.js View on Github external
constructor(props) {
    super(props);
    this.state = {
      viewport: {
        latitude: location.latitude,
        longitude: location.longitude,
        zoom: 11,
        startDragLngLat: null,
        isDragging: false
      }
    };
    autobind(this);
  }