Hello I’m in the process of developing a running log in WinForms. I would like to know if anyone has some good resources for Google Maps integration. The end goal is to have a user double click on a cell in the “Distance” column and it will open a new form. The new form would have a Google Map on it where a user could trace their route using Google’s distance measurement tool. Accepting that route would close the window and enter the traced route’s distance (miles) into the cell.
I am completely new to Google Maps integration, if it is in fact possible with a C# application. Please point me in the right direction where I can find some sample code to accomplish my goal.
Thanks in advance.
You will need to use the google maps API.
Thankfully this is quite simple and uses JSON, which is well supported.
Have a look at:
http://code.google.com/apis/maps/documentation/distancematrix/
Unfortunately google will choose the best route between the two points you enter, which isn’t much use if you didn’t run the fastest route.
To combat this, have a look here:
http://code.google.com/apis/maps/documentation/directions/
This allows you to add waypoints, and is therefore perhaps more useful, but you will probably need the user to create these waypoints themselves.
A final thing to remember is that if you expect to be getting a large number of requests – google is now charging developers to use these services. As a non-business user you are limited to 2,500 requests per day with a maximum of 8 waypoints per request.