Given a WMS service, is there a ready-made script that, for a given extent, creates a tile-pyramid that is compliant with:


That is urls on the form:


I think what I want is MapProxy. I can configure a TMS layer that caches my WMS service, and copy the files that it generates.


MapProxy is certainly a good option. If it is just a script you require, TileCache is another option. It's not as configurable as MapProxy, but it is a nice, light-weight solution. If you are already serving your WMS using GeoServer, then I'd recommend GeoWebCache.


with openlayers you can get your wms xyz result as below code. i think with some changes this code will work for you.


function getURL (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;
  • I was looking for a script that generates the tiles. Not quite sure what the idea with the javascript you posted is? – Pimin Konstantin Kefaloukos Feb 24 '12 at 23:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.