[OpenLayers-Users] TMS SphericalMercator + MapServer WMS WGS84
Fernando
fnorte at gmail.com
Tue Feb 28 11:20:06 EST 2012
Hi,
I create a TMS with tiles generate from gdal2tiles in sphericalMercator
(EPSG:900913),
and Create a WMS Server with WGS84 projection (EPSG:4326).
But HOW can I reproject one of them, the TMS to EPSG:4326 or the WMS to
EPSG:900913.
Or even better, there is an script to generate the tile address:
function overlay_getTileURL(bounds) {
var res = this.map.getResolution();
var x = Math.round((bounds.left - this.maxExtent.left) / (res *
this.tileSize.w));
var y = Math.round((bounds.bottom - this.tileOrigin.lat) / (res *
this.tileSize.h));
var z = this.map.getZoom();
if (mapBounds.intersectsBounds( bounds ) && z >= mapMinZoom && z <=
mapMaxZoom ) {
return "http://localhost/tizo/tiles/" + z + "/" + x + "/" + y + "." +
this.type;
} else {
return "http://localhost/tizo/tiles/13/3104/3556.png"; // A image sample to
test the correct path
}
}
How can I change this script to calculate this number of tiles, with the
EPGS:900913?
Att,
Fernando G. Norte
BHte - MG
cel: +55 31 9119 8814
-------------------------
MSN e Gtalk # fnorte at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20120228/65240ea4/attachment.html
More information about the Users
mailing list