Cant get exact distance of a beacon dynamically!

Could you please provide me the link for distance demo template.