Quantcast
Channel: Mendix Forum Questions
Viewing all articles
Browse latest Browse all 83469

Using longitude and latitude in query

$
0
0
Hi, I want to use this kind of query (from https://gist.github.com/robotmay/851250) in a microflow: # Using an example table of 'addresses' with a latitude and longitude column # Replace #LONGITUDE#, #LATITUDE#, and #DISTANCE_IN_MILES# with your search values SELECT addresses.*, (ACOS( SIN(RADIANS(#LATITUDE#)) * SIN(RADIANS(addresses.latitude)) + COS(RADIANS(#LATITUDE#)) * COS(RADIANS(addresses.latitude)) * COS(RADIANS(addresses.longitude) - RADIANS(#LONGITUDE#)) ) * 3963.1676) AS distance FROM addresses WHERE (((ACOS( SIN(RADIANS(#LATITUDE#)) * SIN(RADIANS(addresses.latitude)) + COS(RADIANS(#LATITUDE#)) * COS(RADIANS(addresses.latitude)) * COS(RADIANS(addresses.longitude) - RADIANS(#LONGITUDE#)) ) * 3963.1676) <= #DISTANCE#) OR (addresses.latitude = #LATITUDE# AND addresses.longitude = #LONGITUDE#)) But this is not possible with XPath. Is there a simple way to get the results of this query in a microflow? I think the only way to do this is a java-action? I want to loop through the results and use it in a listview. 

Viewing all articles
Browse latest Browse all 83469

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>