Hi,
I have a custom layer that extends OMGraphicHandlerLayer. When I
initially load the layer with OMGraphics in it, the icons display just fine.
The problem occurs after the initial loading of the layer when I add new
graphics to the layer. They don't render at all. How do I get the layer to
render properly after adding new icons to i? My Layer is below.
Thanks!
============================================
public class MCULayer extends OMGraphicHandlerLayer{
/**
* A list of graphics to be painted on the map.
*/
private OMGraphicList omgraphics;
private OMGraphic selectedGraphic;
public MCULayer() {
super();
omgraphics = new OMGraphicList();
}
public void addSingleGraphic(float lat, float lon){
ImageIcon simpsons = new ImageIcon("C:/Temp_Images/Simpsons.png");
OMScalingIcon simpsonsScalingIcon = new
OMScalingIcon(lat,lon,simpsons);
OMGraphic simsonAsOMGraphic = (OMGraphic) simpsonsScalingIcon;
omgraphics.add(simsonAsOMGraphic);
}
_at_Override
public void paint(java.awt.Graphics g) {
omgraphics.render(g);
}
--
View this message in context: http://www.nabble.com/Why-won%27t-my-layer-re-render--tp20369107p20369107.html
Sent from the OpenMap mailing list archive at Nabble.com.
--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Thu Nov 06 2008 - 15:35:42 EST