From 8f2fba55cfdf9a2d4ddcc901abc53f46a8f9363f Mon Sep 17 00:00:00 2001 From: Luke Butler Date: Sat, 3 May 2014 16:30:41 +1000 Subject: [PATCH] service.htm - tilelayer not working unless port 80 'window.location.hostname' changed to 'window.location.host', if a port other then 80 is used then tileLayer wont be pointing to the correct server address --- service.htm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/service.htm b/service.htm index 2cf9137..b4b92cd 100644 --- a/service.htm +++ b/service.htm @@ -91,7 +91,7 @@

<%=obj.name %>

var ix = jQuery.inArray('MBTILES', u) + 1; var layer = document.URL.split('/')[ix]; - var server = window.location.hostname; + var server = window.location.host; $(window).ready(function () { $.getJSON('../' + layer + "/tilejson", function (data) { @@ -107,7 +107,8 @@

<%=obj.name %>

console.log(data.bounds); - var map = L.map('map').fitBounds([data.bounds.slice(0, 2).reverse(), data.bounds.slice(2, 4).reverse()]); + var map = L.map('map').fitBounds([data.bounds.slice(0, 2).reverse(), data.bounds.slice(2, 4).reverse()]); + var fullScreen = new L.Control.FullScreen(); map.addControl(fullScreen); @@ -120,4 +121,4 @@

<%=obj.name %>

} } - \ No newline at end of file +