[mapguide-users] Consuming MG tiled maps as XYZ tiled maps (for OpenLayers/Leaflet/etc)

Bruno Scott bscott at geomapgis.com
Mon Apr 14 23:59:28 PDT 2014


Hi Jackie

Maybe by reverse engineering what's done with openLayers

          var currentRes = this.map.getResolution();
          var colidx =
Math.floor((bounds.left-this.maxExtent.left)/currentRes);
          colidx = Math.round(colidx/this.tileSize.w);
          var rowidx =
Math.floor((this.maxExtent.top-bounds.top)/currentRes);
          rowidx = Math.round(rowidx/this.tileSize.h);

            url = this.getFullRequestString(
                   {
                       tilecol: colidx,
                       tilerow: rowidx,
                       scaleindex: this.resolutions.length - this.map.zoom -
1
                    });



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Consuming-MG-tiled-maps-as-XYZ-tiled-maps-for-OpenLayers-Leaflet-etc-tp5134024p5135065.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list