[OpenLayers-Users] In TMS layer,it display "lack of image".
Yang Zhaohui
yangzhaozhao2008 at 163.com
Sat Apr 12 23:11:07 EDT 2008
Hello dear sir,
I have a problem to consult you. I make a TMS demo, restrict the map to a specific bound, and use a maxResolution. My codes are as follows. But it display "lack of image"(some 256*256 red box with a cross) in the region where there are out of the bound. How to control it, and do not let it display "lack of image"? Using the parameter "maxResolution"? How to calculate the value of the "maxResolution" of a TMS layer? Thank you very much!
var bounds = new OpenLayers.Bounds(103.944322120274,30.633607944233,104.154306379013,30.8435922029719);
......
var map_options={
controls:[new OpenLayers.Control.MouseDefaults()]
,'maxExtent': bounds
,'projection': 'EPSG:4326'
,numZoomLevels: 3
,maxResolution:0.00082025101069921875
,units: "degrees"
};
map = new OpenLayers.Map( 'map' , map_options );
var tms_options={
layername: 'basic'
, type:'jpg'
,'maxExtent': bounds
,displayOutsideMaxExtent: false
};
layer = new OpenLayers.Layer.TMS( "TMS",
"http://localhost:8080/functions/", tms_options );
......
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080413/249fa5cb/attachment.html
More information about the Users
mailing list