X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/6c3b5aa9d46577818723e669d6fc64f1bb30cc01..9cb8311f02e1bd0e2188e3b1db623400aaf8da47:/app/controllers/site_controller.rb?ds=sidebyside diff --git a/app/controllers/site_controller.rb b/app/controllers/site_controller.rb index e6d09f18d..73f38f78c 100644 --- a/app/controllers/site_controller.rb +++ b/app/controllers/site_controller.rb @@ -32,9 +32,9 @@ class SiteController < ApplicationController end def edit - editor = @user.preferred_editor || DEFAULT_EDITOR + editor = params[:editor] || @user.preferred_editor || DEFAULT_EDITOR - if editor == "josm" + if editor == "remote" render :action => :index else # Decide on a lat lon to initialise potlatch with. Various ways of doing this @@ -49,7 +49,8 @@ class SiteController < ApplicationController @zoom = params['zoom'].to_i elsif params['gpx'] - #use gpx id to locate (dealt with below) + @lon = Trace.find(params['gpx']).longitude + @lat = Trace.find(params['gpx']).latitude elsif cookies.key?("_osm_location") @lon, @lat, @zoom, layers = cookies["_osm_location"].split("|")