Distance tools extension

I wrote a new extension to measure distances between two points. Currently it has four methods

  • pythagorean(a, b)
    • allows you to calculate the hypotenuse of a and b according to the pythagorean theorem
  • gcDistance(lat1, lng1, lat2, lng2)
    • allows you to calculate the great-circle distance between two points on a sphere. Input format is decimal degrees (like in the other location components)
  • haversineFormula(lat1, lng1, lat2, lng2)
    • Has a higher accuracy for shorter distances than the gcDistance
  • vincentyFormula(lat1, lng1, lat2, lng2)
    • The vincenty formula allows you to calculate the distance between two points on earth with an accuracy of 50 m.

The extension is hosted in my Github repo.


2017-09-01: Initial release
2017-09-02: v2 with more functions
2018-01-05: fixed Play Store error in v3


I have just downloaded it. Thank you!

Excelente, cuando tienes un tutorial?


wait a tutorial also, thanks

Gracias RedPanda, seria genial un pequeño tutorial

You all want a tutorial, but the input is simply latitude and longtitude of point 1 and 2 :slight_smile:


Other formula is by Haversine:


En un plano puedes medir la distancia de esta manera;



v2 is out now and has two new formulas: haversine and vincenty

i want say thanks for all, i could make with Haversine

May I ask, what is the distance unit for this extension? (miles / kilometers)

I would imagine it’s km but you can double check by calculating the distance between two know points:


1 Like

very clear thank you, Domhnall

thank you for fix in Play store
finally i found the problem was couse your extention :XD

method for show markers in certain circle from string in your choosing and show it in advanced ListView
D: The distance for your location

The resolution of this image is very bad. Could you upload a better resolution sample?

you can see blocks in aia example

thank you.