India Map

State Wastage Score

Bar Chart: Municipal Service Performance

var indiaBounds = [[6.5, 68.0], [35.5, 97.5]]; var map = L.map('map', { center: [22.5937, 78.9629], zoom: 5, minZoom: 4, maxZoom: 8, maxBounds: indiaBounds, maxBoundsViscosity: 1.0 }); /* Blank background */ L.tileLayer('', {}).addTo(map); fetch('geojson/india_states.geojson') .then(resp => resp.json()) .then(function(geojsonData) { /* Mask outside India */ var worldMask = { "type": "Feature", "geometry": { "type": "Polygon", "coordinates": [[ [-180, -90], [180, -90], [180, 90], [-180, 90], [-180, -90] ]] } }; L.geoJSON(worldMask, { style: { fillColor: 'white', fillOpacity: 1, weight: 0 } }).addTo(map); /* States layer */ L.geoJSON(geojsonData, { style: { color: '#154e3b', weight: 1, fillColor: '#8fc7b9', fillOpacity: 0.7 }, onEachFeature: function(feature, layer) { var p = feature.properties; /* Permanent state name */ layer.bindTooltip( "" + p.NAME_1 + "", { permanent: true, direction: 'center', className: 'state-label' } ); /* Hover popup with values */ layer.on('mouseover', function () { var popupContent = ` ${p.NAME_1}
Gap: 200
Legacy: 150
Solid Waste: 220 `; layer.bindPopup(popupContent).openPopup(); layer.setStyle({ fillColor: "#154e3b", fillOpacity: 0.9 }); }); layer.on('mouseout', function () { layer.closePopup(); layer.setStyle({ color: '#333', weight: 1, fillColor: '#8fc7b9', fillOpacity: 0.7 }); }); /* Click navigation */ if (p.NAME_1 === "UttarPradesh") { layer.on('click', function() { window.location.href = "http://103.154.2.115/~ashishdestest/statemaps_30/up_demo.html"; }); } if (p.NAME_1 === "NCTofDelhi") { layer.on('click', function() { window.location.href = "http://103.154.2.115/~ashishdestest/statemaps/delhi_demo.html"; }); } } }).addTo(map); }) .catch(err => console.error(err)); var indiaBounds = [[6.5, 68.0], [35.5, 97.5]]; var map = L.map('map', { center: [22.5937, 78.9629], zoom: 5, minZoom: 4, maxZoom: 8, maxBounds: indiaBounds, maxBoundsViscosity: 1.0 }); /* Blank background */ L.tileLayer('', {}).addTo(map); fetch('geojson/india_states.geojson') .then(resp => resp.json()) .then(function(geojsonData) { /* Mask outside India */ var worldMask = { "type": "Feature", "geometry": { "type": "Polygon", "coordinates": [[ [-180, -90], [180, -90], [180, 90], [-180, 90], [-180, -90] ]] } }; L.geoJSON(worldMask, { style: { fillColor: 'white', fillOpacity: 1, weight: 0 } }).addTo(map); /* States layer */ L.geoJSON(geojsonData, { style: { color: '#154e3b', weight: 1, fillColor: '#8fc7b9', fillOpacity: 0.7 }, onEachFeature: function(feature, layer) { var p = feature.properties; /* Permanent state name */ layer.bindTooltip( "" + p.NAME_1 + "", { permanent: true, direction: 'center', className: 'state-label' } ); /* Hover popup with values */ layer.on('mouseover', function () { var popupContent = ` ${p.NAME_1}
Gap: 200
Legacy: 150
Solid Waste: 220 `; layer.bindPopup(popupContent).openPopup(); layer.setStyle({ fillColor: "#154e3b", fillOpacity: 0.9 }); }); layer.on('mouseout', function () { layer.closePopup(); layer.setStyle({ color: '#333', weight: 1, fillColor: '#8fc7b9', fillOpacity: 0.7 }); }); /* Click navigation */ if (p.NAME_1 === "UttarPradesh") { layer.on('click', function() { window.location.href = "http://103.154.2.115/~ashishdestest/statemaps_30/up_demo.html"; }); } if (p.NAME_1 === "NCTofDelhi") { layer.on('click', function() { window.location.href = "http://103.154.2.115/~ashishdestest/statemaps/delhi_demo.html"; }); } } }).addTo(map); }) .catch(err => console.error(err));