Skip to content

Setting Heading of IconSymbol or PlaceNode #1966

Answered by keince
nebsar asked this question in Support Q&A
Discussion options

You must be logged in to vote

Have you tried the following in an update callback for your PlaceNode?

auto style = place->getStyle();
style.getOrCreate<IconSymbol>()->heading() = headingDeg;
place->setStyle(style);

This works for us in rotating the icon of a PlaceNode based on a heading. Just be aware that calling "setStyle(...)" forces a recompile of the object using it so it's expensive. Only call it when the heading changes.

-S

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@nebsar
Comment options

Comment options

You must be logged in to vote
1 reply
@nebsar
Comment options

Answer selected by nebsar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants