[OpenMap Users] Why won't my layer re-render?

From: SlikWilly <rbenito_at_mitre.org>
Date: Thu, 6 Nov 2008 12:34:50 -0800 (PST)

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

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:09 EDT