]> git.openstreetmap.org Git - rails.git/commitdiff
Merge 7452:7744 from trunk.
authorTom Hughes <tom@compton.nu>
Fri, 9 May 2008 23:22:26 +0000 (23:22 +0000)
committerTom Hughes <tom@compton.nu>
Fri, 9 May 2008 23:22:26 +0000 (23:22 +0000)
1  2 
config/routes.rb
public/javascripts/map.js
public/stylesheets/site.css

diff --combined config/routes.rb
index b6ab25c13a0d3ca660b28d80df26e4fa3e64dec6,dc26259fa8ffb76ce8263b01d863e02c58f71710..c23509372c8a2c4c9ba761e433332729df242f43
@@@ -42,7 -42,10 +42,10 @@@ ActionController::Routing::Routes.draw 
    
    map.connect "api/#{API_VERSION}/user/details", :controller => 'user', :action => 'api_details'
    map.connect "api/#{API_VERSION}/user/preferences", :controller => 'user_preference', :action => 'read', :conditions => { :method => :get }
+   map.connect "api/#{API_VERSION}/user/preferences/:preference_key", :controller => 'user_preference', :action => 'read_one', :conditions => { :method => :get }
    map.connect "api/#{API_VERSION}/user/preferences", :controller => 'user_preference', :action => 'update', :conditions => { :method => :put }
+   map.connect "api/#{API_VERSION}/user/preferences/:preference_key", :controller => 'user_preference', :action => 'update_one', :conditions => { :method => :put }
+   map.connect "api/#{API_VERSION}/user/preferences/:preference_key", :controller => 'user_preference', :action => 'delete_one', :conditions => { :method => :delete }
    map.connect "api/#{API_VERSION}/user/gpx_files", :controller => 'user', :action => 'api_gpx_files'
   
    map.connect "api/#{API_VERSION}/gpx/create", :controller => 'trace', :action => 'api_create'
    map.connect "api/#{API_VERSION}/amf", :controller =>'amf', :action =>'talk'
    map.connect "api/#{API_VERSION}/swf/trackpoints", :controller =>'swf', :action =>'trackpoints'
    
 +  # Data browsing
 +  map.connect '/browse/start', :controller => 'browse', :action => 'start'
 +  map.connect '/browse', :controller => 'browse', :action => 'index'
 +  map.connect '/browse/way/:id', :controller => 'browse', :action => 'way', :id => /\d+/
 +  map.connect '/browse/way/:id/history', :controller => 'browse', :action => 'way_history', :id => /\d+/
 +  map.connect '/browse/node/:id', :controller => 'browse', :action => 'node', :id => /\d+/
 +  map.connect '/browse/node/:id/history', :controller => 'browse', :action => 'node_history', :id => /\d+/
 +  map.connect '/browse/relation/:id', :controller => 'browse', :action => 'relation', :id => /\d+/
 +  map.connect '/browse/relation/:id/history', :controller => 'browse', :action => 'relation_history', :id => /\d+/
 +  
    # web site
  
    map.connect '/', :controller => 'site', :action => 'index'
index ccfa3b2559a0fa40d9c7fbb0f058642a6a87e9c0,db5b8561638afd45ba4fa403c881b11196ddcf9f..c7f381d846df32e1b68863968d4ea9b3d5c566b3
@@@ -7,10 -7,9 +7,10 @@@ OpenLayers._getScriptLocation = functio
     return "/openlayers/";
  }
  
 -function createMap(divName) {
 +function createMap(divName, options) {
 +   if (!options) { options = {} }
     map = new OpenLayers.Map(divName, {
 -      controls: [
 +      controls: options.controls || [
           new OpenLayers.Control.ArgParser(),
           new OpenLayers.Control.Attribution(),
           new OpenLayers.Control.LayerSwitcher(),
@@@ -19,7 -18,7 +19,7 @@@
           new OpenLayers.Control.ScaleLine()
        ],
        units: "m",
 -      maxResolution: 156543,
 +      maxResolution: 156543.0339,
        numZoomLevels: 20
     });
  
@@@ -40,9 -39,6 +40,9 @@@
        wrapDateLine: true
     });
     map.addLayer(maplint);
 +   var data = new OpenLayers.Layer.Data("Data", {'visibility': false});
 +   map.addLayer(data); 
 +   map.dataLayer = data;
  
     var numZoomLevels = Math.max(mapnik.numZoomLevels, osmarender.numZoomLevels);
     markers = new OpenLayers.Layer.Markers("Markers", {
@@@ -113,6 -109,10 +113,10 @@@ function setMapExtent(extent) 
     map.zoomToExtent(extent.clone().transform(epsg4326, map.getProjectionObject()));
  }
  
+ function getMapExtent(extent) {
+    return map.getExtent().clone().transform(map.getProjectionObject(), epsg4326);
+ }
  function getEventPosition(event) {
     return map.getLonLatFromViewPortPx(event.xy).clone().transform(map.getProjectionObject(), epsg4326);
  }
index 4edff5793a04132765a94a12e7e9301bcb5968d4,2ede490efc557377171b7deecc156fa285495741..801654877261033a8a79ca37b694de3162181576
@@@ -1,4 -1,4 +1,4 @@@
 -a {
 +a m
    color: #0000ff;
    text-decoration: none;
  }
@@@ -358,9 -358,14 +358,14 @@@ hides rule from IE5-Mac \*
    width: 100%;
  }
  
+ .optionalbox td {
+   margin: 0px;
+   padding: 0px;
+ }
  .search_form {
    height: 16px;
-   padding-bottom: 2px;
+   padding-bottom: 6px;
  }
  
  #search_active {
    list-style: square;
  }
  
- input[type="text"] {
+ input[type="text"], input[type="password"], textarea {
+   border: 1px solid black;
+ }
+ input[type="submit"] {
    border: 1px solid black;
  }
  
    font-weight: normal;
  }
  
+ #sotminfo a:link {
+   text-decoration: underline;
+ }
+ #sotminfo a:visited {
+   text-decoration: underline;
+ }
  #permalink {
    z-index:10000;
    position:absolute;