• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Drawing line on Google Maps using Latitude and Longitude from MySQL table.

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please Help. I need to draw race route on Google Map and run Object on that line using Javascript. It's urgent
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Bat-Erdene Erdenetsogt
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
 
Bat-Erdene Erdenetsogt
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bat-Erdene Erdenetsogt wrote:Why not feel free to move it.


Done. Moved to 'Other Languages' as there is no specific 'Javascript' forum.

Winston
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
reply
    Bookmark Topic Watch Topic
  • New Topic