← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2363: (GIS) Unused parts of MapFish lib excluded + bug fixed.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 2363 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: trunk
timestamp: Thu 2010-10-14 00:00:52 +0200
message:
  (GIS) Unused parts of MapFish lib excluded + bug fixed.
modified:
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/MapFish.js
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/core/GeoStat.js
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/MapFish.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/MapFish.js	2010-06-08 22:29:29 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/MapFish.js	2010-10-13 15:18:12 +0000
@@ -88,50 +88,51 @@
      * 
      * When we *are* part of a SFL build we do not dynamically include the 
      * MapFish library code as it will be appended at the end of this file.
-      */
+     */
+      
     if(!singleFile) {
         var jsfiles = new Array(
             "lang/en.js",
             "core/Color.js",
             "core/GeoStat.js",
             "core/GeoStat/Choropleth.js",
-            "core/GeoStat/ProportionalSymbol.js",
+            //"core/GeoStat/ProportionalSymbol.js",
             "core/GeoStat/Symbol.js",
-            "core/Routing.js",
+            //"core/Routing.js",
             "core/Util.js",
-            "core/Searcher.js",
-            "core/Searcher/Map.js",
-            "core/Searcher/Form.js",
-            "core/PrintProtocol.js",
-            "core/Offline.js",
-            "core/Protocol.js",
-            "core/Protocol/MapFish.js",
-            "core/Protocol/MergeFilterDecorator.js",
-            "core/Protocol/TriggerEventDecorator.js",
-            "core/Strategy.js",
-            "core/Strategy/ProtocolListener.js",
-            "widgets/MapComponent.js",
-            "widgets/Shortcuts.js",
-            "widgets/data/FeatureReader.js",
-            "widgets/data/FeatureStoreMediator.js",
-            "widgets/data/SearchStoreMediator.js",
-            "widgets/data/LayerStoreMediator.js",
-            "widgets/data/GridRowFeatureMediator.js",
+            //"core/Searcher.js",
+            //"core/Searcher/Map.js",
+            //"core/Searcher/Form.js",
+            //"core/PrintProtocol.js",
+            //"core/Offline.js",
+            //"core/Protocol.js",
+            //"core/Protocol/MapFish.js",
+            //"core/Protocol/MergeFilterDecorator.js",
+            //"core/Protocol/TriggerEventDecorator.js",
+            //"core/Strategy.js",
+            //"core/Strategy/ProtocolListener.js",
+            //"widgets/MapComponent.js",
+            //"widgets/Shortcuts.js",
+            //"widgets/data/FeatureReader.js",
+            //"widgets/data/FeatureStoreMediator.js",
+            //"widgets/data/SearchStoreMediator.js",
+            //"widgets/data/LayerStoreMediator.js",
+            //"widgets/data/GridRowFeatureMediator.js",
             "widgets/geostat/Choropleth.js",
             "widgets/geostat/Mapping.js",
-            "widgets/geostat/ProportionalSymbol.js",
-            "widgets/geostat/Symbol.js",
-            "widgets/tree/LayerTree.js",
-            "widgets/tree/LayerTreeExtra.js",
-            "widgets/toolbar/Toolbar.js",
-            "widgets/toolbar/CheckItem.js",
-            "widgets/toolbar/MenuItem.js",
-            "widgets/editing/FeatureList.js",
-            "widgets/print/Base.js",
-            "widgets/print/BaseWidget.js",
-            "widgets/print/SimpleForm.js",
-            "widgets/print/MultiPage.js",
-            "widgets/print/PrintAction.js"
+            //"widgets/geostat/ProportionalSymbol.js",
+            "widgets/geostat/Symbol.js"
+            //"widgets/tree/LayerTree.js",
+            //"widgets/tree/LayerTreeExtra.js",
+            //"widgets/toolbar/Toolbar.js",
+            //"widgets/toolbar/CheckItem.js",
+            //"widgets/toolbar/MenuItem.js",
+            //"widgets/editing/FeatureList.js",
+            //"widgets/print/Base.js",
+            //"widgets/print/BaseWidget.js",
+            //"widgets/print/SimpleForm.js",
+            //"widgets/print/MultiPage.js",
+            //"widgets/print/PrintAction.js"
         ); // etc.
 
         var allScriptTags = "";

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/core/GeoStat.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/core/GeoStat.js	2010-10-11 17:05:42 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/core/GeoStat.js	2010-10-13 21:44:10 +0000
@@ -385,7 +385,7 @@
             nbBins = this.sturgesRule();
         }
 
-        switch (method) {
+        switch (parseFloat(method)) {
         case mapfish.GeoStat.Distribution.CLASSIFY_WITH_BOUNDS :
             classification = this.classifyWithBounds(bounds);
             break;

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js	2010-10-12 15:21:18 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js	2010-10-13 21:58:40 +0000
@@ -76,7 +76,8 @@
     
     selectFeatures: false,
     
-    initComponent: function() {                            
+    initComponent: function() {
+    
         this.legend = {
             type: GLOBALS.config.map_legend_type_automatic,
             method: GLOBALS.config.classify_by_equal_intervals,
@@ -93,9 +94,11 @@
         
         if (PARAMETER) {
             this.mapView = PARAMETER.mapView;
-            this.legend.type = this.mapView.mapLegendType;
-            this.legend.method = this.mapView.method || this.legend.method;
-            this.legend.classes = this.mapView.classes || this.legend.classes;
+            this.legend = {
+                type: this.mapView.mapLegendType,
+                method: this.mapView.method || this.legend.method,
+                classes: this.mapView.classes || this.legend.classes
+            };
             
             PARAMETER = false;        
             MAP.setCenter(new OpenLayers.LonLat(this.mapView.longitude, this.mapView.latitude), this.mapView.zoom);