Opened 19 years ago

Last modified 15 years ago

#1397 new defect

Query of WMS layers with SWF output fails

Reported by: jmckenna@… Owned by: mapserverbugs
Priority: high Milestone:
Component: Output-SWF Version: 4.6
Severity: normal Keywords:
Cc: jmckenna

Description

from Dr. Song:

****
> I tried flash mapping recently using the stable version of Mapserver4.4.2 and
Glenn Brauen's flash method mentioned at
http://mapserver.gis.umn.edu/user_utilities/fmv.zip. My purpose is to produce
flash map with the "OUTPUT_MOVIE=MULTIPLE" in mapscript. 
> 
> You may check my mapscript configuration files at
http://aris.cseas.kyoto-u.ac.jp/fmv/fmvpro.map and
http://aris.cseas.kyoto-u.ac.jp/fmv/fmvpro_wms.map. The former mapscript file
only includes vector layers, and it work well. The later mapscript file adds one
WMS layer, the problem comes. That is, the flash map dispaly is correct, but the
query cannot be done! You may download my demo and try it later.
> 
> All the below, I will talk only in the WMS case! I checked the mapserver
generated flash layers at my temp folder (one "main" swf file and several layer
swf fiels), finding that the WMS layer was encoded into the "main" swf, instead
of a separate layer swf itself.
> 
> First I read the explaination about the "main" swf file at
http://www2.dmsolutions.ca/mapserver/dl/FlashMapserverUserDoc.html
> and used 'vi mainindex.swf' to check the "main" swf binary. I found that the
layer name description at "mapObj.layers[]" part in the main swf is not correct!
the 'vi' did show some useful ascii information in the mail swf file.
> 
> Then, this can be confirmed by debuging the mapswf.c - the line 2790
(image->img.swf->map->numlayers) and the line 2807
(image->img.swf->nLayerMovies). Actually the 'numlayers' should equal to
'nLayerMovies', however, 'nLayerMovies' is less than 'numlayers', it seems the
WMS layer is omitted. I traced the source code, locating the bugs at "imageObj
*msDrawMap(mapObj *map)" of "mapdraw.c".
> 
> The problem was solved by modifying mapdraw.c as following:
> 
> -------- original code (line 406-408) -----
> <  status = msDrawWMSLayerSWF(map->layerorder[i], asOWSReqInfo,
> <           numOWSRequests,
> <           map, lp, image);
> ------- modified by song ----
> 
>> //status = msDrawWMSLayerSWF(map->layerorder[i], asOWSReqInfo,
>> //        numOWSRequests,
>> //        map, lp, image);
>> status = msDrawLayer(map, lp, image);
> 
> 
> -------- original code (line 531-532) -----
> <  status = msDrawWMSLayerSWF(map->layerorder[i], asOWSReqInfo, numOWSRequests,
> <           map, lp, image);
> ------- modified by song ----
> 
>> //status = msDrawWMSLayerSWF(map->layerorder[i], asOWSReqInfo, numOWSRequests,
>> //         map, lp, image);
>> status = msDrawLayer(map, lp, image);
> 
> 
> I do not know why the WMS layer is separately treated at line 396-453 and line
521-548, since I could not understand all the source code. Again, I am not sure
my modification would cause other normal function failed.

Change History (2)

comment:1 by jmckenna@…, 18 years ago

just a reminder of this bug for SWF output - the developer has submitted a
patch, so it might be nice to add.

comment:2 by jmckenna, 15 years ago

Cc: jmckenna added
Note: See TracTickets for help on using tickets.