I think the best choice would be to create a MapGraphic that will
display your icons. MapGraphics can be added by extending the
MapGraphic extension point: net.refractions.udig.mapgraphic.mapgraphic.
Here's an example of a mapgraphics extension declaration:
<extension
point="net.refractions.udig.mapgraphic.mapgraphic">
<mapGraphic
class="net.refractions.udig.printing.ui.ScalebarMapGraphic"
id="%printing.ui.scalebar.mapgraphic.id"
name="%printing.ui.scalebar.mapgraphic.name"/>
</extension>
You have to include the net.refractions.udig.mapgraphics plugin as a
dependency.
A MapGraphic has a single method: draw( MapGraphicContext ). Once the
extension is defined the draw method must draw to the image contained in
the context and voila... that will show up as a layer in your map.
You can also use the gridcoverage resource but resources usually need a
physical location. We currently don't have the concept of a "temporary"
gridcoverage like we do for Datastores. We need to make one though I
now realize. I will make up a bug report to that effect.
Jesse
M.S.Bachler wrote:
Hi!
I need to create a panel of icons that can be dragged and dropped onto a
map layer.
Help!
What types of image files can be used?
I am happy I can create the view with a tree of icons to drag and drop.
I can probably figure out how to do the drag and drop code.
I have no idea how to add an icon to a map layer
The email below seemed to hint at possibly something similar to what I
need to be able to do.
Could I have a little more information / pointers about creating jpg
layers.
Thanks
Michelle
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Christopher Hammack
Sent: 01 February 2006 23:49
To: [email protected]
Subject: [udig-devel] Difficulty with raster images using World Image
Files
I've been plugging along with pretty good success so far, but I have a
problem that I'm really confused by.
I'm using the WorldImageExtension to construct jpeg layers. Sometimes,
the layers show up just fine. Other times, the exact same files will
not render. Digging down deeper, it turns out that an
IllegalArgumentException is thrown. It's actually inside the geotools
WorldImageReader readSourceImage()... line 208, at:
ParameterBlockJAI readParams = new ParameterBlockJAI("ImageRead",
"rendered");
That call actually throws the IllegalArgumentException. Does anyone
have any idea why this would work some times, and other times it won't?
I have JAI installed, and it does work some of the time as the images
actually are properly rendered and no exception is thrown.
Thanks,
-cnh
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel