tags:

views:

36

answers:

2

I have a collection of gps points in the following format:

S 25°35', W 48°10'

I cannot find a way to pass it to google maps api (v2) , so that I can draw a polyline.

+2  A: 

What you need to do is convert the degree-style latitude and longitude into a decimal style geo location point. Then you'll have the style that google is looking for.

Wyatt Barnett
+2  A: 

You need to convert your degrees, minutes, seconds location into a decimal location:

// For 25°35'0''
var degrees = 25;
var minutes = 35;
var seconds = 0;

// need to calculate the decimal 25.5833333
var longitude = degrees + (minutes / 60) + (seconds / 60 / 60);
Cannonade