Hi James,
I have narrowed down the problem a bit.
I have used the exact code from the AutoRefreshOverlay and was able to see the markers move around. I then used Google Map overlay and projected the markers in the same position. The markers didn't refreshed. I am guessing it is a Projection PLUS AutoRefreshInterval issue. Below is code used. Maybe I missed something.
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
Map1.MapBackground.BackgroundBrush = new GeoSolidBrush(GeoColor.FromHtml("#E5E3DF"));
Proj4Projection proj4 = new Proj4Projection();
proj4.InternalProjectionParametersString = Proj4Projection.GetEpsgParametersString(4326);
proj4.ExternalProjectionParametersString = Proj4Projection.GetGoogleMapParametersString();
proj4.Open();
PointShape position = new PointShape(-95.31105, 38.98184);
PointShape projectedPosition = proj4.ConvertToExternalProjection(position) as PointShape;
PointShape position2 = new PointShape(-95.20359, 38.92185);
PointShape projectedPosition2 = proj4.ConvertToExternalProjection(position2) as PointShape;
Map1.CurrentExtent = new RectangleShape(projectedPosition, projectedPosition2);
Map1.MapUnit = GeographyUnit.Meter;
GoogleOverlay google = new GoogleOverlay("Google Map");
google.GoogleMapType = ThinkGeo.MapSuite.WebEdition.GoogleMapType.Normal;
google.JavaScriptLibraryUri = new Uri("maps.google.com/maps?file=api&v=2&client=gme-astrataasia&sensor=true");
Map1.CustomOverlays.Add(google);
SimpleMarkerOverlay markerOverlay = new SimpleMarkerOverlay("MarkerOverlay");
markerOverlay.AutoRefreshInterval = TimeSpan.FromMilliseconds(3000);
markerOverlay.Tick += new EventHandler<EventArgs>(markerOverlay_Tick);
position = new PointShape(-95.26095, 38.93926);
projectedPosition = proj4.ConvertToExternalProjection(position) as PointShape;
markerOverlay.Markers.Add(new Marker(projectedPosition, new WebImage(21, 25, -10.5f, -25f)));
position = new PointShape(-95.26086, 38.96956);
projectedPosition = proj4.ConvertToExternalProjection(position) as PointShape;
markerOverlay.Markers.Add(new Marker(projectedPosition, new WebImage(21, 25, -10.5f, -25f)));
position = new PointShape(-95.25919, 38.96758);
projectedPosition = proj4.ConvertToExternalProjection(position) as PointShape;
markerOverlay.Markers.Add(new Marker(projectedPosition, new WebImage(21, 25, -10.5f, -25f)));
position = new PointShape(-95.29056, 38.95703);
projectedPosition = proj4.ConvertToExternalProjection(position) as PointShape;
markerOverlay.Markers.Add(new Marker(projectedPosition, new WebImage(21, 25, -10.5f, -25f)));
position = new PointShape(-95.22653, 38.94278);
projectedPosition = proj4.ConvertToExternalProjection(position) as PointShape;
markerOverlay.Markers.Add(new Marker(projectedPosition, new WebImage(21, 25, -10.5f, -25f)));
position = new PointShape(-95.26987, 38.93531);
projectedPosition = proj4.ConvertToExternalProjection(position) as PointShape;
markerOverlay.Markers.Add(new Marker(projectedPosition, new WebImage(21, 25, -10.5f, -25f)));
Map1.CustomOverlays.Add(markerOverlay);
}
}
void markerOverlay_Tick(object sender, EventArgs e)
{
SimpleMarkerOverlay markerOverlay = (SimpleMarkerOverlay)Map1.CustomOverlays["MarkerOverlay"];
foreach (Marker marker in markerOverlay.Markers)
{
double lon = marker.Position.X + new Random(Guid.NewGuid().GetHashCode()).Next(-12, 20) / 50.0;
double lat = marker.Position.Y + new Random(Guid.NewGuid().GetHashCode()).Next(-11, 26) / 50.0;
marker.Position = new PointShape(lon, lat);
}
}