How to use the react-mapbox-gl.Map function in react-mapbox-gl

To help you get started, we’ve selected a few react-mapbox-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 attivio / suit / src / components / MapFacetContents.js View on Github external
render() {
    const Marker = ReactMapboxGl.Marker;
    const ZoomControl = ReactMapboxGl.ZoomControl;
    const { buckets, tooltip } = this.props;
    if (StringUtils.notEmpty(this.props.mapboxKey)) {
      const Map = ReactMapboxGl.Map({
        accessToken: this.props.mapboxKey,
        attributionControl: false,
      });

      let locationPointer = ;
      if (this.props.pointerImageUri) {
        locationPointer = <img style="{{" alt="location pointer" src="{this.props.pointerImageUri}">;
      } else if (this.props.pointerGlyph) {
        locationPointer = ;
      }
      const points = this.props.buckets.map((bucket) =&gt; {
        // Return null if getCoordinatesFromBucket() returns null value
        const coordinates = MapFacetContents.getCoordinatesFromBucket(bucket);
        if (!coordinates) {
          return null;
        }

react-mapbox-gl

A React binding of mapbox-gl-js

MIT
Latest version published 4 years ago

Package Health Score

57 / 100
Full package analysis