[mapguide-trac] #377: .NET API: Switching MgLayerGroup visibility on/off doesn't work

MapGuide Open Source trac_mapguide at osgeo.org
Thu Dec 27 04:23:20 EST 2007


#377: .NET API: Switching MgLayerGroup visibility on/off doesn't work
-----------------------+----------------------------------------------------
   Reporter:  MaksimS  |       Owner:       
       Type:  defect   |      Status:  new  
   Priority:  medium   |   Milestone:       
  Component:  Web API  |     Version:  1.2.0
   Severity:  major    |    Keywords:       
External_id:           |  
-----------------------+----------------------------------------------------
 This won't switch on/off targeted MgLayerGroup, but it should. When I
 issue:

 {{{
 Dim map As MgMap = ...get runtime Map...
 Dim layerGroup As MgLayerGroup =
 map.GetLayerGroups.GetItem(layerGroupName)
 layerGroup.SetVisible(True)
 map.Save(...ResourceService...)
 }}}

 and then call JavaScript function parent.parent.Refresh(); from Task Pane,
 base layer group gets switched on only in legend pane, but map
 representation won't change. MgLayerGroup doesn't have ForceRefresh()
 method like MgLayer.

 If user zooms in/out after above code runs, base layer gets refreshed as
 expected. Ivan Milicevic proposed to perform a slight zoom in/out (e.g.
 for a pixel), but this workaround is not applicable for maps with preset
 scale range.

-- 
Ticket URL: <http://trac.osgeo.org/mapguide/ticket/377>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals


More information about the mapguide-trac mailing list