events posted with distance from Home GZ

Discussion about the Geocaching Australia web site
User avatar
mtrax
Posts: 1974
Joined: 19 December 06 9:57 am
Location: Weston Creek, Canberra

events posted with distance from Home GZ

Post by mtrax » 28 October 08 10:55 am

could I request a enhancement to the Dashboard to include distance for the event caches

ie http://geocaching.com.au/dashboard/au/

it makes a just a little easier to determine potential events to visit, I'm not sure we need exact kms just some indication

User avatar
ideology
Posts: 2763
Joined: 28 March 03 4:01 pm
Location: Sydney
Contact:

Post by ideology » 28 October 08 11:28 am

actually what would be super-cool is a feed that would automatically put these in your calendar via http://en.wikipedia.org/wiki/ICalendar

Online
User avatar
CraigRat
850 or more found!!!
850 or more found!!!
Posts: 7015
Joined: 23 August 04 3:17 pm
Twitter: CraigRat
Facebook: http://facebook.com/CraigRat
Location: Launceston, TAS
Contact:

Re: events posted with distance from Home GZ

Post by CraigRat » 28 October 08 11:31 am

mtrax wrote:could I request a enhancement to the Dashboard to include distance for the event caches

ie http://geocaching.com.au/dashboard/au/

it makes a just a little easier to determine potential events to visit, I'm not sure we need exact kms just some indication
For performance reasons, the dashboard is cached and therefor is the same for everyone, adding that may cause some issues, however we can perhaps address this when we go to new hardware.

Good idea!

User avatar
mtrax
Posts: 1974
Joined: 19 December 06 9:57 am
Location: Weston Creek, Canberra

Post by mtrax » 28 October 08 11:39 am

a pity this calculation can't be done on client-side?

User avatar
ideology
Posts: 2763
Joined: 28 March 03 4:01 pm
Location: Sydney
Contact:

Post by ideology » 28 October 08 11:56 am

that's a very clever idea!

User avatar
Bewilderbeest
2000 or more caches found
2000 or more caches found
Posts: 955
Joined: 24 December 06 4:18 pm
Location: Canberra

Post by Bewilderbeest » 28 October 08 12:24 pm

Talk about lazy :roll: Just have a look at a map!

Guest

Post by Guest » 28 October 08 2:49 pm

You of course can do the calcs yourself as they are fairly easy :) Depending how acurate you want to get... the rough mud math way is to just use pythag (ie right angle triangle) but throw in a cos(latitude) for good measure.

distance in km = sqrt((abs(lon1 - lon2) * cos((lat1 + lat2) / 2))^2 + (abs(lat1 - lat2) * 100)^2)

Of course if you want to get precise you need to use the great circle distance formular, but the above is good enough for most cases.

User avatar
riblit
It's the journey.
It's the journey.
Posts: 3444
Joined: 04 April 03 6:30 pm
Location: Land Grant of John Campbell

Post by riblit » 28 October 08 3:02 pm

delta_foxtrot2 wrote:You of course can do the calcs yourself as they are fairly easy :) Depending how acurate you want to get... the rough mud math way is to just use pythag (ie right angle triangle) but throw in a cos(latitude) for good measure.

distance in km = sqrt((abs(lon1 - lon2) * cos((lat1 + lat2) / 2))^2 + (abs(lat1 - lat2) * 100)^2)

Of course if you want to get precise you need to use the great circle distance formular, but the above is good enough for most cases.
We have a function in the codebase but as previously stated we don't want to impact on the performance by doing this for individual page reguests.

User avatar
caughtatwork
Posts: 17025
Joined: 17 May 04 12:11 pm
Location: Melbourne
Contact:

Post by caughtatwork » 28 October 08 3:20 pm

Or you can use this page
http://geocaching.com.au/caches/events/au/

It's just not on the dashboard.

Guest

Post by Guest » 28 October 08 5:46 pm

riblit wrote:We have a function in the codebase but as previously stated we don't want to impact on the performance by doing this for individual page reguests.
Well do what the other person suggested, put the load on the client side rather than server.

User avatar
caughtatwork
Posts: 17025
Joined: 17 May 04 12:11 pm
Location: Melbourne
Contact:

Post by caughtatwork » 28 October 08 6:42 pm

I would prefer not. Javascript is unreliable across browsers, it takes more code to download and not everyone has it turned on. To cater for the most we do it server side. Use the other link which is generated in real time based on your home co-ords.

Online
User avatar
CraigRat
850 or more found!!!
850 or more found!!!
Posts: 7015
Joined: 23 August 04 3:17 pm
Twitter: CraigRat
Facebook: http://facebook.com/CraigRat
Location: Launceston, TAS
Contact:

Post by CraigRat » 28 October 08 7:15 pm

caughtatwork wrote:Or you can use this page
http://geocaching.com.au/caches/events/au/

It's just not on the dashboard.
DOH!!!!
I forgot about that page!

/brain is rusty

User avatar
mtrax
Posts: 1974
Joined: 19 December 06 9:57 am
Location: Weston Creek, Canberra

Post by mtrax » 28 October 08 8:05 pm

caughtatwork wrote:Or you can use this page
http://geocaching.com.au/caches/events/au/

It's just not on the dashboard.
perfect... :D

User avatar
mtrax
Posts: 1974
Joined: 19 December 06 9:57 am
Location: Weston Creek, Canberra

Post by mtrax » 28 October 08 8:08 pm

btw what happens to caches like this... http://geocaching.com.au/cache/ga1037 a FTF still available

Guest

Post by Guest » 28 October 08 8:18 pm

caughtatwork wrote:I would prefer not. Javascript is unreliable across browsers, it takes more code to download and not everyone has it turned on. To cater for the most we do it server side. Use the other link which is generated in real time based on your home co-ords.
Basic math functions aren't questionable, and you can easily use noscript tags for those with it disabled on a per site or entirely.

Most problems with JS is related to displaying, or layout etc.

Post Reply