I have polygon data in SQL Server 2012 that I need to get onto a Leaflet application - we're not talking thousands of polygons, but simplified U.S. counties where only one state will be displayed at a time. The database gets updated every 5 minutes and the map needs to reflect that. I know there are several ways to get the data to geojson/json and put that onto the map (such as the jQuery $.getJSON
method). We've thought about creating a web service to pull the data and do the conversion to geojson, then get it onto the map with Ajax. The concern there is that this sounds slow and CPU-intensive. Thoughts on that?
I'd lke to know if there are any methods that would allow me to more directly query SQL Server (from within the application perhaps) and get the polygon data into my Leaflet app, keeping in mind that it needs to be refreshed every 5 minutes.