[udig-devel] Help with simple plugin

Pedro Da Ros pedro.ros at gmail.com
Thu Jun 14 04:32:46 PDT 2007


Hey Cory,

thanks for the reply. In the end I kinda managed to implement the
DS/etc and it worked, but I´m still looking for a simpler solution.

The in-memory layer seems to be what I´m trying to do, but I didnt
know it existed. Where can I find an example of that on any default
plugin in the SDK? Or maybe just point me the classes related to this.

To make it objective, what Im trying to do is :
1) create a map
2) create a layer in that map
3) add features with certain attributes
4) show/display the layer with all the added features
5) change the attributes of the features and see it reflected on the screen

Does this in-memory layer thing helps me with this? :)

Thanks, cya,
-Pedro


On 6/13/07, Cory Horner <chorner at refractions.net> wrote:
> Pedro Da Ros wrote:
> > here am I again :P.
> >
> > Well, I must be doing something wrong, it is taking me several (20?)
> > hours to write such a (supposedly) simple plugin. All I want to do is
> > create a layer that holds a certain kind of feature type (like a point
> > with a few string attribs) that I populate dynamically (ie, not from a
> > shapefile).
> >
> > Can anyone point me a simple (few lines?) way, or is this operation
> > really hard?
> >
> > I tried to base my solution on the TxtPlugin or on the Shapefile one
> > but both are linked to a file/URL, and I cant seem to unbind from
> > that, and still those solutions seems like an overkill to what I need
> > to to : having to implement ~10 classes to do this is insane.
>
> Hi Pedro,
>
> Thanks for hanging in there.
>
> Implementing your own datastore right out of the gate is a little
> ambitious.  Why don't you just instantiate an in-memory layer to put
> your data in?
>
> The myriad of classes needed to implement a datastore is for all the
> bells and whistles (drag-and-drop support, wizard, etc).
>
> What is it you're trying to do, exactly?
>
> Cheers,
> Cory.


More information about the udig-devel mailing list