It is really boring to configure this coordinetes appropriately… I spent a lot of time to configure everything correctly in my application…
Are you using TileCache with OpenLayers? You have to configure openlayers’ map option accordingly with the tilecache configuration.
In the tilecache.cfg, I think that the bbox MUST be SQUARE. For example: bbox=10,50,14,54
14 - 10 = 54 - 50 = 4
This means that the TileCache will accept the following tile request BBOXes:
Zoom level nº 1:
10,50,14,54
Zoom level nº 2:
10,50,12,52 12,50,14,52
10,52,12,54 12,52,14,54
Zoom level nº 3:
10,50,11,51 11,50,12,51 12,50,13,51 13,50,14,51
10,51,11,52 11,51,12,52 12,51,13,52 13,51,14,52
10,52,11,53 11,52,12,53 12,52,13,53 13,52,14,53
10,53,11,54 11,53,12,54 12,53,13,54 13,53,14,54
And so on…
In this example, your map option in the OpenLayers should be something like:
var options = {
maxExtent: new OpenLayers.Bounds(10,50,14,54),
maxResolution: 4 / 256, //each tile has 256 x 256 pixels, so a tile, in the max zoom level, has 4 = 14-10 = 54-50
numZoomLevels: 20,
controls: [new OpenLayers.Control.MouseDefaults()]
};
var map = new OpenLayers.Map(‘map’, options);
And in the tilecache.cfg your layer would be something like:
[tc_ruas]
type=WMSLayer
layers=ns1:limite,ns1:rios,ns1:ruas,ns1:rodovias
url=http://localhost/geoserver_1_4_0/wms
extension=png
bbox=10,50,14,54
If you still get pink tiles, click with the right button with the mouse in a pink tile, and see int the URL the bbox that it is requesting.
Thats it…
Daniel
On 8/6/07, Kencana <bluesky_dyx@anonymised.com > wrote:
Hi all,
I am using geoserver to generate wms currently. and it gave me no problem at
all.
however when i try to use tilecache to generate the map image using the same
BBOX
value as what i use to generate wms in geoserver it returns me error message
as follows:
“couldn’t calculate tile index for layer test4 from ([ 103.7109375,
1.2303741774326145, 103.88671875, 1.4061088354351594])”
I am using SRS=EPSG:4326 for the SRS value.
any idea on how to get the correct map image?
i read about set up the resolutions value in the conf file. but i have no
idea on how to calculate
the correct resolution
Thank you
Regards,
Kencana
–
View this message in context: http://www.nabble.com/map-tile-resolution-tf4222269.html#a12011116
Sent from the GeoServer - User mailing list archive at Nabble.com.
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users