How to get location information of beacon and how to use it

I would like to receive the beacon location information and calculate the distance and direction from my current location.
My location will be displayed on Google Maps and will use ‘navigator.geolocation.watchPosition’ to display my current location.
Thank you for your help.

p.s i am using html and js. So I upload this files.
index(html file).txt (4.1 KB)
app(js file).txt (10.1 KB)