X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/a78da07f0b771b9c65195e304cc8c8a31c9155df..6b696558126fdeaefab37291a3bd26136c95fddb:/app/assets/javascripts/osm.js.erb diff --git a/app/assets/javascripts/osm.js.erb b/app/assets/javascripts/osm.js.erb index 5c15e08e6..f82516632 100644 --- a/app/assets/javascripts/osm.js.erb +++ b/app/assets/javascripts/osm.js.erb @@ -3,8 +3,8 @@ //= require qs/dist/qs OSM = { -<% if defined?(PIWIK) %> - PIWIK: <%= PIWIK.to_json %>, +<% if defined?(Settings.matomo) %> + MATOMO: <%= Settings.matomo.to_json %>, <% end %> MAX_REQUEST_AREA: <%= Settings.max_request_area.to_json %>, @@ -107,7 +107,7 @@ OSM = { mapParams.lon = parseFloat(params.mlon); mapParams.lat = parseFloat(params.mlat); mapParams.zoom = parseInt(params.zoom || 12); - } else if (loc = $.cookie('_osm_location')) { + } else if (loc = Cookies.get('_osm_location')) { loc = loc.split("|"); mapParams.lon = parseFloat(loc[0]); mapParams.lat = parseFloat(loc[1]); @@ -146,7 +146,7 @@ OSM = { return args; } - hash = Qs.parse(hash.substr(i + 1)); + hash = Qs.parse(hash.slice(i + 1)); var map = (hash.map || '').split('/'), zoom = parseInt(map[0], 10),