[Tilecache] tilecache problem with a projection in meters
olivier.terral
olivier.terral at geomatys.fr
Fri Mar 9 05:33:32 EST 2007
Yaaaaaaaaaaaaaaaaaaa, it's works but only for one layer ,
it's very strange because the coordinates are not same between the first
layer and the 2nd , for a tile in th same place
example:
layer WORLD:
<img id="OpenLayersDiv5064" class="olTileImage" style="left: 256px; top:
62px; width: 256px; height: 256px; position: absolute; background-color:
pink;" src="http://localhost/wms-c?LAYERS=world&TRANSPARENT=TRUE&FORMAT=image%2Fgif&STYLES=default&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A54004&BBOX=-7811594.5%2C4724577.5%2C4354549.5%2C16890721.5&WIDTH=256&HEIGHT=256"/>
layer OCEAN:
<img id="OpenLayersDiv1041" class="olTileImage" style="left: 256px; top:
62px; width: 256px; height: 256px; position:
absolute;" src="http://localhost/wms-c?LAYERS=ocean&TRANSPARENT=TRUE&FORMAT=image%2Fgif&STYLES=default&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A54004&BBOX=-7811633%2C4684619%2C4354511%2C16850763&WIDTH=256&HEIGHT=256"/>
For information, the layer OCEAN is the first layer created and after
this is WORLD .
The 2 layer are defined in a same way (see below):
oh it's mistake, too more test :)
I've cleanup my files now I 've a new error:
var mapOptions = {
controls:[],
projection: "EPSG:54004",
units: "m",
maxExtent: new
OpenLayers.Bounds(-19977777,-7481525,20037508,18356400),
maxResolution:47524
};
map = new OpenLayers.Map($('mainMap'),mapOptions);
layer definition:
var layerOptions = {
visibility:true,
transparent:"TRUE",
projection:"EPSG:54004",
maxExtent: new
OpenLayers.Bounds(-19977777,-7481525,20037508,18356400
),
maxResolution: 47524
};
layer= new OpenLayers.Layer.WMS("ocean","http://localhost/wms-c",
{
layers: "ocean",
transparent:"TRUE",
format:image/png,
},
layerOptions
);
map.addLayers(layer);
[world]
type=WMSLayer
url=http://localhost/wms
extension=gif
bbox=-19977777,-7481525,20037508,18356400
maxResolution=47524
srs=EPSG:54004
[ocean]
type=WMSLayer
url=http://localhost/wms
extension=gif
bbox=-19977777,-7481525,20037508,18356400
maxResolution=47524
srs=EPSG:54004
olivier.terral a écrit :
> oh it's mistake, too more test :)
>
> I've cleanup my files now I 've a new error:
>
> var mapOptions = {
> controls:[],
> projection: "EPSG:54004",
> units: "m",
> maxExtent: new
> OpenLayers.Bounds(-19977777,-7481525,20037508,18356400),
> maxResolution:47524
> };
>
> map = new OpenLayers.Map($('mainMap'),mapOptions);
>
> layer definition:
>
> var layerOptions = {
> visibility:true,
> transparent:"TRUE",
> projection:"EPSG:54004",
> maxExtent: new
> OpenLayers.Bounds(-19977777,-7481525,20037508,18356400
> ),
> maxResolution: 47524
> };
> layer= new OpenLayers.Layer.WMS("ocean","http://localhost/wms-c",
> {
> layers: "ocean",
> transparent:"TRUE",
> format:image/png,
>
> },
> layerOptions
> );
>
> map.addLayers(layer);
>
>
> [ocean]
> type=WMSLayer
> url=http://localhost/wms
> extension=gif
> srs=EPSG:54004
> bbox=-19977777,-7481525,20037508,18356400
> maxResolution=47524
>
>
> Error in browser:
> L'image
> “http://localhost/wms-c?LAYERS=ocean&TRANSPARENT=TRUE&FORMAT=image%2Fgif&STYLES=default&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A54004&BBOX=-7811633%2C4684619%2C4354511%2C16850763&WIDTH=256&HEIGHT=256”
> ne peut être affichée car elle contient des erreurs.
>
>
>
> error in Apache:
> [Wed Mar 07 14:01:06 2007] [error] [client 127.0.0.1] Cache hit: -7811633.0,4684619.0,4354511.0,16850763.0, Tile: x: 1, y: 1, z: 0, time: 0.0, debug: True\r
> [Wed Mar 07 14:01:07 2007] [error] [client 127.0.0.1] Cache hit: -7811633.0,4684619.0,4354511.0,16850763.0, Tile: x: 1, y: 1, z: 0, time: 0.0, debug: True\r
> [Wed Mar 07 14:01:09 2007] [error] [client 127.0.0.1] Cache hit: -7811633.0,4684619.0,4354511.0,16850763.0, Tile: x: 1, y: 1, z: 0, time: 0.0, debug: True\r
> [Wed Mar 07 14:01:12 2007] [error] [client 127.0.0.1] Cache hit: -7811633.0,4684619.0,4354511.0,16850763.0, Tile: x: 1, y: 1, z: 0, time: 0.0, debug: True\r
>
>
>
>
> Christopher Schmidt a écrit :
>
>> On Wed, Mar 07, 2007 at 09:58:53AM +0100, olivier.terral wrote:
>>
>>
>>> Yep,
>>>
>>> Map definiton:
>>>
>>>
>> Your maxResolution doesn't match. Either round the one in OpenLayers, or
>> change the one in TileCache.
>>
>> -- Chris
>>
>>
>>
>>> var mapOptions = {
>>> controls:[],
>>> projection: "EPSG:54004",
>>> units: "m",
>>> maxExtent: new
>>> OpenLayers.Bounds(-19977777,-8938600.163301663,20037508,19813475.16330166),
>>> maxResolution:47524.091449
>>> };
>>>
>>> map = new OpenLayers.Map($('mainMap'),mapOptions);
>>>
>>> layer definition:
>>>
>>> var layerOptions = {
>>> visibility:true,
>>> transparent:"TRUE",
>>> projection:"EPSG:54004",
>>> maxExtent: new
>>> OpenLayers.Bounds(-19977777,-8938600.163301663,20037508,19813475.16330166),
>>> maxResolution: 47524.091449
>>> };
>>> layer= new OpenLayers.Layer.WMS("Oceans","http://localhost/wms-c",
>>> {
>>> layers: "ocean",
>>> transparent:"TRUE",
>>> format:image/png,
>>>
>>> },
>>> layerOptions
>>> );
>>>
>>> map.addLayers(layer);
>>>
>>>
>>> "http://localhost/wms" is a mapserver who works fine
>>> "http://localhost/wms-c" is the TileCache cgi for the wms of this mapserver
>>>
>>> Thanks for your help Christopher :)
>>>
>>>
>>> Christopher Schmidt a ?crit :
>>>
>>>
>>>> On Tue, Mar 06, 2007 at 05:07:37PM +0100, olivier.terral wrote:
>>>>
>>>>
>>>>
>>>>> Hi,
>>>>>
>>>>> I test Tilecache but I've a problem.
>>>>>
>>>>> Crschimdt said me maxResolution='auto' creates problem so I create my
>>>>> layers and map with maxResolution=47524 ( It's a world mercator
>>>>> projection in meters) and a maxExtent
>>>>>
>>>>> for information wms works good, it's a mapserver wms and the layer is
>>>>> displayed correctly
>>>>> but with tilecache it bugs
>>>>>
>>>>>
>>>>>
>>>> We need your OpenLayers config -- layer and map constructors -- to debug
>>>> further.
>>>>
>>>> Regards,
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
> _______________________________________________
> Tilecache mailing list
> Tilecache at openlayers.org
> http://openlayers.org/mailman/listinfo/tilecache
>
>
More information about the Tilecache
mailing list