[mapserver-users] MapServer 5.4 WMS Server VERSION=1.3.0 Problem
G'day all, I'm a little new to WMS, but I confess the GetLegendGraphic feature available now in the 5.4 release caught my eye. So I'm 5.4.0 and using OpenLayers 2.7. However, when I use the URL : /cgi-bin/mapserv?map=/Users/19022662/Sites/marketprices/mapserver/ layers/ ol_countries_wms .map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&STYLES=&SRS=EPSG:4326& I get the following message (embedded in the tile) : msWMSLoadGetMapParams(): WMS server error. Invalid format for the EXCEPTION parameter. If I drop the VERSION (either back to 1.1.1 or just completely loose it, text below in the context of the OL script. var pol_bnd = new OpenLayers.Layer.WMS( 'Countries', 'http://trade.murdoch.local/cgi-bin/mapserv?map=/Users/19022662/Sites/marketprices/mapserver/layers/ol_countries_wms.map&SERVICE=WMS&REQUEST=GetMap&STYLES=&SRS=EPSG:4326&;' , {layers: 'countries'} ); map.addLayer(pol_bnd); I get my maps. I can work with this for now, but is there something I'm missing. I did try fiddling with the reported CRS / SRS changes, but I think I just confused myself - but that would be another topic! Perhaps along with the mapfile in the documentation, a copy of a full example of a request url would be great. Some of the mapfile is attached for completeness (it has been sucked across from a CGI Mapserv application): -- MAP NAMEaus_boundaries STATUS ON UNITS DD EXTENT 110 -35 130 -12 # WA extents SIZE900 650 SHAPEPATH "../geodata/" FONTSET "../geodata/fonts/fonts.lst" SYMBOLSET "../trade.sym" IMAGECOLOR 230 240 255 CONFIG "MS_ERRORFILE" "/var/log/mserr.log" DEBUG 5 PROJECTION "init=epsg:4326" END WEB METADATA "wms_title" "GMS Livestock Trade" "wms_onlineresource" "http://trade.murdoch.local/cgi-bin/mapserv?map=/Users/19022662/Sites/marketprices/mapserver/ol_countries_wms.map&; " "wms_srs" "EPSG:4326" END IMAGEPATH "../../tmp/" IMAGEURL"../../tmp/" END LAYER METADATA "wms_title" "Country Boundaries" "wms_srs" "EPSG:4326" "wms_group_title" "Political" END STATUS ON NAME"countries" GROUP "Political" DATA"global/ctybnda" TYPEpolygon OPACITY 100 CLASS NAME"Country Borders" COLOR 240 240 180 OUTLINECOLOR 0 70 0 END END cheers Ben -- Ben Madin REMOTE INFORMATION t : +61 8 9192 5455 f : +61 8 9192 5535 m : 0448 887 220 Broome WA 6725 b...@remoteinformation.com.au Out here, it pays to know... ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] MapServer 5.4 WMS Server VERSION=1.3.0 Problem
Hi, Do you have the full URL that is received by the server? MapServer WMS 1.3.0 supports the following EXCEPTIONS : XML, INIMAGE, or BLANK. Is might be possible to add EXCEPTIONS: "XML" (or INIMAGE, or BLANK) when building your OL wms 1.3.0 layer? Best Regards, Ben Madin wrote: G'day all, I'm a little new to WMS, but I confess the GetLegendGraphic feature available now in the 5.4 release caught my eye. So I'm 5.4.0 and using OpenLayers 2.7. However, when I use the URL : /cgi-bin/mapserv?map=/Users/19022662/Sites/marketprices/mapserver/layers/ol_countries_wms.map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&STYLES=&SRS=EPSG:4326& I get the following message (embedded in the tile) : msWMSLoadGetMapParams(): WMS server error. Invalid format for the EXCEPTION parameter. If I drop the VERSION (either back to 1.1.1 or just completely loose it, text below in the context of the OL script. var pol_bnd = new OpenLayers.Layer.WMS( 'Countries', 'http://trade.murdoch.local/cgi-bin/mapserv?map=/Users/19022662/Sites/marketprices/mapserver/layers/ol_countries_wms.map&SERVICE=WMS&REQUEST=GetMap&STYLES=&SRS=EPSG:4326&;', {layers: 'countries'} ); map.addLayer(pol_bnd); I get my maps. I can work with this for now, but is there something I'm missing. I did try fiddling with the reported CRS / SRS changes, but I think I just confused myself - but that would be another topic! Perhaps along with the mapfile in the documentation, a copy of a full example of a request url would be great. Some of the mapfile is attached for completeness (it has been sucked across from a CGI Mapserv application): -- MAP NAMEaus_boundaries STATUSON UNITSDD EXTENT 110 -35 130 -12 # WA extents SIZE900 650 SHAPEPATH "../geodata/" FONTSET "../geodata/fonts/fonts.lst" SYMBOLSET "../trade.sym" IMAGECOLOR 230 240 255 CONFIG "MS_ERRORFILE" "/var/log/mserr.log" DEBUG 5 PROJECTION "init=epsg:4326" END WEB METADATA "wms_title" "GMS Livestock Trade" "wms_onlineresource" "http://trade.murdoch.local/cgi-bin/mapserv?map=/Users/19022662/Sites/marketprices/mapserver/ol_countries_wms.map&"; "wms_srs" "EPSG:4326" END IMAGEPATH "../../tmp/" IMAGEURL"../../tmp/" END LAYER METADATA "wms_title" "Country Boundaries" "wms_srs""EPSG:4326" "wms_group_title" "Political" END STATUSON NAME"countries" GROUP"Political" DATA"global/ctybnda" TYPEpolygon OPACITY 100 CLASS NAME"Country Borders" COLOR240 240 180 OUTLINECOLOR 0 70 0 END END cheers Ben -- Assefa Yewondwossen Software Analyst Email: ass...@dmsolutions.ca http://www.dmsolutions.ca/ Phone: (613) 565-5056 (ext 14) Fax: (613) 565-0925 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] MapServer 5.4 WMS Server VERSION=1.3.0 Problem
G'day Assefa, On 05/05/2009, at 12:16 AM, Yewondwossen Assefa wrote: Do you have the full URL that is received by the server? No... I'm not sure how to get this(?) - I thought it might be shown if I set the debug levels high enough, but so far no luck! MapServer WMS 1.3.0 supports the following EXCEPTIONS : XML, INIMAGE, or BLANK. Is might be possible to add EXCEPTIONS: "XML" (or INIMAGE, or BLANK) when building your OL wms 1.3.0 layer? using either : new OpenLayers.Layer.WMS( 'Countries', 'http://trade.murdoch.local/cgi-bin/mapserv?map=/Users/19022662/Sites/marketprices/mapserver/layers/ol_countries_wms.map&SERVICE=WMS&VERSION=1.3.0&EXCEPTIONS=INIMAGE&REQUEST=GetMap&STYLES=&SRS=EPSG:4326&;' , {layers: 'countries'} ); or new OpenLayers.Layer.WMS( 'Tail Tag Areas', 'http://trade.murdoch.local/cgi-bin/mapserv?map=/Users/19022662/Sites/marketprices/mapserver/layers/ol_countries_wms.map&SERVICE=WMS&REQUEST=GetMap&STYLES=&SRS=EPSG:4326' , {layers: 'tailtagareas', transparent: 'true', version: '1.3.0', exceptions: 'xml'} ); gives no error, but neither do I receive any images any more. using the url (such as in the first example) works fine in QGIS, so I'm guessing the web serving 'can' work... very confusing. cheers Ben Ben Madin wrote: G'day all, I'm a little new to WMS, but I confess the GetLegendGraphic feature available now in the 5.4 release caught my eye. So I'm 5.4.0 and using OpenLayers 2.7. However, when I use the URL : /cgi-bin/mapserv?map=/Users/19022662/Sites/marketprices/mapserver/ layers/ ol_countries_wms .map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&STYLES=&SRS=EPSG: 4326& I get the following message (embedded in the tile) : msWMSLoadGetMapParams(): WMS server error. Invalid format for the EXCEPTION parameter. If I drop the VERSION (either back to 1.1.1 or just completely loose it, text below in the context of the OL script. var pol_bnd = new OpenLayers.Layer.WMS( 'Countries', 'http://trade.murdoch.local/cgi-bin/mapserv?map=/Users/19022662/Sites/marketprices/mapserver/layers/ol_countries_wms.map&SERVICE=WMS&REQUEST=GetMap&STYLES=&SRS=EPSG:4326&;' , {layers: 'countries'} ); map.addLayer(pol_bnd); I get my maps. I can work with this for now, but is there something I'm missing. I did try fiddling with the reported CRS / SRS changes, but I think I just confused myself - but that would be another topic! Perhaps along with the mapfile in the documentation, a copy of a full example of a request url would be great. Some of the mapfile is attached for completeness (it has been sucked across from a CGI Mapserv application): -- MAP NAMEaus_boundaries STATUSON UNITSDD EXTENT 110 -35 130 -12 # WA extents SIZE900 650 SHAPEPATH "../geodata/" FONTSET "../geodata/fonts/fonts.lst" SYMBOLSET "../trade.sym" IMAGECOLOR 230 240 255 CONFIG "MS_ERRORFILE" "/var/log/mserr.log" DEBUG 5 PROJECTION "init=epsg:4326" END WEB METADATA "wms_title" "GMS Livestock Trade" "wms_onlineresource" "http://trade.murdoch.local/cgi-bin/mapserv?map=/Users/19022662/Sites/marketprices/mapserver/ol_countries_wms.map&; " "wms_srs" "EPSG:4326" END IMAGEPATH "../../tmp/" IMAGEURL"../../tmp/" END LAYER METADATA "wms_title" "Country Boundaries" "wms_srs""EPSG:4326" "wms_group_title" "Political" END STATUSON NAME"countries" GROUP"Political" DATA"global/ctybnda" TYPEpolygon OPACITY 100 CLASS NAME"Country Borders" COLOR240 240 180 OUTLINECOLOR 0 70 0 END END -- Ben Madin REMOTE INFORMATION t : +61 8 9192 5455 f : +61 8 9192 5535 m : 0448 887 220 Broome WA 6725 b...@remoteinformation.com.au Out here, it pays to know... ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] MapServer 5.4 WMS Server VERSION=1.3.0 Problem
Ben Madin wrote: G'day Assefa, On 05/05/2009, at 12:16 AM, Yewondwossen Assefa wrote: Do you have the full URL that is received by the server? No... I'm not sure how to get this(?) - I thought it might be shown if I set the debug levels high enough, but so far no luck! If you have access to the web server you can check the logs (with Apache, it would be the access.log that would contain the request) You can also get it in your browser by checking the URL referenced by the image. MapServer WMS 1.3.0 supports the following EXCEPTIONS : XML, INIMAGE, or BLANK. Is might be possible to add EXCEPTIONS: "XML" (or INIMAGE, or BLANK) when building your OL wms 1.3.0 layer? using either : new OpenLayers.Layer.WMS( 'Countries', 'http://trade.murdoch.local/cgi-bin/mapserv?map=/Users/19022662/Sites/marketprices/mapserver/layers/ol_countries_wms.map&SERVICE=WMS&VERSION=1.3.0&EXCEPTIONS=INIMAGE&REQUEST=GetMap&STYLES=&SRS=EPSG:4326&;', {layers: 'countries'} ); or new OpenLayers.Layer.WMS( 'Tail Tag Areas', 'http://trade.murdoch.local/cgi-bin/mapserv?map=/Users/19022662/Sites/marketprices/mapserver/layers/ol_countries_wms.map&SERVICE=WMS&REQUEST=GetMap&STYLES=&SRS=EPSG:4326', {layers: 'tailtagareas', transparent: 'true', version: '1.3.0', exceptions: 'xml'} ); As I understand it, Openlayers (at least version 2.7) does not support wms 1.3.0. But you can still do the following and use CRS:84 in your case: var options2 = { maxExtent: new OpenLayers.Bounds(-180, -90, 180, 90), units: 'degree', //projection: "EPSG:4326" projection: "CRS:84" }; map = new OpenLayers.Map( 'map', options2 ); layer = new OpenLayers.Layer.WMS( "gmap wms", "http://127.0.0.1:8080/cgi-bin/mapserv.exe?map=f:/msapps/gmap-ms40/htdocs/gmap75_wms_4326.map";, {layers: 'DEMO', VERSION:'1.3.0', EXCEPTIONS:'INIMAGE', CRS:'CRS:84'} ); map.addLayer(layer); gives no error, but neither do I receive any images any more. using the url (such as in the first example) works fine in QGIS, so I'm guessing the web serving 'can' work... very confusing. I think QGIS does support wms 1.3.0. At the end what the GetMap parameters should be is: ...&CRS=EPSG:4326&BBOX=ymin,xmin,ymax,xmax or ...&CRS=CRS:84&BBOX=xmin,ymin,xmax,ymax Best regards, cheers Ben Ben Madin wrote: G'day all, I'm a little new to WMS, but I confess the GetLegendGraphic feature available now in the 5.4 release caught my eye. So I'm 5.4.0 and using OpenLayers 2.7. However, when I use the URL : /cgi-bin/mapserv?map=/Users/19022662/Sites/marketprices/mapserver/layers/ol_countries_wms.map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&STYLES=&SRS=EPSG:4326& I get the following message (embedded in the tile) : msWMSLoadGetMapParams(): WMS server error. Invalid format for the EXCEPTION parameter. If I drop the VERSION (either back to 1.1.1 or just completely loose it, text below in the context of the OL script. var pol_bnd = new OpenLayers.Layer.WMS( 'Countries', 'http://trade.murdoch.local/cgi-bin/mapserv?map=/Users/19022662/Sites/marketprices/mapserver/layers/ol_countries_wms.map&SERVICE=WMS&REQUEST=GetMap&STYLES=&SRS=EPSG:4326&;', {layers: 'countries'} ); map.addLayer(pol_bnd); I get my maps. I can work with this for now, but is there something I'm missing. I did try fiddling with the reported CRS / SRS changes, but I think I just confused myself - but that would be another topic! Perhaps along with the mapfile in the documentation, a copy of a full example of a request url would be great. Some of the mapfile is attached for completeness (it has been sucked across from a CGI Mapserv application): -- MAP NAMEaus_boundaries STATUSON UNITSDD EXTENT 110 -35 130 -12 # WA extents SIZE900 650 SHAPEPATH "../geodata/" FONTSET "../geodata/fonts/fonts.lst" SYMBOLSET "../trade.sym" IMAGECOLOR 230 240 255 CONFIG "MS_ERRORFILE" "/var/log/mserr.log" DEBUG 5 PROJECTION "init=epsg:4326" END WEB METADATA "wms_title" "GMS Livestock Trade" "wms_onlineresource" "http://trade.murdoch.local/cgi-bin/mapserv?map=/Users/19022662/Sites/marketprices/mapserver/ol_countries_wms.map&"; "wms_srs" "EPSG:4326" END IMAGEPATH "../../tmp/" IMAGEURL"../../tmp/" END LAYER METADATA "wms_title" "Country Boundaries" "wms_srs""EPSG:4326" "wms_group_title" "Political" END STATUSON NAME"countries" GROUP"Political" DATA"global/ctybnda" TYPEpolygon OPACITY 100 CLASS NAME"Country Borders" COLOR240 240 180 OUTLINECOLOR 0 70 0 END END