I want to make a table of city and coordinate of the city, and then i have a button which gives me my location(with longitude and latitude)
how can i connect them? lets say there is 2 cities one of them is closer to me, and the other one is far, i want it to automatically put me within the one that is closer to me. for example maybe something like this in a code:
<table>
<tr>
<td id="city">Haifa</td>
<td id="coord">32.81841 34.9885</td>
</tr>
<tr>
<td id="city">Tel-Aviv</td>
<td id="coord">32.083333 34.7999968</td>
</tr>
</table>
and then lets say, my location is: 32.777777 34.999999 how can i make it that it will say i am from Haifa? thanks.