Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] Help with simple plugin

Yeah, that's what the memory data store is for. As long as you don't
have a gazillion features, it's very useful. Also there's now a trigger
to save the in memory contents prior to exit.

now *how* to go about doing all this is another issue. I'm currently
debugging something similar so my code can't yet serve as a useful
example to you.

--adrian


On Thu, 2007-06-14 at 08:32 -0300, Pedro Da Ros wrote:
> 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@xxxxxxxxxxxxxxx> 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.
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel



Back to the top