Project

General

Profile

« Previous | Next » 

Revision 8f9d4412

Added by Andreas Kohlbecker about 8 years ago

hack to fix layer order for flora cuba

View differences:

modules/cdm_dataportal/js/map/openlayers_map.js
440 440

  
441 441
                } else {
442 442
                    // it is a response from for a distribution map
443
                    console.log("start with adding distribution layers :");
443 444
                    for ( var i in mapResponseObj.layers) {
444 445
                        var layerData = mapResponseObj.layers[i];
445 446

  
447
                        console.log(" " + i +" -> " + layerData.tdwg);
446 448
                        layer = new OpenLayers.Layer.WMS(
447 449
                                layerData.tdwg,
448 450
                                mapResponseObj.geoserver + "/wms",
......
456 458
                        layer.params.SLD = layerData.sld;
457 459
                        layer.setOpacity(opts.distributionOpacity);
458 460
                        map.addLayers([layer]);
461
                        // hack for cuba
462
                        if(layerData.tdwg == "flora_cuba_2016_regions"){
463
                          map.setLayerZIndex(layer, 5);
464
                        }
465
                        if(layerData.tdwg == "flora_cuba_2016_provinces"){
466
                          map.setLayerZIndex(layer, 6);
467
                        }
468
                        if(layerData.tdwg == "flora_cuba_2016_world"){
469
                          map.setLayerZIndex(layer, 4);
470
                        }
459 471

  
460 472
                    }
461 473

  

Also available in: Unified diff