Sorry to come back with the same issue…
As I mentioned in my last mail, rendering is now OK, but I tested the solution proposed by Don in a quick and dirty way, i.e., at the MapBean level (for all the layers thus). I used the following code at MapBean creation time:
RenderingHints
rh = new RenderingHints(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
RenderingHintsRenderPolicy
hints =
new RenderingHintsRenderPolicy();
hints.setRenderingHints(rh);
HintsMapBeanRepaintPolicy
hmbrp =
new HintsMapBeanRepaintPolicy(mapBean);
hmbrp.setHints(hints);
mapBean.setMapBeanRepaintPolicy(hmbrp);
This works, but as rendering is applied to all the layers, this slows down the display of the maps, especially when multiple large layers are present.
Therefore, I’ve tried to associate the rendering to my LocationLayer only, using the following code in the constructor:
public
class NodusLocationLayer
extends LocationLayer {
// Replacement of the LocationLayer constructor which calls setRenderPolicy(new BufferedImageRenderPolicy(this));
public NodusLocationLayer() {
RenderingHints
rh = new RenderingHints(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
RenderingHintsRenderPolicy
rp =
new RenderingHintsRenderPolicy(this);
rp.setRenderingHints(rh);
setRenderPolicy(rp);
setMouseModeIDsForEvents(new String[] {"Gestures"});
}
…
Unfortunately, this doesn’t work. Did I miss something ?
Bart