+ Start a Discussion
sumithasumitha 

Google map Intergration to show near by Contacts based on the current location

Hi All, 

Need help on displaying the Nearby contacts within the radius(10km) around our current location  in Google Maps without using the Map component in the visual force page.

Please advice.

Thanks,
Sumitha P
devedeve
Yes Geolocation points should be there in both current location and contact then you can hit google api to calculate ditance between them and add them into a list to show.
Can check this link for code:-
https://gist.github.com/chrisjlee/658ddbada4b26db9c98d
sumithasumitha
Hi,

Thanks for the link.In specified link it calculates the distance but I need show the contacts as marker(label) in Google maps within the radius of 10km around my Current Location.

I have idea but i am struck on implementation:
Query using Distance function(which get the current location < 10km)  and pass the query results as variable into Javasript and push into Google map.
Please Advice.

Thanks & Regards,
Sumitha P
sumithasumitha
Hi All,

Please Suggest any idea, share the coding logic about this issue.

Thanks,
Sumitha P
sumithasumitha
Hi,

Solve this Issue using Remote Site Settings and Javascript with Google Maps API.

Thanks.