Draw Commands "live" until their isValid method returns false. So
when you want to turn off/kill the command call setValid(false). Or
override the isValid method to know when it is no longer needed.
Jesse
On 30-Mar-06, at 1:03 AM, Jeffrey Bergamini wrote:
Hi again everybody,
The plugin development is going well (much of it thanks to your help),
but now I'm running into another lack-of-knowledge problem:
I want to display a toggleable grid over the current map that
illustrates the available tile boundaries as a navigation guide. I've
been able to get a Ctrl-Click to display the lines through calls to
getContext().sendASyncCommand((getContext().getDrawFactory
().createDrawShapeCommand(...)),
like on the net.refractions.udig.tutorials.tool.coordinate tutorial.
However, these lines seem to live forever on the map, and I don't see
any obvious way of clearing them and/or temporarily disabling them.
Any suggestions? I could conceivably generate a grid layer on the WMS
proxy, but it would make more sense in some ways to do it through the
plugin.
Jeff
_______________________________________________
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