You can definire a list of markers that have the ability to move along a predetermined path ( roads , polylines or polygons ) .
This list type TMobileList is available through the property Mobiles.
TECMap available in more than two properties related to mobiles
TMobileList
You have access to methods and propertiesiMarker is the index of the list marker Markers
iRoute index is the way forward is in Roads (default) or in Polygons or Polylines
iSpeed is the mobile speed in km / h
iDistance is the starting position on the road in meters
var c:TAlphaColor;
...
TAlphaColorRec(c).R := 247;
TAlphaColorRec(c).G := 250;
TAlphaColorRec(c).B := 191;
map.ColorFilter.Colors.Add(c);
map.ColorFilter.ActionColor := acKeep;
...
map.ColorFilter.Add(Old_color_1);
map.ColorFilter.Add(New_color_1);
map.ColorFilter.Add(Old_color_2);
map.ColorFilter.Add(New_color_2);
map.ColorFilter.ActionColor := acReplace;
Property read / write indicating what is the motive that we will follow the card is automatically refocus on him when he crosses the boundaries visible.
Set this property to -1 to not follow any mobile
29By default, the mobile does not move, you can move in either automatic mode or manual mode.
In automatic mode they will move at the speed that you've assigned them in manual mode or you can directly manipulate the distance is to be calculated according to time and speed.
Even in automatic mode you can manually change the distance, speed, you can also change the road on which the mobile moves, its position is automatically adjusted.
30To do this you must access the class tmobile
TMobile
Property read / write sets the distance in meters, mobile since its real starting point, management is not taken into account.
Any change of this property leads to a shift of the marker associated with mobile
31Direction of movement, dsStartEnd or dsEndStart
For a road dsStartEnd corresponds to a displacement of the point of departure or arrival point for polylines and polygons of the first point to last.
The distance is always calculated based on the real starting point, management will not be decisive for a shift automatic or manual call to Move.
Index in the list of mobile phones
Property read / write the index of the Marker to move
Property read / write set if the mobile moves automatically or not, by default set to false the mobile does not move by itself.
Events
Two events are related to mobileIndex is the index of the list marker Markers
dLatitude an dLongitude the new position
Vous can change it in the event
8iMobile index in the list of mobile Mobiles
Depending on the direction the mobile is either at the terminus or point of departure
Property Mobile is set to false, to boost your mobile in automatic mode you must return it to true and reverse the direction.