[mapguide-internals] Fwd: Swithing base MgLayerGroupon/off...fails?

Maksim Sestic max at geoinova.com
Thu Dec 27 04:06:45 EST 2007


If I understood right, ShowBaseGroup() is part of mapFrame? What's LayerID,
how do I obtain one? I'm using JavaScript sparingly and was hoping to get
this done via .NET wrapper only.

Regards,
Maksim Sestic


Ivan Milicevic-3 wrote:
> 
> I have founded solution for this problem.
>  
> look at ShowBaseGroup function in ajaxmappane.templ file, deliver to this
> function layer id, name and visible status. You can modify this function
> if you don't use in-bulit legent (I see that you don't).
>  
> Sorry for "spaming" internals :-)
> 
> ________________________________
> 
> From: mapguide-internals-bounces at lists.osgeo.org on behalf of Ivan
> Milicevic
> Sent: sri 26.12.2007 23:21
> To: MapGuide Internals Mail List
> Subject: RE: [mapguide-internals] Fwd: Swithing base
> MgLayerGroupon/off...fails?
> 
> 
> 
> Maksim,
> 
> now I have the samo problem. Have you resolved it yet?
> 
> ________________________________
> 
> From: mapguide-internals-bounces at lists.osgeo.org on behalf of Maksim
> Sestic
> Sent: pon 24.12.2007 10:04
> To: mapguide-internals at lists.osgeo.org
> Subject: RE: [mapguide-internals] Fwd: Swithing base MgLayerGroup
> on/off...fails?
> 
> 
> 
> 
> Event handler is OK, it does triger parent.parent.Refresh()... which is
> actually mapFrame.Refresh(), so there's no difference.
> 
> Changing a zoom factor for a pixel won't work in my case since I'm working
> with predefined scale range. Zooming in/out may take significant amount of
> time since targeted base layer group contains orthophoto imagery (almost
> 200
> Kb per tile). If I perform zoom in + refresh, then zoom back + refresh
> it'll
> take twice as much time to complete map refresh operation.
> 
> Regards,
> Maksim Sestic
> 
> 
> 
> Ivan Milicevic-3 wrote:
>>
>> Are you sure that paren.parent.Refresh() triggers refreshing?
>>
>> Try parent.mapFrame.Refresh()
>>
>> Maybe Refres works for "dynamic" layers?
>>
>> I had same problem but I resolved it wit paning 1 point to the left.
>> Never
>> figured out why Refresno() doesn't work.
>>
>> ________________________________
>>
>> From: mapguide-internals-bounces at lists.osgeo.org on behalf of Maksim
>> Sestic
>> Sent: pon 24.12.2007 9:45
>> To: mapguide-internals at lists.osgeo.org
>> Subject: RE: [mapguide-internals] Fwd: Swithing base MgLayerGroup on/off
>> ...fails?
>>
>>
>>
>>
>> That's the most intriguing part - as soon as I perform zoom (not pan,
>> since
>> tiles on base layer group are fully precached), targeted layer group
>> becomes
>> visible/invisible, as set. I don't get why issuing
>> parent.parent.Refresh();
>> won't update it in the first place. Is there some other type of
>> JavaScript
>> refresh function available?
>>
>> Regards,
>> Maksim Sestic
>>
>>
>>
>> Ivan Milicevic-3 wrote:
>>>
>>> And when you move a view with pan? The map still hide group?
>>>
>>> ________________________________
>>>
>>> From: mapguide-internals-bounces at lists.osgeo.org on behalf of Maksim
>>> Sestic
>>> Sent: pet 21.12.2007 12:40
>>> To: mapguide-internals at lists.osgeo.org
>>> Subject: [mapguide-internals] Fwd: Swithing base MgLayerGroup on/off ...
>>> fails?
>>>
>>>
>>>
>>>
>>> I guess I'm missing something, but this won't switch on/off base layer
>>> group:
>>>
>>> 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.
>>>
>>> I'm coding my own Legend TreeView control in AJAX.NET and everything
>>> else
>>> in
>>> it works just fine (dynamic layers, etc), except for the base layer
>>> groups.
>>>
>>> Regards,
>>> Maksim Sestic
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Fwd%3A-Swithing-base-MgLayerGroup-on-off-...-fails--tp14454152s16610p14454152.html
>>> Sent from the MapGuide Internals mailing list archive at Nabble.com.
>>>
>>> _______________________________________________
>>> mapguide-internals mailing list
>>> mapguide-internals at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/mapguide-internals
>>>
>>>
>>>
>>> _______________________________________________
>>> mapguide-internals mailing list
>>> mapguide-internals at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/mapguide-internals
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Fwd%3A-Swithing-base-MgLayerGroup-on-off-...-fails--tp14454152s16610p14485701.html
>> Sent from the MapGuide Internals mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> mapguide-internals mailing list
>> mapguide-internals at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapguide-internals
>>
>>
>>
>> _______________________________________________
>> mapguide-internals mailing list
>> mapguide-internals at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapguide-internals
>>
>>
> 
> --
> View this message in context:
> http://www.nabble.com/Fwd%3A-Swithing-base-MgLayerGroup-on-off-...-fails--tp14454152s16610p14485815.html
> Sent from the MapGuide Internals mailing list archive at Nabble.com.
> 
> _______________________________________________
> mapguide-internals mailing list
> mapguide-internals at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-internals
> 
> 
> 
> 
> 
> _______________________________________________
> mapguide-internals mailing list
> mapguide-internals at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-internals
> 
> 

-- 
View this message in context: http://www.nabble.com/Fwd%3A-Swithing-base-MgLayerGroup-on-off-...-fails--tp14454152s16610p14510927.html
Sent from the MapGuide Internals mailing list archive at Nabble.com.



More information about the mapguide-internals mailing list