AnsweredAssumed Answered

Hide or cancel popup windows on measurement?

Question asked by edudom on Dec 21, 2014
Latest reply on Dec 23, 2014 by edudom

I was wondering if someone could help me with this: I'd want to take measures without popup windows on clicking, only these popups should appear out of measuring.


This is my identify task:


map.on("load", mapReady);


        var parcelsURL = "";

        map.addLayer(new ArcGISDynamicMapServiceLayer(parcelsURL,

          { visible: false }));


        function mapReady () {

          map.on("click", executeIdentifyTask);

          //create identify tasks and setup parameters

          identifyTask = new IdentifyTask(parcelsURL);


          identifyParams = new IdentifyParameters();

          identifyParams.tolerance = 3;

          identifyParams.returnGeometry = true;

          identifyParams.layerIds = [2];

          identifyParams.layerOption = IdentifyParameters.LAYER_OPTION_ALL;

          identifyParams.width = map.width;

          identifyParams.height = map.height;



        function executeIdentifyTask (event) {

          identifyParams.geometry = event.mapPoint;

          identifyParams.mapExtent = map.extent;


          var deferred = identifyTask


            .addCallback(function (response) {

              // response is an array of identify result objects

              // Let's return an array of features.

              return, function (result) {

                var feature = result.feature;

                var layerName = result.layerName;


                feature.attributes.layerName = layerName;

                if (layerName === 'States') {

                  var taxParcelTemplate = new InfoTemplate("Estado: ${STATE_NAME}",

                    "Población: ${POP2000} personas<br/> Dens. Pob.: ${POP00_SQMI} pers./milla cuadr.<br/> Área: ${area} millas cuadradas ");



                else if (layerName === 'Building Footprints') {


                  var buildingFootprintTemplate = new InfoTemplate("",

                    "Estado: ${STATE_NAME}");



                return feature;




And my measure task:


function initt() {

        //This sample requires a proxy page to handle communications with the ArcGIS Server services. You will need to 

        //replace the url below with the location of a proxy on your machine. See the 'Using the proxy page' help topic

        //for details on setting up a proxy page. = "/proxy/"; = false;


        //This service is for development and testing purposes only. We recommend that you create your own geometry service for use within your applications

        esri.config.defaults.geometryService = new esri.tasks.GeometryService("");




        dojo.connect(map, 'onLoad', function(map) {






      function initToolbar(mymap) {




        //define a new line symbol and point symbol to use for measure tools

        var pms = new esri.symbol.PictureMarkerSymbol("images/flag.png",24,24);


        var sls = new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_DOT,

            new dojo.Color([255,0,0,0.55]), 4);


        var measurement = new esri.dijit.Measurement({

          map: mymap,






        }, dojo.byId('measurementDiv'));










and the button action:




        function fmedidas(){




Many thanks.