We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
osgEarth Version (required): 3.4
Description of the problem: icon does not change by setStyle(style)
What you have tried: I am trying to change the icons using code after assigning an initial icon when i was creating the node as below:
osgEarth::PlaceNode* label = new osgEarth::PlaceNode( osgEarth::GeoPoint( geoSRS, port->getPortCoordinate().getLongitude().value(), port->getPortCoordinate().getLatitude().value(), 0, osgEarth::AltitudeMode::ALTMODE_ABSOLUTE), labelText.toStdString(), _normalStyle);
Screenshot, code block, or data file that will help reproduce the issue:
void toggleHighlightNode(const osgEarth::ObjectID& id) { auto node = osgEarth::Registry::objectIndex()->get<osgEarth::PlaceNode>(id); if (!node) return; auto it = _highlightedNodes.find(node); if (it != _highlightedNodes.end()) { node->setStyle(_normalStyle); _highlightedNodes.erase(it); } else { node->setStyle(_highlightStyle); _highlightedNodes.insert(node); } node->dirty(); }
The text was updated successfully, but these errors were encountered:
This may be a bug in PlaceNode; as a workaround, try calling PlaceNode::setIconImage() directly and see if that works.
Sorry, something went wrong.
Thank you. This worked.
Thanks for reporting back. I have marked this as a defect and will put it in the queue to patch up for the trunk.
gwaldron
No branches or pull requests
osgEarth Version (required): 3.4
Description of the problem: icon does not change by setStyle(style)
What you have tried: I am trying to change the icons using code after assigning an initial icon when i was creating the node as below:
Screenshot, code block, or data file that will help reproduce the issue:
The text was updated successfully, but these errors were encountered: