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 02-18-2011, 09:07 PM   #1
cravencr
Junior Member
 
Join Date: Nov 2010
Posts: 16
cravencr is on a distinguished road
Default KMLPlacemark Point rendering incorrectly when located inside a KMLPlacemark Polygon

I have KMLPlacemark Points with Icons (aka tracks) that 'fly into' a KMLPlacemark Polygon. While inside this transparent polygon the tracks display correctly most of the time. It seems when using the mouse wheel to zoom in on the tracks that they disappear temporarily, or until the view is adjusted slightly. If I continue to zoom in to where the view is inside the polygon the tracks are displayed correctly. Im pretty sure this is undesired behavior and it seems like it should be a quick fix. I will try to look at the code for KMLPolygons in the hopes that I can find something to make a better recommendation. That said, I hope that someone more familiar can take a look. Thanks


Craig
cravencr is offline   Reply With Quote
Old 02-19-2011, 01:15 AM   #2
what_nick
Worldwind Developer
 
Join Date: Jan 2006
Location: Hobart, Australia
Posts: 754
what_nick is an unknown quantity at this point
Default

Do you have a sample KML to ease the reproduction of the problem. It would be a typical clipping or z-buffer issue.

Cheers,

whatnick.
__________________
Coding This and That in World Wind and helping new people out, as long as they don't pester too much.
Currently blogging at: http://whatnicklife.blogspot.com
Working at:
Aerometrex - http://aerometrex.com.au/blog/
Impact so far:


what_nick is offline   Reply With Quote
Old 02-21-2011, 02:54 PM   #3
cravencr
Junior Member
 
Join Date: Nov 2010
Posts: 16
cravencr is on a distinguished road
Default

Ok here is a sample text file (rename to kml) that will produce the problem in worldwind. I loaded it with the KMLViewer example and zoomed down towards the polygon. As you zoom down, the placemark inside the polygon should disappear and reappear depending on the angle etc...

Let me know if you need anything else.

Craig
Attached Files
File Type: txt PolyTrackRenderProblem.txt (2.8 KB, 73 views)
cravencr is offline   Reply With Quote
Old 02-22-2011, 01:27 PM   #4
James_In_Utah
Super Member
 
James_In_Utah's Avatar
 
Join Date: Jan 2006
Location: Eden, Utah
Posts: 1,779
James_In_Utah
Default

For some reason the icons don't display for me when using a styleurl. Did you have to make any changes to the SDK code to get that to work?
Thanks,
James
James_In_Utah is offline   Reply With Quote
Old 02-22-2011, 02:23 PM   #5
cravencr
Junior Member
 
Join Date: Nov 2010
Posts: 16
cravencr is on a distinguished road
Default

My example does include paths to the icons we use in our system (not included with the example i posted), however the render issue still occurs with the default thumbpins. Was that just a general question?

If so, I did notice that specifying an absolute path (i.e. C:\directory\image.png) would not work. What does work is a relative path to the executing directory of the main program. So if your program runs on the C:\ drive and your images are in C:\images\ you would specify the Icons href to "images/the_icon_image.png"
cravencr is offline   Reply With Quote
Old 02-22-2011, 04:16 PM   #6
James_In_Utah
Super Member
 
James_In_Utah's Avatar
 
Join Date: Jan 2006
Location: Eden, Utah
Posts: 1,779
James_In_Utah
Default

It seems like the path is relative to the KML file being opened. I still can't get the icon to diplay when referencing a styleUrl. The sample you uploaded seems to have an extra <styleUrl/> tag right after the <name>201</name> tag. Anyway, I replaced that with
Code:
     <Style>
 <LineStyle>
   <color>7f0000ff</color>
   <width>4</width>
 </LineStyle>
 <IconStyle>
   <color>ff0000ff</color><colorMode>normal</colorMode>
   <scale>0.4</scale>
   <Icon>
     <href>C:/KML/images/reinforced_message.png</href>
   </Icon>
 </IconStyle>
      </Style>
and I got my icon to display. It has a red extrude line to ground (water), and I can verify that as I zooom around, the Icon is wiped out temporarily by the polygon being redrawn. Seems like a render priority problem to me. I have no idea where to set render priority in this SDK, but the icons and extrude lines should be way higher than transparent polygon shapes.
James
James_In_Utah is offline   Reply With Quote
Old 02-23-2011, 08:44 PM   #7
cravencr
Junior Member
 
Join Date: Nov 2010
Posts: 16
cravencr is on a distinguished road
Default

Quote:
Originally Posted by what_nick View Post
Do you have a sample KML to ease the reproduction of the problem. It would be a typical clipping or z-buffer issue.

Cheers,

whatnick.
Just wondering if you had found anything out what_nick?

Thanks
cravencr is offline   Reply With Quote
Old 02-26-2011, 02:47 AM   #8
tag
WWJ Technical Manager
 
Join Date: May 2007
Location: Seattle
Posts: 1,028
tag is on a distinguished road
Default

We know what the problem is and are fixing it. Might be tonight, but maybe not until Monday.
tag is offline   Reply With Quote
Reply

Tags
kml, point, polygon, rendering, transparency


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
any convenient mothed in worldwind can confirm if a point is inside a polygon? jenvy129 Feature Discussion 1 07-19-2010 03:44 PM
Determining whether a given point is inside or outside a given spherical polygon Jason_Steven Developers' Corner 8 10-01-2009 12:18 AM


All times are GMT +1. The time now is 04:51 PM.


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