]> git.openstreetmap.org Git - rails.git/blob - app/views/site/edit.rhtml
Allow access to all zoom levels again.
[rails.git] / app / views / site / edit.rhtml
1 <%= render :partial => 'search' %>
2
3 <% if params['mlon'] and params['mlat'] %>
4 <% lon =  params['mlon'] %>
5 <% lat =  params['mlat']  %>
6 <% zoom =  params['zoom'] || '12' %>
7 <% elsif @user and params['lon'].nil? and params['lat'].nil? %> 
8 <% lon =  @user.home_lon %>
9 <% lat =  @user.home_lat %>
10 <% zoom = '12' %>
11 <%else%>
12 <% lon =  params['lon'] || '-0.1' %>
13 <% lat =  params['lat'] || '51.5' %>
14 <% zoom =  params['zoom'] || '12' %>
15 <% end %>
16
17 <div id="mapcontent">You need a Flash player to use Potlatch, the
18     OpenStreetMap Flash editor. You can <a href="http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">download Flash Player from Adobe.com</a>.
19
20     <a href="http://wiki.openstreetmap.org/index.php/Editing">Several other options</a> are also available
21     for editing OpenStreetMap.</div>
22   <script type="text/javascript" src="/javascripts/swfobject.js"></script>
23   <script type="text/javascript">
24     var fo = new SWFObject("/potlatch/potlatch.swf?d="+Math.round(Math.random()*1000), "potlatch", "700", "600", "6", "#FFFFFF");
25     function doSWF(lat,lon,sc) {
26       fo.addVariable('lat',lat);
27       fo.addVariable('long',lon);
28       fo.addVariable('scale',sc);
29       fo.addVariable('token','<%= @user.token %>');
30       fo.write("mapcontent");
31     }
32
33     doSWF(<%= lat %>,<%= lon %>,<%= zoom %>);
34
35 </script>