How to use the mapbox.js.geoJSON 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
//     [83, 190],
    //     [-83, -210]
    //   ])


    this.map = map;
    // Use styleLayer to add a Mapbox style created in Mapbox Studio
    L.mapbox.styleLayer('mapbox://styles/adam2222/ciyucouor002e2rpl7gut7p81').addTo(map);

    // map.dragging.disable();
    // map.touchZoom.disable();
    // map.doubleClickZoom.disable();
    // map.scrollWheelZoom.disable();
    // map.zoomControl.remove();

     geojson = L.geoJSON(countriesLayer, {
      onEachFeature: this.countriesOnEachFeature
    }).addTo(map);


    geojson.setStyle({opacity: 0, fillOpacity: 0})




    // Map click function to show coordinates of the place when the mpa is clicked
    // Don't erase this function, we might need this for future modification

    //Need to change below click event when refactoring into react component
    // map.on('click', onMapClick);

    //Add country markers