MediaWiki:Common.js: Unterschied zwischen den Versionen

Aus Die Chroniken von Samay
Wechseln zu: Navigation, Suche
K
K
Zeile 2: Zeile 2:
  
 
   var myElement = document.getElementById('mw-mywiki-example');
 
   var myElement = document.getElementById('mw-mywiki-example');
   myElement.innerHTML = '<p>This is a paragraph.</p>';
+
   myElement.innerHTML = 'var map = L.map('map').setView([51.505, -0.09], 13);
 +
 
 +
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
 +
    attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
 +
}).addTo(map);
 +
 
 +
L.marker([51.5, -0.09]).addTo(map)
 +
    .bindPopup('A pretty CSS3 popup.<br> Easily customizable.')
 +
    .openPopup();';
  
 
}());
 
}());

Version vom 31. August 2019, 15:13 Uhr

$(function () {

  var myElement = document.getElementById('mw-mywiki-example');
  myElement.innerHTML = 'var map = L.map('map').setView([51.505, -0.09], 13);

L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
    attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);

L.marker([51.5, -0.09]).addTo(map)
    .bindPopup('A pretty CSS3 popup.<br> Easily customizable.')
    .openPopup();';

}());