<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Using location functions and variables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-location-functions-and-variables/m-p/13852072#M2038896</link>
    <description>&lt;P&gt;I really need some help. I used the build in geolocation function that saves the longitude and latitude to variables, I dont understand how to use the georadius function to check if the user is within a certain radius of a set of coordinates.&lt;BR /&gt;&lt;BR /&gt;All I want is that when a user is at a certain location (with a radius of my choosing) it triggers a pop up toast. I have tried so many things, so far I can check to see if the users location coordinates are the same as the location im trying to trigger the toast but I cannot set a certain radius, the user basically has to already be at the location instead of getting a pop up when they are say 40 meters away from the location. I have looked into so many option I cannot figure it out. Please help thank you.&lt;/P&gt;</description>
    <pubDate>Tue, 03 Sep 2024 02:19:59 GMT</pubDate>
    <dc:creator>StacksIndeed</dc:creator>
    <dc:date>2024-09-03T02:19:59Z</dc:date>
    <item>
      <title>Using location functions and variables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-location-functions-and-variables/m-p/13852072#M2038896</link>
      <description>&lt;P&gt;I really need some help. I used the build in geolocation function that saves the longitude and latitude to variables, I dont understand how to use the georadius function to check if the user is within a certain radius of a set of coordinates.&lt;BR /&gt;&lt;BR /&gt;All I want is that when a user is at a certain location (with a radius of my choosing) it triggers a pop up toast. I have tried so many things, so far I can check to see if the users location coordinates are the same as the location im trying to trigger the toast but I cannot set a certain radius, the user basically has to already be at the location instead of getting a pop up when they are say 40 meters away from the location. I have looked into so many option I cannot figure it out. Please help thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2024 02:19:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-location-functions-and-variables/m-p/13852072#M2038896</guid>
      <dc:creator>StacksIndeed</dc:creator>
      <dc:date>2024-09-03T02:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: Using location functions and variables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-location-functions-and-variables/m-p/13852186#M2038897</link>
      <description>&lt;P&gt;There's a&amp;nbsp; formula to determine this... I suppose as a last resort you can ask Chatgpt or Gemini to write it in Javascript for you and then use the custom Javascript flow function.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2024 05:26:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-location-functions-and-variables/m-p/13852186#M2038897</guid>
      <dc:creator>srose99</dc:creator>
      <dc:date>2024-09-03T05:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: Using location functions and variables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-location-functions-and-variables/m-p/13852329#M2038898</link>
      <description>&lt;P&gt;Here's a function we used in our &lt;A href="https://community.sap.com/t5/sap-builders-discussions/april-citizen-developer-challenge-sap-build-apps-task-4-mobile-device/td-p/13680103" target="_self"&gt;developer challenge&lt;/A&gt; (thanks&amp;nbsp;&lt;a href="https://community.sap.com/t5/user/viewprofilepage/user-id/148298"&gt;@shrinivasan_neelamegam&lt;/a&gt;) to tell if something is nearby. You can modify it to return the actual distance.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;function arePointsNearBy(currentLocation, venueLocation, km) { 
   var ky = 40000 / 360; 
   var kx = Math.cos(Math.PI * venueLocation.lat / 180.0) * ky; 
   var dx = Math.abs(venueLocation.lng - currentLocation.lng) * kx; 
   var dy = Math.abs(venueLocation.lat - currentLocation.lat) * ky; 
   return Math.sqrt(dx * dx + dy * dy) &amp;lt;= km; 
} &lt;/LI-CODE&gt;&lt;P&gt;I'm sure Shrini can help if you need something even more sophisticated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2024 07:26:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-location-functions-and-variables/m-p/13852329#M2038898</guid>
      <dc:creator>Dan_Wroblewski</dc:creator>
      <dc:date>2024-09-03T07:26:33Z</dc:date>
    </item>
  </channel>
</rss>

