MediaWiki:CarteGeo.js
Note : après avoir publié vos modifications, il se peut que vous deviez forcer le rechargement complet du cache de votre navigateur pour voir les changements.
- Firefox / Safari : maintenez la touche Maj (Shift) en cliquant sur le bouton Actualiser ou appuyez sur Ctrl + F5 ou Ctrl + R (⌘ + R sur un Mac).
- Google Chrome : appuyez sur Ctrl + Maj + R (⌘ + Shift + R sur un Mac).
- Internet Explorer / Edge : maintenez la touche Ctrl en cliquant sur le bouton Actualiser ou pressez Ctrl + F5.
- Opera : appuyez sur Ctrl + F5.
/* Place importScript('MediaWiki:CarteGeo.js'); into MediaWiki:Common.js */
/* Usage: inserts an iframe into a div with id "mapgeodiv" in conjunction with modèle:Carte Geo
for embeddable maps of georeferenced destinations. Relies on HTML5 data parameters. */
function insertIFrame() {
var exhtml = 'http://maps.wikivoyage-ev.org/w/artmap.php?lang=fr';
var map = $('#mapgeodiv');
if ( map.length ) {
var exsrc = exhtml;
var ifstr = '<iframe src="'+exsrc+'" width="'+map.data("width")+'" height="'+map.data("height")
+'" style="border:0"></iframe>';
map.html(ifstr);
}
}
$(insertIFrame);