]> git.openstreetmap.org Git - rails.git/commitdiff
Make sure we always put a valid URL on the edit tab, and allow switching
authorTom Hughes <tom@compton.nu>
Wed, 13 Jun 2007 10:02:37 +0000 (10:02 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 13 Jun 2007 10:02:37 +0000 (10:02 +0000)
to the editor to work from z11 instead of z14 as that is what Potlatch
supports.

Also fix default zooms for Potlatch when no position is given.

app/views/site/edit.rhtml
public/javascripts/site.js

index 40be2d7dce077790b099351177d82f5d8bd5dc68..a1b0a4925fb93b2b51af5d4fcd788b43ccdd1819 100644 (file)
@@ -7,11 +7,11 @@
 <% elsif @user and params['lon'].nil? and params['lat'].nil? %> 
 <% lon =  @user.home_lon %>
 <% lat =  @user.home_lat %>
-<% zoom = '10' %>
+<% zoom = '12' %>
 <%else%>
 <% lon =  params['lon'] || '-0.1' %>
 <% lat =  params['lat'] || '51.5' %>
-<% zoom =  params['zoom'] || '4' %>
+<% zoom =  params['zoom'] || '12' %>
 <% end %>
 
 <div id="mapcontent">You need a Flash player to use Potlatch, the
index 0d37d99ccb9a581e9f7a579de6ccefe62835212d..b610f3728262b6aed70840b4a0950008d7e18074 100644 (file)
@@ -21,12 +21,12 @@ function updatelinks(lon,lat,zoom) {
 
   node = document.getElementById("editanchor");
   if (node) {
-    if ( zoom >= 14) {
-      var args = getArgs(node.href);
+    if (zoom >= 11) {
+      var args = new Object();
       args.lat = lat;
       args.lon = lon;
       args.zoom = zoom;
-      node.href = setArgs(node.href, args);
+      node.href = setArgs("/edit.html", args);
       node.style.fontStyle = 'normal';
     } else {
       node.href = 'javascript:alert("zoom in to edit map");';