I have an application which contains a map service of point locations. The point data in the map service are from a Query Layer with the data coming from Sql Server (not SDE). I don't have control of the server and can only update the lat/longs and geometry column of the data via a stored procedure in SQL Server. This wasn't too hard - I just pass the facility ID and x/y of the MapPoint where the user clicks to a WCF service which then runs the stored proc in the database. Where I'm stuck is once the asynch WCF call is complete I'm trying to refresh the map display and have tried this -(_Layer as ArcGISDynamicMapServiceLayer).Refresh();
and this Map.Zoom(1.0);
but neither actually refreshes the data. The point the user moved is still in the old location until they pan or zoom out. The code below works, but is there a better/easier way that I'm not seeing?
TimeSpan zd = _Map.ZoomDuration;
_Map.ZoomDuration = new TimeSpan(0, 0, 0, 0);
_Map.Zoom(0.99);
_Map.Zoom(1.01);
_Map.ZoomDuration = zd;
Thanks, Terry