From: Martin D. <mar...@no...> - 2006-01-26 21:56:02
|
Andre Lampe a =E9crit : > I am using a Styled MapPane to display the map. When I try to replace a > layer in my MapContext by another layer at the same index and repaint t= he > map, the new layer is always shown on top. Isn't the Layer's MapContext > index also its Position? How can i force the new layer to be shown at t= he > old layers's order-position and not on top? I'm not sure how MapContext work (I'm not familiar with this part). But=20 the underyling renderer use the z-order hint for determining the order.=20 This hint can be set with RenderedLayer.setZOrder(z). I guess that=20 setting the same z value than the old layer (as returned by=20 RenderedLayer.getZValue()) should do the trick. I'm in the process right now to rewrite the renderer as a GO-1=20 implementation (the org.opengis.go packages there:=20 http://geoapi.sourceforge.net/2.0/javadoc/index.html). It make take a=20 few months before it become ready, but I hope to fix many J2D renderer=20 issues in this process. Martin. |