| Author |
Drawing line on Google Maps using Latitude and Longitude from MySQL table.
|
Bat-Erdene Erdenetsogt
Greenhorn
Joined: Jun 25, 2012
Posts: 6
|
|
|
Please Help. I need to draw race route on Google Map and run Object on that line using Javascript. It's urgent
|
 |
Jesper de Jong
Java Cowboy
Bartender
Joined: Aug 16, 2005
Posts: 12929
|
|
Welcome to the Ranch!
So, what exactly have you tried and where did you get stuck? Please be more specific with your question, so that we can help you with the exact problem you're having trouble with. Do you know how to use the Google Maps API?
Bat-Erdene Erdenetsogt wrote:It's urgent
Please ease up.
|
Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
|
 |
Bat-Erdene Erdenetsogt
Greenhorn
Joined: Jun 25, 2012
Posts: 6
|
|
Jesper de Jong wrote:Welcome to the Ranch!
So, what exactly have you tried and where did you get stuck? Please be more specific with your question, so that we can help you with the exact problem you're having trouble with. Do you know how to use the Google Maps API?
Bat-Erdene Erdenetsogt wrote:It's urgent
Please ease up.
I'm just a beginner at Google API. I retrieved my database. And imported Google API to my site. My problem is the latitude and longitude are retrieved from GPS tracker so database has over 1000. So I can't write every line like new google.maps.LatLng etc. I hope you understand me. Sorry I'm not very good at english.
|
 |
Winston Gutkowski
Bartender
Joined: Mar 17, 2011
Posts: 4761
|
|
Bat-Erdene Erdenetsogt wrote:I retrieved my database. And imported Google API to my site. My problem is the latitude and longitude are retrieved from GPS tracker so database has over 1000.
And is this a Java problem, or Javascript? The two are not the same, and you've come to the Java forum.
I'll be happy to move this Thread if you like.
So I can't write every line like new google.maps.LatLng etc. I hope you understand me. Sorry I'm not very good at english.
No, I'm afraid that last bit lost me. What do you mean by 'write every line like new google.maps.LatLng'? Is this a class constructor?
Winston
|
Isn't it funny how there's always time and money enough to do it WRONG?
|
 |
Bat-Erdene Erdenetsogt
Greenhorn
Joined: Jun 25, 2012
Posts: 6
|
|
Winston Gutkowski wrote:
And is this a Java problem, or Javascript? The two are not the same, and you've come to the Java forum.
I'll be happy to move this Thread if you like.
Why not feel free to move it.
Winston Gutkowski wrote:No, I'm afraid that last bit lost me. What do you mean by 'write every line like new google.maps.LatLng'? Is this a class constructor?
It's a Google API function, i think. I'm not expert on javascript. Is there a way to use Google Map in Java? If there is I would happily use Java. My problems would solve if I can use Google Map API on JApplet.
|
 |
Winston Gutkowski
Bartender
Joined: Mar 17, 2011
Posts: 4761
|
|
Bat-Erdene Erdenetsogt wrote:Why not feel free to move it.
Done. Moved to 'Other Languages' as there is no specific 'Javascript' forum.
Winston
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16483
|
|
Bat-Erdene Erdenetsogt wrote:My problem is the latitude and longitude are retrieved from GPS tracker so database has over 1000. So I can't write every line like new google.maps.LatLng etc.
I don't see why that is a problem. I have written programs which extract data from my GPS tracks and produce Google Maps from them. Here's an example: Keld to Grinton.
The way I did that was to read the XML file and output an HTML document including Javascript, and the Javascript uses the Google Maps API. Don't look at my example too seriously because I think it uses an old version of the Google Maps API, but the new version is fundamentally similar.
I used XSLT to produce this page, but you could certainly use Java to read the GPS track and output an HTML document. So you'll see that it doesn't matter how many points you have, you're just going to process them in a loop and produce one Google Map point for each point in your database. Here's how to think about it: first decide what you want your HTML file to look like. Make up some small examples (just a few points) by hand and make sure they work. Then write your Java code to produce real output which works the same way as your small examples.
|
 |
 |
|
|
subject: Drawing line on Google Maps using Latitude and Longitude from MySQL table.
|
|
|