Does someone have a beginning to end example of how to take data from a SQL Server geography type field and pass it to the Google Maps API to display the shape on a map? The geography data I'm storing is either a polygon or multipolygon, some of which have holes in them. I would like to do this using .NET code and JavaScript on the fly with whatever data is stored.
[GIS] SQL Server to Google Maps
google-maps-apisql server
Best Answer
Here is how I did it using MVC and VB.NET
This SchoolDistrictVertices function is in a partial class of a SchoolDistrict object which was generation using EntityFramework from a SQL database. It contains a geography field named DistrictLocation.
Here is the View file which takes a SchoolDistrict object as the model: