[fusion-commits] r2237 - in sandbox/jxlib-3.0/layers: . MapGuide
MapServer
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Tue Sep 28 10:21:57 EDT 2010
Author: pagameba
Date: 2010-09-28 14:21:57 +0000 (Tue, 28 Sep 2010)
New Revision: 2237
Modified:
sandbox/jxlib-3.0/layers/Layers.js
sandbox/jxlib-3.0/layers/MapGuide/MapGuide.js
sandbox/jxlib-3.0/layers/MapServer/MapServer.js
Log:
adding support for indicating editable layers and manage the edit state of layers. Actual editing would be provided by other widgets of course.
Modified: sandbox/jxlib-3.0/layers/Layers.js
===================================================================
--- sandbox/jxlib-3.0/layers/Layers.js 2010-09-27 19:57:42 UTC (rev 2236)
+++ sandbox/jxlib-3.0/layers/Layers.js 2010-09-28 14:21:57 UTC (rev 2237)
@@ -33,6 +33,8 @@
Fusion.Event.MAP_LAYER_ORDER_CHANGED = Fusion.Event.lastEventId++;
Fusion.Event.LAYER_LOADED = Fusion.Event.lastEventId++;
Fusion.Event.LAYER_LOADING = Fusion.Event.lastEventId++;
+Fusion.Event.LAYER_START_EDIT = Fusion.Event.lastEventId++;
+Fusion.Event.LAYER_STOP_EDIT = Fusion.Event.lastEventId++;
Fusion.Layers = OpenLayers.Class(Fusion.Lib.EventMgr, {
bSingleTile: null,
@@ -49,8 +51,10 @@
_sMapTitle: null,
_sMapname: null,
supports: {
- query: false
+ query: false,
+ edit: false
},
+ bIsEditing: false,
initialize: function(map, mapTag, isMapWidgetLayer) {
// console.log('Fusion.Layers.initialize');
@@ -299,7 +303,21 @@
return null;
},
- getMapTip: function(mapTipWidget) {}
+ getMapTip: function(mapTipWidget) {},
+
+ startEditing: function() {
+ if (!this.bIsEditing && this.supports.edit) {
+ this.bIsEditing = true;
+ this.triggerEvent(Fusion.Event.LAYER_START_EDIT, this);
+ }
+ },
+
+ stopEditing: function() {
+ if (this.bIsEditing && this.supports.edit) {
+ this.bIsEditing = false;
+ this.triggerEvent(Fusion.Event.LAYER_STOP_EDIT, this);
+ }
+ }
});
/***************************************************************************
Modified: sandbox/jxlib-3.0/layers/MapGuide/MapGuide.js
===================================================================
--- sandbox/jxlib-3.0/layers/MapGuide/MapGuide.js 2010-09-27 19:57:42 UTC (rev 2236)
+++ sandbox/jxlib-3.0/layers/MapGuide/MapGuide.js 2010-09-28 14:21:57 UTC (rev 2237)
@@ -45,7 +45,8 @@
useAsyncOverlay: false,
defaultFormat: 'PNG',
supports: {
- query: true
+ query: true,
+ edit: true
},
initialize: function(map, mapTag, isMapWidgetLayer) {
Modified: sandbox/jxlib-3.0/layers/MapServer/MapServer.js
===================================================================
--- sandbox/jxlib-3.0/layers/MapServer/MapServer.js 2010-09-27 19:57:42 UTC (rev 2236)
+++ sandbox/jxlib-3.0/layers/MapServer/MapServer.js 2010-09-28 14:21:57 UTC (rev 2237)
@@ -48,7 +48,8 @@
//the map file
sMapFile: null,
supports: {
- query: true
+ query: true,
+ edit: true
},
initialize: function(map, mapTag, isMapWidgetLayer) {
More information about the fusion-commits
mailing list