Load large Shapefiles using a Web Worker
This sample shows how to load large shapefiles (.shp, .dbf, .prj) onto the map using a web worker so that it doesn't freeze the UI. This sample uses the open source
library which converts Shapefiles into GeoJSON which can easily be consumed by the map control. It also makes use of the open source
library which makes working with web workers easier.
Not all file and mime types are enabled in all servers. If using .NET, it is recommended to add the following to the web.config file:
<mimeMap fileExtension=".shp" mimeType="application/octet-stream" />
<mimeMap fileExtension=".dbf" mimeType="application/octet-stream" />
<mimeMap fileExtension=".prj" mimeType="text/plain" />