maybe there is an easy way for solving this but if we choose to go the hard way, you can write your own cache mechanism for overlaping certain zoom levels with your yorkLayer and your baseLayer.
File and Folder Mechanisms:
z = zoom
x = folder name
y = file name
Google Map: z/x/y.jpg
ArcGIS Cache: z/y/x.jpg
Example Image Adress:
http://ww4.yorkmaps.ca/ArcGIS/rest/services/CacheMaps/YR_StreetMap/MapServer/tile/0/633/286
TMS Cache: z/x/((2**z - 1) -y).jpg
and you can use this:
var yorkUrl = 'http://ww4.yorkmaps.ca/ArcGIS/rest/services/CacheMaps/
YR_StreetMap/MapServer/tile/';
....
function get_my_url (bounds) {
var res = this.map.getResolution();
var x = Math.round ((bounds.left - this.maxExtent.left) / (res * this.tileSize.w));
var y = Math.round ((this.maxExtent.top - bounds.top) / (res * this.tileSize.h));
var z = this.map.getZoom();
var path = z + "/" + x + "/" + y + "." + this.type;
var url = this.url;
if (url instanceof Array) {
url = this.selectUrl(path, url);
}
return url + path;
};
var yorkLayer = new OpenLayers.Layer.TMS("YorkLayer", yorkUrl , { 'type':'png',
'getURL':get_my_url });
yorkLayer.isBaseLayer = false;
but dont forget you have to beat your brains out to get true result...The point to focus on is that get_my_url function...
i hope it helps you...