Opened 17 years ago
Closed 16 years ago
#1974 closed defect (fixed)
Simple WMS layer does not add STYLES to the URL
Reported by: | Owned by: | tomkralidis | |
---|---|---|---|
Priority: | high | Milestone: | 5.2 release |
Component: | WMS Server | Version: | 4.10 |
Severity: | major | Keywords: | |
Cc: | jmckenna, tomkralidis |
Description
In mapwmslayer.c:400 pszStyle can be set to "" At mapwmslayer.c:424 STYLES is only add if (strlen(pszStyle) > 0) Here is a simple mapfile the reproduces the problem: MAP NAME "wms-jpl" STATUS ON EXTENT -180.0 -90.0 180.0 90.0 SIZE 400 250 IMAGECOLOR 200 200 200 IMAGETYPE png UNITS DD #DEBUG ON PROJECTION "init=epsg:4326" END WEB IMAGEPATH "/tmp/ms_tmp/" IMAGEURL "/ms_tmp/" END LAYER NAME "global_landsat" TYPE RASTER DEBUG TRUE STATUS DEFAULT MINSCALE 20000 CONNECTION "http://wms.jpl.nasa.gov/wms.cgi?STYLES=" # following does not pick up the wms_styles # CONNECTION "http://wms.jpl.nasa.gov/wms.cgi?" CONNECTIONTYPE WMS METADATA "wms_srs" "EPSG:4326" "wms_name" "modis,global_mosaic" "wms_styles" "" "wms_server_version" "1.1.1" "wms_format" "image/png" END END END
Change History (7)
comment:1 by , 17 years ago
Cc: | added |
---|
comment:4 by , 16 years ago
Cc: | added; removed |
---|
Steve: I believe #1088 may have fixed this. Can you verify?
comment:5 by , 16 years ago
Tom,
I get the following. The WMS connection timed out so I'm not sure if this hits the code or not. Sorry, I have been swamped lately. If you have another WMS site handy and you are happy with the results, then I'm good also. I can't remember what I was doing 2 years ago when I reported this, but I'm glad you have picked it up and done something with it.
Thanks,
-Steve
woodbri@carto:/u/data/maps$ shp2img -o junk.png -m bug1974.map [Tue Jun 24 10:41:59 2008].481263 HTTP: Starting to prepare HTTP requests. [Tue Jun 24 10:41:59 2008].481476 HTTP request: id=0, http://wms.jpl.nasa.gov/wms.cgi?STYLES=&LAYERS=modis%2Cglobal%5Fmosaic&REQUEST=GetMap&SERVICE=WMS&FORMAT=image%2Fpng&HEIGHT=250&VERSION=1.1.1&SRS=EPSG:4326&WIDTH=400&BBOX=%2D180%2C%2D112%2E5%2C180%2C112%2E5&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_inimage [Tue Jun 24 10:41:59 2008].482085 HTTP: Before download loop [Tue Jun 24 10:42:30 2008].23442 HTTP: After download loop [Tue Jun 24 10:42:30 2008].23500 msHTTPExecuteRequests() timing summary per layer (connect_time + time_to_first_packet + download_time = total_time in seconds) [Tue Jun 24 10:42:30 2008].23526 HTTP: TIMEOUT of 30 seconds exceeded for http://wms.jpl.nasa.gov/wms.cgi?STYLES=&LAYERS=modis%2Cglobal%5Fmosaic&REQUEST=GetMap&SERVICE=WMS&FORMAT=image%2Fpng&HEIGHT=250&VERSION=1.1.1&SRS=EPSG:4326&WIDTH=400&BBOX=%2D180%2C%2D112%2E5%2C180%2C112%2E5&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_inimage [Tue Jun 24 10:42:30 2008].23637 Layer 0: 0.335 + -0.335 + 30.868 = 30.868s [Tue Jun 24 10:42:30 2008].23861 msDrawMap(): Layer 0 (global_landsat), 0.000s
comment:6 by , 16 years ago
Milestone: | → 5.2 release |
---|---|
Owner: | changed from | to
Status: | new → assigned |
Steve: I tried this with another WMS and it seems to work:
MAP NAME "mstrac-1974" STATUS ON EXTENT -180.0 -90.0 180.0 90.0 SIZE 400 250 IMAGECOLOR 200 200 200 IMAGETYPE png UNITS DD #DEBUG ON PROJECTION "init=epsg:4326" END WEB IMAGEPATH "/tmp/" IMAGEURL "/ms_tmp/" END LAYER NAME "envirodat" TYPE RASTER DEBUG TRUE STATUS DEFAULT MINSCALE 20000 # following does not pick up the wms_styles CONNECTION "http://map.ns.ec.gc.ca/envdat/map.aspx" CONNECTIONTYPE WMS METADATA "wms_srs" "EPSG:4326" "wms_name" "envirodat" "wms_styles" "" "wms_server_version" "1.1.1" "wms_format" "image/png" END END END
[devgeo:/home/tkralidi/foss4g/mapserver/bugs/1974]$ shp2img -layer_debug envirodat 1 -m test2.map -o foo.png [Tue Jun 24 08:50:42 2008].82431 HTTP: Starting to prepare HTTP requests. [Tue Jun 24 08:50:42 2008].82736 HTTP request: id=0, http://map.ns.ec.gc.ca/envdat/map.aspx?LAYERS=envirodat&REQUEST=GetMap&SERVICE=WMS&FORMAT=image/png&STYLES=&HEIGHT=250&VERSION=1.1.1&SRS=EPSG:4326&WIDTH=400&BBOX=-180,-112.330827067669,180,112.330827067669&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_inimage [Tue Jun 24 08:50:42 2008].83093 HTTP: Before download loop [Tue Jun 24 08:50:42 2008].679001 msHTTPWriteFct(id=0, 301 bytes) [Tue Jun 24 08:50:42 2008].778232 HTTP: After download loop [Tue Jun 24 08:50:42 2008].778257 msHTTPExecuteRequests() timing summary per layer (connect_time + time_to_first_packet + download_time = total_time in seconds) [Tue Jun 24 08:50:42 2008].778351 Layer 0: 0.003 + 0.593 + 0.102 = 0.698s [Tue Jun 24 08:50:42 2008].778516 msDrawRasterLayerLow(envirodat): entering. [devgeo:/home/tkralidi/foss4g/mapserver/bugs/1974]$
I get an image back as expected. STYLES seems to be passed correctly.
Steve: any chance you can quickly test and verify?
comment:7 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Closing based on my tests. If you find an error in testing, please reopen.
i have also hit this same issue, with MapServer 4.10.2