Closed yaterman closed 1 month ago
osgEarth Version (required):2.8
What is the problem?
std::string wktString = "EPSG:3857"; //wgs84 osgEarth::ProfileOptions profileOpts; profileOpts.srsString() = wktString; // 设置缓存目录 osgEarth::Drivers::FileSystemCacheOptions cacheOpts; std::string cacheDir = path.toStdString() + "/data/tmp"; cacheOpts.rootPath() = cacheDir; osgEarth::MapOptions mapOpts; mapOpts.cache() = cacheOpts; mapOpts.coordSysType() = osgEarth::MapOptions::CSTYPE_PROJECTED; mapOpts.profile() = profileOpts; // 创建地图节点 osg::ref_ptr<osgEarth::Map> map = new osgEarth::Map(mapOpts); osg::ref_ptr<osgEarth::MapNode> mapNode = new osgEarth::MapNode(map); osgEarth::Drivers::GDALOptions gdal; gdal.url() = path.toStdString() + "/data/world.tif";; // 二维地图资源路径 osg::ref_ptr<osgEarth::ImageLayer> layer = new osgEarth::ImageLayer("mapImage", gdal); map->addImageLayer(layer); root->addChild(mapNode);
when program run line osg::ref_ptr mapNode = new osgEarth::MapNode(map); app crash,why?
How have you tried to resolve i
Help US help YOU: include a screenshot, code block, or data file that we can use to reproduce the issue!
Where does it crash? Do you have a stack trace?
osgEarth 2.8 is almost 8 years old. It will be difficult for us to give you support for such an old version. Please consider upgrading to the latest version 3.6.
osgEarth Version (required):2.8
What is the problem?
when program run line osg::ref_ptr mapNode = new osgEarth::MapNode(map); app crash,why?
How have you tried to resolve i
Help US help YOU: include a screenshot, code block, or data file that we can use to reproduce the issue!