Measurement widget location tool not displaying correctly.

3740
19
Jump to solution
06-26-2015 05:39 AM
ArjunDongre
Occasional Contributor

The measurement tool is displaying two mouse pointers and two pins when using the "location" tool. Anyone else having this problem?

Thanks.

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
JoelBennett
MVP Regular Contributor

Remove the call to the startup function.

View solution in original post

0 Kudos
19 Replies
RobertScheitlin__GISP
MVP Emeritus

Arjun,

   Nope I have not seen this behavior. Can you have your code for review?

0 Kudos
ArjunDongre
Occasional Contributor

Hi Robert,

  Not doing anything fancy to the widget, except calling it in the JS file:

var measurement = new Measure({

        map: map,

        style:"margin-top:25px;height:200px",

        id:"measurement",

      }, 'measurement').startup();

and <div id='measurement'></div> in html.

The other erratic behaviour was that I had to force a height on the tool, otherwise it was making it incredibly tall, pushing the divs below way down having to scroll down to see them.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Arjun,

You have:

var measurement = new Measure({

What is the require that you are using for this? Normally you would use

esri/dijit/Measurement

and a var of

Measurement

Did you just choose to use Measure as your var?

What happens when you use the esri sample for the Measurement widget?

Measurement Widget | ArcGIS API for JavaScript

0 Kudos
JoelBennett
MVP Regular Contributor

Remove the call to the startup function.

0 Kudos
ArjunDongre
Occasional Contributor

That did it. Thanks! So simple. Im so used to making the startup call in dojo.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Joel,

   Why?....

0 Kudos
ArjunDongre
Occasional Contributor

Startup() overrides the default override within the class, as you probably already know. ESRI may not have accounted for this call in the results table, and it generates two rows for each.

RobertScheitlin__GISP
MVP Emeritus

Arjun,

   I startup the dijit in all my apps and have never seen the issue. The esri samples all call startup on the Measurement dijit and do not display the issue.

0 Kudos
ArjunDongre
Occasional Contributor

Weird. Yeah - I have no clue. Thanks for the help Robert!

0 Kudos