Make launching of Potlatch 2 from the GPS trace list work
This commit is contained in:
parent
a373f2ab8a
commit
409576eea0
2 changed files with 5 additions and 1 deletions
|
@ -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("|")
|
||||
|
|
|
@ -24,6 +24,9 @@
|
|||
fo.addParam("base","/potlatch2");
|
||||
if (lat) { fo.addVariable("lat",lat); }
|
||||
if (lon) { fo.addVariable("lon",lon); }
|
||||
<% if params['gpx'] %>
|
||||
fo.addVariable('gpx' ,'<%= h(params['gpx']) %>');
|
||||
<% end %>
|
||||
fo.addVariable("zoom",zoom);
|
||||
fo.addVariable("api","http://<%= SERVER_URL %>/api/<%= API_VERSION %>/");
|
||||
fo.addVariable("policy","http://<%= SERVER_URL %>/api/crossdomain.xml");
|
||||
|
|
Loading…
Add table
Reference in a new issue