Reputation: 1053
I am creating a GPS tracking system. I am able to collect the real time coordinates. Now I want to move the marker in real time in the web interface using Google Maps V3. What I know is to move the marker if I know the starting & ending point. But here since the system is live the ending point will keep on changing dynamically. I cannot refresh the page.You can find coordinate logging here
Upvotes: 0
Views: 3757
Reputation: 1
Good structure but not actual. i think the new variable is not declare value of it, even googlemap try to find it. when i run this in my device and edit too still show wrong location. i hope we may find new idea to locate. for this, i think any other method will be more effective than "new", because syntax.
Upvotes: 0
Reputation: 38147
Its very simple - just use the setPosition method ... example :
var myLatLng = new google.maps.LatLng( 50, 50 ); // initial position
var marker = new google.maps.Marker( {position: myLatLng, map: map} ); // add to map
marker.setPosition( new google.maps.LatLng( 52, 52 ) ); // move it
Upvotes: 1