Friday, April 27, 2007

So for a few years, I've been into Geocaching.    For those of you who never seen this amazing world wide treasure hunt look at the official website -

http://www.geocaching.com

Now here's a great way to use your Windows Mobile device,  to lookup the nearest hidden caches to you (i.e Geocaching radar).     The website lets you find the nearest co-ordinates to you.    Taking the form of a URL like -

http://www.geocaching.com/seek/nearest.aspx?lat=52.2656&lon=0.18905

So I've added a simple geocache menu option to the application I built and shared in this blog post at -

http://www.binaryrefinery.com/main/PermaLink,guid,e63c722f-5798-4fee-8764-f787b46ee29d.aspx

 

Here's the source for this, little useful button -

 

private void mnugeocache_Click(object sender, EventArgs e)
{
GpsPosition pos = gps.GetPosition();
if (!(pos.LatitudeValid || pos.LongitudeValid))
{
DialogResult ret = MessageBox.Show("Position Is Not Currently Valid, Lookup Anyway?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2);
if (ret == DialogResult.No) return;

}
string url=@"
http://www.geocaching.com/seek/nearest.aspx?lat="+position.Latitude+"&lon="+position.Longitude;

System.Diagnostics.Process.Start("iexplore.exe", url);
}

 

 

Comments are closed.

Theme design by Jelle Druyts

Pick a theme: