Results 1 to 8 of 8

Thread: KMLPlacemark Point rendering incorrectly when located inside a KMLPlacemark Polygon

  1. #1
    Junior Member
    Join Date
    Nov 2010
    Posts
    16

    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

  2. #2
    Worldwind Developer
    Join Date
    Jan 2006
    Location
    Hobart, Australia
    Posts
    740

    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:



  3. #3
    Junior Member
    Join Date
    Nov 2010
    Posts
    16

    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 Attached Files

  4. #4
    Super Member James_In_Utah's Avatar
    Join Date
    Jan 2006
    Location
    Eden, Utah
    Posts
    1,791

    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

  5. #5
    Junior Member
    Join Date
    Nov 2010
    Posts
    16

    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"

  6. #6
    Super Member James_In_Utah's Avatar
    Join Date
    Jan 2006
    Location
    Eden, Utah
    Posts
    1,791

    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

  7. #7
    Junior Member
    Join Date
    Nov 2010
    Posts
    16

    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

  8. #8
    WWJ Technical Manager
    Join Date
    May 2007
    Location
    Seattle
    Posts
    1,120

    Default

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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 07-19-2010, 04:44 PM
  2. Replies: 8
    Last Post: 10-01-2009, 01:18 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •