<div dir="ltr">Dear All:<br>Thanks Justin. <br>I would like to tell you, the problem have been solved. I found one post of tilecache mailing list. <br><br><i style="color: rgb(51, 51, 255);"><span>Neither OpenLayers nor TileCache is configured correctly. OpenLayers is
</span><br><span>missing any kind of &#39;maxResolution&#39; or other resolution-setting option,
</span><br><span>and TileCache is missing maxresolution and bbox. 
</span><br><br><span>&quot;The most important thing to do is to ensure that the OpenLayers Layer
</span><br><span>has the same resolutions and bounding box as your TileCache layer. You
</span><br><span>can define the resolutions in OpenLayers via the &#39;resolutions&#39; option or
</span><br><span>the &#39;maxResolution&#39; option on the layer. The maxExtent should be defined
</span><br><span>to match the bbox parameter of the TileCache layer.&quot; &nbsp;--
</span><br><a href="http://tilecache.org/readme.html" rel="nofollow"><span>http://tilecache.org/readme.html</span></a></i><br><br>So my configure have change into Tilecache<br><br>[mylayer1]<br>type=WMSLayer<br>url=<a href="http://127.0.0.1:2008/atrium/wms">http://127.0.0.1:2008/atrium/wms</a><br>
layers=topp:GroupLayers<br>bbox=0,300000,310000,610000<br>extension=png<br>srs=EPSG:28992<br>maxResolution=3000<br>metaTile=true<br>debug=yes<br>mime_type=image/png<br><br>then the openlayers script <br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var map;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var tiled;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OpenLayers.IMAGE_RELOAD_ATTEMPTS = 5;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OpenLayers.DOTS_PER_INCH = 25.4 / 0.28;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; function init(){<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var bounds = new OpenLayers.Bounds(<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0,300000,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 310000,610000<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; );<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var options = {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; controls: [],<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; maxExtent: bounds,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; maxResolution: 3000,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; projection: &quot;EPSG:28992&quot;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; units: &#39;m&#39;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map = new OpenLayers.Map(&#39;map&#39;, options);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // setup tiled layer<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tiled = new OpenLayers.Layer.WMS(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;topp:osmLine - Tiled&quot;, &quot;<a href="http://127.0.0.1:2010/tilecache/tilecache.py">http://127.0.0.1:2010/tilecache/tilecache.py</a>&quot;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; width: &#39;590&#39;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; srs: &#39;EPSG:28992&#39;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp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nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map.addLayers(tiled);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // setup controls and initial zooms<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map.addControl(new OpenLayers.Control.PanZoomBar());<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map.addControl(new OpenLayers.Control.Navigation());<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map.addControl(new OpenLayers.Control.Scale($(&#39;scale&#39;)));<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map.addControl(new OpenLayers.Control.MousePosition({element: $(&#39;location&#39;)}));<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map.addControl(new OpenLayers.Control.LayerSwitcher());<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //map.addControl(new OpenLayers.Control.OverviewMap());<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map.zoomToExtent(bounds);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>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. <br>
<br>All the best <br><br>Xiaoyu<br><br><br><br><br><br><br><div class="gmail_quote">On Fri, Jul 25, 2008 at 4:22 AM, Justin Deoliveira &lt;<a href="mailto:jdeolive@openplans.org" target="_blank">jdeolive@openplans.org</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
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.<br>


<br>
-Justin<br>
<br>
Xiaoyu Guan wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>
<br>
<br>
<br>
Dear list:<br>
<br>
I have successfully setup GeoServer1.6 (Apache Tomcat) + Tilecache(Apache2.2 + mod_python) + OpenLayer + WMS<br>
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.<br>
For example,<br>
I have WMS link like this:<br>
</div><a href="http://127.0.0.1:2008/geoserver/wms?bbox=-77498.10277191945,252450.97991880335,343091.0787104775,680814.505391243&amp;styles=&amp;Format=application/openlayers&amp;request=GetMap&amp;version=1.1.1&amp;layers=topp:Mydatalayer&amp;width=590&amp;height=550&amp;srs=EPSG:28992" target="_blank">http://127.0.0.1:2008/geoserver/wms?bbox=-77498.10277191945,252450.97991880335,343091.0787104775,680814.505391243&amp;styles=&amp;Format=application/openlayers&amp;request=GetMap&amp;version=1.1.1&amp;layers=topp:Mydatalayer&amp;width=590&amp;height=550&amp;srs=EPSG:28992</a> &lt;<a href="http://127.0.0.1:2008/geoserver/wms?bbox=-77498.10277191945,252450.97991880335,343091.0787104775,680814.505391243&amp;styles=&amp;Format=application/openlayers&amp;request=GetMap&amp;version=1.1.1&amp;layers=topp:Mydatalayer&amp;width=590&amp;height=550&amp;srs=EPSG:28992" target="_blank">http://127.0.0.1:2008/geoserver/wms?bbox=-77498.10277191945,252450.97991880335,343091.0787104775,680814.505391243&amp;styles=&amp;Format=application/openlayers&amp;request=GetMap&amp;version=1.1.1&amp;layers=topp:Mydatalayer&amp;width=590&amp;height=550&amp;srs=EPSG:28992</a>&gt;<div>

<div></div><div><br>
<br>
and I setup tilecache like this in .cfg file<br>
<br>
[topp]<br>
type=WMSLayerw<br>
layers=topp:Mydatalayer<br>
url=<a href="http://127.0.0.1:2008/geoserver/wms" target="_blank">http://127.0.0.1:2008/geoserver/wms</a><br>
extension=png<br>
srs=EPSG:28992<br>
<br>
and my OpenLayer script like this<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;var lon = 7.37;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;var lat = 52.1;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;var zoom = 10;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;var map, layer;<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp;function init(){<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;map = new OpenLayers.Map( &#39;map&#39; );<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;layer = new OpenLayers.Layer.WMS( &quot;OpenLayers WMS&quot;,<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;/tilecache/tilecache.py&quot;, {layers: &#39;topp&#39;} );<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;map.addLayer(layer);<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;map.addControl(new OpenLayers.Control.MousePosition());<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;map.addControl( new OpenLayers.Control.LayerSwitcher() );<br>
 &nbsp; &nbsp; &nbsp; &nbsp;}<br>
<br>
the result just show pink images, I dont why this happened. I was try to setup more parameters. but I did not successed.<br>
Is there anybody have idea about this situations? Thanks in advance<br>
<br>
All the best<br>
<br>
Xiaoyu<br>
PS. I have send the same mail to tilecache mailinglist<br>
-- <br>
Xiaoyu Guan (Sam)<br>
Geo-information Science<br>
Wageningen UR<br>
<br>
<br></div></div>
!DSPAM:4007,488831c6186882458217002!<br>
<br>
<br>
------------------------------------------------------------------------<br>
<br>
-------------------------------------------------------------------------<br>
This SF.Net email is sponsored by the Moblin Your Move Developer&#39;s challenge<br>
Build the coolest Linux based applications with Moblin SDK &amp; win great prizes<br>
Grand prize is a trip for two to an Open Source event anywhere in the world<br>
<a href="http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/" target="_blank">http://moblin-contest.org/redirect.php?banner_id=100&amp;url=/</a><br>
<br>
!DSPAM:4007,488831c6186882458217002!<br>
<br>
<br>
------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
Geoserver-users mailing list<br>
<a href="mailto:Geoserver-users@lists.sourceforge.net" target="_blank">Geoserver-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/geoserver-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/geoserver-users</a><br>
<br>
<br>
!DSPAM:4007,488831c6186882458217002!<br>
</blockquote>
<br>
<br>
-- <br>
Justin Deoliveira<br>
The Open Planning Project<br>
<a href="mailto:jdeolive@openplans.org" target="_blank">jdeolive@openplans.org</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Xiaoyu Guan (Sam)<br>Geo-information Science<br>Wageningen UR<br>
</div>