How to use the mapbox.js.Browser function in mapbox

To help you get started, we’ve selected a few mapbox 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 AutoLingo / autolingo / app / components / Map.jsx View on Github external
highlightFeature(e) {
      var layer = e.target;
      let country = layer.feature.properties.name

      this.setState({
        highlightedCountry: country
      })

      layer.setStyle(
        {
          weight: 3,
          fillColor: '#0082E6',
          fillOpacity: 0.8
        }
      )
      if(!L.Browser.ie && !L.Browser.opera) {
        layer.bringToFront();
      }
    }