[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2004: (GIS) Opacity management implemented for all layer types.

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)

revision-diff.txt (7.75 KB)

···

------------------------------------------------------------
revno: 2004 [merge]
committer: Jan Henrik Overland <janhenrik.overland@gmail.com>
branch nick: trunk
timestamp: Fri 2010-06-18 14:26:58 +0200
message:
  (GIS) Opacity management implemented for all layer types.
modified:
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js

--
lp:dhis2

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to OpenID transaction in progress

Merge authors:

Jan Henrik Øverland (janhenrik-overland)


revno: 2004 [merge]

committer: Jan Henrik Overland janhenrik.overland@gmail.com

branch nick: trunk

timestamp: Fri 2010-06-18 14:26:58 +0200

message:

(GIS) Opacity management implemented for all layer types.

modified:

dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js

lp:dhis2

https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.

To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription

=== modified file ‘dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js’

— dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js 2010-06-17 15:27:20 +0000

+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js 2010-06-18 12:13:13 +0000

@@ -2848,9 +2848,9 @@

    addOverlaysToMap();
  • function showWMSLegend(layer) {
  • function showWMSLayerOptions(layer) {

    var baseLayerOptionsWindow = new Ext.Window({
    
  •        title: 'Layer options: <span style="font-weight:normal;">' + [layer.name](http://layer.name) + '</span>',
    
  •        title: 'Options: <span style="font-weight:normal;">' + [layer.name](http://layer.name) + '</span>',
    
           items: [
    
               {
    
                   xtype: 'menu',
    

@@ -2890,6 +2890,53 @@

                                 }

                             }

                         }
  •                    },
    
  •                    {
    
  •                        html: 'Opacity',
    
  •                        menu: {
    
  •                            items: [
    
  •                                {
    
  •                                    html: '0.1',
    
  •                                    listeners: { 'click': { fn: function() { layer.setOpacity(0.1); } } }
    
  •                                },
    
  •                                {
    
  •                                    html: '0.2',
    
  •                                    listeners: { 'click': { fn: function() { layer.setOpacity(0.2); } } }
    
  •                                },
    
  •                                {
    
  •                                    html: '0.3',
    
  •                                    listeners: { 'click': { fn: function() { layer.setOpacity(0.3); } } }
    
  •                                },
    
  •                                {
    
  •                                    html: '0.4',
    
  •                                    listeners: { 'click': { fn: function() { layer.setOpacity(0.4); } } }
    
  •                                },
    
  •                                {
    
  •                                    html: '0.5',
    
  •                                    listeners: { 'click': { fn: function() { layer.setOpacity(0.5); } } }
    
  •                                },
    
  •                                {
    
  •                                    html: '0.6',
    
  •                                    listeners: { 'click': { fn: function() { layer.setOpacity(0.6); } } }
    
  •                                },
    
  •                                {
    
  •                                    html: '0.7',
    
  •                                    listeners: { 'click': { fn: function() { layer.setOpacity(0.7); } } }
    
  •                                },
    
  •                                {
    
  •                                    html: '0.8',
    
  •                                    listeners: { 'click': { fn: function() { layer.setOpacity(0.8); } } }
    
  •                                },
    
  •                                {
    
  •                                    html: '0.9',
    
  •                                    listeners: { 'click': { fn: function() { layer.setOpacity(0.9); } } }
    
  •                                },
    
  •                                {
    
  •                                    html: '1.0',
    
  •                                    listeners: { 'click': { fn: function() { layer.setOpacity(1.0); } } }
    
  •                                }
    
  •                            ]
    
  •                        }
    
                       }
    
                   ]
    
               }
    

@@ -2898,6 +2945,70 @@

     baseLayerOptionsWindow.setPagePosition(Ext.getCmp('east').x - 190, Ext.getCmp('center').y + 50);

     baseLayerOptionsWindow.show();

 }
  • function showVectorLayerOptions(layer) {

  •    var vectorLayerOptionsWindow = new Ext.Window({
    
  •        title: 'Options: <span style="font-weight:normal;">' + [layer.name](http://layer.name) + '</span>',
    
  •        items: [
    
  •            {
    
  •                xtype: 'menu',
    
  •                id: 'vectorlayeroptions_m',
    
  •                floating: false,
    
  •                items: [
    
  •                    {
    
  •                        html: 'Opacity',
    
  •                        menu: {
    
  •                            items: [
    
  •                                {
    
  •                                    html: '0.1',
    
  •                                    listeners: { 'click': { fn: function() { layer.setOpacity(0.1); } } }
    
  •                                },
    
  •                                {
    
  •                                    html: '0.2',
    
  •                                    listeners: { 'click': { fn: function() { layer.setOpacity(0.2); } } }
    
  •                                },
    
  •                                {
    
  •                                    html: '0.3',
    
  •                                    listeners: { 'click': { fn: function() { layer.setOpacity(0.3); } } }
    
  •                                },
    
  •                                {
    
  •                                    html: '0.4',
    
  •                                    listeners: { 'click': { fn: function() { layer.setOpacity(0.4); } } }
    
  •                                },
    
  •                                {
    
  •                                    html: '0.5',
    
  •                                    listeners: { 'click': { fn: function() { layer.setOpacity(0.5); } } }
    
  •                                },
    
  •                                {
    
  •                                    html: '0.6',
    
  •                                    listeners: { 'click': { fn: function() { layer.setOpacity(0.6); } } }
    
  •                                },
    
  •                                {
    
  •                                    html: '0.7',
    
  •                                    listeners: { 'click': { fn: function() { layer.setOpacity(0.7); } } }
    
  •                                },
    
  •                                {
    
  •                                    html: '0.8',
    
  •                                    listeners: { 'click': { fn: function() { layer.setOpacity(0.8); } } }
    
  •                                },
    
  •                                {
    
  •                                    html: '0.9',
    
  •                                    listeners: { 'click': { fn: function() { layer.setOpacity(0.9); } } }
    
  •                                },
    
  •                                {
    
  •                                    html: '1.0',
    
  •                                    listeners: { 'click': { fn: function() { layer.setOpacity(1.0); } } }
    
  •                                }
    
  •                            ]
    
  •                        }
    
  •                    }
    
  •                ]
    
  •            }
    
  •        ]
    
  •    });
    
  •    vectorLayerOptionsWindow.setPagePosition(Ext.getCmp('east').x - 173, Ext.getCmp('center').y + 50);
    
  •    vectorLayerOptionsWindow.show();
    
  • }

    var layerTreeConfig = [{

    nodeType: 'gx_baselayercontainer',
    

@@ -2929,13 +3040,13 @@

                    'click': {

                            fn: function(n) {

                                    if (n.isAncestor(this.getNodeById('xnode-253'))) {
  •                                           showWMSLegend(MAP.getLayersByName([n.attributes.layer.name](http://n.attributes.layer.name))[0]);
    
  •                                           showWMSLayerOptions(MAP.getLayersByName([n.attributes.layer.name](http://n.attributes.layer.name))[0]);
    
                                      }
    
                   else if (n.isAncestor(this.getNodeById('xnode-254'))) {
    
  •                    //alert([n.attributes.layer.name](http://n.attributes.layer.name));
    
  •                    showVectorLayerOptions(MAP.getLayersByName([n.attributes.layer.name](http://n.attributes.layer.name))[0]);
    
                   }
    
                                      else {
    
  •                                           //alert(n.attributes.layer);
    
  •                    showVectorLayerOptions(MAP.getLayersByName(n.attributes.layer)[0]);
    
                                      }
    
                              }
    
                      }
    

Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

image

image

···

On Fri, Jun 18, 2010 at 2:28 PM, noreply@launchpad.net wrote: