[Gfoss] OpenLayers con TileCache

Salvator*eL*arosa s_larosa a libero.it
Mer 3 Set 2008 12:02:29 CEST




francesco334 wrote:
> 
> 
> 
> Vedendo un pò su internet,mi dicono di settare correttamente il bbox!
> Sinceramente non l'ho mai settato enonho capito come recuperarlo!
> 
> Help..please!
> 
> Grazie,
> Francesco
> 
> 

Per inserire il bounds procedi così:

Inserisci questa variabile nella funzione init();

var bounds = new OpenLayers.Bounds(Xmin,Ymin,Xmax,Ymax);

poi in mapOptions inserisci:

maxExtent=bounds

Per esempio nel mio caso:
           var bounds = new
OpenLayers.Bounds(2614649.5,4320194.5,2653614.5,4344669.5);
           var mapOptions = {
	   		theme: null,
			controls: [], 
			maxExtent: bounds, 
			projection:"EPSG:3004", 
			resolutions: [1,2,4,8,16,32,64,128,256,512],
			maxResolution: 'auto',
			units: "m", 
			format: 'png',
			numZoomLevel: 10 };

           map = new OpenLayers.Map( 'map' , mapOptions);


Ciao!


-----
Salvatore Larosa
GPG: 0xE504BBE2 (FP: D9B2 CA87 81CD 1B91 E24D 3B42 D0F7 FA01 E504 BBE2)
-- 
View this message in context: http://www.nabble.com/OpenLayers-con-TileCache-tp19223528p19286296.html
Sent from the Gfoss mailing list archive at Nabble.com.




Maggiori informazioni sulla lista Gfoss