|
各位大侠!我加载osg_package切好的dem和影像数据怎么很慢呢?我也设置了最大最小level,真心不知道问题出在哪里,下面是我的部分代码,请指教
osgEarth:rivers::TMSOptions tmsOpt;//加载dem
tmsOpt.url()=osgEarth::URI("http://202.114.123.30:8020//Edvis_-1/Layer_0/tms.xml");
std::string DemtmslayerName="TmsDem";
osgEarth::ElevationLayerOptions tmslayerOpt(DemtmslayerName,tmsOpt);
tmslayerOpt.maxLevel()=10;
tmslayerOpt.minLevel()=5;
osg::ref_ptr<osgEarth::ElevationLayer> TmsDemLayer = new osgEarth::ElevationLayer(tmslayerOpt);
m_pMap->addElevationLayer(TmsDemLayer.get());
osgEarth::Drivers::TMSOptions ImagetmsOpt;//加载影像
ImagetmsOpt.url()=osgEarth::URI("http://202.114.123.30:8020/Edvis_-1/Layer_4/tms.xml");
//ImagetmsOpt.url()=osgEarth::URI("http://demo.pelicanmapping.com/rmweb/data/bluemarble-tms/tms.xml");
std::string ImagetmslayerName="ImageDem";
osgEarth::ImageLayerOptions ImagetmslayerOpt(ImagetmslayerName,ImagetmsOpt);
ImagetmslayerOpt.maxLevel()=10;
ImagetmslayerOpt.minLevel()=0;
ImagetmslayerOpt.edgeBufferRatio()=3.0;
ImagetmslayerOpt.lodBlending()=true;
osg::ref_ptr<osgEarth::ImageLayer> TmsImageLayer = new osgEarth::ImageLayer(ImagetmslayerOpt);
m_pMap->addImageLayer(TmsImageLayer.get()); |
|