From: Tom Hughes Date: Fri, 9 May 2008 23:22:26 +0000 (+0000) Subject: Merge 7452:7744 from trunk. X-Git-Tag: live~7829^2~11 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/5620d7263a36fe842f4d97bc21dda5edd0651b37?hp=-c Merge 7452:7744 from trunk. --- 5620d7263a36fe842f4d97bc21dda5edd0651b37 diff --combined config/routes.rb index b6ab25c13,dc26259fa..c23509372 --- a/config/routes.rb +++ b/config/routes.rb @@@ -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' @@@ -54,16 -57,6 +57,16 @@@ 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' diff --combined public/javascripts/map.js index ccfa3b255,db5b85616..c7f381d84 --- a/public/javascripts/map.js +++ b/public/javascripts/map.js @@@ -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); } diff --combined public/stylesheets/site.css index 4edff5793,2ede490ef..801654877 --- a/public/stylesheets/site.css +++ b/public/stylesheets/site.css @@@ -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 { @@@ -525,7 -530,11 +530,11 @@@ list-style: square; } - input[type="text"] { + input[type="text"], input[type="password"], textarea { + border: 1px solid black; + } + + input[type="submit"] { border: 1px solid black; } @@@ -569,6 -578,14 +578,14 @@@ font-weight: normal; } + #sotminfo a:link { + text-decoration: underline; + } + + #sotminfo a:visited { + text-decoration: underline; + } + #permalink { z-index:10000; position:absolute;