[fusion-commits] r1348 - in sandbox/olcore: MapGuide MapServer
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Thu Mar 27 16:15:44 EDT 2008
Author: madair
Date: 2008-03-27 16:15:44 -0400 (Thu, 27 Mar 2008)
New Revision: 1348
Modified:
sandbox/olcore/MapGuide/MapGuide.js
sandbox/olcore/MapServer/MapServer.js
Log:
re #5: Map object files use OpenLayers.Class for inheritance
Modified: sandbox/olcore/MapGuide/MapGuide.js
===================================================================
--- sandbox/olcore/MapGuide/MapGuide.js 2008-03-27 19:52:31 UTC (rev 1347)
+++ sandbox/olcore/MapGuide/MapGuide.js 2008-03-27 20:15:44 UTC (rev 1348)
@@ -1000,12 +1000,11 @@
* Implements the map layer groups for MapGuide services
*/
-Fusion.Maps.MapGuide.Group = Class.create();
-Fusion.Maps.MapGuide.Group.prototype = {
+Fusion.Maps.MapGuide.Group = OpenLayers.Class(Fusion.Widget.Map.Group, {
oMap: null,
initialize: function(o, oMap) {
this.uniqueId = o.uniqueId;
- Object.inheritFrom(this, Fusion.Widget.Map.Group.prototype, [o.groupName]);
+ Fusion.Widget.Map.Group.prototype.initialize.apply(this, [o.groupName]);
this.oMap = oMap;
this.groupName = o.groupName;
this.legendLabel = o.legendLabel;
@@ -1042,7 +1041,7 @@
isVisible: function() {
return this.visible;
}
-};
+});
/***************************************************************************
* Class: Fusion.Maps.MapGuide
@@ -1050,15 +1049,14 @@
* Implements individual map legend layers for MapGuide services
*/
-Fusion.Maps.MapGuide.Layer = Class.create();
-Fusion.Maps.MapGuide.Layer.prototype = {
+Fusion.Maps.MapGuide.Layer = OpenLayers.Class(Fusion.Widget.Map.Layer, {
scaleRanges: null,
oMap: null,
initialize: function(o, oMap) {
this.uniqueId = o.uniqueId;
- Object.inheritFrom(this, Fusion.Widget.Map.Layer.prototype, [o.layerName]);
+ Fusion.Widget.Map.Layer.prototype.initialize.apply(this, [o.layerName]);
this.oMap = oMap;
this.layerName = o.layerName;
this.uniqueId = o.uniqueId;
@@ -1137,7 +1135,7 @@
isVisible: function() {
return this.visible;
}
-};
+});
/***************************************************************************
* Class: Fusion.Maps.MapGuide
@@ -1145,8 +1143,7 @@
* Implements a scale range object for MapGuide services
*/
-Fusion.Maps.MapGuide.ScaleRange = Class.create();
-Fusion.Maps.MapGuide.ScaleRange.prototype = {
+Fusion.Maps.MapGuide.ScaleRange = OpenLayers.Class({
styles: null,
initialize: function(o, layerType) {
this.minScale = o.minScale;
@@ -1169,7 +1166,7 @@
contains: function(fScale) {
return fScale >= this.minScale && fScale <= this.maxScale;
}
-};
+});
/***************************************************************************
* Class: Fusion.Maps.MapGuide
@@ -1177,8 +1174,7 @@
* Implements the legend style items to get a legend icon from the server
*/
-Fusion.Maps.MapGuide.StyleItem = Class.create();
-Fusion.Maps.MapGuide.StyleItem.prototype = {
+Fusion.Maps.MapGuide.StyleItem = OpenLayers.Class({
initialize: function(o, staticIcon) {
this.legendLabel = o.legendLabel;
this.filter = o.filter;
@@ -1196,4 +1192,4 @@
var url = Fusion.getConfigurationItem('mapguide', 'mapAgentUrl');
return url + "OPERATION=GETLEGENDIMAGE&SESSION=" + layer.oMap.getSessionID() + "&VERSION=1.0.0&SCALE=" + fScale + "&LAYERDEFINITION=" + encodeURIComponent(layer.resourceId) + "&THEMECATEGORY=" + this.categoryIndex + "&TYPE=" + this.geometryType;
}
-};
+});
Modified: sandbox/olcore/MapServer/MapServer.js
===================================================================
--- sandbox/olcore/MapServer/MapServer.js 2008-03-27 19:52:31 UTC (rev 1347)
+++ sandbox/olcore/MapServer/MapServer.js 2008-03-27 20:15:44 UTC (rev 1348)
@@ -30,8 +30,7 @@
*/
Fusion.Event.MAP_LAYER_ORDER_CHANGED = Fusion.Event.lastEventId++;
-Fusion.Maps.MapServer = Class.create();
-Fusion.Maps.MapServer.prototype = {
+Fusion.Maps.MapServer = OpenLayers.Class(Fusion.Lib.EventMgr, {
arch: 'MapServer',
session: [null],
aShowLayers: null,
@@ -730,7 +729,7 @@
}
}
-};
+});
/******************************************************************************
@@ -739,12 +738,11 @@
* Implements the map layer groups for MapServer CGI services
*/
-Fusion.Maps.MapServer.Group = Class.create();
-Fusion.Maps.MapServer.Group.prototype = {
+Fusion.Maps.MapServer.Group = OpenLayers.Class(Fusion.Widget.Map.Group, {
oMap: null,
initialize: function(o, oMap) {
this.uniqueId = o.uniqueId;
- Object.inheritFrom(this, Fusion.Widget.Map.Group.prototype, [this.uniqueId]);
+ Fusion.Widget.Map.Group.prototype.initialize.apply(this, [o.groupName]);
this.oMap = oMap;
this.groupName = o.groupName;
this.legendLabel = o.legendLabel;
@@ -776,7 +774,7 @@
return this.visible && bParentVisible;
}
-};
+});
var MSLAYER_POINT_TYPE = 0;
var MSLAYER_LINE_TYPE = 1;
@@ -790,8 +788,7 @@
* Implements individual map legend layers for MapServer services
*/
-Fusion.Maps.MapServer.Layer = Class.create();
-Fusion.Maps.MapServer.Layer.prototype = {
+Fusion.Maps.MapServer.Layer = OpenLayers.Class(Fusion.Widget.Map.Group, {
scaleRanges: null,
@@ -799,7 +796,7 @@
initialize: function(o, oMap) {
this.uniqueId = o.uniqueId;
- Object.inheritFrom(this, Fusion.Widget.Map.Layer.prototype, [this.uniqueId]);
+ Fusion.Widget.Map.Layer.prototype.initialize.apply(this, [this.uniqueId]);
this.oMap = oMap;
this.layerName = o.layerName;
this.uniqueId = o.uniqueId;
@@ -872,7 +869,7 @@
return '';
}
}
-};
+});
/******************************************************************************
* Class: Fusion.Maps.MapServer.ScaleRange
@@ -880,8 +877,7 @@
* Implements a scale range object for MapServer services
*/
-Fusion.Maps.MapServer.ScaleRange = Class.create();
-Fusion.Maps.MapServer.ScaleRange.prototype = {
+Fusion.Maps.MapServer.ScaleRange = OpenLayers.Class({
styles: null,
initialize: function(o, bRaster) {
this.minScale = o.minScale;
@@ -915,7 +911,7 @@
contains: function(fScale) {
return fScale >= this.minScale && fScale <= this.maxScale;
}
-};
+});
/******************************************************************************
* Class: Fusion.Maps.MapServer.StyleItem
@@ -923,8 +919,7 @@
* Implements the legend style items to get a legend icon from the server
*/
-Fusion.Maps.MapServer.StyleItem = Class.create();
-Fusion.Maps.MapServer.StyleItem.prototype = {
+Fusion.Maps.MapServer.StyleItem = OpenLayers.Class({
initialize: function(o, staticIcon) {
this.legendLabel = o.legendLabel;
this.filter = o.filter;
@@ -938,4 +933,4 @@
var params = 'mapname='+layer.oMap._sMapname+"&session="+sessionid + '&layername='+layer.resourceId + '&classindex='+this.index;
return url + '?'+params;
}
-};
+});
More information about the fusion-commits
mailing list