Hello,
I am using libkml 1.2.0 and I am having trouble using the
kmlengine::CreateResolvedStyle. I am trying to pull this KML file:
http://destinsharks.com/kmz/poi/ais.kml
It has style URLs in there like:
http://earthnc.info/styles/aisstyle-encb.xml#tanker
My code looks like:
bool KMLFileIE::GetRemoteStyle(const kmldom::FeaturePtr& feature,
const kmlengine::KmlFilePtr &ptr,kmldom::StylePtr &style)
{
bool retval = true;
kmldom::StylePtr style_ptr =
kmlengine::CreateResolvedStyle(feature,ptr,kmldom::STYLESTATE_NORMAL);
if(style_ptr)
style = style_ptr;
else
retval = false;
return retval;
}
Now I know that the CreateResolvedStyle is going out and pulling the
remote file correctly and its coming back ok. When I look at the
style_ptr I see that there is an IconStyle (which there should be),
but after getting the icon style and calling has_color() and
has_icon() I see nothing. I know that the heading and scale are
filled out, but that is it. Any thoughts on what I may be doing
wrong? This loads correctly in Google Earth.
Thanks.