1

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?

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Mar 26, 2015 at 20:08

1 Answer 1

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.

answered Mar 27, 2015 at 12:26

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.