I need to create a C# application takes a Google Map Url like this:
and export a GPX file.
Can someone tell me how can I achieve this? I don't need the whole script but just the idea or base API methods to call.
cgoogle-maps-apigpx
I need to create a C# application takes a Google Map Url like this:
and export a GPX file.
Can someone tell me how can I achieve this? I don't need the whole script but just the idea or base API methods to call.
Best Answer
You can use Google Maps Directions API (https://developers.google.com/maps/documentation/directions/intro) which returns the route information in JSON or XML format. The route's geometry is encoded in Google's polyline algorithm, see https://developers.google.com/maps/documentation/utilities/polylinealgorithm . Example from Google API Documentation:
After decoding, conversion to GPX is straightforward. Google allows up to 2,500 free requests per day.