osgEarth
osgEarth is a powerful open source SDK for visualizing 3D maps developed by Pelican Mapping.
Loading imagery and elevation layers in osgEarth to ReadyMap can be done by editing your earth file to point to the TMS endpoint for your layer. For example:
<map name="ReadyMap.org">
<!--Load an image layer-->
<TMSImage name="ReadyMap 15m Imagery">
<url>http://readymap.org/readymap/tiles/1.0.0/7/</url>
</TMSImage>
<!--Load an elevation layer-->
<TMSElevation name="ReadyMap 90m Elevation">
<url>http://readymap.org/readymap/tiles/1.0.0/116/</url>
<vdatum>egm96</vdatum>
</TMSElevation>
</map>
You can also load imagery and elevation layers using the osgEarth C++ API. Here is an complete example of how to make a MapNode and add image and elevation layers to it.
#include <osgViewer/Viewer>
#include <osgEarth/GLUtils>
#include <osgEarth/MapNode>
#include <osgEarth/TMS>
#include <osgEarth/EarthManipulator>
using namespace osgEarth;
int
main(int argc, char** argv)
{
osgEarth::initialize();
osg::ArgumentParser arguments(&argc,argv);
// create the empty map.
Map* map = new Map();
// add a TMS image layer:
TMSImageLayer* imagery = new TMSImageLayer();
imagery->setURL("http://readymap.org/readymap/tiles/1.0.0/7/");
map->addLayer(imagery);
// add a TMS elevation layer:
TMSElevationLayer* elevation = new TMSElevationLayer();
elevation->setURL("http://readymap.org/readymap/tiles/1.0.0/116/");
map->addLayer( elevation );
// make the map scene graph:
MapNode* node = new MapNode( map );
// initialize a viewer:
osgViewer::Viewer viewer(arguments);
viewer.setCameraManipulator( new EarthManipulator() );
viewer.getCamera()->setSmallFeatureCullingPixelSize(-1.0f);
viewer.setSceneData( node );
GL3RealizeOperation* rop = new GL3RealizeOperation();
viewer.setRealizeOperation(rop);
return viewer.run();
}