我的github

1.aeqd.earth

2.annotation.earth

3.annotation_dateline.earth

4.annotation_dateline_projected.earth

5.annotation_flat.earth

6.arcgisonline.earth

https://max.book118.com/html/2022/0625/5042331323004244.shtm

http://docs.osgearth.org/en/latest/install.html

例1:

#include <osgEarth/MapNode>
#include <osgEarth/TMS>
#include <osgEarth/EarthManipulator>

#include <osg/ArgumentParser>
#include <osgViewer/Viewer>

int main(int argc, char** argv)
{
    osgEarth::initialize();
    
    osg::ArgumentParser args(&argc, argv);
    osgViewer::Viewer viewer(args);
    
    auto imagery = new osgEarth::TMSImageLayer();
    imagery->setURL("https://readymap.org/readymap/tiles/1.0.0/7/");
    
    auto mapNode = new osgEarth::MapNode();
    mapNode->getMap()->addLayer(imagery);
    
    viewer.setSceneData(mapNode);
    viewer.setCameraManipulator(new osgEarth::EarthManipulator(args));
    
    return viewer.run();
}

.earth文件是什么?

osgEarth uses the familiar Map/Layer paradigm for organizing data. The Map is comprised of a collection of layers. The renderer draws each visible layer one after the next, from bottom to top, to display the final scene. You can see all the different layer types here.

An Earth File is an XML file that describes the contents of a Map in osgEarth.

http://docs.osgearth.org/en/latest/earthfile.html

posted on 2023-03-29 14:50  XiaoNiuFeiTian  阅读(242)  评论(0编辑  收藏  举报