/***标绘***/
{
// 类型
FxGIS::PlotManager* plotSys = FxGIS::PlotManager::getInstance(m_earthScene);
// 创建标绘图层参数
osg::ref_ptr<FxGIS::PlotLayerOption> layerOpt = new FxGIS::PlotLayerOption();
// 创建并添加标绘图层
FxGIS::PlotLayer* layer = plotSys->addPlotLayer(layerOpt.get());
FxGIS::PlotCircle* circle = dynamic_cast<FxGIS::PlotCircle*>(plotSys->createPlot(FxGIS::PLOT_TYPE_CIRCLE));
circle->setRadius(50000.0);
circle->setPositionGeo(osg::Vec3d(116.5, 39.4, 100.0));
circle->setLineColor(osg::Vec4f(1.0, 0.0, 0.0, 1.0));
circle->setLineWidth(5.0);
circle->setArcStartDegree(0);
circle->setArcEndDegree(360);
circle->setEnableFill(false);
circle->setName("YUAN");
//添加标绘
layer->addPlot(circle);
//删除标绘
//layer->removePlot(circle);
}
Chapter 6 标绘
于 2024-10-08 15:37:30 首次发布