aboutsummaryrefslogtreecommitdiffstats
path: root/view/theme/diabook/js/jquery.mapquery.mqLayerManager.js
diff options
context:
space:
mode:
Diffstat (limited to 'view/theme/diabook/js/jquery.mapquery.mqLayerManager.js')
-rw-r--r--view/theme/diabook/js/jquery.mapquery.mqLayerManager.js23
1 files changed, 8 insertions, 15 deletions
diff --git a/view/theme/diabook/js/jquery.mapquery.mqLayerManager.js b/view/theme/diabook/js/jquery.mapquery.mqLayerManager.js
index 22dec2170..885330cf1 100644
--- a/view/theme/diabook/js/jquery.mapquery.mqLayerManager.js
+++ b/view/theme/diabook/js/jquery.mapquery.mqLayerManager.js
@@ -111,7 +111,7 @@ $.widget("mapQuery.mqLayerManager", {
var element = checkbox.parents('.mq-layermanager-element');
var layer = element.data('layer');
var self = element.data('self');
- self._visible(layer,checkbox.attr('checked'));
+ self._visible(layer,checkbox.is(':checked'));
});
element.delegate('.ui-icon-closethick', 'click', function() {
@@ -120,11 +120,11 @@ $.widget("mapQuery.mqLayerManager", {
});
//binding events
- map.bind("mqAddLayer",
+ map.bind("addlayer",
{widget:self,control:lmElement},
self._onLayerAdd);
- map.bind("mqRemoveLayer",
+ map.bind("removelayer",
{widget:self,control:lmElement},
self._onLayerRemove);
@@ -286,23 +286,16 @@ $.widget("mapQuery.mqLayerManager", {
evt.data.widget._layerAdded(evt.data.control,layer);
},
- _onLayerRemove: function(evt, id) {
- evt.data.widget._layerRemoved(evt.data.control,id);
+ _onLayerRemove: function(evt, layer) {
+ evt.data.widget._layerRemoved(evt.data.control,layer.id);
},
- _onLayerChange: function(evt, data) {
- var layer;
- //since we don't know which layer we get we've to loop through
- //the openlayers.layer.ids to find the correct one
- $.each(evt.data.map.layers(), function(){
- if(this.olLayer.id == data.layer.id) {layer=this;}
- });
- //(name, order, opacity, params, visibility or attribution)
- switch(data.property) {
+ _onLayerChange: function(evt, layer, property) {
+ switch(property) {
case 'opacity':
evt.data.widget._layerOpacity(evt.data.widget,layer);
break;
- case 'order':
+ case 'position':
evt.data.widget._layerPosition(evt.data.widget,layer);
break;
case 'visibility':