dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #01604
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 488: (GIS) GeoExt MapPanel taken into use. MapFish MapComponent replaced.
------------------------------------------------------------
revno: 488
committer: Jan Henrik Overland janhenrik.overland@xxxxxxxxx
branch nick: trunk
timestamp: Fri 2009-08-21 02:07:39 +0200
message:
(GIS) GeoExt MapPanel taken into use. MapFish MapComponent replaced.
modified:
gis/dhis-web-mapping/src/main/webapp/mapping/geostat/geostat.js
gis/dhis-web-mapping/src/main/webapp/mapping/geostat/index.html
gis/dhis-web-mapping/src/main/webapp/mfbase/ext/resources/css/examples.css
gis/dhis-web-mapping/src/main/webapp/mfbase/openlayers/lib/OpenLayers.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 'gis/dhis-web-mapping/src/main/webapp/mapping/geostat/geostat.js'
--- gis/dhis-web-mapping/src/main/webapp/mapping/geostat/geostat.js 2009-08-20 18:49:24 +0000
+++ gis/dhis-web-mapping/src/main/webapp/mapping/geostat/geostat.js 2009-08-21 00:07:39 +0000
@@ -272,18 +272,6 @@
})
});
- var static2Layer = new OpenLayers.Layer.Vector("static 2", {
- 'visibility': false,
- 'styleMap': new OpenLayers.StyleMap({
- 'default': new OpenLayers.Style(
- OpenLayers.Util.applyDefaults(
- {'fillOpacity': 1, 'strokeWidth': 2, 'strokeColor': '#000000', 'strokeOpacity': 1 },
- OpenLayers.Feature.Vector.style['default']
- )
- )
- })
- });
-
map.addLayers([ vmap0, local_wfs, choroplethLayer, static1Layer ]);
var selectFeatureChoropleth = new OpenLayers.Control.newSelectFeature(
@@ -1474,11 +1462,11 @@
var nml_b = Ext.getCmp('newmaplayer_b');
var dml_b = Ext.getCmp('deletemaplayer_b');
- if (tab.id == 'view0') {
+ if (tab.id == 'maplayer0') {
nml_b.setVisible(true);
dml_b.setVisible(false);
}
- else if (tab.id == 'view1') {
+ else if (tab.id == 'maplayer1') {
nml_b.setVisible(false);
dml_b.setVisible(true);
}
@@ -1488,7 +1476,7 @@
[
{
title:'New map layer',
- id: 'view0',
+ id: 'maplayer0',
items:
[
newMapLayerPanel
@@ -1496,7 +1484,7 @@
},
{
title:'Delete map layer',
- id: 'view1',
+ id: 'maplayer1',
items:
[
deleteMapLayerPanel
@@ -1699,31 +1687,21 @@
}
});
- static2 = new mapfish.widgets.geostat.Static({
- id: 'static2',
- map: map,
- layer: static2Layer,
- title: 'static 2',
- nameAttribute: 'NAME',
- indicators: [['value', 'Indicator']],
- url: INIT_URL,
- featureSelection: false,
- loadMask: {msg: 'Loading shapefile...', msgCls: 'x-mask-loading'},
- legendDiv: 'choroplethLegend',
- defaults: {width: 130},
- listeners: {
- expand: {
- fn: function() {}
- }
- }
- });
-
static1.hide();
- static2.hide();
mapping.hide();
shapefilePanel.hide();
mapLayerPanel.hide();
+ var mapPanel = new GeoExt.MapPanel({
+ region: 'center',
+ id: 'center',
+ height: 1000,
+ width: 1000,
+ map: map,
+ title: '',
+ zoom: 3
+ });
+
viewport = new Ext.Viewport({
id: 'viewport',
layout: 'border',
@@ -1738,24 +1716,24 @@
el: 'north',
height: north_height
}),
- {
- region: 'south',
- contentEl: 'south',
- id: 'south-panel',
- split: true,
- height: 70,
- minSize: 50,
- maxSize: 200,
- collapsible: true,
- collapsed: true,
- title: 'Status',
- margins: '0 5 5 5',
- bodyStyle: 'padding:5px; font-family:tahoma; font-size:12px'
- },
+ //{
+ // region: 'south',
+ // contentEl: 'south',
+ // id: 'south-panel',
+ // split: true,
+ // height: 70,
+ // minSize: 50,
+ // maxSize: 200,
+ // collapsible: true,
+ // collapsed: true,
+ // title: 'Status',
+ // margins: '0 5 5 5',
+ // bodyStyle: 'padding:5px; font-family:tahoma; font-size:12px',
+ //},
{
region: 'east',
id: 'east',
- title: ' ',
+ title: '',
width: 200,
collapsible: true,
margins: '0 5 0 5',
@@ -1888,18 +1866,18 @@
]
},
{
- xtype: 'mapcomponent',
+ xtype: 'gx_mappanel',
region: 'center',
id: 'center',
- title: 'Map',
- margins: '0 0 5 0',
+ height: 1000,
+ width: 1000,
map: map,
- height: 400,
- width: 1000
+ title: '',
+ zoom: 3
}
]
});
-
+
map.addControl(new OpenLayers.Control.MousePosition({
displayClass: "void",
div: $('mouseposition'),
=== modified file 'gis/dhis-web-mapping/src/main/webapp/mapping/geostat/index.html'
--- gis/dhis-web-mapping/src/main/webapp/mapping/geostat/index.html 2009-08-20 18:49:24 +0000
+++ gis/dhis-web-mapping/src/main/webapp/mapping/geostat/index.html 2009-08-21 00:07:39 +0000
@@ -4,33 +4,46 @@
<head>
<title>DHIS2 Geostat</title>
- <link rel="stylesheet" type="text/css" href="../../mfbase/ext/resources/css/ext-all.css"/>
- <link rel="stylesheet" type="text/css" href="../../mfbase/ext/resources/css/xtheme-gray-extend.css" />
-
- <!-- EXT colorField Extent -->
- <link rel="stylesheet" type="text/css" href="../../mfbase/ext-community-extensions/color-field.css" />
- <link rel="stylesheet" type="text/css" href="../../mfbase/ext-community-extensions/multiselect.css" />
- <link rel="stylesheet" type="text/css" href="../../mfbase/ext/resources/css/examples.css" />
- <link rel="stylesheet" type="text/css" href="../../mfbase/ext/resources/css/checkbox_or.css" />
-
- <script type="text/javascript" src="../../mfbase/ext/adapter/ext/ext-base.js"></script>
- <script type="text/javascript" src="../../mfbase/ext/ext-all.js"></script>
-
- <!-- debug mode -->
- <script type="text/javascript" src="../../mfbase/openlayers/lib/OpenLayers.js"></script>
- <script type="text/javascript" src="../../mfbase/mapfish/MapFish.js"></script>
-
- <!-- EXT user extensions -->
- <script type="text/javascript" src="../../mfbase/openlayers/lib/OpenLayers/Control/newSelectFeature.js"></script>
- <script type="text/javascript" src="../../mfbase/ext/source/examples/examples.js"></script>
- <script type="text/javascript" src="../../mfbase/ext-community-extensions/color-field.js"></script>
- <script type="text/javascript" src="../../mfbase/ext-community-extensions/DDView.js"></script>
- <script type="text/javascript" src="../../mfbase/ext-community-extensions/MultiSelect.js"></script>
- <script type="text/javascript" src="../../mfbase/ext-community-extensions/ItemSelector.js"></script>
-
- <!-- Div script -->
- <script type="text/javascript" src="config.js"></script>
- <script type="text/javascript" src="geostat.js"></script>
+ <!-- CSS -->
+
+ <!-- Ext JS -->
+ <link rel="stylesheet" type="text/css" href="../../mfbase/ext/resources/css/ext-all.css"/>
+
+ <!-- User extensions -->
+ <link rel="stylesheet" type="text/css" href="../../mfbase/ext/resources/css/xtheme-gray-extend.css" />
+ <link rel="stylesheet" type="text/css" href="../../mfbase/ext-community-extensions/color-field.css" />
+ <link rel="stylesheet" type="text/css" href="../../mfbase/ext-community-extensions/multiselect.css" />
+ <link rel="stylesheet" type="text/css" href="../../mfbase/ext/resources/css/examples.css" />
+ <link rel="stylesheet" type="text/css" href="../../mfbase/ext/resources/css/checkbox_or.css" />
+
+ <!-- JavaScript -->
+
+ <!-- OpenLayers -->
+ <script type="text/javascript" src="../../mfbase/openlayers/OpenLayers.js"></script>
+
+ <!-- User extensions -->
+ <script type="text/javascript" src="../../mfbase/openlayers/lib/OpenLayers/Control/newSelectFeature.js"></script>
+
+ <!-- Ext JS -->
+ <script type="text/javascript" src="../../mfbase/ext/adapter/ext/ext-base.js"></script>
+ <script type="text/javascript" src="../../mfbase/ext/ext-all.js"></script>
+
+ <!-- User extensions -->
+ <script type="text/javascript" src="../../mfbase/ext/source/examples/examples.js"></script>
+ <script type="text/javascript" src="../../mfbase/ext-community-extensions/color-field.js"></script>
+ <script type="text/javascript" src="../../mfbase/ext-community-extensions/DDView.js"></script>
+ <script type="text/javascript" src="../../mfbase/ext-community-extensions/MultiSelect.js"></script>
+ <script type="text/javascript" src="../../mfbase/ext-community-extensions/ItemSelector.js"></script>
+
+ <!-- GeoExt -->
+ <script type="text/javascript" src="../../mfbase/geoext/script/GeoExt.js"></script>
+
+ <!-- MapFish -->
+ <script type="text/javascript" src="../../mfbase/mapfish/MapFish.js"></script>
+
+ <!-- DHIS2 -->
+ <script type="text/javascript" src="config.js"></script>
+ <script type="text/javascript" src="geostat.js"></script>
<style>
.assigned-row {background-color: #72FF63}
=== modified file 'gis/dhis-web-mapping/src/main/webapp/mfbase/ext/resources/css/examples.css'
--- gis/dhis-web-mapping/src/main/webapp/mfbase/ext/resources/css/examples.css 2009-07-31 17:22:28 +0000
+++ gis/dhis-web-mapping/src/main/webapp/mfbase/ext/resources/css/examples.css 2009-08-21 00:07:39 +0000
@@ -60,7 +60,7 @@
position:absolute;
left:35%;
top:10px;
- width:250px;
+ width:300px;
z-index:20000;
}
.x-grid3-row-body p {
=== modified file 'gis/dhis-web-mapping/src/main/webapp/mfbase/openlayers/lib/OpenLayers.js'
--- gis/dhis-web-mapping/src/main/webapp/mfbase/openlayers/lib/OpenLayers.js 2009-08-20 23:36:24 +0000
+++ gis/dhis-web-mapping/src/main/webapp/mfbase/openlayers/lib/OpenLayers.js 2009-08-21 00:07:39 +0000
@@ -147,6 +147,7 @@
"OpenLayers/Control/Navigation.js",
"OpenLayers/Control/MouseDefaults.js",
"OpenLayers/Control/MousePosition.js",
+ "OpenLayers/Control/newSelectFeature.js",
"OpenLayers/Control/OverviewMap.js",
"OpenLayers/Control/KeyboardDefaults.js",
"OpenLayers/Control/PanZoom.js",