Skip to content

Instantly share code, notes, and snippets.

@dheerosaur
Last active August 29, 2015 14:10
Show Gist options
  • Save dheerosaur/b04d6d7bb3cb600b4b60 to your computer and use it in GitHub Desktop.
Save dheerosaur/b04d6d7bb3cb600b4b60 to your computer and use it in GitHub Desktop.
map = L.map('map', {zoomControl: false});
map.fitBounds([[40.869693, -74.170267], [40.546460, -73.772013]]);
var MAP_ROOT = 'http://{s}.tiles.mapbox.com/v4/MAP_ID'
, TOKEN = 'Access token from Mapbox';
L.tileLayer(MAP_ROOT + '/{z}/{x}/{y}.png?access_token=' + TOKEN, {
attribution: 'Attribution text and links',
maxZoom: 18,
}).addTo(map);
L.control.zoom({ position: 'topright' }).addTo(map);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment