osgEarth 2.9+ and demos

classic Classic list List threaded Threaded
3 messages Options
marlinrowley marlinrowley
Reply | Threaded
Open this post in threaded view
|

osgEarth 2.9+ and demos

Hello,

We are having a hard time getting the original demos from osgearth to run with the latest version (which incorporates several changes).  Here is a simple function that will not render the earth globe:

osg::ref_ptr<osg::Group> run(osg::ArgumentParser& parser)
    {

        Map* map = new Map();

        // add a TMS imagery layer:
        TMSOptions imagery;
        imagery.url() = "http://readymap.org/readymap/tiles/1.0.0/7/";
        map->addLayer(new ImageLayer("ReadyMap Imagery", imagery));

        // add a TMS elevation layer:
        TMSOptions elevation;
        elevation.url() = "http://readymap.org/readymap/tiles/1.0.0/116/";
        map->addLayer(new ElevationLayer("ReadyMap Elevation", elevation));

        // create the empty map.
        MapNode* terrainMap = new MapNode(map);
        terrainMap->load(parser);

        return terrainMap;
    }

What are we missing here?
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: osgEarth 2.9+ and demos

Marlin,
This code (except for the superfluous call to MapNode::load) is also found in the osgearth_map example, which appears to be working properly in the master branch.
Glenn Waldron / Pelican Mapping
marlinrowley marlinrowley
Reply | Threaded
Open this post in threaded view
|

Re: osgEarth 2.9+ and demos

I was using that code actually.

In any case, I was able to get the earth to render now.  I'll backtrack and see what I missed.