dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #06838
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1896: (GIS) Map rendering with mapsource = database improved.
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 1896 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: trunk
timestamp: Thu 2010-08-05 15:32:13 +0200
message:
(GIS) Map rendering with mapsource = database improved.
modified:
dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.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/Mapping.js
dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Symbol.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/mapping/script/index.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js 2010-08-03 17:21:49 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js 2010-08-05 12:55:57 +0000
@@ -1437,7 +1437,7 @@
var n = Ext.getCmp('maplayerpath_cb').getValue();
Ext.Ajax.request({
- url: path_mapping + 'getGeoJson' + type,
+ url: path_mapping + 'getGeoJsonFromFile' + type,
method: 'POST',
params: {name: n},
success: function(r) {
@@ -1908,7 +1908,7 @@
if (MAPSOURCE == map_source_type_geojson) {
Ext.Ajax.request({
- url: path_mapping + 'getGeoJson' + type,
+ url: path_mapping + 'getGeoJsonFromFile' + type,
method: 'POST',
params: {name: mlp},
success: function(r) {
@@ -2310,7 +2310,7 @@
Ext.message.msg(true, 'The overlay <span class="x-msg-hl">' + mln + '</span> '+i18n_was_registered);
Ext.getCmp('maplayer_cb').getStore().load();
- var mapurl = MAPSOURCE == map_source_type_geojson ? path_mapping + 'getGeoJson.action?name=' + mlmsf : path_geoserver + wfs + mlwmso + output;
+ var mapurl = MAPSOURCE == map_source_type_geojson ? path_mapping + 'getGeoJsonFromFile.action?name=' + mlmsf : path_geoserver + wfs + mlwmso + output;
MAP.addLayer(
new OpenLayers.Layer.Vector(mln, {
@@ -2890,7 +2890,7 @@
var mapLayers = Ext.util.JSON.decode(r.responseText).mapLayers;
for (var i = 0; i < mapLayers.length; i++) {
- var mapurl = MAPSOURCE == map_source_type_shapefile ? path_geoserver + wfs + mapLayers[i].mapSource + output : path_mapping + 'getGeoJson.action?name=' + mapLayers[i].mapSource;
+ var mapurl = MAPSOURCE == map_source_type_shapefile ? path_geoserver + wfs + mapLayers[i].mapSource + output : path_mapping + 'getGeoJsonFromFile.action?name=' + mapLayers[i].mapSource;
var fillColor = mapLayers[i].fillColor;
var fillOpacity = parseFloat(mapLayers[i].fillOpacity);
var strokeColor = mapLayers[i].strokeColor;
=== 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-08-03 22:04:02 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js 2010-08-05 12:55:57 +0000
@@ -1181,20 +1181,7 @@
loadById: function(id) {
if (id != choropleth.parentId || MAPVIEW) {
choropleth.parentId = id;
-
- Ext.Ajax.request({
- url: path_mapping + 'getOrganisationUnitChildren' + type,
- method: 'POST',
- params: {node:choropleth.parentId},
- success: function(r) {
- var childIsLeaf = Ext.util.JSON.decode(r.responseText)[0].leaf;
- var url = childIsLeaf ? path_mapping + 'getPointShapefile.action?id=' + id : path_mapping + 'getPolygonShapefile.action?id=' + id;
- choropleth.setUrl(url);
- },
- failure: function() {
- alert('Error: getOrganisationUnitChildren');
- }
- });
+ choropleth.setUrl(path_mapping + 'getGeoJson.action?parentId=' + choropleth.parentId);
}
},
@@ -1203,7 +1190,7 @@
choropleth.newUrl = url;
if (MAPSOURCE == map_source_type_geojson) {
- choropleth.setUrl(path_mapping + 'getGeoJson.action?name=' + url);
+ choropleth.setUrl(path_mapping + 'getGeoJsonFromFile.action?name=' + url);
}
else if (MAPSOURCE == map_source_type_shapefile) {
choropleth.setUrl(path_geoserver + wfs + url + output);
=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Mapping.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Mapping.js 2010-08-03 17:21:49 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Mapping.js 2010-08-05 12:55:57 +0000
@@ -461,7 +461,7 @@
mapping.newUrl = url;
if (MAPSOURCE == map_source_type_geojson) {
- mapping.setUrl(path_mapping + 'getGeoJson.action?name=' + url);
+ mapping.setUrl(path_mapping + 'getGeoJsonFromFile.action?name=' + url);
}
else if (MAPSOURCE == map_source_type_shapefile) {
mapping.setUrl(path_geoserver + wfs + url + output);
=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Symbol.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Symbol.js 2010-08-03 22:04:02 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Symbol.js 2010-08-05 12:55:57 +0000
@@ -1181,20 +1181,7 @@
loadById: function(id) {
if (id != proportionalSymbol.parentId || MAPVIEW) {
proportionalSymbol.parentId = id;
-
- Ext.Ajax.request({
- url: path_mapping + 'getOrganisationUnitChildren' + type,
- method: 'POST',
- params: {node:proportionalSymbol.parentId},
- success: function(r) {
- var childIsLeaf = Ext.util.JSON.decode(r.responseText)[0].leaf;
- var url = childIsLeaf ? path_mapping + 'getPointShapefile.action?id=' + id : path_mapping + 'getPolygonShapefile.action?id=' + id;
- proportionalSymbol.setUrl(url);
- },
- failure: function() {
- alert('Error: getOrganisationUnitChildren');
- }
- });
+ proportionalSymbol.setUrl(path_mapping + 'getGeoJson.action?parentId=' + proportionalSymbol.parentId);
}
},
@@ -1203,7 +1190,7 @@
proportionalSymbol.newUrl = url;
if (MAPSOURCE == map_source_type_geojson) {
- proportionalSymbol.setUrl(path_mapping + 'getGeoJson.action?name=' + url);
+ proportionalSymbol.setUrl(path_mapping + 'getGeoJsonFromFile.action?name=' + url);
}
else if (MAPSOURCE == map_source_type_shapefile) {
proportionalSymbol.setUrl(path_geoserver + wfs + url + output);