I currently have the task of integrating some GPS data stored in a MySQL database with google earth. The objective is to create placemarks/waypoints of these readings and display them on google earth.
I googled the task and came across an article : "A Database Driven Earth App: Using PHP & MySQL with the Earth API" .
Located at the URL:
https://developers.google.com/earth/articles/phpsqlearth
I followed it successfully; until I came to where I had to create the placemarks. The main issue is that the 'createPlacemark' function has the following signature:
"createPlacemark(name,address,type,lat,lng)" .
My main point of concern is the lat and lng arguments (latitude and longitude), because the GPS data in the
database are all in the format :
"N5 bb.xxx E8 cc.yyy".
No separate longitude or latitude data was stored. The data is being collected via a garmin gps. I was thinking that perhaps I could resolve this issue by doing this:
var point = ge.createPoint('N5 bb.xxx E8 cc.yyy ') ,
and forget about the
point.setLatitude(parseFloat(lat))
and
point.setLongitude(parseFloat(lng)) statements.
However , I wanted to confirm if I was on the right path seeing I will be away from my development machine for a few days.