dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #17031
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6646: (GIS) Geojson/data requests separated to allow for data caching.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 6646 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2012-04-19 18:32:20 +0200
message:
(GIS) Geojson/data requests separated to allow for data caching.
modified:
dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/InitializeAction.java
dhis-2/dhis-web/dhis-web-mapping/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/geojsonmin.vm
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/Centroid.js
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/Point.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/java/org/hisp/dhis/mapping/action/InitializeAction.java'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/InitializeAction.java 2012-03-26 13:00:42 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/java/org/hisp/dhis/mapping/action/InitializeAction.java 2012-04-19 16:30:39 +0000
@@ -27,9 +27,6 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-import static org.hisp.dhis.mapping.MappingService.KEY_MAP_DATE_TYPE;
-import static org.hisp.dhis.mapping.MappingService.MAP_DATE_TYPE_FIXED;
-
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -44,7 +41,6 @@
import org.hisp.dhis.organisationunit.OrganisationUnit;
import org.hisp.dhis.organisationunit.OrganisationUnitService;
import org.hisp.dhis.period.PeriodType;
-import org.hisp.dhis.user.UserSettingService;
import com.opensymphony.xwork2.Action;
@@ -66,13 +62,6 @@
this.mappingService = mappingService;
}
- private UserSettingService userSettingService;
-
- public void setUserSettingService( UserSettingService userSettingService )
- {
- this.userSettingService = userSettingService;
- }
-
private ConfigurationService configurationService;
public void setConfigurationService( ConfigurationService configurationService )
=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/resources/META-INF/dhis/beans.xml 2012-03-05 16:37:17 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/resources/META-INF/dhis/beans.xml 2012-04-19 16:30:39 +0000
@@ -15,7 +15,6 @@
class="org.hisp.dhis.mapping.action.InitializeAction"
scope="prototype">
<property name="mappingService" ref="org.hisp.dhis.mapping.MappingService" />
- <property name="userSettingService" ref="org.hisp.dhis.user.UserSettingService" />
<property name="configurationService" ref="org.hisp.dhis.configuration.ConfigurationService" />
<property name="organisationUnitService" ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
</bean>
=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/geojsonmin.vm'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/geojsonmin.vm 2012-02-08 15:15:18 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/geojsonmin.vm 2012-04-19 16:30:39 +0000
@@ -1,5 +1,1 @@
-#set($size=$object.size())[
-
-#foreach($unit in $object)
-{
-"t":#if(${unit.featureType}=="Point")"2"#else"1"#end,"c":$!encoder.jsonEncode($!{unit.validCoordinates}),"i":"$!{unit.id}","n":"$!encoder.jsonEncode(${unit.name})"}#if($velocityCount<$size),#end#end]
\ No newline at end of file
+#set($size=$object.size())[#foreach($unit in $object){"t":#if(${unit.featureType}=="Point")"2"#else"1"#end,"c":$!encoder.jsonEncode($!{unit.validCoordinates}),"i":"$!{unit.id}","n":"$!encoder.jsonEncode(${unit.name})","h":$!{unit.hasChildrenWithCoordinates()}}#if($velocityCount<$size),#end#end]
\ No newline at end of file
=== 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 2012-01-11 14:48:47 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/core/GeoStat.js 2012-04-19 16:30:39 +0000
@@ -100,7 +100,6 @@
this.layer.features = G.util.getTransformedFeatureArray(this.layer.features);
G.vars.activeWidget.featureStorage = this.layer.features.slice(0);
this.requestSuccess(request);
-
G.vars.activeWidget.classify(false, false, true);
},
=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Centroid.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Centroid.js 2012-03-26 15:08:13 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Centroid.js 2012-04-19 16:30:39 +0000
@@ -1024,13 +1024,11 @@
G.vars.mask.msg = G.i18n.loading;
G.vars.mask.show();
G.vars.activeWidget = this;
- this.updateValues = false;
+ this.updateValues = true;
- var url = G.conf.path_mapping + 'getGeoJsonWithValues.action?' +
- 'periodId=' + this.cmp.period.getValue() +
- '&parentId=' + this.organisationUnitSelection.parent.id +
- '&level=' + this.organisationUnitSelection.level.level;
- url += this.valueType.isIndicator() ? '&indicatorId=' + this.cmp.indicator.getValue() : '&dataElementId=' + this.cmp.dataElement.getValue();
+ var url = G.conf.path_mapping + 'getGeoJson.action?' +
+ 'parentId=' + this.organisationUnitSelection.parent.id +
+ '&level=' + this.organisationUnitSelection.level.level;
this.setUrl(url);
},
=== 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 2012-03-29 15:24:07 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js 2012-04-19 16:30:39 +0000
@@ -700,8 +700,7 @@
scope: this,
fn: function(cb) {
if (cb.getValue() == G.conf.map_legendset_type_predefined && cb.getValue() != this.legend.value) {
- this.legend.value = G.conf.map_legendset_type_predefined;
-
+ this.legend.value = G.conf.map_legendset_type_predefined;
this.prepareMapViewLegend();
if (this.cmp.mapLegendSet.getValue()) {
@@ -1699,13 +1698,11 @@
G.vars.mask.msg = G.i18n.loading;
G.vars.mask.show();
G.vars.activeWidget = this;
- this.updateValues = false;
+ this.updateValues = true;
- var url = G.conf.path_mapping + 'getGeoJsonWithValues.action?' +
- 'periodId=' + this.cmp.period.getValue() +
- '&parentId=' + this.organisationUnitSelection.parent.id +
- '&level=' + this.organisationUnitSelection.level.level;
- url += this.valueType.isIndicator() ? '&indicatorId=' + this.cmp.indicator.getValue() : '&dataElementId=' + this.cmp.dataElement.getValue();
+ var url = G.conf.path_mapping + 'getGeoJson.action?' +
+ 'parentId=' + this.organisationUnitSelection.parent.id +
+ '&level=' + this.organisationUnitSelection.level.level;
this.setUrl(url);
},
=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Point.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Point.js 2012-03-29 15:24:07 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Point.js 2012-04-19 16:30:39 +0000
@@ -1655,7 +1655,7 @@
},
clearForm: function(clearLayer) {
- this.cmp.mapview.clearValue();
+ this.cmp.mapview.clearValue();
this.cmp.mapValueType.setValue(G.conf.map_value_type_indicator);
this.valueType.setIndicator();
@@ -1698,13 +1698,11 @@
G.vars.mask.msg = G.i18n.loading;
G.vars.mask.show();
G.vars.activeWidget = this;
- this.updateValues = false;
+ this.updateValues = true;
- var url = G.conf.path_mapping + 'getGeoJsonWithValues.action?' +
- 'periodId=' + this.cmp.period.getValue() +
- '&parentId=' + this.organisationUnitSelection.parent.id +
- '&level=' + this.organisationUnitSelection.level.level;
- url += this.valueType.isIndicator() ? '&indicatorId=' + this.cmp.indicator.getValue() : '&dataElementId=' + this.cmp.dataElement.getValue();
+ var url = G.conf.path_mapping + 'getGeoJson.action?' +
+ 'parentId=' + this.organisationUnitSelection.parent.id +
+ '&level=' + this.organisationUnitSelection.level.level;
this.setUrl(url);
},
@@ -1789,7 +1787,7 @@
Ext.message.msg(false, G.i18n.no_values_found);
return;
}
-
+
this.button.menu.find('name','history')[0].addItem(this);
var options = {