Howard,
I did not send the aspx markup, maybe that is where your difficulty lies. I will attach it. The map loads data from an initial query (function SetUpDataSet) and the data is cached in a dataset. The map code then accesses this dataset and draws the map. This works fine. The aspx markup contains a server side timer firing every x number of seconds; could be 5 or could be 10 seconds. When the timer fires, the function UpdateTrackShape() is called. UpdateTrackShape creates a proxy and calls a web service that may or may not have new data. If it does not, nothing happens, but if it does, the new data DataRow.ItemArray (object[] values) is returned and cast as a DataRow. The cached dataset is updated with this DataRow and DrawMapUpdate() is called with the new updated dataset. The important field in ths dataset is State which controls which color marker icon is loaded. DrawMapUpdate() should redraw the map reflecting the new data. I would like to redraw only the point that have state change, but if I cannot do that, I suppose I could redraw the entire map by deleting the existing shape file and clearing the features. That is what I am trying to do in the function DrawMapUpdate(). We are taking advantage of the World Map Kit to draw the map. That presents a problem in that one cannot use CustomOverlays with StaticOverlays or DynamicOverlays that the WMK uses; therefore all the examples of redrawing or removing markers use CustomOveraly code to achieve the marker manipulation cannot be used. Because of using the WMK, that is not an option. I see two options, modify the WMK to load CustomOverlays ( I would not want to tackle that), or redraw the map, as I am trying to do. Most likely there is another option that I don't know about. I am hoping you can point that out and give some code, or better yet modify mine. The axd error is 'Microsoft JScript compilation error: Syntax error'. on: 'on'+state,this,response);}catch(e)
the error is flagged on the } before the catch(e) in GeoResource.axd (line 627). No error is flagged in the function DrawMapUpdate. It may be difficult to set up an example, but I will look into that. The map is only part of a larger system. Hopefully you can figure this out from the information I am giving you now.
Regards,
Steven
OpenLayers.Ajax.Responders.dispatch(
1337-Map.txt (23.7 KB)