[mapguide-users] Dynamically Adding Layers to a Map with Selectable
Features
Scott Reisdorf
reisdorf1 at llnl.gov
Fri Aug 18 13:18:45 EDT 2006
nevermind... I found my mistake.
After I create the new Layer i just have to call setSelectable(true).
Sorry.
-scott
Scott Reisdorf wrote:
> I am dynamically adding layers to my Map object, and would like the
> Map to have the Features selected after the layer is loaded.
> I have followed the DevGuide examples, and I get the new layers to
> appear; however, the features on the layer are not selectable.
> Looking into the base Map definition, I see that when a layer is added
> that can be selected, additional XML nodes are added to the map as
> below, with the 'Selectable == true'.
> <MapLayer>
> <Name>New Layer</Name>
> <ResourceId>Library://.... </ResourceId>
> *<Selectable>true</Selectable>*
> <ShowInLegend>true</ShowInLegend>
> <LegendLabel> </LegendLabel>
> <ExpandInLegend>true</ExpandInLegend>
> <Visible>true</Visible>
> <Group></Group>
> </MapLayer>
>
> If I want my dynamic layers to be selectable, do I need to also update
> the base Map Definition file too, or is there some other way via the
> API that I can do this and have the new layer features be selectable.
>
> Thanks,
>
> -scott
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide_users/attachments/20060818/962b4ffb/attachment.html
More information about the Mapguide_users
mailing list