View Single Post
Old 14-02-2011, 08:37 AM   #21
vietnamtour
Nhập môn đệ tử
 
Tham gia ngày: Feb 2011
Bài gửi: 5
:
Hi Everybody,

I'm not sure if this is the right forum, but as you all have some knowledge about google maps, maybe you can help me. So here is what I want to do:

I have a database table with users and I have the google geocoordinates of them. I also have a table with places and the geo-codes of them.

Users can visit places. What I want to do now is calculate the distance a user has traveled from one place to another. But only the direct distance, not the actual distance of the route.

By using some trigonometry it's quite simple:
(latA-latB)^2 + (lonA-lonB)^2=distance^2

But the geocodes are signed... And what is a difference of 5.0 geocoords in kilometers? It's not necessary for me to have the spheric shape of earth in my calculation. And I don't want to use the google maps api to caluclate it, as i have to calculate a huge amount of distances for every user. I would like to do it in a way similar to the one I showed above, with trigonometry.

Maybe you can help me. I would really appreciate that.

Thanks in advance

Spackbirne
vietnamtour vẫn chưa có mặt trong diễn đàn   Trả Lời Với Trích Dẫn