X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/4d91fe3dd95c1058cb8d24fd4c900223e30b9059..513bec8044e56bf669d1b2e7ef3a1c4b53362aff:/app/controllers/site_controller.rb diff --git a/app/controllers/site_controller.rb b/app/controllers/site_controller.rb index 015da9e22..606143f4f 100644 --- a/app/controllers/site_controller.rb +++ b/app/controllers/site_controller.rb @@ -39,6 +39,21 @@ class SiteController < ApplicationController if editor == "remote" render :action => :index + return + end + + if params[:node] + bbox = Node.find(params[:node]).bbox.to_unscaled + @lat = bbox.centre_lat + @lon = bbox.centre_lon + elsif params[:way] + bbox = Way.find(params[:way]).bbox.to_unscaled + @lat = bbox.centre_lat + @lon = bbox.centre_lon + elsif params[:gpx] + trace = Trace.visible_to(@user).find(params[:gpx]) + @lat = trace.latitude + @lon = trace.longitude end end