I am having an issue with the Measure Widget in my application after updating to 3.11. The widget does not appear after the application loads. I have checked my code and do not see an issue, also when reverting back to 3.10 it works correctly.
Has anyone else had this issue after updating to 3.11?
measurement = new Measurement({
map: map
},
dom.byId("measure_results"));
measurement.startup();
UPDATE
The widget is actually working, but the "esriMeasurementButtonPane" is not being parsed. See screenshot below:
screencap
3 Answers 3
I figured out the issue was with the buttons content pane being registered twice. I assume this was due to a parsing issue. I changed parseOnLoad:true to false and manually parsed the data onload. This resolved the issue.
I noticed this from the "What's new in Version 3.11" tab.
- New methods getTool and getUnit on Measurement class.
- New events measure-start and measure on Measurement class.
- Updated event measure-end on Measurement.
- New events tool-change and unit-change on Measurement class.
Measurement widget enhancements:
New developer events and methods to support interacting with geometries during the life cycle of the Measurement widget, accessing the current tool, and current units. Fixed issues for developers when using the Measurement widget in applications and services containing coordinate systems other than WGS84 and Web Mercator.
It appears the code needs updating
-
1I did read that section and am not using any of those methods/events. My code is the same as the Measure Widget example in the API developers.arcgis.com/javascript/sandbox/…Jeremy Hamm– Jeremy Hamm2014年10月07日 18:20:50 +00:00Commented Oct 7, 2014 at 18:20
I just wanted to share that I was having a similar issue, except no tool buttons were showing. When I removed "compact" from the following: <script type="text/javascript" src="http://js.arcgis.com/3.11compact/"></script>
it works as expected.
-
1Thanks for the update, it turns out the reason it was not being displayed was because it was not being parsed. Once the parsing was done manually it has been resolved.Jeremy Hamm– Jeremy Hamm2014年10月09日 20:20:52 +00:00Commented Oct 9, 2014 at 20:20
Explore related questions
See similar questions with these tags.