0

I was able to display the HTML files locally which displays a base map from mapbox and a layer rendered from tile-stream. I had setup an apache server so that the HTML can be viewed remotely. There is a static domain name, which i was able to access remotely. The port forwarding is given for 80 and tilestream port 8888. On local browser everything is displaying. But on remote system the page loads without base map and layers. I am on ubuntu. The request for the base map base in the HTML file is

var map = L.mapbox.map('map','examples.map-9ijuk24y');

the layer is added with

var stamenLayer = L.tileLayer('http://localhost:8888/v2/sample/{z}/{x}/{y}.png').addTo(map);

Thanks in advance

  • 1
    Have you tried looking at what firebug shows? Have you tried putting in the real IP address rather than localhost. (Hint: remember that your javascript is running on the client machine) – BradHards Feb 1 '14 at 10:08
1

If you are able to access remotely and without problems your html files, then use your domain name instead localhost:

var stamenLayer = L.tileLayer('http://www.mydomain.com:8888/v2/sample/{z}/{x}/{y}.png').addTo(map);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.