Solved

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

Posted on 2010-09-04
5
4,108 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 110

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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

622 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