Bienvenue sur le wiki de Nuit debout, nous sommes le 3021 mars.




Utilisateur:Jmv/common.js : Différence entre versions

De NuitDebout
Aller à : navigation, rechercher
(Annulation des modifications 43813 de Jmv (discussion))
Ligne 13 : Ligne 13 :
 
mw.loader.load("https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/leaflet.css", 'text/css' );
 
mw.loader.load("https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/leaflet.css", 'text/css' );
  
 +
document.addEventListener('DOMContentLoaded', function(){
 +
   
 
var mymap = L.map('mapid').setView([51.505, -0.09], 13);
 
var mymap = L.map('mapid').setView([51.505, -0.09], 13);
  
L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpandmbXliNDBjZWd2M2x6bDk3c2ZtOTkifQ._QA7i5Mpkd_m30IGElHziw', {
+
L.tileLayer('http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png', {
maxZoom: 18,
+
maxZoom: 19,
attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
+
attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>, Tiles courtesy of <a href="http://hot.openstreetmap.org/" target="_blank">Humanitarian OpenStreetMap Team</a>'
'<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
+
}).addTo(mymap);
'Imagery © <a href="http://mapbox.com">Mapbox</a>',
+
id: 'mapbox.streets'
+
}).addTo(mymap)
+
  
 
}, false);
 
}, false);

Version du 2 juillet 2016 à 10:56

/*
mw.loader.load("https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.1/photoswipe.min.js");
mw.loader.load("https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.1/photoswipe-ui-default.min.js");

document.addEventListener('DOMContentLoaded', function(){

  var myPhotoSwipe = Code.PhotoSwipe.attach( window.document.querySelectorAll('.PhotoSwipe a'), { enableMouseWheel: false , enableKeyboard: false } );

}, false);
*/

mw.loader.load("https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/leaflet.js");
mw.loader.load("https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/leaflet.css", 'text/css' );

document.addEventListener('DOMContentLoaded', function(){
    
var mymap = L.map('mapid').setView([51.505, -0.09], 13);

L.tileLayer('http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png', {
	maxZoom: 19,
	attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>, Tiles courtesy of <a href="http://hot.openstreetmap.org/" target="_blank">Humanitarian OpenStreetMap Team</a>'
}).addTo(mymap);

}, false);