+ $(".welcome .close").on("click", function () {
+ $(".welcome").removeClass("visible");
+ $.cookie("_osm_welcome", "hide", { secure: true, expires: expiry, path: "/" });
+ });
+
+ var bannerExpiry = new Date();
+ bannerExpiry.setYear(bannerExpiry.getFullYear() + 1);
+
+ $("#banner .close-wrap").on("click", function (e) {
+ var cookieId = e.target.id;
+ $("#banner").hide();
+ e.preventDefault();
+ if (cookieId) {
+ $.cookie(cookieId, "hide", { secure: true, expires: bannerExpiry, path: "/" });
+ }
+ });
+
+ if (OSM.PIWIK) {
+ map.on("layeradd", function (e) {
+ if (e.layer.options) {
+ var goal = OSM.PIWIK.goals[e.layer.options.keyid];
+
+ if (goal) {
+ $("body").trigger("piwikgoal", goal);
+ }
+ }
+ });
+ }
+
+ if (params.bounds) {
+ map.fitBounds(params.bounds);
+ } else {
+ map.setView([params.lat, params.lon], params.zoom);
+ }
+
+ if (params.marker) {
+ L.marker([params.mlat, params.mlon]).addTo(map);
+ }
+
+ $("#homeanchor").on("click", function (e) {
+ e.preventDefault();
+
+ var data = $(this).data(),
+ center = L.latLng(data.lat, data.lon);