Jesse, Thanks for the reference... Your first method is basically what I have been trying. Unfortunately, however, I'm still having difficulty.
If I leave the map's RenderManager unset or set the RenderManager on the map using a rendermanager constructed using RenderFactory, the layers are never rendered (by inspecting the "statusMessage" variable of the layer). If I set the Map's RenderManager to a RenderManagerDynamic, the layer statusMessage is: "Error: The input argument(s) may not be null.". Any tips here? What I'm trying to do is to set up a ViewportJava, which I'm using to call the "image()" method to extract a BufferedImage which I can use. Thanks, -cnh > I've added an entry into the FAQ at: > > http://udig.refractions.net/confluence/display/DEV/How+do+I+create+a+map +programmatically%3F > > Jesse > > Christopher Hammack wrote: > > I am trying to construct a Map object programmatically, by adding a map > > graphic (jpg/jgw) layer. I do not want to do this in the context of > > the editor. I just want to construct a Map object in memory and > > operate on that. Is there a way to do that? > > > > I'm trying to use the catalog to "find()" a resource and then add that > > to a layer that I construct using the LayerFactory retrieved from a Map > > that I created from a MapFactory. > > > > I've searched through the archives and documentation, and I've been > > unable to find anything documented. Any help will be appreciated. > > > > Thanks. > > > > -cnh > > _______________________________________________ > > 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
