[Geoserver-users] GeoServer + TileCahe + WMS + OpenLayer = Doesnt work

Dear list:

I have successfully setup GeoServer1.6 (Apache Tomcat) + Tilecache(Apache2.2 + mod_python) + OpenLayer + WMS
I have already test my Geoserver and tilecache , both of them are work. I used the default examples of Geoserver. However, when I setup my own data layers for tilecache. it doesnt work.
For example,
I have WMS link like this:
http://127.0.0.1:2008/geoserver/wms?bbox=-77498.10277191945,252450.97991880335,343091.0787104775,680814.505391243&styles=&Format=application/openlayers&request=GetMap&version=1.1.1&layers=topp:Mydatalayer&width=590&height=550&srs=EPSG:28992

and I setup tilecache like this in .cfg file

[topp]
type=WMSLayerw
layers=topp:Mydatalayer
url=http://127.0.0.1:2008/geoserver/wms
extension=png
srs=EPSG:28992

and my OpenLayer script like this

var lon = 7.37;
var lat = 52.1;
var zoom = 10;
var map, layer;

function init(){
OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;
map = new OpenLayers.Map( ‘map’ );
layer = new OpenLayers.Layer.WMS( “OpenLayers WMS”,
“/tilecache/tilecache.py”, {layers: ‘topp’} );
map.addLayer(layer);

map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
map.addControl(new OpenLayers.Control.MousePosition());

map.addControl( new OpenLayers.Control.LayerSwitcher() );
}

the result just show pink images, I dont why this happened. I was try to setup more parameters. but I did not successed.
Is there anybody have idea about this situations? Thanks in advance

All the best

Xiaoyu
PS. I have send the same mail to tilecache mailinglist

Xiaoyu Guan (Sam)
Geo-information Science
Wageningen UR

Hi,

It would be helpful to know if requests are making it to the GeoServer backend. Can you clear your tile cache, reload open layers and then watch the GeoServer request log? If you see requests go by including the request log would be useful.

-Justin

Xiaoyu Guan wrote:

Dear list:

I have successfully setup GeoServer1.6 (Apache Tomcat) + Tilecache(Apache2.2 + mod_python) + OpenLayer + WMS
I have already test my Geoserver and tilecache , both of them are work. I used the default examples of Geoserver. However, when I setup my own data layers for tilecache. it doesnt work.
For example,
I have WMS link like this:
http://127.0.0.1:2008/geoserver/wms?bbox=-77498.10277191945,252450.97991880335,343091.0787104775,680814.505391243&styles=&Format=application/openlayers&request=GetMap&version=1.1.1&layers=topp:Mydatalayer&width=590&height=550&srs=EPSG:28992

and I setup tilecache like this in .cfg file

[topp]
type=WMSLayerw
layers=topp:Mydatalayer
url=http://127.0.0.1:2008/geoserver/wms
extension=png
srs=EPSG:28992

and my OpenLayer script like this

        var lon = 7.37;
        var lat = 52.1;
        var zoom = 10;
        var map, layer;

        function init(){
            OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;
            map = new OpenLayers.Map( 'map' );
            layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
                    "/tilecache/tilecache.py", {layers: 'topp'} );
            map.addLayer(layer);

            map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
            map.addControl(new OpenLayers.Control.MousePosition());

            map.addControl( new OpenLayers.Control.LayerSwitcher() );
        }

the result just show pink images, I dont why this happened. I was try to setup more parameters. but I did not successed.
Is there anybody have idea about this situations? Thanks in advance

All the best

Xiaoyu
PS. I have send the same mail to tilecache mailinglist
--
Xiaoyu Guan (Sam)
Geo-information Science
Wageningen UR

!DSPAM:4007,488831c6186882458217002!

------------------------------------------------------------------------

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

!DSPAM:4007,488831c6186882458217002!

------------------------------------------------------------------------

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,488831c6186882458217002!

--
Justin Deoliveira
The Open Planning Project
jdeolive@anonymised.com

Dear All:
Thanks Justin.
I would like to tell you, the problem have been solved. I found one post of tilecache mailing list.

Neither OpenLayers nor TileCache is configured correctly. OpenLayers is
missing any kind of ‘maxResolution’ or other resolution-setting option,
and TileCache is missing maxresolution and bbox.

"The most important thing to do is to ensure that the OpenLayers Layer
has the same resolutions and bounding box as your TileCache layer. You
can define the resolutions in OpenLayers via the ‘resolutions’ option or
the ‘maxResolution’ option on the layer. The maxExtent should be defined
to match the bbox parameter of the TileCache layer." –
http://tilecache.org/readme.html

So my configure have change into Tilecache

[mylayer1]
type=WMSLayer
url=http://127.0.0.1:2008/atrium/wms
layers=topp:GroupLayers
bbox=0,300000,310000,610000
extension=png
srs=EPSG:28992
maxResolution=3000
metaTile=true
debug=yes
mime_type=image/png

then the openlayers script

var map;

var tiled;

OpenLayers.IMAGE_RELOAD_ATTEMPTS = 5;
OpenLayers.DOTS_PER_INCH = 25.4 / 0.28;

function init(){
var bounds = new OpenLayers.Bounds(
0,300000,
310000,610000
);
var options = {
controls: ,
maxExtent: bounds,
maxResolution: 3000,
projection: “EPSG:28992”,
units: ‘m’
};
map = new OpenLayers.Map(‘map’, options);

// setup tiled layer
tiled = new OpenLayers.Layer.WMS(
“topp:osmLine - Tiled”, “http://127.0.0.1:2010/tilecache/tilecache.py”,
{
width: ‘590’,
srs: ‘EPSG:28992’,
layers: ‘mylayer1’,
height: ‘550’,
styles: ‘’,
format: ‘image/png’,
tiled: ‘true’,
tilesOrigin : “0,300000”
},
{buffer: 0}
);

map.addLayers(tiled);

// setup controls and initial zooms
map.addControl(new OpenLayers.Control.PanZoomBar());
map.addControl(new OpenLayers.Control.Navigation());
map.addControl(new OpenLayers.Control.Scale($(‘scale’)));
map.addControl(new OpenLayers.Control.MousePosition({element: $(‘location’)}));
map.addControl(new OpenLayers.Control.LayerSwitcher());
//map.addControl(new OpenLayers.Control.OverviewMap());
map.zoomToExtent(bounds);
}
Finally, it works, but I see another problem, when I load the map, some tile images are not pink images or maps, it is just blank and the browser already stop loading images. Then if you refresh the browser, sometimes it load again. I thought I could solve it via OpenLayers.IMAGE_RELOAD_ATTEMPTS , but it doesnt work.

All the best

Xiaoyu

On Fri, Jul 25, 2008 at 4:22 AM, Justin Deoliveira <jdeolive@anonymised.com> wrote:

Hi,

It would be helpful to know if requests are making it to the GeoServer backend. Can you clear your tile cache, reload open layers and then watch the GeoServer request log? If you see requests go by including the request log would be useful.

-Justin

Xiaoyu Guan wrote:

Dear list:

I have successfully setup GeoServer1.6 (Apache Tomcat) + Tilecache(Apache2.2 + mod_python) + OpenLayer + WMS
I have already test my Geoserver and tilecache , both of them are work. I used the default examples of Geoserver. However, when I setup my own data layers for tilecache. it doesnt work.
For example,
I have WMS link like this:

http://127.0.0.1:2008/geoserver/wms?bbox=-77498.10277191945,252450.97991880335,343091.0787104775,680814.505391243&styles=&Format=application/openlayers&request=GetMap&version=1.1.1&layers=topp:Mydatalayer&width=590&height=550&srs=EPSG:28992 <http://127.0.0.1:2008/geoserver/wms?bbox=-77498.10277191945,252450.97991880335,343091.0787104775,680814.505391243&styles=&Format=application/openlayers&request=GetMap&version=1.1.1&layers=topp:Mydatalayer&width=590&height=550&srs=EPSG:28992>

and I setup tilecache like this in .cfg file

[topp]
type=WMSLayerw
layers=topp:Mydatalayer
url=http://127.0.0.1:2008/geoserver/wms
extension=png
srs=EPSG:28992

and my OpenLayer script like this

var lon = 7.37;
var lat = 52.1;
var zoom = 10;
var map, layer;

function init(){
OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;
map = new OpenLayers.Map( ‘map’ );
layer = new OpenLayers.Layer.WMS( “OpenLayers WMS”,
“/tilecache/tilecache.py”, {layers: ‘topp’} );
map.addLayer(layer);

map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
map.addControl(new OpenLayers.Control.MousePosition());

map.addControl( new OpenLayers.Control.LayerSwitcher() );
}

the result just show pink images, I dont why this happened. I was try to setup more parameters. but I did not successed.
Is there anybody have idea about this situations? Thanks in advance

All the best

Xiaoyu
PS. I have send the same mail to tilecache mailinglist

Xiaoyu Guan (Sam)
Geo-information Science
Wageningen UR

!DSPAM:4007,488831c6186882458217002!



This SF.Net email is sponsored by the Moblin Your Move Developer’s challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

!DSPAM:4007,488831c6186882458217002!



Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4007,488831c6186882458217002!


Justin Deoliveira
The Open Planning Project
jdeolive@anonymised.com


Xiaoyu Guan (Sam)
Geo-information Science
Wageningen UR