← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11979: (DV, GIS) Plugin updates. Work in progress.

 

------------------------------------------------------------
revno: 11979
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-09-09 12:39:16 +0300
message:
  (DV, GIS) Plugin updates. Work in progress.
modified:
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/plugin.html
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/core.js
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/plugin.js
  dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/plugin.html


--
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/app/plugin.html'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/plugin.html	2013-01-17 13:09:10 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/plugin.html	2013-09-09 09:39:16 +0000
@@ -3,9 +3,7 @@
 
 <head>
     <title>DHIS2 GIS Plugin</title>
-
 	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-
 	<link rel="stylesheet" type="text/css" href="../../dhis-web-commons/javascripts/ext/resources/css/ext-all-gray.css"/>
 	<link rel="stylesheet" type="text/css" href="styles/style.css" />
 </head>
@@ -22,25 +20,20 @@
 		<div id="map2" style="width:700px; height:400px"></div>
 	</p>
 
-	<script type="text/javascript">
-		var GIS = {};
-		window.google = null;
-	</script>
-
     <script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=false";></script>
 
     <script type="text/javascript" src="../../dhis-web-commons/javascripts/ext/ext-all.js"></script>
-    <script type="text/javascript" src="scripts/ext-ux/ext-ux-custom.js"></script>
-
     <script type="text/javascript" src="scripts/openlayers/OpenLayers.js"></script>
-    <script type="text/javascript" src="scripts/openlayers-ux/newSelectFeature.js"></script>
-    <script type="text/javascript" src="scripts/openlayers-ux/Circle.js"></script>
-
-    <script type="text/javascript" src="scripts/geoext/script/custom.js"></script>
+    <script type="text/javascript" src="scripts/custom.js"></script>
+    
+    <script type="text/javascript" src="scripts/core.js"></script>
 
     <script type="text/javascript" src="scripts/mapfish/MapFish.js"></script>
+    <script type="text/javascript" src="scripts/mapfish/core/Color.js"></script>
+    <script type="text/javascript" src="scripts/mapfish/core/Util.js"></script>
+    <script type="text/javascript" src="scripts/mapfish/core/GeoStat.js"></script>
+    <script type="text/javascript" src="scripts/mapfish/core/GeoStat/all.js"></script>
 
-    <script type="text/javascript" src="scripts/core.js"></script>
     <script type="text/javascript" src="scripts/plugin.js"></script>
 
 	<script type="text/javascript">
@@ -50,13 +43,13 @@
 			GIS.getMap({
 				url: url,
 				el: "map1",
-				id: "mBY3WW5q7td"
+				id: "bhmHJ4ZCdCd"
 			});
 
 			GIS.getMap({
 				url: url,
 				el: "map2",
-				id: "bhmHJ4ZCdCd"
+				id: "eDlFx0jTtV9"
 			});
 
 		});

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/core.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/core.js	2013-08-20 12:59:06 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/core.js	2013-09-09 09:39:16 +0000
@@ -1103,6 +1103,7 @@
 		};
 
 		loadOrganisationUnits = function(view) {
+console.log(view);			
 			Ext.data.JsonP.request({
 				url: gis.init.contextPath + gis.conf.url.path_gis + 'getGeoJson.action',
 				params: {

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/plugin.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/plugin.js	2013-08-20 12:59:06 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/plugin.js	2013-09-09 09:39:16 +0000
@@ -33,7 +33,7 @@
 			afterRender,
 			getViews,
 			createViewport,
-			gis,
+			//gis,
 			initialize;
 
 		validateConfig = function() {
@@ -254,40 +254,37 @@
 				return;
 			}
 
-			gis = GIS.core.getInstance({
-				baseUrl: config.url,
-				el: config.el
-			});
-
 			Ext.data.JsonP.request({
-				url: gis.init.contextPath + gis.conf.url.path_gis + 'initialize.action',
+				url: '../initialize.action',
 				success: function(r) {
-					gis.init = r;
+					gis = GIS.core.getInstance(r);
+					
+					gis.el = config.el;
+
+					GIS.core.createSelectHandlers(gis, gis.layer.boundary);
+					GIS.core.createSelectHandlers(gis, gis.layer.thematic1);
+					GIS.core.createSelectHandlers(gis, gis.layer.thematic2);
+					GIS.core.createSelectHandlers(gis, gis.layer.thematic3);
+					GIS.core.createSelectHandlers(gis, gis.layer.thematic4);
+					GIS.core.createSelectHandlers(gis, gis.layer.facility);
+
+					gis.map = {
+						id: config.id,
+						longitude: config.longitude,
+						latitude: config.latitude,
+						zoom: config.zoom,
+						mapViews: getViews()
+					};
+
+					gis.viewport = createViewport();
+
+					gis.olmap.mask = Ext.create('Ext.LoadMask', gis.viewport.centerRegion.getEl(), {
+						msg: 'Loading'
+					});
+
+					GIS.core.MapLoader(gis).load();
 				}
 			});
-
-			GIS.core.createSelectHandlers(gis, gis.layer.boundary);
-			GIS.core.createSelectHandlers(gis, gis.layer.thematic1);
-			GIS.core.createSelectHandlers(gis, gis.layer.thematic2);
-			GIS.core.createSelectHandlers(gis, gis.layer.thematic3);
-			GIS.core.createSelectHandlers(gis, gis.layer.thematic4);
-			GIS.core.createSelectHandlers(gis, gis.layer.facility);
-
-			gis.map = {
-				id: config.id,
-				longitude: config.longitude,
-				latitude: config.latitude,
-				zoom: config.zoom,
-				mapViews: getViews()
-			};
-
-			gis.viewport = createViewport();
-
-			gis.olmap.mask = Ext.create('Ext.LoadMask', gis.viewport.centerRegion.getEl(), {
-				msg: 'Loading'
-			});
-
-			GIS.core.MapLoader(gis).load();
 		}();
 	};
 

=== modified file 'dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/plugin.html'
--- dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/plugin.html	2013-08-13 11:46:30 +0000
+++ dhis-2/dhis-web/dhis-web-visualizer/src/main/webapp/dhis-web-visualizer/app/plugin.html	2013-09-09 09:39:16 +0000
@@ -1,9 +1,9 @@
 <!DOCTYPE html>
 <html>
 <head>
-    <link rel="stylesheet" type="text/css" href="../../../dhis-web-commons/javascripts/ext/resources/css/ext-plugin-gray.css" />
+    <link rel="stylesheet" type="text/css" href="../../dhis-web-commons/javascripts/ext/resources/css/ext-plugin-gray.css" />
 
-    <script src="../../../dhis-web-commons/javascripts/ext/ext-all.js"></script>
+    <script src="../../dhis-web-commons/javascripts/ext/ext-all.js"></script>
 	<script src="scripts/core.js"></script>
 	<script src="scripts/plugin.js"></script>