I have two servers:
the first server is 177 and that has a html file with the TMS layer.
We will call this tms_layer.html and it has your init function with this in there:
var tmsoverlay = new OpenLayers.Layer.TMS( "TMS Overlay", "",
{
serviceVersion: '.', layername: '.', alpha: true, type: 'JPG', getURL:
overlay_getTileURL, isBaseLayer: true
});
When i go to 177/tms_layer.html the tiles are being correctly displayed.
So that is working fine.
Now, I want to serve that tms_layer.html file on a different server (server 190), and I have been trying to serve it as a WMS layer. Not sure if WMS is the best approach but I think it is. Correct me if I'm wrong.
We'll call this tiles_revision1.html and within the init function I currently have:
layer = new OpenLayers.Layer.WMS( "My TMS layer in WMS",
"http://177/dev/tiles/tiles_1a.html", {layers: ['tmsoverlay'], transparent: "true", format: "image/jpg"} );
map.addLayer(layer);
For the layers: []
do I even need to reference this since it's just a bunch of jpgs making up the tile(s)/map? Leaving it blank has not done anything.
With the above code I currently get a blank OL map, see here (When I pan around the map I get a Uncaught TypeError: cannot read property 'wrapDateLine' of null. I don't think that is the root of my issue though):
Edit: the most important thing here is to be able to access those 177 tiles from anywhere as a baselayer. There is quite a few associated jpgs, and the tms_layer.html
file is pretty beefy on its own.
What is the correct way to do this?
117
server. What you need to do is to access it as an TMS layer from the new server as well.