Solved

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

Posted on 2010-09-04
5
3,689 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
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…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

734 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