[fusion-commits] r2964 - in trunk: layers/MapGuide lib widgets
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Thu Nov 24 03:24:56 PST 2016
Author: jng
Date: 2016-11-24 03:24:56 -0800 (Thu, 24 Nov 2016)
New Revision: 2964
Modified:
trunk/layers/MapGuide/MapGuide.js
trunk/lib/Map.js
trunk/widgets/Legend.js
Log:
#654: Fusion update to handle the fixed CREATERUNTIMEMAP response (https://trac.osgeo.org/mapguide/changeset/9094)
Modified: trunk/layers/MapGuide/MapGuide.js
===================================================================
--- trunk/layers/MapGuide/MapGuide.js 2016-10-06 18:31:46 UTC (rev 2963)
+++ trunk/layers/MapGuide/MapGuide.js 2016-11-24 11:24:56 UTC (rev 2964)
@@ -440,6 +440,16 @@
csr.styles.push(cr);
}
}
+ } else {
+ //A vector layer without a feature style is technically illegal. Therefore, this has
+ //to be a raster or drawing (both do not have feature styles)
+ var fsId = lyr.FeatureSource[0].ResourceId[0];
+ var DRAWING_SOURCE = "DrawingSource";
+ if (fsId.indexOf(DRAWING_SOURCE, fsId.length - DRAWING_SOURCE.length) !== -1) {
+ ltypes[Fusion.Constant.LAYER_DWF_TYPE] = Fusion.Constant.LAYER_DWF_TYPE;
+ } else {
+ ltypes[Fusion.Constant.LAYER_RASTER_TYPE] = Fusion.Constant.LAYER_RASTER_TYPE;
+ }
}
clsr.scaleRanges.push(csr);
}
Modified: trunk/lib/Map.js
===================================================================
--- trunk/lib/Map.js 2016-10-06 18:31:46 UTC (rev 2963)
+++ trunk/lib/Map.js 2016-11-24 11:24:56 UTC (rev 2964)
@@ -95,26 +95,27 @@
* Constant: Fusion.Event.MAP_BASE_LAYER_CHANGED
*/
Fusion.Event.MAP_BASE_LAYER_CHANGED = Fusion.Event.lastEventId++;
+
/**
* Constant: Fusion.Constant.LAYER_POINT_TYPE
*/
Fusion.Constant.LAYER_POINT_TYPE = 0;
/**
- * Constant: Fusion.Constant.LAYER_POINT_TYPE
+ * Constant: Fusion.Constant.LAYER_LINE_TYPE
*/
-Fusion.Constant.LAYER_POINT_TYPE = 1;
+Fusion.Constant.LAYER_LINE_TYPE = 1;
/**
- * Constant: Fusion.Constant.LAYER_POINT_TYPE
+ * Constant: Fusion.Constant.LAYER_POLYGON_TYPE
*/
-Fusion.Constant.LAYER_POINT_TYPE = 2;
+Fusion.Constant.LAYER_POLYGON_TYPE = 2;
/**
- * Constant: Fusion.Constant.LAYER_POINT_TYPE
+ * Constant: Fusion.Constant.LAYER_SOLID_TYPE
*/
-Fusion.Constant.LAYER_POINT_TYPE = 3;
+Fusion.Constant.LAYER_SOLID_TYPE = 3;
/**
- * Constant: Fusion.Constant.LAYER_POINT_TYPE
+ * Constant: Fusion.Constant.LAYER_RASTER_TYPE
*/
-Fusion.Constant.LAYER_POINT_TYPE = 4;
+Fusion.Constant.LAYER_RASTER_TYPE = 4;
/**
* Constant: Fusion.Constant.LAYER_DWF_TYPE
*/
Modified: trunk/widgets/Legend.js
===================================================================
--- trunk/widgets/Legend.js 2016-10-06 18:31:46 UTC (rev 2963)
+++ trunk/widgets/Legend.js 2016-11-24 11:24:56 UTC (rev 2964)
@@ -817,15 +817,12 @@
opt.selectable = false;
}
- var LAYER_RASTER = 4;
- var LAYER_DWF = 5;
-
if (!style) {
//This could be a DWF or Raster layer
if (layer.layerTypes.length == 1) {
- if (layer.layerTypes[0] == LAYER_RASTER) {
+ if (layer.layerTypes[0] == Fusion.Constant.LAYER_RASTER_TYPE) {
opt.image = this.imgLayerRasterIcon;
- } else if (layer.layerTypes[0] == LAYER_DWF) {
+ } else if (layer.layerTypes[0] == Fusion.Constant.LAYER_DWF_TYPE) {
opt.image = this.imgLayerDWFIcon;
} else {
opt.image = this.imgDisabledLayerIcon;
More information about the fusion-commits
mailing list