|
From: Michael B. <mic...@gm...> - 2012-07-19 11:58:02
|
Hi George, Not sure I understand. As I mentioned before, JMapFrame doesn't do any projection setting itself. Really it is just a convenience class that saves people from having to define their own JFrame sub-class to hold a map pane etc. All of the projection-related data is held by MapViewport while the actual work of drawing multiple layers in a common projection is handled by the renderer. The same would be true if you were to use your own custom frame and map pane classes. Regardless, many thanks for looking into the code and sorry that I couldn't be more directly helpful. Michael On 19 July 2012 20:54, George Taylor <geo...@ya...> wrote: > Hello Michael, > after a few attempts to understand how JMapFrame would receive the > individual layers with the correct projection I have given up further > debugging. I found it easier to continue with the workaround described above > than finding all lines in JMapFrame that need rewriting if one common > projection is needed rather than simply overlaying unrelated projections. > For simple applications with a single datasource, JMapFrame is still > helpful. > > Thanks > George > > ________________________________ > Von: Michael Bedward <mic...@gm...> > An: George Taylor <geo...@ya...> > CC: "geo...@li..." > <geo...@li...> > Gesendet: 4:47 Dienstag, 17.Juli 2012 > > Betreff: Re: [Geotools-gt2-users] define projection when overlaying WMS and > shapefile in JMapFrame > > On 17 July 2012 00:59, George Taylor <geo...@ya...> wrote: >> >> Instead I am now using the following workaround: >> I first render the shapefile with the correct projection using a >> GTRenderer. >> Next I request the image from the WMS Server using a GetMapRequest which >> has >> the correct projection set. Finally the WMS image can be drawn on top of >> the >> rendered shapefile. >> >> The JMapFrame ignores the projection setting, when the individual layers >> are >> requested. >> > > Hello George, > > Thanks for the further report on this. I'm afraid that I don't have an > idea for what is causing the problem at the moment. JMapFrame doesn't > do any projection setting itself, it merely passes the bounds and crs > to the MapViewport object, to be subsequently passed to the renderer. > But your observations suggest that the order of events (bounds setting > vs loading layers) affects the end result. > > If you have the chance to step through what is happening in a debugger > and are able to identify the problem area(s) in the map pane or > viewport code that would be helpful. Otherwise it will have to wait > until I next have time for gt-swing work which I'm afraid will not be > soon. > > Michael > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > GeoTools-GT2-Users mailing list > Geo...@li... > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > |