[fusion-trac] #82: Reference to non-existing this.oMap in
Fusion.Maps.MapServer.showGroup(..) and ...hideGroup(..)
Fusion
trac_fusion at osgeo.org
Fri Jun 20 10:02:50 EDT 2008
#82: Reference to non-existing this.oMap in Fusion.Maps.MapServer.showGroup(..)
and ...hideGroup(..)
---------------------------+------------------------------------------------
Reporter: schneiderei | Owner: madair
Type: defect | Status: new
Priority: P2 | Milestone: 1.1
Component: MapServer | Version: 1.0.6
Severity: Major | Keywords: MapServer, Legend, Groups, Layers
External_id: | State: New
Browser: All | Os: All
---------------------------+------------------------------------------------
Writing a Fusion application based on MapServer 5.0.2, I experienced some
incorrect behaviour in the legend. Often, if I click a group, the map is
not redrawn. With other groups, redrawing was triggered as expected. I was
not able to identify a logic behind this that could help reproducing the
error. However, I found something that I think is a bug in
MapServer/MapServer.js. Fixing this issue also fixed the incorrect
behaviour in the legend.
In the methods Fusion.Maps.MapServer.showGroup(..) and
Fusion.Maps.MapServer.hideGroup(..), there are calls to this.oMap. I am
not sure, but I think that the MapServer object does not have such a
field. However, another object in the two methods, namely group, does have
a field oMap. Thus, I suspect that there is a bug stemming from a typo or
from some unfinished copy/paste.
I suggest changing the lines as follows:
this.oMap.showLayer(group.layers[i].layerName);
should become
this.showLayer(group.layers[i].layerName);
and
this.oMap.hideLayer(group.layers[i].layerName);
should become
this.hideLayer(group.layers[i].layerName);
It works in my application. Perhaps someone knowledgable should have a
look at this and determine if this is indeed something that needs to be
fixed.
--
Ticket URL: <http://trac.osgeo.org/fusion/ticket/82>
Fusion <http://trac.osgeo.org/fusion>
Fusion is a web-mapping application development framework for MapServer and MapGuide OS.
More information about the fusion-trac
mailing list