@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("|")
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");