You wrote:
"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."
I think this is the way I need to go.
Bearing in mind I am not up to speed with uDig and GIS, this is what I believe I need to achieve and the associated question I have (some of which may be silly).
I need to create layers pointing to local shape files, which each will display one type of icon.
So they can turn the layers on an off. Display all the fish, then all the huts etc.
Q: Can one shapefile hold information about more than one icon/point? (I am sure it can - I just what to be certain)
I am writing an app at the moment that does a similar thing to what you are discussing. I am going to describe what I do so that you are aware of what can be done if you want to take that path.
As they drag an icon from the palette, I need to determine if I have a layer already for that type of icon.
I was hoping to use the layer name = icon name.
Q: Is the layer name stored in the shape file, i.e. is it persistent?
If there is already a layer displaying say huts, I need to create a new point displaying the hut icon dropped else I need to create a new layer and add the icon to that.
Q: Is it possible to add a right-click menu to an icon on a layer (I guess to a point object - though I am still fuzzie about this a present)?
I need to be able to associated a point icon with a Compendium map (an external application).
I am going to use sockets to achieve this.
Q: What information do I need to store in Compendium for it to be able to request uDig to open a specific project, map and layer to link it back to a specific icon on a map? Is it just the .umap file and a layer ID of some kind? If so, how do I programmatically find out what the current .umap file is?, and how do I use that later to re-open that map?
Extra: They have not asked for this yet, but I am guessing that they may expect to be able to drag the icons around the map to relocate them.
Q: Is this currently possible. If not, is this as simple as adding a drag/drop event to an object somewhere, or are we talking really complicated?
Sorry about all the questions.
After a sleepless night worrying, I am trying to crystalize what I need to achieve, and some of the questions I have at this stage.
Thanks for your patients with me so far.
Michelle
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: udig-devel-bounces@xxxxxxxxxxxxxxxxxxxxx
[mailto:udig-devel-bounces@xxxxxxxxxxxxxxxxxxxxx] 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
--
This message has been scanned for viruses and dangerous
content by MailScanner, and is believed to be clean.
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel