[mapguide-users] Problems with legend, when creating layer in tun time

Jackie Ng jackie.ng at aecsystems.com.au
Sun Sep 30 22:57:32 EDT 2007


You need to programmatically refresh the legend pane via javascript. You php
script would look something like:

<?php

//Your code 

?>
<html>
    <head>
        <script type="text/javascript">
        window.onload = function() {
             mapFrame.Refresh();
        };
        </script>
    </head>
    <body>
    </body>
</html>

Hope that helps

- Jackie


MaciekS wrote:
> 
> Hi everyone.
> 
> When I'm creating new layer in php, layer displays on the map but it
> doesn't in the legend.
> After refreshing legend frame it comes to be visible ... strange, isn't
> it?
> 
> My code is:
> 
>   $newLayer->SetName($layerName);
>   $newLayer->SetVisible(true);
>   $newLayer->SetSelectable(true);
>   $newLayer->SetLegendLabel($layerLegendLabel);
>   $newLayer->SetDisplayInLegend(true);
> 
> Any ideas?
> 
> Maciek
> 

-- 
View this message in context: http://www.nabble.com/Problems-with-legend%2C-when-creating-layer-in-tun-time-tf4544080s16610.html#a12972682
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list