From: John Firebaugh Date: Tue, 11 Jun 2013 22:15:41 +0000 (-0700) Subject: Complete de-globalization of map X-Git-Tag: live~4854^2~37 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/9d33721630e02ab9bed1d7853be4fcb5960d7b4f Complete de-globalization of map --- diff --git a/app/assets/javascripts/index.js b/app/assets/javascripts/index.js index 184b57419..c9316ebae 100644 --- a/app/assets/javascripts/index.js +++ b/app/assets/javascripts/index.js @@ -145,6 +145,9 @@ $(document).ready(function () { if (!("autofocus" in document.createElement("input"))) { $("#query").focus(); } + + initializeBrowse(map); + initializeNotes(map); }); function getMapBaseLayerId(map) { diff --git a/app/assets/javascripts/index/browse.js b/app/assets/javascripts/index/browse.js index 8681d8f56..e98e56b27 100644 --- a/app/assets/javascripts/index/browse.js +++ b/app/assets/javascripts/index/browse.js @@ -2,7 +2,7 @@ //= require templates/browse/feature_list //= require templates/browse/feature_history -$(document).ready(function () { +function initializeBrowse(map) { var browseBounds; var layersById; var selectedLayer; @@ -327,4 +327,4 @@ $(document).ready(function () { $("#browse_status").html(""); $("#browse_status").hide(); } -}); +} diff --git a/app/assets/javascripts/index/notes.js.erb b/app/assets/javascripts/index/notes.js.erb index 81d6042c7..1646e8b6d 100644 --- a/app/assets/javascripts/index/notes.js.erb +++ b/app/assets/javascripts/index/notes.js.erb @@ -1,7 +1,7 @@ //= require templates/notes/show //= require templates/notes/new -$(document).ready(function () { +function initializeNotes(map) { var params = OSM.mapParams(), noteLayer = new L.LayerGroup({code: 'N'}), notes = {}, @@ -268,4 +268,4 @@ $(document).ready(function () { e.target.openPopup(); }); }); -}); +}