Just a forewarning, I will try to be as extensive with my question as possible. Due to a number of reasons why this might not be working, I have posted all sorts of portions of my debugging below.
Web map located here
Tile cache is being setup as a test run for the "hii_5" layer in OpenLayers. MapServer is the backend.
I am trying to get TileCache to cache images of my MapServer WMS. However, no images are produced. The TileCache is "trying" to load the tiles (as you can see on the live page), however, no images are returned.
When I follow the path of one of the image tiles, I see this error:
An error occurred: File contains parsing errors: C:\ms4w\Apache\cgi-bin\tilecache.cfg
[line 82]: ' type=WMS\n'
[line 83]: ' url=http://141.117.104.183/cgi-bin/mapserv.exe\n'
[line 84]: ' mapfile=C:/ms4w/Apache/htdocs/moot2_dev/hii_railroads.map\n'
[line 85]: ' extension=png\n'
[line 86]: ' layers=HII_railroads\n'
File "C:\ms4w\Apache\cgi-bin\TileCache\Service.py", line 85, in _load
config.read(files)
File "C:\Python27\lib\ConfigParser.py", line 297, in read
self._read(fp, filename)
File "C:\Python27\lib\ConfigParser.py", line 538, in _read
raise e
- I've run a GetCapabilities request and there are no warnings
- but GetMap request returns a blank page
- and the template return blank
Here are the relevant mapfile, tilecache.cfg, and openlayers source:
Not sure how much help I will get here, but the questions out there for anyone to take a stab at it!
hii_railroads.map
MAP #-> BEGIN MAP
OUTPUTFORMAT #-> BEGIN OUTPUT FORMATTING DEFINITION
NAME "png" # Name of format
DRIVER AGG/PNG # Image driver
MIMETYPE "image/png" # Type of image
IMAGEMODE RGBA # Image mode
EXTENSION "png" # Image filetype
TRANSPARENT ON # Transparency
END #-> END OUTPUT FORMATTING DEFINITION
WEB #-> BEGIN WEB DEFINITION
METADATA
"wms_title" "HII_railroads"
"wms_onlineresource" "http://rinnerweb.arts.ryerson.ca/cgi-bin/mapserv.exe?map=/ms4w/Apache/htdocs/moot2_dev/hii_railroads.map&"
"wms_srs" "EPSG:3857"
"ows_enable_request" "*"
END
TEMPLATE "template.html"
IMAGEPATH "/ms4w/tmp/ms_tmp/"
IMAGEURL "/ms_tmp/"
END #-> END WEB DEFINITION
LAYER #-> BEGIN LAYER DEFINITION: Railroads <-#
METADATA
"wms_title" "HII_railroads"
END
NAME HII_railroads # Layer identifier
DATA "data/wgs84/railroads_360.tif" # Name of the data (in this case, string identifying a raster)
STATUS ON
tilecache.cfg
[HII_railroads]
type=WMS
url=http://141.117.104.183/cgi-bin/mapserv.exe
mapfile=C:/ms4w/Apache/htdocs/moot2_dev/hii_railroads.map
extension=png
layers=HII_railroads
index.html
hii_5 = new OpenLayers.Layer.WMS("Railroads","../../cgi-bin/tilecache.cgi?",{
layers:"HII_railroads",
format:"image/png"},{
isBaseLayer:false,
transparent:true,
format:"image/png",
alpha:true,
displayInLayerSwitcher:false
});