Tolga,
You are doing very cool stuff on the map :), here we have two recommendations for you,
1. map.panTo(lonlat) is a smooth panning with an animation that the map will move smoothly to the destination. “moveend” event will not be raised during the moving, only will be raised when it ends. If every step we raise a moveend event, that might be too often. So we recommend making the timer interval longer, for example 1000, before the “moveend” is raised.
2. It’s a good idea to use the existing marker overlays defined on the server side, but in web edition, InMemoryMarkerOverlay and FeatureSourceMarkerOverlay do not include all the markers at one time, in fact to improve the performance, only the markers within current extent will be added. At the end of every pan, as the current extent is changed, the available markers will also be refreshed, that’s why your predefined markers become invisible. One solution is to use SimpleMarkerOverlay, all markers added on this overlay will be always on the map, even they are not in the current extent. Here is the code of it.
SimpleMarkerOverlay markerOverlay = new SimpleMarkerOverlay("vehicleLayer");
Marker startMarker = new Marker(point, new WebImage("images/3.gif"));
markerOverlay.Markers.Add(startMarker);
Map1.CustomOverlays.Add(markerOverlay);
Another way to fix this is to create a new marker layer at client, please see the code below:
var markerLayer = new OpenLayers.Layer.Markers('vehicleLayer');
map.addLayer(markerLayer);
Let me know if you have any issues.
Thanks,
Ben