CreateResolvedStyle not pulling icon

17 views
Skip to first unread message

clayton

unread,
Jan 5, 2012, 12:41:10 PM1/5/12
to libkml
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.


Reply all
Reply to author
Forward
0 new messages