[fusion-commits] r1735 - trunk/layers/MapGuide

svn_fusion at osgeo.org svn_fusion at osgeo.org
Wed Jan 14 10:25:12 EST 2009


Author: madair
Date: 2009-01-14 10:25:12 -0500 (Wed, 14 Jan 2009)
New Revision: 1735

Modified:
   trunk/layers/MapGuide/MapGuide.js
Log:
re #183: add separate image format parameter to MapGuide map extension

Modified: trunk/layers/MapGuide/MapGuide.js
===================================================================
--- trunk/layers/MapGuide/MapGuide.js	2009-01-14 15:23:01 UTC (rev 1734)
+++ trunk/layers/MapGuide/MapGuide.js	2009-01-14 15:25:12 UTC (rev 1735)
@@ -42,6 +42,7 @@
     bSelectionOn: false,
     oSelection: null,
     selectionAsOverlay: true,
+    defaultFormat: 'PNG',
 
     initialize: function(map, mapTag, isMapWidgetLayer) {
         // console.log('MapGuide.initialize');
@@ -55,6 +56,7 @@
         this.registerEventID(Fusion.Event.MAP_SESSION_CREATED);
 
         this.mapInfo = mapTag.mapInfo;
+        this.imageFormat = mapTag.extension.ImageFormat ? mapTag.extension.ImageFormat[0] : this.defaultFormat;
         this.selectionType = mapTag.extension.SelectionType ? mapTag.extension.SelectionType[0] : 'INTERSECTS';
         this.selectionColor = mapTag.extension.SelectionColor ? mapTag.extension.SelectionColor[0] : '';
         this.selectionFormat = mapTag.extension.SelectionFormat ? mapTag.extension.SelectionFormat[0] : 'PNG';
@@ -563,6 +565,9 @@
         params = {        //single tile params
           session: this.getSessionID(),
           mapname: this._sMapname,
+          format: this.imageFormat,
+          behavior: behaviour,
+          version: "2.0.0",
           clientagent: this.clientAgent
         };
         params.showLayers = this.aShowLayers.length > 0 ? this.aShowLayers.toString() : null;
@@ -571,9 +576,7 @@
         params.hideGroups = this.aHideGroups.length > 0 ? this.aHideGroups.toString() : null;
         params.refreshLayers = this.aRefreshLayers.length > 0 ? this.aRefreshLayers.toString() : null;
 
-        if (behaviour != null) {
-          params.behavior = behaviour;
-          params.version = "2.0.0";
+        if (behaviour == 5) {
           params.selectioncolor = this.selectionColor;
           params.format = this.selectionFormat;
         }



More information about the fusion-commits mailing list