1

I want to use dijit/Layout/Tabcontainer to show results in identify.js. It can't show the Tabcontainer correctly.

The result of the infowindow is as the link, it seems there is CSS file conflicts.

I only change the "identify.js" file of the original one. The code of my changed part is as below.

issues in the tabcontainer

    identifyCallback: function (identifiedlayers, responseArray) {
        var fSet = [];
        array.forEach(responseArray, function (response, i) {
             console.log("valve Chamber");
            var ref = identifiedlayers[i].ref;
            array.forEach(response, function (result) {
                result.feature.geometry.spatialReference = this.map.spatialReference; //temp workaround for ags identify bug. remove when fixed.
                if (result.feature.infoTemplate === undefined) {
                  //***************I change this part start **************//
                  //  var infoTemplate = this.getInfoTemplate(ref, null, result);
                    var infoTemplate=new InfoTemplate();
                    var tc = new TabContainer({ style: "width:300px;height:300px;"

                    }, domConstruct.create("div"));
                    // Display attribute information.
                    var cp1 = new ContentPane({
                        title: "tab1",
                        content: "substation"
                    });                        // Display a dojo pie chart for the male
                    var cp2 = new ContentPane({
                        title: "tab2"
                    });
                    var cp3=new ContentPane({
                        title: "tab3"
                    });
                    tc.addChild(cp1);
                    tc.addChild(cp2);
                    tc.addChild(cp3);
                    infoTemplate.setContent(tc.domNode);

             //***********I change this part End *************//
                    if (infoTemplate) {
                        result.feature.setInfoTemplate(infoTemplate);
                    } else {
                        return;
                    }
                }
                fSet.push(result.feature);
            }, this);
        }, this);
        this.map.infoWindow.setFeatures(fSet);
    },

1 Answer 1

1

For anyone who having the same problem, i accidently found the solution for this

add this >>> useMenu : false, useSlider : false

as shown here >>>

var tc = new TabContainer({ style: "width:300px;height:300px;", 
                useMenu : false, useSlider : false
                },

this will remove the buttons from TabContainer

1
  • @BaohuaChu .. you can thank me by tick this answer and set your vote :)
    – bapak71
    Commented Apr 18, 2017 at 14:35

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.