/
index.html
274 lines (235 loc) · 11.6 KB
/
index.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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
<html>
<head>
<title>Water Resources of India - Web maps (Central Water Commission)</title>
<!-- Use remote copy of Leaflet-->
<link rel="stylesheet" type="text/css" href="https://unpkg.com/leaflet@1.0.1/dist/leaflet.css" />
<script type="text/javascript" src="https://unpkg.com/leaflet@1.0.1/dist/leaflet.js"></script>
<!--Declare OpenWeatherMap-->
<link rel="stylesheet" type="text/css" href="https://github.com/buche/leaflet-openweathermap/blob/master/leaflet-openweathermap.css" />
<script type="text/javascript" src="https://github.com/buche/leaflet-openweathermap/blob/master/leaflet-openweathermap.js"></script>
<!--Other CSS/JS files-->
<link rel="stylesheet" href="css/Control.Opacity.css" />
<script src="js/lib/opacity/Control.Opacity.js"></script>
<style>
#map{
width: 100%;
height: 90%;
}
h1{
color:green;
font-family: "Garamond","Calibri","Times New Roman";
margin-left:30px;
margin-top: 0px;
padding-top: 0px;
margin-bottom: 0px;
padding-bottom: 0px;
font-size: 24px;
}
</style>
</head>
<body>
<div><span class="header"><h1>Water Resources of India - Central Water Commission (CWC) Web maps</h1><a style="margin-left:30px; font-size:12px", href="https://github.com/craigdsouza/water_resources_india">Click here for more about this map</a></span></div>
<div id="map"></div>
<script>
// Declare Baselayers - OSM, HERE Maps, Mapbox, NASA
// OpenStreetMap
var osmLayer = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
})
//HERE Normal Day
/*var HERE_normalDay = L.tileLayer('http://{s}.{base}.maps.cit.api.here.com/maptile/2.1/{type}/{mapID}/normal.day/{z}/{x}/{y}/{size}/{format}?app_id={app_id}&app_code={app_code}&lg={language}', {
attribution: 'Map © 1987-2014 <a href="http://developer.here.com">HERE</a>',
subdomains: '1234',
mapID: 'newest',
app_id: '<your app_id>',
app_code: '<your app_code>',
base: 'base',
maxZoom: 20,
type: 'maptile',
language: 'eng',
format: 'png8',
size: '256'
});*/
// HERE Hybrid Day
/*var HERE_hybridDay = L.tileLayer('http://{s}.{base}.maps.cit.api.here.com/maptile/2.1/{type}/{mapID}/hybrid.day/{z}/{x}/{y}/{size}/{format}?app_id={app_id}&app_code={app_code}&lg={language}', {
attribution: 'Map © 1987-2014 <a href="http://developer.here.com">HERE</a>',
subdomains: '1234',
mapID: 'newest',
app_id: '<your app_id>',
app_code: '<your app_code>',
base: 'aerial',
maxZoom: 20,
type: 'maptile',
language: 'eng',
format: 'png8',
size: '256'
});*/
// NASA Night Lights
var NASAGIBS_ViirsEarthAtNight2012 = L.tileLayer('http://map1.vis.earthdata.nasa.gov/wmts-webmerc/VIIRS_CityLights_2012/default/{time}/{tilematrixset}{maxZoom}/{z}/{y}/{x}.{format}', {
attribution: 'Imagery provided by services from the Global Imagery Browse Services (GIBS), operated by the NASA/GSFC/Earth Science Data and Information System (<a href="https://earthdata.nasa.gov">ESDIS</a>) with funding provided by NASA/HQ.',
bounds: [[-85.0511287776, -179.999999975], [85.0511287776, 179.999999975]],
minZoom: 1,
maxZoom: 8,
format: 'jpg',
time: '',
tilematrixset: 'GoogleMapsCompatible_Level'
});
// Mapbox Light
var mapbox_light = L.tileLayer('https://api.mapbox.com/styles/v1/mapbox/light-v9/tiles/256/{z}/{x}/{y}?access_token=pk.eyJ1IjoiY3JhaWdkczAyMiIsImEiOiJjaW0zMWJvamYwMWE1cnJrczcyZHNvNWw1In0.BPtMjAToq7ac96zV8DgOfw', {
attribution: '© <a href="https://www.mapbox.com/map-feedback/">Mapbox</a> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
});
// Mapbox Satellite
var mapbox_satellite = L.tileLayer('https://api.mapbox.com/styles/v1/mapbox/satellite-v9/tiles/256/{z}/{x}/{y}?access_token=pk.eyJ1IjoiY3JhaWdkczAyMiIsImEiOiJjaW0zMWJvamYwMWE1cnJrczcyZHNvNWw1In0.BPtMjAToq7ac96zV8DgOfw', {
attribution: '© <a href="https://www.mapbox.com/map-feedback/">Mapbox</a> © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
});
// Initialize the map on the "map" div with a given center, zoom and default basemap - OSM
var map = L.map('map',{layers: [mapbox_light]});
map.setView([22,82],5);
// Group Basemaps
var baseMaps = {
"Open Street Map": osmLayer,
"Mapbox-light": mapbox_light,
"Mapbox-satellite": mapbox_satellite,
"NASA Night Lights (2012)": NASAGIBS_ViirsEarthAtNight2012
};
// Declare Tile layers (WRIS - Web Map Services)
var states = L.tileLayer.wms("http://india-wris.nrsc.gov.in/arcgis/services/SubInfoSysLCC/Admin_subinfo_a/MapServer/WMSServer", {
layers: '7',
format: 'image/png',
transparent: true,
attribution: "<a href='http://www.india-wris.nrsc.gov.in/WMSServicesApp.html'>Source: WRIS (CWC)</a>",
zIndex: 1
}).addTo(map);
var districts = L.tileLayer.wms("http://india-wris.nrsc.gov.in/arcgis/services/SubInfoSysLCC/Admin_subinfo_a/MapServer/WMSServer", {
layers: '5',
format: 'image/png',
transparent: true,
attribution: "<a href='http://www.india-wris.nrsc.gov.in/WMSServicesApp.html'>Source: WRIS (CWC)</a>",
})
var villages = L.tileLayer.wms("http://india-wris.nrsc.gov.in/arcgis/services/SubInfoSysLCC/Rural/MapServer/WMSServer", {
layers: '1',
format: 'image/png',
transparent: true,
attribution: "<a href='http://www.india-wris.nrsc.gov.in/WMSServicesApp.html'>Source: WRIS (CWC)</a>"
})
var basins = L.tileLayer.wms("http://india-wris.nrsc.gov.in/arcgis/services/SubInfoSysLCC/Basin/MapServer/WMSServer", {
layers: '9',
format: 'image/png',
transparent: true,
attribution: "<a href='http://www.india-wris.nrsc.gov.in/WMSServicesApp.html'>Source: WRIS (CWC)</a>",
}).addTo(map);
var watersheds = L.tileLayer.wms("http://india-wris.nrsc.gov.in/arcgis/services/SubInfoSysLCC/Watershed/MapServer/WMSServer", {
layers: '1',
format: 'image/png',
transparent: true,
attribution: "<a href='http://www.india-wris.nrsc.gov.in/WMSServicesApp.html'>Source: WRIS (CWC)</a>"
})
var rivers = L.tileLayer.wms("http://india-wris.nrsc.gov.in/arcgis/services/SubInfoSysLCC/Basin/MapServer/WMSServer", {
layers: '1',
format: 'image/png',
transparent: true,
attribution: "<a href='http://www.india-wris.nrsc.gov.in/WMSServicesApp.html'>Source: WRIS (CWC)</a>"
}).addTo(map);
var wetlands = L.tileLayer.wms("http://india-wris.nrsc.gov.in/arcgis/services/SubInfoSysLCC/SurfaceWaterBodyInfoSysWetLands/MapServer/WMSServer", {
layers: '4',
format: 'image/png',
transparent: true,
attribution: "<a href='http://www.india-wris.nrsc.gov.in/WMSServicesApp.html'>Source: WRIS (CWC)</a>"
})
var water_bodies = L.tileLayer.wms("http://india-wris.nrsc.gov.in/arcgis/services/SubInfoSysLCC/SWB/MapServer/WMSServer", {
layers: '10,11,12,13',
format: 'image/png',
transparent: true,
attribution: "<a href='http://www.india-wris.nrsc.gov.in/WMSServicesApp.html'>Source: WRIS (CWC)</a>"
})
var aquifers = L.tileLayer.wms("http://india-wris.nrsc.gov.in/arcgis/services/GeoViz/AquiferSystems/MapServer/WMSServer", {
layers: '1',
format: 'image/png',
transparent: true,
attribution: "<a href='http://www.india-wris.nrsc.gov.in/WMSServicesApp.html'>Source: WRIS (CWC)</a>"
})
var groundwater_level_fluc = L.tileLayer.wms("http://india-wris.nrsc.gov.in/arcgis/services/SubInfoSysLCC/WaterLevelAnalysis/MapServer/WMSServer", {
layers: '1',
format: 'image/png',
transparent: true,
attribution: "<a href='http://www.india-wris.nrsc.gov.in/WMSServicesApp.html'>Source: WRIS (CWC)</a>"
})
var groundwater_level_depth = L.tileLayer.wms("http://india-wris.nrsc.gov.in/arcgis/services/SubInfoSysLCC/WaterLevelAnalysis/MapServer/WMSServer", {
layers: '3',
format: 'image/png',
transparent: true,
attribution: "<a href='http://www.india-wris.nrsc.gov.in/WMSServicesApp.html'>Source: WRIS (CWC)</a>"
})
var soils = L.tileLayer.wms("http://india-wris.nrsc.gov.in/arcgis/services/SubInfoSysLCC/Soil/MapServer/WMSServer", {
layers: '1',
format: 'image/png',
transparent: true,
attribution: "<a href='http://www.india-wris.nrsc.gov.in/WMSServicesApp.html'>Source: WRIS (CWC)</a>"
})
var dams = L.tileLayer.wms("http://india-wris.nrsc.gov.in/arcgis/services/SubInfoSysLCC/WRP/MapServer/WMSServer", {
layers: '9',
format: 'image/png',
transparent: true,
attribution: "<a href='http://www.india-wris.nrsc.gov.in/WMSServicesApp.html'>Source: WRIS (CWC)</a>"
})
var bwa = L.tileLayer.wms("http://india-wris.nrsc.gov.in/arcgis/services/SubInfoSysLCC/WRP/MapServer/WMSServer", {
layers: '10',
format: 'image/png',
transparent: true,
attribution: "<a href='http://www.india-wris.nrsc.gov.in/WMSServicesApp.html'>Source: WRIS (CWC)</a>"
})
var command_areas = L.tileLayer.wms("http://india-wris.nrsc.gov.in/arcgis/services/SubInfoSysLCC/CommandArea/MapServer/WMSServer", {
layers: '1',
format: 'image/png',
transparent: true,
attribution: "<a href='http://www.india-wris.nrsc.gov.in/WMSServicesApp.html'>Source: WRIS (CWC)</a>"
})
var interlinking = L.tileLayer.wms("http://india-wris.nrsc.gov.in/arcgis/services/SubInfoSysLCC/IBTL/MapServer/WMSServer", {
layers: '1',
format: 'image/png',
transparent: true,
attribution: "<a href='http://www.india-wris.nrsc.gov.in/WMSServicesApp.html'>Source: WRIS (CWC)</a>"
})
var mipc = L.tileLayer.wms("http://india-wris.nrsc.gov.in/arcgis/services/MI/IrrigationPotentialCreated/MapServer/WMSServer", {
layers: '1',
format: 'image/png',
transparent: true,
attribution: "<a href='http://www.india-wris.nrsc.gov.in/WMSServicesApp.html'>Source: WRIS (CWC)</a>"
})
var groundwater_resource = L.tileLayer.wms("http://india-wris.nrsc.gov.in/arcgis/services/GeoViz/GWR/MapServer/WMSServer", {
layers: '1',
format: 'image/png',
transparent: true,
attribution: "<a href='http://www.india-wris.nrsc.gov.in/WMSServicesApp.html'>Source: WRIS (CWC)</a>"
})
// Experimental WMS-OpenWeatherMap script
/*
var clouds = L.OWM.clouds({showLegend: false, opacity: 0.5});
var city = L.OWM.current({intervall: 15, lang: 'de'});
*/
// Group Tilemaps
var tileMaps = {
"States": states,
"Districts [zoom in]": districts,
"Villages [zoom in]": villages,
"River Basins (CWC)": basins,
"Watersheds [zoom in]": watersheds,
"Rivers [zoom in]": rivers,
"Wetlands pre-monsoon 2005": wetlands,
"Water Bodies": water_bodies,
"Principal Aquifers": aquifers,
"Groundwater fluctuation": groundwater_level_fluc,
"Groundwater depth": groundwater_level_depth,
"Soil Productivity": soils,
"Dams": dams,
"Barrages/Weirs/Anicuts": bwa,
"Command Areas": command_areas,
"Interlinking [zoom in]": interlinking,
"Minor-Irrigation Potential Created": mipc,
"Groundwater Resources Development": groundwater_resource
};
// Add Controls for Basemaps, Tilemaps and Vector Data to map
L.control.layers(baseMaps,tileMaps).addTo(map);
</script>
</body>
</html>