[fusion-commits] r1933 - in trunk/layers: Generic MapGuide MapServer
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Wed Oct 7 11:28:53 EDT 2009
Author: pdeschamps
Date: 2009-10-07 11:28:51 -0400 (Wed, 07 Oct 2009)
New Revision: 1933
Modified:
trunk/layers/Generic/Generic.js
trunk/layers/MapGuide/MapGuide.js
trunk/layers/MapServer/MapServer.js
Log:
Adding the functionality to allow raster icons to be displayed in the
legend widget
Modified: trunk/layers/Generic/Generic.js
===================================================================
--- trunk/layers/Generic/Generic.js 2009-10-06 21:50:23 UTC (rev 1932)
+++ trunk/layers/Generic/Generic.js 2009-10-07 15:28:51 UTC (rev 1933)
@@ -223,9 +223,9 @@
this.drawMap();
},
- getLegendImageURL: function(fScale, layer, style) {
- var url = null; //TODO: provide a generic icon url
- return url;
+ getLegendImageURL: function(fScale, layer, style,defaultIcon) {
+ //var url = null; //TODO: provide a generic icon url
+ return defaultIcon;
}
});
Modified: trunk/layers/MapGuide/MapGuide.js
===================================================================
--- trunk/layers/MapGuide/MapGuide.js 2009-10-06 21:50:23 UTC (rev 1932)
+++ trunk/layers/MapGuide/MapGuide.js 2009-10-07 15:28:51 UTC (rev 1933)
@@ -1156,18 +1156,25 @@
this.mapWidget.triggerEvent(Fusion.Event.MAP_MAPTIP_REQ_FINISHED, this.oMaptip);
},
- getLegendImageURL: function(fScale, layer, style) {
- var url = Fusion.getConfigurationItem('mapguide', 'mapAgentUrl');
- url += "?OPERATION=GETLEGENDIMAGE&SESSION=" + layer.oMap.getSessionID();
- url += "&VERSION=1.0.0&SCALE=" + fScale;
- url += "&LAYERDEFINITION=" + encodeURIComponent(layer.resourceId);
- url += "&THEMECATEGORY=" + style.categoryIndex;
- url += "&TYPE=" + style.geometryType;
- url += "&CLIENTAGENT=" + encodeURIComponent(this.clientAgent);
- if (layer.noCache) {
- url += "&TS=" + (new Date()).getTime();
- }
- return url;
+ getLegendImageURL: function(fScale, layer, style,defaultIcon) {
+ if(this.layerTypes[0] == 4){
+ return defaultIcon;
+ }
+ else
+ {
+ var url = Fusion.getConfigurationItem('mapguide', 'mapAgentUrl');
+ url += "?OPERATION=GETLEGENDIMAGE&SESSION=" + layer.oMap.getSessionID();
+ url += "&VERSION=1.0.0&SCALE=" + fScale;
+ url += "&LAYERDEFINITION=" + encodeURIComponent(layer.resourceId);
+ url += "&THEMECATEGORY=" + style.categoryIndex;
+ url += "&TYPE=" + style.geometryType;
+ url += "&CLIENTAGENT=" + encodeURIComponent(this.clientAgent);
+ if (layer.noCache) {
+ url += "&TS=" + (new Date()).getTime();
+ }
+ return url;
+ }
+
},
Modified: trunk/layers/MapServer/MapServer.js
===================================================================
--- trunk/layers/MapServer/MapServer.js 2009-10-06 21:50:23 UTC (rev 1932)
+++ trunk/layers/MapServer/MapServer.js 2009-10-07 15:28:51 UTC (rev 1933)
@@ -797,7 +797,7 @@
}
},
- getLegendImageURL: function(fScale, layer, style) {
+ getLegendImageURL: function(fScale, layer, style,defaultIcon) {
var sl = Fusion.getScriptLanguage();
var url = Fusion.getFusionURL() + '/layers/' + this.arch + '/' + sl + '/LegendIcon.' + sl;
var sessionid = this.getSessionID();
More information about the fusion-commits
mailing list