Updated the docs with this example; including an example showing how to change layer stuff with a command.
http://udig.refractions.net/confluence/display/DEV/02+Project+Map+and+Layer You will need to do something like this when you toggle visibility. Summary: - ILayer - read-only from any thread - Layer - only modify from a map command issued via map.sendCommandASync( command ) method -- Jody Garnett On Wednesday, 8 February 2012 at 4:32 PM, Nazareno Chan wrote: > > Noted on this. Thanks! > > > > > > From: [email protected] > [mailto:[email protected]] On Behalf Of Jody Garnett > Sent: Wednesday, 8 February 2012 5:26 PM > To: User-friendly Desktop Internet GIS > Cc: Paul Pfeiffer > Subject: Re: [udig-devel] Clarifications on Legend View Spec > > > > > > > > Had a quick look at LayerInteractionPropertyPage. > > > > > > > > This seems to be the check: > > > > > > > > if( layer.getInteraction( Interaction.BACKGROUND ) ){ > > > > // background layer > > > > } > > > > > > > > -- > > > > Jody Garnett > > > > > > > > On Wednesday, 8 February 2012 at 3:55 PM, Nazareno Chan wrote: > > > > Hi Paul, > > > > > > > > > > > > Can you give me details on the item #2 below? > > > > > > > > > > > > Thanks, > > > > > > Naz Chan > > > > > > > > > > > > From: [email protected] > > (mailto:[email protected]) > > [mailto:[email protected]] On Behalf Of Jody Garnett > > Sent: Wednesday, 8 February 2012 12:14 PM > > To: User-friendly Desktop Internet GIS > > Subject: Re: [udig-devel] Clarifications on Legend View Spec > > > > > > > > > > > > > > > > Comments inline: > > > > > > > > > > > > > > > > > > 1. In the current Layers View, there are Style, Mylar, Zoom buttons, will > > > these be retained in the Legend View? > > > > > > > > > > > > > > > Sure; we will need to balance between the space in the view toolbar; with > > any leftovers going into the view menu. > > > > > > 2. For the toggle background layers functionality, what are considered > > background layers? > > > > > > The one marked as background; paul made a flag we could check. > > > > > > 3. The functionality for the ordering of layers, will through a context > > menu? Toolbar buttons? > > > > > > Probably both: > > 1) for view menu you can make an action that is enabled when the selection > > is a layer > > 2) same deal with context menu > > > > There should already be a move up and move down command which your action > > can submit to the Map when pressed. > > > > > > > > > > 4. For the consider part of the RFC, the grid toggle functionality will be > > to toggle just the grid layer? > > > > > > > > - What will be the default behaviour? Shown/hidden? > > > > > > > > > > > > > > > > > Um - toggled if a grid layer is present in the layer list (and turned > > visible); otherwise it would be up. > > > > > > - Will the layer be auto-added on first open of the view? > > > > > > Sure; do one pass of the layers list and see if you find a grid to turn > > visible first. If not add one to the top of the list. > > > > > > > > > > > > > > > > If you are using one of the edit tools; and cycle through the list of > > snapping options you can watch a grid be automatically added and removed > > this way already. > > > > > > - Will this override the 'toggle map graphics' functionality? > > > > > > Not related; the map graphics toggle is only controlling if the layers are > > listed in the legend view. > > The grid toggle is controlling if they grid is visible on the map. > > So you can toggle the grid on and off; it does not matter if it is shown in > > the legend view or not. > > > > Jody > > > > > > > > > > > > > > > > > > > > The contents of this email are confidential and may be subject to legal or > > professional privilege and copyright. No representation is made that this > > email is free of viruses or other defects. If you have received this > > communication in error, you may not copy or distribute any part of it or > > otherwise disclose its contents to anyone. Please advise the sender of your > > incorrect receipt of this correspondence. > > > > > > > > _______________________________________________ > > > > > > > > User-friendly Desktop Internet GIS (uDig) > > > > > > > > http://udig.refractions.net > > > > > > > > http://lists.refractions.net/mailman/listinfo/udig-devel > > > > > > > > > > > > > > > > > > > The contents of this email are confidential and may be subject to legal or > professional privilege and copyright. No representation is made that this > email is free of viruses or other defects. If you have received this > communication in error, you may not copy or distribute any part of it or > otherwise disclose its contents to anyone. Please advise the sender of your > incorrect receipt of this correspondence. > _______________________________________________ > User-friendly Desktop Internet GIS (uDig) > http://udig.refractions.net > http://lists.refractions.net/mailman/listinfo/udig-devel > >
_______________________________________________ User-friendly Desktop Internet GIS (uDig) http://udig.refractions.net http://lists.refractions.net/mailman/listinfo/udig-devel
