Thanks - that did it.
-----Original Message-----
From: Chris Allport [mailto:callport_at_dtiweb.net]
Sent: Monday, November 10, 2008 7:43 AM
To: openmap-users_at_bbn.com
Cc: Benito, Robert P.
Subject: RE: [OpenMap Users] Why won't my layer re-render?
Try calling generate on your OMGraphicList with your current projection
as the parameter:
omgl.generate(mMapBean.getProjection());
You may also need to issue a repaint() call in your layer.
-----Original Message-----
From: SlikWilly [mailto:rbenito_at_mitre.org]
Sent: Thursday, November 06, 2008 3:35 PM
To: openmap-users_at_bbn.com
Subject: [OpenMap Users] Why won't my layer re-render?
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--tp20369107p203691
0
7.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"]
--
[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 Mon Nov 10 2008 - 08:26:14 EST