I'm trying to display a Shapefile in Google Maps with the library SharpMap. I'm using ASP.NET MVC4. This is my controller:
public class HomeController : Controller
{
public ActionResult InitSharpFiles()
{
SharpMap.Layers.VectorLayer vlayer = new SharpMap.Layers.VectorLayer("streets");
vlayer.DataSource = new SharpMap.Data.Providers.ShapeFile("Content/streets.shp", true);
return View(vlayer);
}
public ActionResult Index()
{
return View();
}
}
I want to load this Shapefile in Google Maps if possible but I don't know how to continue because the documentation about Sharpmap is not much. The next code is where Maps is loaded:
<body onload="getMap()">
<div id="map-canvas" style="width:1200px; height:800px; margin:auto"></div>
I don't know what to do in the controller with the created SharpMap and how to pass this data to the view. How can I display the Shapefiles into Google Maps?
More information:
I have a .SHP file that is about 100MB and a .DBF file that is about 200MB, converted to KML it's about 450MB. What is easier to use, KML or Shapefiles? I want this data to show in Google Maps. I tried to use FusionTables but this is limited to 100MB.