0

I want to simply show some kml files with osgearth_viewer.exe.

I've read the osgEarth documentation and get nothing about how to load a lot of KML files by using .earth file with osgearth_viewer.exe.

I know how to load one kml file using comand line parameter --kml , but I wanna to show all kml files once.

Any help would be gratefully appreciated and sorry for my poor English.

winnersun
  • 3
  • 3

1 Answers1

0

The example here: http://code.metager.de/source/xref/osgearth/src/applications/osgearth_kml/osgearth_kml.cpp#63

Shows pretty clearly how you do it. Just do the

        osg::Node* kml = osgDB::readNodeFile( kmlFile, options.get() );
        if ( kml )
            root->addChild( kml );

steps as many times as you want for as many KML files as you want.

XenonofArcticus
  • 472
  • 2
  • 6
  • OK,at last I found that cannot load more than one kml file using comand line, and I wrote a Qt-OSGEarth frame application – winnersun Jul 26 '16 at 01:37