World Wind Forums

Go Back   World Wind Forums > WorldWind JAVA forums > Development Help

Development Help Help for building applications or diagnosing problems with WWJ

Reply
 
Thread Tools Display Modes
Old 06-19-2012, 04:07 PM   #1
bdrummon
Junior Member
 
Join Date: Jan 2012
Posts: 28
bdrummon is on a distinguished road
Default Disappearing KML screen overlay

Hello,

I'm having a bit of a strange problem using a KML screen overlay. I can get the overlay to render, but when I go for a redraw (to refresh the image) the image disappears. If I jiggle the mouse the image comes right back. The other strange thing is that it works fine on one computer, but exhibits this problem on another. No matter where I run it though I do get a flicker on the refresh. Is this normal behavior? Would it make a difference if I were to use a ScreenImage in the api?

Thanks,
-Brandon
bdrummon is offline   Reply With Quote
Old 06-19-2012, 04:25 PM   #2
bdrummon
Junior Member
 
Join Date: Jan 2012
Posts: 28
bdrummon is on a distinguished road
Default

Hmm, played around a little more. The difference between the two systems was that one was running in Twinview and the other wasn't. Disabling Twinview got rid of the problem.

Thanks,
-Brandon
bdrummon is offline   Reply With Quote
Old 06-19-2012, 05:17 PM   #3
bdrummon
Junior Member
 
Join Date: Jan 2012
Posts: 28
bdrummon is on a distinguished road
Default

Well, I was wrong. The problem is still there, but it occurs less often.

-Brandon
bdrummon is offline   Reply With Quote
Old 06-19-2012, 05:23 PM   #4
bdrummon
Junior Member
 
Join Date: Jan 2012
Posts: 28
bdrummon is on a distinguished road
Default

If I did want to use ScreenImage how on earth do I get the scaled image size of the image I'm trying to place? I'm assuming you use getImageSize(), but it want's a DrawContext as an argument. How do I get the DrawContext? I've seen reference to wwd.getSceneController().getDrawContext( ), but this returns a null pointer for me.

-Brandon
bdrummon is offline   Reply With Quote
Old 06-19-2012, 06:11 PM   #5
pabercrombie
WW Dev. Team
 
Join Date: Sep 2010
Location: Boston, MA, USA
Posts: 325
pabercrombie is on a distinguished road
Default

Can you explain what you're trying to do? Are you importing an overlay through KML, and then attempting to change the image? If so, how are you updating the image (KML update, some other way, ...?)

You can't get the scaled size of a ScreenImage without a DrawContext because the size of the image may depend on the size of the viewport in which the image is drawn. For example, the image might be 25 pixels tall but fill 100% of the viewport in the horizontal dimension. KML screen overlays are implemented using ScreenImage, so I don't know if using ScreenImage directly would solve the problem.
pabercrombie is offline   Reply With Quote
Old 06-19-2012, 08:08 PM   #6
bdrummon
Junior Member
 
Join Date: Jan 2012
Posts: 28
bdrummon is on a distinguished road
Default

Hello,

Yes, I'm importing an overlay through KML and attempting to change the image. In my loop I re-read the KML after having copied in new image files with the same names. Maybe this isn't the best approach?

I figured the KML overlay's were handles as a ScreenImage. That's why I thought I'd ask first.
bdrummon is offline   Reply With Quote
Old 06-22-2012, 05:02 PM   #7
bdrummon
Junior Member
 
Join Date: Jan 2012
Posts: 28
bdrummon is on a distinguished road
Default

So, I've now figured out that my plots aren't changing at all and I feel this may be the underlying problem. I'll explain what I'm trying to do. I have a kml file with four screen overlays defined pointing to four png's. I have a loop which kicks off every five minutes to read in the same kml. Meanwhile I have a program kick off which overwrites the png files. However, the png's never change on the screen. If I alter one of the screen overlays in the kml to point to a different png everything is fine. Is there some way to force the overlays to re-read the overwritten png files? Are they somehow staying resident in memory? I make sure to clear all the renderables from the layer before re-parsing the kml. Is it not even trying to re-parse since the kml never changed?

Thanks,
-Brandon
bdrummon is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Weird KML Exception on loading KMZ file Daan Development Help 7 03-29-2012 09:44 AM
KML tag WWJ Release Announcements 50 07-21-2011 06:49 PM
KML loads ground overlay under base layer on Mars jpc Bug Reports 0 11-27-2010 05:57 PM
Corrupted screen control overlay layers Peter Skvarenina Development Help 8 05-01-2010 12:08 AM
Icon info popup bubble on wrong screen??? James_In_Utah Developers' Corner 7 10-15-2008 07:39 PM


All times are GMT +1. The time now is 04:58 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.