This project has moved and is read-only. For the latest updates, please go here.

LatLonAltBox in GroundOverlay

Jun 17, 2015 at 8:17 PM

I am using Visual Studio and VB.NET to process KML files and I am having some trouble getting the LatLonAltBox information under GroundOverlay. This is what my KML file looks like:
I am using the following code:
kmlData = KmlFile.Load(data)

For Each go In kmlData.Root.Flatten().OfType(Of SharpKml.Dom.GroundOverlay)()

     For Each coordBox In go.Flatten().OfType(Of SharpKml.Dom.LatLonAltBox)()

          /// DO STUFF HERE


I can never get into the 2nd for loop since it cannot find any LatLonAltBox. I further tried debugging it in Visual Studio and it seems that the LatLonAltBox information is under the protected Orphans property when I examine the GroundOverlay object.

How can I access the LatLonAltBox information?

Jun 18, 2015 at 6:20 AM
Looking at the GroundOverlay documentation and it's expecting a LatLonBox as a child, not a LatLonBoxAlt so I don't think the KML is valid, hence why they're appearing in the Orphans.

If you control the generated KML and need to use the LatLonBoxAlt then I think you should be able to use the Region element.

Hope it helps,