For map graphic you don't have to worry about getting a mapgraphic context it will be passed in to the mapgraphic draw method.  So don't worry about that.  An example of the map graphic API in use is the scalebar mapgraphic in one of the printing plugins... printing.ui I think.

Another possibility is to create a point shapefile and one of the attributes can be a URL to an image. The style you can define for the layer can simply display that icon at the location of the point.

Jesse


M.S.Bachler wrote:
Hi!

I am not sure which of the suggested routes to take.

Maybe I should explain a little more about these icons.
They are going to be used for land management for a research project in
Guyana.
So they will be images of fish, birds, huts, that sort of thing.

Users will want to drag a bird say, onto an area of the map where there
are a lot of these birds.
They will need to be able to double-click the bird icon and open a
discussion map in the Compendium application -
www.compendiuminstitute.org (the software I actually develop), where
that bird population can then be discussed or whatever. The Compendium
map will need to link back to that bird icon on that map (somehow!!?) so
users can move between the two applications easily.

This is much more complicated then my original brief. And goes into
areas I know nothing about.
I will need to understand much more about shape files and data storage
so that I can store the icon data position, associated Compendium map
details etc. I have no idea how to do any of this at the moment.

I am just starting to get my head into coding in Eclipse and for uDig.
So far I have managed to write a plugin to manage collections of icons
as groups, with the icons stored locally and the data stored in XML
files (easy really just using the Eclipse API).
I am just looking at writing the view to display these icon groups which
the user can drag from.
The rest of the Eclipse and uDig API is a complete mistery and I get
lost very easily.
I started looking at MapGraphic in the API and straight away could not
work out how to get a MapGraphicContext.

As usual in life, there is just me, with lost of projects and no time.
If someone could spoon-feed me a little with the image drop/shapefile
data storage issues to help me get into uDIG API quickly I would really
appreciate the help at this point.

Thanks

Michelle





-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Jesse
Eichar
Sent: 10 February 2006 17:36
To: User-friendly Desktop Internet GIS
Subject: Re: [udig-devel] Difficulty with raster images using World
Image Files


That's a possibility too.  But only if the attribute exists in the 
feature.  If it is only for viewing then maybe not. 

Oh.  I should mention that map graphics don't automatically save.  
However things in the Map.getBlackboard() do save. Any object on the 
blackboard that has a "persister" extension can be saved and loaded.  
See the net.refractions.udig.project.persister extension point for more 
information on that.

Jesse

Jody Garnett wrote:
  
M.S.Bachler wrote:
    
Hi!

I need to create a panel of icons that can be dragged and dropped 
onto a map layer.
  
      
That sounds a like a "FeatureEditor" to me. Make a tool that adds
points to the map, and based on an attribute displays the correct 
icons. Then make a custom feature editor that will let the user change
    

  
the icon nicely. Finally make a view that has your icons on it, and 
based on the currently selected one it will create a feature of the 
appropriate type.

The actual data could be a shapefile, or a database or anything.

Jody

_______________________________________________
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
_______________________________________________
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

Reply via email to