TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
mari muthu
NA
198
107.3k
google map Check the LatLng value is inside the Radius..?
Mar 15 2018 4:27 AM
hi,
I need to find the the latitude langitude value is inside the Radius circle or not.if its is outside i have to pass some value from my MVC Controller.
i have tried this but data comes wrong distance, if the distance is acroos from the radius line i have to show some notification. if anybody knows this please help me for the same
function
distance(lat1,lon1,lat2,lon2)
{
var
R = 6371;
// Earth's radius in Km
return
Math.acos(Math.sin(lat1)*Math.sin(lat2) +
Math.cos(lat1)*Math.cos(lat2) *
Math.cos(lon2-lon1)) * R; }
if
(distance(user.lat, user.lon, post.lat, post.lon) <= desiredRadiusInKm)
{
// return true;
}
else
{
// return false;
}
i have tried this but data comes wrong distance,
if the distance is across from the radius line i have to show some notification. if anybody knows this please help me for the same
Thanks,
Reply
Answers (
0
)
Android Assernal Library
LINQ Error IN ForEach