AnsweredAssumed Answered

JS API - Measurement widget in draw mode and disabling the InfoTemplate?

Question asked by ipeebles on Sep 8, 2017
Latest reply on Oct 4, 2017 by rscheitlin

I have a simple application where I am adding in a measure widget and I have a couple of InfoTemplates configured.  How can I simply disconnect the infoTemplate from popping up while I am in draw mode with the measurement widget.  The two tools are conflicting with eachother.


I have tried using a couple of functions and setting map.setInfoWindowOnClick(false); while the tool is in draw then setting it back to map.setInfoWindowOnClick(true); but I cannot seem to get it to work.  I checked the API reference, but cannot get it to work.  Here are a couple blocks of code, one for the measurement widget and the other for the info template:


// Map - Measurement Widget
measurement = new Measurement({
     map: map,
     defaultAreaUnit: Units.SQUARE_FEET,
     defaultLengthUnit: Units.FEET
 }, dom.byId("measurementDiv"));


When the widget is activated, I need the popup to disconnect or map.setInfoWindowOnClick(false);


// Planimetrics - Building Footprints (0)
var bfInfoTemplate = new PopupTemplate({
     title: "Building Footprint",
     fieldInfos: [{
        fieldName: "SHAPE.area",
        label: "Square Footage:",
     format: { "places": 0, "digitSeparator": true },
        visible: true


I am wanting to achieve this without having to add in a button and set up event listeners.


Any ideas?