|
楼主 |
发表于 2013-11-16 10:39:17
|
显示全部楼层
代码不清楚:
osgEarth:rivers::ArcGISOptions MapImageLayer;
MapImageLayer.url()=osgEarth::URI("http://202.114.123.30:6080/arcgis/rest/services/Layer_xiaolong2/MapServer");
std::string CdlayerName="worldimage";
osg::ref_ptr<osgEarth::ImageLayer> cdlayer =new osgEarth::ImageLayer(osgEarth::ImageLayerOptions(CdlayerName,MapImageLayer));
map->addImageLayer(cdlayer.get());
osgEarth::Drivers::WMSOptions DEMbaselayerOpt2;
ImagebaselayerOpt2.url()=osgEarth::URI("http://202.114.123.30:8080/geoserver/Edvis_-1/wms");
DEMbaselayerOpt2.layers()="Layer_0";
DEMbaselayerOpt2.tileSize()=256;
DEMbaselayerOpt2.wmsVersion()="2";
DEMbaselayerOpt2.srs() ="EPSG:4326";
std::string DembaselayerName="Dem720";
osgEarth::ElevationLayerOptions demlayerOpt(DembaselayerName,ImagebaselayerOpt2);
demlayerOpt.edgeBufferRatio()=2;
osg::ref_ptr<osgEarth::ElevationLayer> BaseDEMLayer = new osgEarth::ElevationLayer(demlayerOpt);
map->addElevationLayer(BaseDEMLayer.get());
|
|