Hello, > I am relatively new to geotools and I'm looking for a way to display an > image on the center of a JMapPane in instances where the image does not have > any grid information associated with it. Then once the image is placed on > the center of the map, the user should be able to move, resize, crop, and/or > georeference it.
At present JMapPane pane connects to a MapContext object which contains one or more MapLayers, each of which is connected to a vector or raster data source. JMapPane doesn't have the facility to display additional graphics. If you want to do that you need to sub-class JMapPane and override one or both of the methods paintComponent and onRenderingCompleted. Another option would be to use a GlassPane over the JMapPane and display your image on that. See this link for an example of glass panes... http://weblogs.java.net/blog/2006/09/20/well-behaved-glasspane If you go down that route let me know and I'll see if I can help. Also, if you search the list archives I think you'll find some related posts from one of our other users (Oliver) about "transparent layer" or "acetate layer". But the best solution might be to just wait a little while. There are plans afoot to rework the MapContext / MapLayer classes and provide support for something that might be called DrawLayer (or DirectDrawLayer) to display images and map decorations. I'm hoping this will be part of the next GeoTools 2.7 milestone release (2.7-M1 in the next month or two). Michael ------------------------------------------------------------------------------ _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
