July 6th, 2013

Realtime Maps Based On XML File Changes With SignalR and ASP.NET MVC

This article explores how to implement realtime Google and Bing Maps based on XML file changes by external system. It can be used in many ways like to track and display real-time position of bus, train or flight in the maps.

1. Assuming the external system inserts current location in XML file.
2. The .NET FileSystemWatcher object is used to monitor XML File changes. When a location is inserted, the FileSystemWatcher fires an event to notify that a change has occurred.
3. On change event, the current location is passed to client using SignalR
4. The map is updated by client side code.