this.color.toRgba () is not a Function

991
10
09-12-2018 10:53 AM
ChristopherWiebke1
New Contributor III

I am using the print widget and get the error "this.color.toRgba () is not a Function" when i try to print graphics created in my map from the Direction Distance widget?

0 Kudos
10 Replies
KenBuja
MVP Esteemed Contributor

Is this within a function you are calling? If so, you'll probably need to use lang.hitch when calling the function, like this:

settings.forEach(lang.hitch(this, function (setting) {
ChristopherWiebke1
New Contributor III

It is what the widgets are calling "out of the box".  I have not added any custom code.

0 Kudos
KenBuja
MVP Esteemed Contributor

In the console, where is this error occurring?

0 Kudos
ChristopherWiebke1
New Contributor III

0 Kudos
KenBuja
MVP Esteemed Contributor

And when you click on the link on the first line (Widget.js?wab_dv=2.8:153), is that the Print widget or another one?

0 Kudos
ChristopherWiebke1
New Contributor III

That is the print widget, and the error that comes from clicking the print button.  As I mentioned, this only happens after I have created a graphic from the Direction Distance widget.

0 Kudos
ChristopherWiebke1
New Contributor III

0 Kudos
KenBuja
MVP Esteemed Contributor

I get the same error when using the Distance and Directions widget with the Print widget. This is something you should report to Support.

ChristopherWiebke1
New Contributor III

Will do.  thank you for your help.

0 Kudos