When upgrading to 3.13 the following code to disable the measurement tool returns an error:
measurement.setTool("distance", false);
Here is the error:
Uncaught TypeError: Cannot read property 'domNode' of undefined
When I switch back to 3.12 it works fine. I'm thinking it's a bug in 3.13, but wanted to see if anyone else has run across this?
1 Answer 1
The problem was that the setTool()
method was being called before startup()
. It appears that starting with 3.13 you must call startup()
before setTool()
.
My application was built in a way where setTool()
was being called to disable the measurement tool, even if it was not active. Prior to 3.13 that worked fine, but it seems that has changed.