[fusion-commits] r1828 - in trunk: . layers/MapGuide
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Fri Apr 3 14:38:17 EDT 2009
Author: madair
Date: 2009-04-03 14:38:17 -0400 (Fri, 03 Apr 2009)
New Revision: 1828
Modified:
trunk/config_dist.json
trunk/layers/MapGuide/MapGuide.js
Log:
closes #242: set tile cache base URL in config.dist and get when creating the MG OL layer
Modified: trunk/config_dist.json
===================================================================
--- trunk/config_dist.json 2009-04-03 18:30:09 UTC (rev 1827)
+++ trunk/config_dist.json 2009-04-03 18:38:17 UTC (rev 1828)
@@ -21,6 +21,11 @@
"webTierUrl": "",
/* for MapGuide OS version > 2.1 and MGE2010 and higher set this to true*/
"useAsyncOverlay": true
+ /* The tileCacheUrl is the root url to a static mapguide tile cache.
+ A relative URL will be relative to your application.
+ The root url will be appended with the 'Sn'
+ directories for each zoom level. */
+ "tileCacheUrl": "http://localhost:8008/sheboygan"
},
/* The MapServer section is required if you are installing fusion
for MapServer. */
Modified: trunk/layers/MapGuide/MapGuide.js
===================================================================
--- trunk/layers/MapGuide/MapGuide.js 2009-04-03 18:30:09 UTC (rev 1827)
+++ trunk/layers/MapGuide/MapGuide.js 2009-04-03 18:38:17 UTC (rev 1828)
@@ -312,7 +312,7 @@
this.oLayerOL.destroy();
}
- this.oLayerOL = this.createOLLayer(this._sMapname, this.bIsBaseLayer, this.bSingleTile,2);
+ this.oLayerOL = this.createOLLayer(this._sMapname, this.bSingleTile,2);
this.oLayerOL.events.register("loadstart", this, this.loadStart);
this.oLayerOL.events.register("loadend", this, this.loadEnd);
this.oLayerOL.events.register("loadcancel", this, this.loadEnd);
@@ -531,7 +531,7 @@
*
* Returns an OpenLayers MapGuide layer object
*/
- createOLLayer: function(layerName, bIsBaseLayer, bSingleTile, behavior) {
+ createOLLayer: function(layerName, bSingleTile, behavior) {
/* prevent the useOverlay flag based on MapGuide config element */
this.useAsyncOverlay = Fusion.getConfigurationItem('mapguide', 'useAsyncOverlay');
if (!this.useAsyncOverlay) { //v2.0.1 or earlier
@@ -540,7 +540,6 @@
var layerOptions = {
units: this.units,
- isBaseLayer: bIsBaseLayer,
maxResolution: 'auto',
useOverlay: this.selectionAsOverlay,
useAsyncOverlay: this.useAsyncOverlay,
@@ -608,7 +607,12 @@
layerOptions.alpha = true;
}
- var url = Fusion.getConfigurationItem('mapguide', 'mapAgentUrl');
+ var url;
+ if ( !bSingleTile && layerOptions.useHttpTile) {
+ url = Fusion.getConfigurationItem('mapguide', 'tileCacheUrl');
+ } else {
+ url = Fusion.getConfigurationItem('mapguide', 'mapAgentUrl');
+ }
var oLayerOL = new OpenLayers.Layer.MapGuide( layerName, url, params, layerOptions );
return oLayerOL;
},
More information about the fusion-commits
mailing list