阅读:2394回复:1
TileCache配合OpenLayers切图入门级问题,达人请进
我刚刚接触TileCache配合OpenLayers,配置都能成功,就是切图每次都从-180, -90, 180, 90,很久都能完,目前我只需要切115.6,23.46,120.65,28.45范围内的,我知道在TileCache是可以指定bbox=115.6,23.46,120.65,28.45, OpenLayers我指定了maxExtent: new OpenLayers.Bounds(115.6,23.46,120.65,28.45),但出不来图,请告诉我怎么做,万分感谢!
|
|
1楼#
发布于:2009-06-05 11:19
<P>可能是Resolution的问题,我也遇到同样问题</P>
<P>var options = {<BR> maxExtent: new OpenLayers.Bounds(-60000, -60000, 60000, 70000),<BR> maxResolution : 1<BR> }; <BR> <BR> map = new OpenLayers.Map( $('map') , options ); <BR> layer = new OpenLayers.Layer.TileCache("TileCacheLayer", <BR> "<a href="http://localhost/tilecache-2.10/Cache" target="_blank" >http://localhost/tilecache-2.10/Cache</A>",<BR> "shm",<BR> {<BR> 'format': 'image/png',<BR> maxResolution: 'auto' // same as the TileCache config<BR> }<BR> );</P> |
|