X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/fef620e375faf7a168518d12f670ff26d0890aae..5454bf3ec93c65c991e0e17b15c0480a1587d9fb:/app/views/site/_potlatch2.html.erb diff --git a/app/views/site/_potlatch2.html.erb b/app/views/site/_potlatch2.html.erb index a72975dd7..4305e07b9 100644 --- a/app/views/site/_potlatch2.html.erb +++ b/app/views/site/_potlatch2.html.erb @@ -27,9 +27,12 @@ <% if params['gpx'] %> fo.addVariable('gpx' ,'<%= h(params['gpx']) %>'); <% end %> + <% if params['tileurl'] %> + fo.addVariable('tileurl' ,'<%= h(params['tileurl']) %>'); + <% end %> fo.addVariable("zoom",zoom); - fo.addVariable("api","http://<%= SERVER_URL %>/api/<%= API_VERSION %>/"); - fo.addVariable("policy","http://<%= SERVER_URL %>/api/crossdomain.xml"); + fo.addVariable("api","<%= request.protocol + request.host_with_port %>/api/<%= API_VERSION %>/"); + fo.addVariable("policy","<%= request.protocol + request.host_with_port %>/api/crossdomain.xml"); fo.addVariable("connection","XML"); fo.addVariable("oauth_token","<%= token.token %>"); fo.addVariable("oauth_token_secret","<%= token.secret %>");