You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When adding a model by FeatureModelLayer, set the Style of the model by url() displays the model correctly, but using setModel() method does not display the model. Any ideas?
void addFeature(osg::Node* model,osgEarth::Map* themap)
{
using namespace osg;
using namespace osgEarth;
OGRFeatureSource* features = new OGRFeatureSource;
features->setName("vector-data");
osgEarth::Point* p = new osgEarth::Point;
p->set(osg::Vec3d(-90.35, 1.32, 0.0));
features->setGeometry(p);
themap->addLayer(features);
Style style;
ModelSymbol* ms = style.getOrCreateSymbol<ModelSymbol>();
#if 0
ms->setModel(model); //can not display the model
#else
ms->url()->setLiteral("axes.osgt.500000.scale"); //It's OK
#endif
StyleSheet* sheet = new StyleSheet;
sheet->addStyle(style);
FeatureModelLayer* fml = new FeatureModelLayer;
fml->setName("models");
fml->setFeatureSource(features);
fml->setStyleSheet(sheet);
themap->addLayer(fml);
}
There is a similar issues about setURL() and setModel() #2298
The text was updated successfully, but these errors were encountered:
When adding a model by FeatureModelLayer, set the Style of the model by url() displays the model correctly, but using setModel() method does not display the model. Any ideas?
There is a similar issues about setURL() and setModel() #2298
The text was updated successfully, but these errors were encountered: