Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4816
  • Last Modified:

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

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
abhi376
Asked:
abhi376
1 Solution
 
Ray PaseurCommented:
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
 
Molnar IstvánHelpDesk / ProgrammerCommented:
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
 
abhi376Author Commented:
Thanks !!
0
 
cyberhulkCommented:
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
 
Teja GCommented:
Can anybody post the source code of the same in ios using objective c? Thanks in advance
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now