public void SetGeometry(IEnumerable <SqlGeographyStyled> geographies)
 {
     try
     {
         List <SqlGeometryStyled> geoms = new List <SqlGeometryStyled>();
         foreach (SqlGeographyStyled geog in geographies)
         {
             SqlGeometry geom = null;
             if (geog.Geometry.TryToGeometry(out geom))
             {
                 SqlGeometryStyled geomStyled = SqlGeomStyledFactory.Create(geom, geog.Style.FillColor, geog.Style.StrokeColor, geog.Style.StrokeWidth);
                 geoms.Add(geomStyled);
             }
         }
         this.Internal_SetGeometry(geoms);
     }
     catch (Exception ex)
     {
         System.Windows.Forms.MessageBox.Show(this.GetType().Name + " Error: " + ex.Message);
     }
 }
        public static List <SqlGeometryStyled> Create(IEnumerable <SqlGeometry> geomList, Color?fillColor = null, Color?strokeColor = null, float?strokeWidth = null, string label = null, bool isInDefaultView = false)
        {
            var list = geomList.Select(g => SqlGeomStyledFactory.Create(g, fillColor, strokeColor, strokeWidth, label, isInDefaultView)).ToList();

            return(list);
        }