map.on('click', function() {
if (!map.scrollWheelZoom.enabled()) {
map.scrollWheelZoom.enable();
}
});
map.on('mouseout', function() {
map.scrollWheelZoom.disable();
});
If false
, new tiles are loaded during panning, otherwise only after it (for better performance). true by default on mobile WebKit, otherwise false.
var map = L.map('map').setView([20.5, -0.09], 3);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png').addTo(map);
var southWest = L.latLng(-60.5, -90),
northEast = L.latLng(60.5, 90);
var bounds = L.latLngBounds(southWest, northEast);
map.setMaxBounds(bounds);
map.on('drag', function() {
map.panInsideBounds(bounds, { animate: false });
});
let userpass = btoa(`${clientId}:${clientSecret}`);
let url_2 = `https://api.github.com/applications/${clientId}/tokens/${x.access_token}`;
fetch(url_2, {
method: 'GET',
headers: {
'Authorization': `Basic ${userpass}`
}
} )
.then(x => x.json())
.then(x => {console.log(x)});