![]() |
|
|||||||
| Development Help Help for building applications or diagnosing problems with WWJ |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Jan 2012
Posts: 28
![]() |
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 |
|
|
|
|
|
#2 |
|
Junior Member
Join Date: Jan 2012
Posts: 28
![]() |
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 |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jan 2012
Posts: 28
![]() |
Well, I was wrong. The problem is still there, but it occurs less often.
-Brandon |
|
|
|
|
|
#4 |
|
Junior Member
Join Date: Jan 2012
Posts: 28
![]() |
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 |
|
|
|
|
|
#5 |
|
WW Dev. Team
Join Date: Sep 2010
Location: Boston, MA, USA
Posts: 325
![]() |
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. |
|
|
|
|
|
#6 |
|
Junior Member
Join Date: Jan 2012
Posts: 28
![]() |
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. |
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Jan 2012
Posts: 28
![]() |
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 |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
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 |