</p>
<% else %>
<% content_for :greeting do %>
-<% if !@user.home_lon.nil? and !@user.home_lat.nil? %>
+<% if @user and !@user.home_lon.nil? and !@user.home_lat.nil? %>
<%= link_to_function 'home', "setPosition(#{@user.home_lat}, #{@user.home_lon}, 10)" %> |
<% end %>
<% end %>
var fo = new SWFObject("/potlatch/potlatch.swf?d="+Math.round(Math.random()*1000), "potlatch", "700", "600", "6", "#FFFFFF");
function doSWF(lat,lon,sc) {
+ if (sc < 11) sc = 11;
fo.addVariable('lat',lat);
fo.addVariable('long',lon);
fo.addVariable('scale',sc);
fo.addVariable('token','<%= session[:token] %>');
+<% if params['gpx'] %> fo.addVariable('gpx','<%= params['gpx']+"/data" %>'); <% end %>
fo.write("map");
}