This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class RazorTemplateBase<T> : TemplateBase<T> | |
{ | |
private StandaloneHtmlHelpers _html; | |
public StandaloneHtmlHelpers Html | |
{ | |
get | |
{ | |
_html = _html ?? new StandaloneHtmlHelpers(TemplateService, ViewBag); | |
return _html; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static List<List<Coordinate>> ToGoogleMapsPolygon(this DbGeography dbGeo) | |
{ | |
// contains all geo data for one postal code / admin area code | |
// conversion to SqlGeography because DbGeography does not offer properties to determine rings within geometries. we need those ring information to display areas with holes | |
var sqlGeo = (SqlGeography) dbGeo.ProviderValue; | |
var numberOfGeometries = sqlGeo.STNumGeometries(); | |
var result = new List<List<Coordinate>>((int) numberOfGeometries); |