Opened 15 years ago

Closed 14 years ago

#2908 closed defect (fixed)

setConnectionType(MS_WMS) doesn't work with mapscript

Reported by: assefa Owned by: mapserverbugs
Priority: normal Milestone: 5.4 release
Component: MapServer C Library Version: unspecified
Severity: normal Keywords:
Cc: sdlime, adube@…

Description

reported by Alexander Dube:

I just installed mapserver 5.4.0-beta1. In mapscript, I'm now not unable to use oLayer->set("connectiontype", MS_WMS). I get an error saying "use setConnectionType()" instead.

That's what I did, but it doesn't work with MS_WMS. My collegue Julien looked deeper in the code and found out in maplayer.c, in the msInitializeVirtualTable, when we use MS_WMS it returns MS_FAILURE.

So I guess it's no longer possible to set connectiontype to wms in mapscript. Is there a new way of doing this ?

Also, why would a normal mapfile still accept the wms CONNECTIONTYPE ? I tried to save my map object as a mapfile and only added CONNECTIONTYPE wms and it worked.

Attachments (1)

diff_2908.txt (1.1 KB ) - added by assefa 15 years ago.
patch to fix the problem

Download all attachments as: .zip

Change History (8)

by assefa, 15 years ago

Attachment: diff_2908.txt added

patch to fix the problem

comment:1 by assefa, 15 years ago

Cc: sdlime adube@… added
Milestone: 5.4 release

Steve,

This seems to work for me but would like to verify with you before commiting.

Note that I have set the target to 5.4 but I can also go to 5.4.1 if appropriate.

Alexandre, can you please try the patch and report?

Thanks

comment:2 by adube, 15 years ago

The patch also worked for me. Thanks a lot Assefa.

comment:3 by dmorissette, 15 years ago

Assefa, the patch seems fine so I think we should commit it before 5.4.0beta4. Do you want to do it or should I do it?

comment:4 by assefa, 15 years ago

Resolution: fixed
Status: newclosed

committed in the 5.4.x branch r8849 committed in main trunk r8850

comment:5 by tamas, 15 years ago

Resolution: fixed
Status: closedreopened

I reopen this, because I still found a problem with this. Currently when setting the connectiontype to MS_WMS the type is changed internally to MS_RASTER and the layer is not drawn.

comment:6 by tamas, 15 years ago

Component: MapScript-PHPMapServer C Library

Applied the fix in r8901 and r8902

comment:7 by dmorissette, 14 years ago

Milestone: 5.6 release5.4 release
Resolution: fixed
Status: reopenedclosed

Tamas, I believe we can mark this one closed in 5.4? Please reopen with a comment if not.

Note: See TracTickets for help on using tickets.