-
Notifications
You must be signed in to change notification settings - Fork 9
/
plugin.html
98 lines (85 loc) · 2.57 KB
/
plugin.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<!DOCTYPE html>
<head>
<title>DHIS2 GIS Plugin</title>
<!--<link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all-gray.css"/>-->
<link rel="stylesheet" href="css/style.css" />
<script src="extjs/ext-all.js"></script>
<script src="map.js"></script> <!-- transpiled -->
<style>
h1 {
font-size: 20px;
padding: 20px 0 10px;
}
#map1, #map2 {
width: 700px;
height: 400px;
margin-bottom: 30px;
overflow: hidden;
}
</style>
<script>
Ext.onReady(function() {
var url = "http://localhost:8080";
GIS.plugin.getMap({
url: url,
el: "map1",
id: 'qTfO4YkQ9xW',
crossDomain: true,
username: 'admin',
password: 'district',
// userOrgUnit: ["O6uvpzGd5pu", "Vth0fbpFcsO"]
});
/*
GIS.plugin.getMap({
url: url,
el: "map1",
crossDomain: true,
username: 'admin',
password: 'district',
dashboard: true,
hideLegend: true,
basemap: 'googleStreets',
mapViews: [
{
layer: 'boundary',
rows: [{dimension: 'ou', items: [{id: 'LEVEL-2'}, {id: 'ImspTQPwCqd'}]}],
labels: {
fontSize: 14,
color: '#00f'
}
}
]
});
*/
/*
GIS.plugin.getMap({
url: url,
el: "map2",
crossDomain: true,
username: 'admin',
password: 'district',
dashboard: true,
hideLegend: true,
basemap: 'googleStreets',
mapViews: [
{
layer: 'boundary',
rows: [{dimension: 'ou', items: [{id: 'LEVEL-2'}, {id: 'ImspTQPwCqd'}]}],
labels: {
fontSize: 14,
color: '#00f'
}
}
]
});
*/
});
</script>
</head>
<body style="margin:10px 0 0 30px; font-family:arial,sans-serif">
<h1>MAP BY UID</h1>
<div id="map1"></div>
<h1>MAP BY CONFIG</h1>
<div id="map2"></div>
</body>
</html>