I currently use a google map and create tiles for it by using a PHP script to generate the required PNG images
var myTileLayer = new GTileLayerOverlay(
new GTileLayer(null, null, null, {
//tileUrlTemplate: 'Overlays/Overlay_{Z}_{X}_{Y}.png',
tileUrlTemplate: 'gentile.php?Zoom={Z}&TileX={X}&TileY={Y}',
isPng:true,
opacity:1.0
})
);
map.addOverlay(myTileLayer);
I now wish to use OpenStreetMap and according to this source: http://wiki.openstreetmap.org/wiki/OpenLayers_Simple_Example
I need to use this code to acheive that, however it seems to want me to use premade tiles when I want to gen them on the fly
var newLayer = new OpenLayers.Layer.OSM("New Layer", "URL_TO_TILES/${z}/${x}/${y}.png", {numZoomLevels: 19});
map.addLayer(newLayer);
Really I need to use gentile.php?Zoom={Z}&TileX={X}&TileY={Y}