[OpenLayers-Users] Bounding Box and Orthographic projection "AUTO2:42003,1,-75.,0."

Joaquín Rodriguez-Guerra Urcelay jrguerra at gmv.com
Wed Mar 2 05:13:40 EST 2011


Dear list,

I am having a bit of troube trying to set the bbox parameter in a wms request.

I want openlayers to request the following url (which works) (image in orthographic projection similar to the ones in http://glmapserver.sourceforge.net/test/layer_test.html)

http://localhost:8080/cgi-bin/mywms?LAYERS=mars_orbital&VERSION=1.3.0&EXCEPTIONS=INIMAGE&SERVICE=WMS&REQUEST=GetMap&STYLES=&FORMAT=image%2Fjpeg&CRS=AUTO2%3A42003%2C1%2C-75.%2C0.&BBOX=-7800000.,-7800000.,7800000.,7800000.&WIDTH=512&HEIGHT=256

But all I can get is this (which does not work)

http://localhost:8080/cgi-bin/mywms?LAYERS=mars_orbital&VERSION=1.3.0&EXCEPTIONS=INIMAGE&SERVICE=WMS&REQUEST=GetMap&STYLES=&FORMAT=image%2Fjpeg&CRS=AUTO2%3A42003%2C1%2C-75.%2C0.&BBOX=-360,-180,360,180&WIDTH=512&HEIGHT=256

The only difference is the bbox parameter. Openlayers keeps requesting BBOX=-360,-180,360,180 when I need BBOX=-7800000.,-7800000.,7800000.,7800000

I dont know how to set the extent, this is what I tried : 

        function init(){
            var options = {
		projection: new OpenLayers.Projection("AUTO2:42003,1,-75.,0."),
                units: "m",
		maxExtent: new OpenLayers.Bounds(-7800000,-7800000,7800000,7800000) 
            };
            map = new OpenLayers.Map('map',options);
            var ol_wms = new OpenLayers.Layer.WMS(
                "OpenLayers WMS",
                "http://localhost:8080/cgi-bin/mywms", 
		{layers: 'mars_orbital',VERSION: "1.3.0"},
		{singleTile: true, ratio: 1});
            map.addLayer(ol_wms);
            map.addControl(new OpenLayers.Control.LayerSwitcher());
	    map.zoomToMaxExtent();       

Thanks in advance!!

Best regards,

Joaquín Rodríguez-Guerra Urcelay

Unidad de Sistemas de Procesamiento de Ciencia y de Observación de la Tierra / Science and Earth Observing Processing Systems Unit

GMV AEROSPACE AND DEFENCE, S.A.
Isaac Newton, 11
P.T.M. Tres Cantos
E-28760 Madrid
Tel. +34 91 807 21 00 / 7695
Fax +34 91 807 21 99
www.gmv.com

______________________
This message including any attachments may contain confidential 
information, according to our Information Security Management System,
 and intended solely for a specific individual to whom they are addressed.
 Any unauthorised copy, disclosure or distribution of this message
 is strictly forbidden. If you have received this transmission in error,
 please notify the sender immediately and delete it.

______________________
Este mensaje, y en su caso, cualquier fichero anexo al mismo,
 puede contener informacion clasificada por su emisor como confidencial
 en el marco de su Sistema de Gestion de Seguridad de la 
Informacion siendo para uso exclusivo del destinatario, quedando 
prohibida su divulgacion copia o distribucion a terceros sin la 
autorizacion expresa del remitente. Si Vd. ha recibido este mensaje 
 erroneamente, se ruega lo notifique al remitente y proceda a su borrado. 
Gracias por su colaboracion.

______________________



More information about the Users mailing list