Embed Block
Add an embed URL or code. Learn more
L.mapbox.accessToken = 'pk.eyJ1Ijoib2MzMjUiLCJhIjoiMTAxYjUxYmM4NWYxZjg2YjVhNTM3MjJmZDdhNTBjNTQifQ.d8Pqb9XknZ25-TcGqKUy3w';

// Construct a bounding box for this map that the user cannot
// move out of
var southWest = L.latLng(-57.136239, -180),
    northEast = L.latLng(84.267172, 180),
    bounds = L.latLngBounds(southWest, northEast);

var map = L.mapbox.map('map', 'oc325.nd00japh', {
maxBounds: bounds,
 maxZoom: 19,
    minZoom: 2,
//restrict zooming levels
    // These options apply to the tile layer in the map.
    tileLayer: {
        // This map option disables world wrapping. by default, it is false.
        continuousWorld: false,
        // This option disables loading tiles outside of the world bounds.
        noWrap: true
}).setView([40, 0], 2);

map.featureLayer.on('click', function(e) {
    });//centers on marker when clicked
map.on('popupopen', function(centerMarker) {
        var cM = map.project(centerMarker.popup._latlng);
        cM.y -= centerMarker.popup._container.clientHeight/2
        map.setView(map.unproject(cM),13, {animate: true});

 // zoom the map to that bounding box
Embed Block
Add an embed URL or code. Learn more