[Tilecache] RS: RV: Internal organisation

Vidal, Antoni antoni.vidal at icc.cat
Thu Oct 8 02:45:13 EDT 2009


Hello again,

In my last e-mail I've mixed x and y values, sorry for confused you.

Regarding your answer:

>Generally speaking, something like:
>
>    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();
>
>where res is the resolution of the current zoom, would be the x and y values.

Using an example, I know res = 5 (meters/pixel) and tileSize.w and tileSize.h = 256 px

What about bounds.left, is this the left side of tile?, and what is this.maxExtent.left?. The same doubt for y axis.

Thank's a lot.


Antoni Vidal
Unitat d'Aplicacions SIG-WEB
Institut Cartogràfic de Catalunya
Parc de Montjuïc, E-08038 Barcelona
Tel. (+34) 93 567 15 00 (ext. 3228)
www.icc.cat
 






More information about the Tilecache mailing list