Trouble displaying the map on the web

Jun 2, 2011 at 6:51 PM

The map generator worked great for me and I was able to view the map just fine on my local machine. I wanted to post the map online for the friends I play Terraria with, but I can't seem to get the map.html to find the map images. No matter what I've tried, I just get a fully black map.

I've tried modifying the basePath in the map.html file multiple times, using absolute and relative paths, double-checked the permissions, and everything I can think of, but nothing I've tried works.

The map file can be found at, and the PNGs are in the folder

Any thoughts on what I might be doing wrong?

Jun 2, 2011 at 7:08 PM

You're trying to load the images through file:/// instead of http://


Change this: = "black url(file:///"

to: = "black url("

Jun 2, 2011 at 7:14 PM
Edited Jun 2, 2011 at 7:17 PM

I see the problem you're having.

The base path should be set to

If you scroll down in the map.html file you should find a line that reads: = "black url(file:///" + basePath + "Zoom%20" + zoomLevel.toString() + "/Layer%200/" + coord.x.toString() + "/" + coord.y.toString() + ".png)";

change this line to the following: = "black url(" + basePath + "Zoom%20" + zoomLevel.toString() + "/Layer%200/" + coord.x.toString() + "/" + coord.y.toString() + ".png)";


and that should fix it.

Jun 2, 2011 at 8:02 PM

Whoa, thanks for the quick reply!

Made the changes, but now nothing loads on the page at all. Just a white screen. The page source does appear to be there, but it fails to display anything. Perhaps just running out of memory on a cheap shared hosting account? Or do you think it might be something else?

Jun 2, 2011 at 8:27 PM

You got my post before I editted it to fix a typo. You need to change the second change to what I updated in the post.

Edit the second line again to = "black url(" + basePath + "Zoom%20" + zoomLevel.toString() + "/Layer%200/" + coord.x.toString() + "/" + coord.y.toString() + ".png)";

I highlight where the problem is.

Jun 2, 2011 at 9:08 PM

Works beautifully!

A winner is you!

Jun 2, 2011 at 9:22 PM

Good to hear.

You might want to grab a new version also. Backgrounds are working.