Change color of Text by using Actions? #1588
-
Hi, I was wondering if it possible to change color of the Text by clicking on different Actions.
Before creating the Line I can choose which color it should be. However I cannot get that HTMLElement when it does not yet exist but is about to be created, so I can't change colors that way or I might be missing something. Anyone has an idea? please |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
I solved it with the following code.
Basically, I added a control to the map letting the user choose the color.
Everytime the user clicks on a different color button, Line.setOptions(...) gets called to set the right color for the line and for the text I just set it on the event "map.on(pm:create)".