1 Reply Latest reply on May 21, 2012 1:06 PM by grueningd

    How to display all layers at the same time?


      I have created several theme based FOIs with a checkbox to set visible them. Each theme has some data and when you click in the theme region it displays this data in an information box. But when I set visible more than one theme, can only display the information box of the last one theme that I set visible (the others are not clickable because they are under the last no?). Is there anyway to make all of them clickable at the same time?

      For each theme that I create I call this function:

           function addThemeBasedFOI(value, i) {

                /* Add JDBC SQL Query theme based FOI */
                baseQuery = "SELECT value,annotation as label FROM " + value;
                var theme = "<themes><theme name='JDBC_THEME'>"
                          + "<jdbc_query asis='true' spatial_column='value' jdbc_srid='4326' label_column='label' " +
           "render_style='colorScheme' datasource='DSTest'>"
                          + baseQuery + "</jdbc_query></theme></themes>";
                buffertheme = new MVThemeBasedFOI('bufferthemeL_' + i, theme);
                buffertheme.attachEventListener(MVEvent.MOUSE_CLICK, showInfoPanel);          
           function showInfoPanel (loc, foi){
                var width = 250;
                var height = 150;
                var html = "<p style='color:blue'>Name:<br><font color='black'>" + foi.name + "</font></p><br><p style='color:blue'>Localization:<br><font color='black'> X:" + loc.getPointX() + "<br> Y:" + loc.getPointY() + "</font></p>";
                mapview.displayInfoWindow(loc, html, width, height, "MVInfoWindowStyle4");

      /* Function to set visible a layer */
      function setVisible(item) {
                var themebasedfoi = mapview.getThemeBasedFOI(item.value);

                if(themebasedfoi.isVisible()) {

      Thanks in advance,