[OpenLayers-Dev] Projection-error on WMS-service

Michael Östling michael.ostling at metagis.se
Wed Jul 18 02:22:49 EDT 2007


Hi,
I have tried diiferent solutions but still get some problems.

I have added BBOX and SRS to the constructor. I can see that OpenLayers
reads this info. 

layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://metagisxp1/cgi-bin/mapserv.exe?map=/ms4w/Apache/htdocs/sna01.map",
{layers: 'markyta','projection':'EPSG:2400','SRS':'EPSG:2400','units':'m',
'BBOX':'1200000,6100000,1900000,7900000',
'maxExtent': new OpenLayers.Bounds(1200000,6100000,1900000,7900000)} );

But when checking the Apache-logfile I can see that the arguments BBOX and
SRC has been moved forward in the list of arguments but they stil have have
the default values
"GET /cgi-bin/mapserv.exe?map=/ms4w/Apache/htdocs/sna01.map&
LAYERS=markyta&
PROJECTION=EPSG%3A2400&
SRS=EPSG%3A4326&
UNITS=m&
BBOX=-180%2C-90%2C180%2C270&
MAXEXTENT=leftbottom%3D(1200000%2C6100000)%20right-top%3D(1900000%2C7900000)
&
SERVICE=WMS&
VERSION=1.1.1&
REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=im
age%2Fjpeg&WIDTH=256&HEIGHT=256 

/Michael

-----Ursprungligt meddelande-----
Från: Bart van den Eijnden (OSGIS) [mailto:bartvde at osgis.nl] 
Skickat: den 16 juli 2007 10:03
Till: Michael �stling; dev at openlayers.org
Ämne: Re: [OpenLayers-Dev] Projection-error on WMS-service

Hi,

try something similar for your EPSG code (mainly projection and units
parameters):

map = new OpenLayers.Map( $('imgMapContainer'), { controls: [],
'projection': 'EPSG:28992', 'units':'m', 'maxExtent': new
OpenLayers.Bounds(-231847.29064, 193706.896552, 521847.29064, 721293.103448)
, 'maxResolution':'auto'}); 

Best regards,
Bart

--
Bart van den Eijnden
OSGIS, Open Source GIS
http://www.osgis.nl


--------- Oorspronkelijk bericht --------
Van: Michael �stling <michael.ostling at metagis.se>
Naar: dev at openlayers.org <dev at openlayers.org>
Onderwerp: [OpenLayers-Dev] Projection-error on WMS-service
Datum: 16/07/07 05:44

> 
> 
> 
> 
> 
> Hi,
> I have 
> problems&nbsp;to get&nbsp;OpenLayers understanding any other projection
than 
> wgs84 (epsg:4324) when calling a WMS-layer
> &nbsp;
> I have an 
> WMS-services created with Mapserver.
> The services 
> has&nbsp;a SRS with&nbsp;epsg-code 2400.
> I can verify the the 
> service and the projection in Carbon tools OGC-Analyzer.
> &nbsp;
> I then try to show 
> this in OpenLayers with the html-code shown in the bottom of the eMail.The
code 
> seems not to use my extent information and the WMS-epsg 
> code.
> When looking into 
> the apache-logfile I can see that my boundingbox and SRC is skipped and
instead 
> replaced by epsg:4326 and boundingbox with -180,-90-180,270 
> ???
> &nbsp;
> Mapserver 
> returns&nbsp; images with the error-text written into it&nbsp;&nbsp; 
> " msWMSLoadGetMapParams(): WMS Server Error,&nbsp;Invalid SRS 
> given"
> &nbsp;
> Apachelogfile
> 192.168.1.198 - - 
> [16/Jul/2007:09:21:46 +0200] "GET 
>
/cgi-bin/mapserv.exe?map=/ms4w/Apache/htdocs/sna01.map&amp;LAYERS=markyta&am
p;SERVICE=WMS&amp;VERSION=1.1.1&amp;REQUEST=GetMap&amp;






-- 
No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.476 / Virus Database: 269.10.6/902 - Release Date: 2007-07-15
14:21






More information about the Dev mailing list