[Tilecache] bbox and ImageLayer

christopher.schmidt at nokia.com christopher.schmidt at nokia.com
Tue Apr 27 13:49:25 EDT 2010


On Apr 27, 2010, at 1:40 PM, ext Mikel Maron wrote:

> Hi
> 
> I'm trying to set up an ImageLayer in TileCache. The bbox covers a small area, and I want the TMS requests to correspond with spherical mercator style; a particular tile request to OSM should correspond geographically to the same tile request against this image. 

1. Your image isn't in spherical mercator. Since TileCache has no support for reprojection, this is very much not going to work. You will need to reproject your image first.
2. Setting the bbox and filebounds to the same thing isn't going to work. The bbox should match the maxExtent of the OpenLayers layer you want to create -- which in this case, is the spherical mercator extent. (The same is true of resolution.) You can set both of these via spherical_mercator=true.
3. Once you reproject the image to spherical mercator, you'll need to make sure the filebounds map to the spherical mercator coordinates, not the lat/lon coords.

-- Chris



> However, the requests against the TileCache aren't acting as I'd expect ... a request for /0/0/0.png retrieves the image, resized to 256x256, rather than a zoomed out world view.
> 
> This is my current configuration
> 
> [health_meeting_1_group_3]
> type=ImageLayer
> bbox=36.771332811,-1.325321221,36.80718373,-1.300412621
> filebounds=36.771332811,-1.325321221,36.80718373,-1.300412621
> file=/var/www/aerial.maps.jsintl.org/data/IMG_6275-trimmed.JPG
> tms_type=google
> 
> The OpenLayers config
> 
>                         var health_meeting_1_group_3 = new OpenLayers.Layer.TMS( "Health1-3",
>                         "http://aerial.maps.jsintl.org/tilecache/tilecache.cgi/1.0.0/health_meeting_1_group_3/",
>                                                 { type: 'png', getURL: osm_getTileURL, numZoomLevels:20 } );
> 
> Any pointers?
> 
> Best
> Mikel
>  
> == Mikel Maron ==
> +254(0)724899738 @mikel s:mikelmaron
> http://mapkibera.org/
> http://wiki.openstreetmap.org/index.php/Haiti
> 
> <ATT00001..txt>



More information about the Tilecache mailing list