Closed mer8771 closed 8 years ago
Trolled by markdown! LOL
Hey, thanks for your contribution. I haven't touched this repo in ages, because the GW2 API v2 (especially the maps part) is still work in progress and unfinished. The v1 is pretty much unusable for wiki purposes - i'll rewrite the widget from scratch when v2 is done. ;)
The first update is the the Common.js file. Just copy from the first /\ to the end }); It updated cloudflare versions. /**
jQuery(document).ready(function(){ if($(".gw2map").length){ $.each([ "//cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.5/leaflet.css", /* Updated version / "https://d1h9a8s8eodvjz.cloudfront.net/fonts/menomonia/08-02-12/menomonia.css", "https://d1h9a8s8eodvjz.cloudfront.net/fonts/menomonia/08-02-12/menomonia-italic.css" ], function(){ var ref = document.createElement("link"); ref.setAttribute("rel", "stylesheet"); ref.setAttribute("href", this); document.getElementsByTagName("head")[0].appendChild(ref); }); $.ajax("//cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.5/leaflet.js", {cache:true, dataType:"script"}).done(function(){ / Updated version / / * You'll need to change the link to the actual URL where the widget's JS is stored. * For easy maintenance it's a good idea to store it somewhere in the Widget namespace. * You can find the latest (minified) versions including polyline decorator and the PhpJS excerpts on the german GW2 wiki: * //wiki-de.guildwars2.com/index.php?title=Widget:Karte/JS&action=raw&ctype=text/javascript */ $.ajax("js/gw2wikimaps.js", {cache:true, dataType:"script"}).done(function(){ $(".gw2map").each(function(){ GW2Maps.init(this); }); }); }); } });
The second is in the Common.css file. I add the missing class attribute for the body tag. just add this to the Common.css if you haven't already.
.map {
}
The 3erd is in the Common.html file. I updated the hosted jQuery version. find and replace with this.
Yes it's easy stuff but for new people it may help.