Add Animated Marker
Instructions
Use the "Start" button to animate the marker in a predefined path.
See the JavaScript API for more information.
Source Code
The Javascript code for the above map is:
<script language="Javascript"
src="http://www.locationbox.com.tr/locationbox/services?Key=key&Cmd=APIV2
&Typ=JS"></script>
<script language="JavaScript">
var mapper = new IMapper();
function startup() {
mapper.initMap(41.1, 29.1, 9);
mapper.addNavigationPanel();
mapper.addCustomMarker("id_1", 41.0, 29.0, 'SampleMarker', 'images/049bw.gif',
40, 40, null);
return;
}
function animate() {
ordinates = [29.0, 41.0, 29.1, 41.1, 29.15, 41.15, 29.2, 41.2];
mapper.animateMarker('id_1', ordinates, 300);
return;
}
</script>
Button:
<a href="javascript:animate()"
><img src="images/add.gif" border=0></a>
Download working pageRemember that you need to use your key code as Key attribute.