web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Find nearby addresses using Lat & Long

(0) ShareShare
ReportReport
Posted on by 1,720

Hi

I have a custom entity 'Property' that stores the address details along with Latitude and Longitude. I want to be able to perform a search on this entity and find all properties within a certain radius (say 5km) of a given address. Does anyone know how this can be achieved?

Thanks 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    BadrinathB Profile Picture
    970 on at

    Hi Mir,

    Below could be some of the options for you to achieve this

    1. Use Bing or google maps and ingrate your CRM. Not sure how much you can full fill your businees requirements with this.

    2. Use 3 rd party tools like nutshell to achieve this www.nutshell.com/.../introducing-nutshell-maps

    3. Custom code either JS or Plugin to find and associate the properties based on their long and lat

    Algorithams to achieve this are well explained in the below article

    www.movable-type.co.uk/.../latlong.html

    stackoverflow.com/.../calculate-distance-between-two-latitude-longitude-points-haversine-formula

    function getDistanceFromLatLonInKm(lat1,lon1,lat2,lon2) {

     var R = 6371; // Radius of the earth in km

     var dLat = deg2rad(lat2-lat1);  // deg2rad below

     var dLon = deg2rad(lon2-lon1);

     var a =

       Math.sin(dLat/2) * Math.sin(dLat/2) +

       Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) *

       Math.sin(dLon/2) * Math.sin(dLon/2)

       ;

     var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));

     var d = R * c; // Distance in km

     return d;

    }

    function deg2rad(deg) {

     return deg * (Math.PI/180)

    }

  • Suggested answer
    Inogic Profile Picture
    703 on at
    Hi there,

    As a quick hack, you can explore Radius/ Proximity Search by Maplytics within Dynamics 365. The app integrates Maps with Dynamics 365 and allows users to visualize CRM records on the map.

    Using the Radius Search feature, you can select one of your ‘property’ entities as the current location, specify a radius for search, say 5 km, and visualize all the properties within that travel distance.

    This is so quick that the results are plotted even before you would blink. For more details and to explore other features of Maplytics, check out the website or connect with the team at crm@inogic.com.
     
    Thanks,
    Sam

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans