🏡 index : github.com/shreyas-satish/govote.git

author Shreyas Satish <shreyassatish@Shreyass-MacBook-Pro.local> 2023-12-08 11:06:57.0 +05:30:00
committer Shreyas Satish <shreyassatish@Shreyass-MacBook-Pro.local> 2023-12-08 11:06:57.0 +05:30:00
commit
d8e8e2a338c470d78f8c099a68ea9067e051c84e [patch]
tree
e50f4ba8726a6d8d3f0d6bc8642e8ee81a4d56e3
parent
7d8b7b013f96ed0cb062a2029d7727decc07c4f2
download
d8e8e2a338c470d78f8c099a68ea9067e051c84e.tar.gz

revert



Diff

 assets/script.js | 24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)

diff --git a/assets/script.js b/assets/script.js
index 2bf6584..a7bb335 100644
--- a/assets/script.js
+++ a/assets/script.js
@@ -218,18 +218,30 @@

    features = findFeaturesContainingPoint(window.geojson, turf.point([lng, lat]));
    let details = "Not in a Bangalore Constituency"
    let tehsil = "Bangalore"; // until we have more clarity, this works
    if (features.length == 1) {
      ward = window.ward = wardLookup[features[0].properties['id'].toString()]
      let acID = ward['ac_id'];
      let pcId = CONSTITUENCY_MAP[acID][0];
      let pcName = CONSTITUENCY_MAP[acID][1];
      let eciDistrict = CONSTITUENCY_MAP[acID][2];
      details = `<div>
      <strong>Assembly Constituency</strong>: ${ward['ac_id']} - ${ward['ac_name']}<br>
      <strong>District</strong>: ${eciDistrict}<br>
      <br>Parliamentary Constituency: <br>${pcId} - ${pcName}<br>
      <br>Ward: <br>${ward['id']} - ${ward['name']}
      </div>`;
      details = `
      <table>
        <tbody>
          <tr>
            <td><strong>District</strong></td>
            <td>${eciDistrict}</td>
          </tr>
          <tr>
            <td><strong>Assembly Constituency (AC)</strong></td>
            <td>${ward['ac_id']} - ${ward['ac_name']}</td>
          </tr>
          <tr>
            <td><strong>Tehsil</strong></td>
            <td>${tehsil}</td>
          </tr>
        </tbody>
      </table>`;

      console.log(details)