Solved

how to animate markers on google maps along with a route ?

Posted on 2010-09-04
5
3,053 Views
Last Modified: 2016-10-06
Hi,

I have some couple of co-ordinates and time. I'm looking to animate the marker along with the route. Please help me on how to animate the marker along with the routes and if possible at particluar times. I tried some links in google and none of them works.

-Abhi
0
Comment
Question by:abhi376
5 Comments
 
LVL 109

Expert Comment

by:Ray Paseur
ID: 33604724
Please post the code you've been working on, and tell us what kinds of errors you're getting.  

Also, please post the links to Google that show the examples you tried.

Thanks, ~Ray
0
 
LVL 13

Accepted Solution

by:
Molnar István earned 500 total points
ID: 33662554
my idea is :
1.) to create a database or xml file to store the coordinates
2.) retrieve the coords from database and create a polyline from the coords in JS
3.) display the polyline and the marker on the google map (JS)
  -add a marker to the map with the first coord (this will be the starting point)
  -loop through each coord and refresh the coordinates of the marker (you can create a button to stop/start the loop)
  -you can use setInterval()/clearInterval() functions in JS to automate the loop

you can use http://en.googlemaps.subgurim.net/ free .net control if you would like to avoid writing javascript


here is an example how to animate the marker along the route:
http://econym.org.uk/gmap/example_cartrip2.htm
(more examples :http://econym.org.uk/gmap/ - look for "fun stuff")

hope it helps

0
 
LVL 6

Author Closing Comment

by:abhi376
ID: 33698862
Thanks !!
0
 

Expert Comment

by:cyberhulk
ID: 37786504
Here is the code of moving marker, the coordinates can be taken either from database or form somewhere you would like!

Find the code attached, just initialize the x and y arrays and use....
map.js
0
 

Expert Comment

by:Teja G
ID: 41831333
Can anybody post the source code of the same in ios using objective c? Thanks in advance
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question