add ward details
Diff
index.html | 2 ++
assets/script.js | 10 +++++++++-
2 files changed, 10 insertions(+), 2 deletions(-)
@@ -140,6 +140,8 @@
<p>2. Go <a href="https://voters.eci.gov.in/login" target="_blank">here</a>, and submit Form 8 (or Form 6 if you've never had a voter ID) using the credentials you signed up with.</p>
<p>Keep these details handy for the form:</p>
<div id="location-details"></div>
<p>Once you've filled the form, you will get a form reference id. Keep this safe, so you can follow the form's progress. You can use your ward details to find your Booth Level Officer and follow up on the progress.</p>
</p>
{% include stuck.html %}
<button class="prev-button" onclick="navigate('prev', 5)">Previous</button>
@@ -206,8 +206,6 @@
map.setZoom(18);
marker.setPosition(location);
JSON.stringify(window.wardLookup)
if (typeof location.lat == 'function') {
lat = location.lat()
lng = location.lng()
@@ -219,6 +217,7 @@
features = findFeaturesContainingPoint(window.geojson, turf.point([lng, lat]));
let details = "Couldn't find a Bangalore Constituency, check FAQ"
let tehsil = "Bangalore";
let wardDetails = "";
if (features.length == 1) {
ward = window.ward = wardLookup[features[0].properties['id'].toString()]
let acID = ward['ac_id'];
@@ -233,6 +232,12 @@
<td><strong>Assembly Constituency (AC)</strong></td>
<td>${ward['ac_id']} - ${ward['ac_name']}</td>
</tr>`;
wardDetails = `<tr>
<td><strong>Ward</strong></td>
<td>${ward['id']} - ${ward['name']}</td>
</tr>`;
details = `
<table>
<tbody>
@@ -252,6 +257,7 @@
<td><strong>Post Office (Pick One)</strong></td>
<td><ul>${window.postOffice}</ul></td>
</tr>
${wardDetails}
</tbody>
</table>`;
}