Dear fellow mendix developers, How do I compare 2 Latitudes and Longitudes? See Image What it does is: If you click on the blue button it looks for the Current GEO Location and fills the Latitude and Longitude in the Latitude and Longitude fields in. What i want is: if the Latitude and Longitude calculated by the blue button is almost the same as one of the Installation locations listed in the database then it should automatically select the best choice in the dropdownbox, if it isn't close like more than 50 metres away from the current location then it should give the message "choose location manually!"
This is something you'll have to solve using Math, and calculate what the distance is between the two points. The formula to do this is pretty complex, and uses the sinus and inverse tangent. Those aren't functions we currently have in microlfow.
You'll probably want to make a Java action to do this, see this post for the Java function to do the calculation.
Jasper van der Hoek
Maybe best to look for a service that already provides these kind of lookups.