[Geoprisma-dev] mapfishlayertree and initialview

Yves Moisan yves.moisan at boreal-is.com
Tue Feb 16 15:58:53 EST 2010


> Yves,
> 
>   The behavior you're describing doesn't apply to the Shortcut widget, 
> see the example [1].  

Thanx Alexandre,

Yes I know.

> The MapFish layertree already listen to the 
> "visibilitychanged" and "changelayer" events (see 
> MapFishLayerTree.xslt).  I don't know what's going on, but maybe a look 
> at the source of the layertree and shortcut widgets could help.

I was thiking something along the lines of
objArrayLayer[0].events.on({ "visibilitychanged": Toggle });

but that does not relate to a mapfishlayertree object at all.  Do you
have examples of triggering a "visibilitychanged" event so that the
corresponding layertree tickbox is ticked after the layer's visibility
is set to true ?

Cheers,

Yves

> 
>   Regards,
> 
> Alexandre
> 
> [1] http://geoprisma.org/samples/shortcut/activateresources/index.php
> 
> 
> Yves Moisan wrote:
> > Hi All,
> >
> > I have found that layers that comprise a resource with an initialview
> > attached will be automatically activated upon loading the map with the
> > initialview *without* the mapfishlayer tree corresponding layer being
> > ticked on.  It is similar to the selfActivate option of the shortcut
> > widget, only the layer isn't ticked on in the tree.  
> >
> > Another issue I found is that when the resource that has an initialview
> > widget attached to is part of a "compound WMS" layer, e.g.
> >
> > <layer>
> >     <resourcenames>
> >         <resourcename>RSMunicipalities</resourcename>
> >         <resourcename>RSvegetation_tline</resourcename>
> > 	<resourcename>RSstructures_mine</resourcename>
> >         <resourcename>RSstructures_tline</resourcename>
> > 	<resourcename>RSroads_tline</resourcename>
> >         <resourcename>RSwater_river_tline</resourcename>
> > 	<resourcename>RSwater_stream_tline</resourcename>
> >   <!--resourcename>RSmonitoring_stations</resourcename-->
> >         <resourcename>RSwater_monitoring_stations</resourcename>
> >     </resourcenames>
> >     <servicetype>wms</servicetype>
> >     <options>
> >         <layername>LYR_WMS</layername>
> >         <isbaselayer>false</isbaselayer>
> >         <projection>EPSG:32644</projection>
> >         <format>image/png</format>
> >         <transparent>true</transparent>
> >         <singletile>true</singletile>
> >     </options>
> > </layer>
> >
> > Then all those layers will be shown on map load (without any of the
> > layers in the tree ticked on).  That is understandable, since there is
> > one call to MapServer, but that's not what we want on initialview.  In
> > the example above, the <!--resourcename> tag is the one with the
> > initialview.  I had to take it out of the compound WMS layer and shove
> > it into a layer of its own, so that means any layer we want an
> > initialview on cannot be used in an optimized compound WMS layer.
> > Should I file a bug for that ?  And should I file a bug for the
> > layertree not being ticked on or is it me ?
> >
> > Cheers,
> >
> > Yves
> >
> >
> > _______________________________________________
> > Geoprisma-dev mailing list
> > Geoprisma-dev at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/geoprisma-dev
> >   
> 
> 




More information about the Geoprisma-dev mailing list