[fusion-commits] r2966 - in branches/fusion-mg30: . layers/MapGuide lib widgets
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Thu Nov 24 03:36:06 PST 2016
Author: jng
Date: 2016-11-24 03:36:06 -0800 (Thu, 24 Nov 2016)
New Revision: 2966
Modified:
branches/fusion-mg30/
branches/fusion-mg30/layers/MapGuide/MapGuide.js
branches/fusion-mg30/lib/Map.js
branches/fusion-mg30/widgets/Legend.js
Log:
Merged revision(s) 2964 from trunk:
#654: Fusion update to handle the fixed CREATERUNTIMEMAP response (https://trac.osgeo.org/mapguide/changeset/9094)
........
Property changes on: branches/fusion-mg30
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/fusion-mg24:2560
/branches/fusion-mg26:2855,2869
/sandbox/adsk/2.6l:2911
/sandbox/adsk/3.1n:2925-2927
/sandbox/createruntimemap:2699-2708
/sandbox/jxlib-3.0:1957-2248
/sandbox/ol213:2801-2803
/sandbox/robust_error_handling:2818-2825
/sandbox/stamen:2873-2875
/sandbox/tiling:2845-2846
/trunk:2896-2899,2905-2908,2915,2920-2932,2936-2942,2946,2950,2956,2960
+ /branches/fusion-mg24:2560
/branches/fusion-mg26:2855,2869
/sandbox/adsk/2.6l:2911
/sandbox/adsk/3.1n:2925-2927
/sandbox/createruntimemap:2699-2708
/sandbox/jxlib-3.0:1957-2248
/sandbox/ol213:2801-2803
/sandbox/robust_error_handling:2818-2825
/sandbox/stamen:2873-2875
/sandbox/tiling:2845-2846
/trunk:2896-2899,2905-2908,2915,2920-2932,2936-2942,2946,2950,2956,2960,2964
Modified: branches/fusion-mg30/layers/MapGuide/MapGuide.js
===================================================================
--- branches/fusion-mg30/layers/MapGuide/MapGuide.js 2016-11-24 11:35:58 UTC (rev 2965)
+++ branches/fusion-mg30/layers/MapGuide/MapGuide.js 2016-11-24 11:36:06 UTC (rev 2966)
@@ -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: branches/fusion-mg30/lib/Map.js
===================================================================
--- branches/fusion-mg30/lib/Map.js 2016-11-24 11:35:58 UTC (rev 2965)
+++ branches/fusion-mg30/lib/Map.js 2016-11-24 11:36:06 UTC (rev 2966)
@@ -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: branches/fusion-mg30/widgets/Legend.js
===================================================================
--- branches/fusion-mg30/widgets/Legend.js 2016-11-24 11:35:58 UTC (rev 2965)
+++ branches/fusion-mg30/widgets/Legend.js 2016-11-24 11:36:06 UTC (rev 2966)
@@ -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