[fusion-commits] r1459 - in trunk: MapGuide MapGuide/php widgets
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Wed Aug 13 13:34:30 EDT 2008
Author: madair
Date: 2008-08-13 13:34:30 -0400 (Wed, 13 Aug 2008)
New Revision: 1459
Modified:
trunk/MapGuide/MapGuide.js
trunk/MapGuide/php/Buffer.php
trunk/widgets/Buffer.js
Log:
closes #104: add a noCache flag to layers to prevent caching of legend icons; remove debugging output from Buffer.php
Modified: trunk/MapGuide/MapGuide.js
===================================================================
--- trunk/MapGuide/MapGuide.js 2008-08-12 20:17:15 UTC (rev 1458)
+++ trunk/MapGuide/MapGuide.js 2008-08-13 17:34:30 UTC (rev 1459)
@@ -366,6 +366,7 @@
for (var j=0; j<this.oldLayers.length; ++j){
if (this.oldLayers[j].uniqueId == newLayer.uniqueId) {
newLayer.selectedFeatureCount = this.oldLayers[j].selectedFeatureCount;
+ newLayer.noCache = this.oldLayers[j].noCache;
break;
}
}
@@ -1203,6 +1204,15 @@
},
getLegendImageURL: function(fScale, layer) {
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 + "&CLIENTAGENT=" + encodeURIComponent(this.clientAgent);
+ url += "OPERATION=GETLEGENDIMAGE&SESSION=" + layer.oMap.getSessionID();
+ url += "&VERSION=1.0.0&SCALE=" + fScale;
+ url += "&LAYERDEFINITION=" + encodeURIComponent(layer.resourceId);
+ url += "&THEMECATEGORY=" + this.categoryIndex;
+ url += "&TYPE=" + this.geometryType;
+ url += "&CLIENTAGENT=" + encodeURIComponent(this.clientAgent);
+ if (layer.noCache) {
+ url += "&TS=" + (new Date()).getTime();
+ }
+ return url;
}
});
Modified: trunk/MapGuide/php/Buffer.php
===================================================================
--- trunk/MapGuide/php/Buffer.php 2008-08-12 20:17:15 UTC (rev 1458)
+++ trunk/MapGuide/php/Buffer.php 2008-08-13 17:34:30 UTC (rev 1459)
@@ -216,7 +216,7 @@
$wktReaderWriter = new MgWktReaderWriter();
$agfTextPoint = $wktReaderWriter->Write($oGeom);
- echo "<!-- wkt: ".$agfTextPoint." -->\n";
+ //echo "<!-- wkt: ".$agfTextPoint." -->\n";
if (!$merge) {
/* use measure to accomodate differences in SRS */
$oNewGeom = $oGeom->Buffer($dist, $measure);
Modified: trunk/widgets/Buffer.js
===================================================================
--- trunk/widgets/Buffer.js 2008-08-12 20:17:15 UTC (rev 1458)
+++ trunk/widgets/Buffer.js 2008-08-13 17:34:30 UTC (rev 1459)
@@ -169,12 +169,10 @@
},
execute: function() {
- var layer = '&layer=';
if (this.layerNameInput) {
- layer += this.getValue(this.layerNameInput);
- } else {
- layer += this.layerName;
+ this.layerName = this.getValue(this.layerNameInput);
}
+ var layer = '&layer=' + this.layerName;
var d;
if (this.bufferDistanceInput) {
@@ -222,6 +220,10 @@
bufferCreated: function() {
var aMaps = this.getMap().getAllMaps();
+ var layer = aMaps[0].getLayerByName(this.layerName);
+ if (layer) {
+ layer.noCache = true;
+ }
aMaps[0].reloadMap();
aMaps[0].drawMap();
}
More information about the fusion-commits
mailing list