[mapguide-users] Custom layouts...

Kenneth, GEOGRAF A/S ks at geograf.dk
Thu Jun 28 02:45:46 EDT 2007


You must open the map, using map.Open(...)
Then use map.Layer(layername).Visible = true
and finally map.Save(...)

All the steps are described in detail in the developers guide.

Beware that there are some bugs in MapGuide that will
prevent this from working straight away:

http://trac.osgeo.org/mapguide/ticket/167


Regards, Kenneth, GEOGRAF A/S



anakando skrev:
> hi guys..
>
> see attachment. how can i create a link to toggle selected layers from
> button as show below?? so,users wiill have 2 option to toggle a layer,
> either from lagend panel,or from click on a button that i create using
> firework.. http://www.nabble.com/file/p11336461/gisweb.jpg ??
>
>
>
> Kori Maleski-3 wrote:
>   
>> Hi All,
>>
>>  
>>
>> I am trying to embed a legend in a separate web page.  Does anyone still
>> have some of the examples that were floating around last year?
>>
>>  
>>
>>  
>>
>> Cheers,
>>
>>  
>>
>>   _____  
>>
>>
>>  <http://www.websoftdev.com/> 
>>
>>  <http://www.websoftdev.com/> 
>>
>>  <http://www.websoftdev.com/> 
>>
>> Kori Maleski
>>
>> Senior Application Developer
>>
>> WEBSOFT DEVELOPERS, INC.
>>
>> P: (530) 759-8754 ext 114
>>
>> F: (530) 759-0923
>>
>> kori.maleski at websoftdev.com
>>
>>   _____  
>>
>>  
>>
>> RE: Custom layouts...  <javascript:%20void%20Nabble.setFlag();> Click to
>> flag this post
>>
>> by Alain Lebatard 
>> <http://www.nabble.com/user/UserProfile.jtp?user=321469>
>> Mar 22, 2006; 09:20am :: Rate this Message:
>> <http://www.nabble.com/forum/ViewPost.jtp?post=3536772&framed=y&skin=16610##
>>     
>> <http://www.nabble.com/forum/ViewPost.jtp?post=3536772&framed=y&skin=16610##
>>     
>> <http://www.nabble.com/forum/ViewPost.jtp?post=3536772&framed=y&skin=16610##
>>     
>> <http://www.nabble.com/forum/ViewPost.jtp?post=3536772&framed=y&skin=16610##
>>     
>> <http://www.nabble.com/forum/ViewPost.jtp?post=3536772&framed=y&skin=16610##
>>     
>> <http://www.nabble.com/forum/ViewPost.jtp?post=3536772&framed=y&skin=16610##
>>     
>>> (use ratings to moderate[? <http://www.nabble.com/help/Answer.jtp?id=16>
>>>       
>> ])
>>
>> Reply <http://www.nabble.com/forum/Reply.jtp?post=3536772>  | Reply to
>> Author <http://www.nabble.com/user/SendEmail.jtp?type=pm&post=3536772>  |
>> Show Only this Message
>> <http://www.nabble.com/RE%3A-Custom-layouts...-p3536772s16610.html>  |
>> Link
>> to this Message
>> <http://www.nabble.com/Custom-layouts...-tf1319084s16610.html#a3536772>  
>>
>> Jason,
>>
>>  
>>
>> I attached a couple HTML pages that show you a possible approach in
>> displaying the legend control in another place In this example the legend
>> control runs in an IFrame at the right of the viewer (see screen snapshot
>> below
>>
>>  
>>
>> This approach requires no code change in the template files. The main
>> issue
>> is that the legend control and the viewer call each other, the viewer to
>> set
>> the scale as the map is navigated, or to refresh the control among other
>> things, and the legend control to change the visibility of layers and
>> groups. When the frame hosting the control changes, the way the control
>> and
>> the viewer reference each other in the code needs to change as well. The
>> reference to the AJAX viewer in the legend control code was hardcoded. I
>> changed this and I will submit the change to the mapguide trunk shortly.
>> The
>> reference to the legend control from the AJAX viewer is hold by a variable
>> so all needs to be done is changing the content of this variable to point
>> to
>> the new control.
>>
>>  
>>
>> The sample script 'legendpane.html' shows you how to wait for the map to
>> be
>> fully initialed, create a new legend control (not the new parameter
>> MAPFRAME
>> to the LegendCtrl.php request), and when this control is fully
>> initialized,
>> sets a reference to it in the AJAX viewer. From that point on the AJAX
>> viewer will interact with the new control.
>>
>>  
>>
>> The drawback of this approach is that the initial legend control is still
>> there, only not visible. But it's not a big deal, the control is inactive
>> after you attached the new instance to the AJAX viewer. The advantage of
>> this approach, which to my opinion far outweighs the drawback, is that it
>> requires no change in the existing surround.
>>
>>  
>>
>>
>>  
>>  
>>  
>>  
>>  
>> _______________________________________________
>> mapguide-users mailing list
>> mapguide-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>>
>>
>>     
>
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20070628/097e0513/attachment.html


More information about the mapguide-users mailing list