X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/98445b2ab9d9d7b731ba128e7878a865d2409f37..6206ab7fe75362155c8b9565a1bd512a9f7ce443:/app/views/site/index.html.erb diff --git a/app/views/site/index.html.erb b/app/views/site/index.html.erb index b7a9df068..8aa318a3f 100644 --- a/app/views/site/index.html.erb +++ b/app/views/site/index.html.erb @@ -25,6 +25,7 @@ @@ -127,6 +128,7 @@ end <%= javascript_include_tag 'openlayers.js' %> <%= javascript_include_tag 'map.js' %> +<%= javascript_include_tag 'notes.js' %> <%= render :partial => 'resize' %> @@ -136,6 +138,10 @@ end OpenLayers.Lang.setCode("<%= I18n.locale.to_s %>"); + <% if @user %> + var loginName = "<%= @user.display_name %>" + <% end %> + function mapInit(){ map = createMap("map"); @@ -145,6 +151,12 @@ end displayInLayerSwitcher: false }); map.addLayer(map.dataLayer); + + var noteLayer = addNoteLayer(map, "<%= notes_url :format => 'json' %>", $("#createnoteanchor"), 11); + + <% if params[:notes] == "yes" -%> + noteLayer.setVisibility(true); + <% end -%> <% end %> <% unless object_zoom %>