void LoadMap(string str) { GeoStar.Core.Map mp = new GeoStar.Core.Map(str); GeoStar.Core.Control.WPF.BaseMapGraphicsLayer baseMap = new GeoStar.Core.Control.WPF.BaseMapGraphicsLayer( mp, new GeoStar.Core.Pyramid()); baseMap.VectorTile = false; baseMap.DataHash = str.GetHashCode(); m_GeoSpace.LayerBox.AddLayer(baseMap); }
void LoadFCS(string str, bool bSingle, bool bVec) { StringBuilder hashStr = new StringBuilder(); hashStr.Append(str); GeoStar.Core.Map map = new GeoStar.Core.Map(); GeoStar.Core.SqliteDatabaseFactory fac = new GeoStar.Core.SqliteDatabaseFactory(); GeoStar.Core.ConnectProperties conn = new GeoStar.Core.ConnectProperties(); conn.Server = str; GeoStar.Core.GeoDatabase gdb = fac.Open(conn); foreach (var item in gdb.DataRoomName(GeoStarCore.geoDataRoomType.GEO_DATAROOM_FEATURECLASS)) { if (bSingle) { hashStr = new StringBuilder(); hashStr.Append(str); map = new GeoStar.Core.Map(); } GeoStar.Core.FeatureClass fcs = gdb.OpenFeatureClass(item) as GeoStar.Core.FeatureClass; GeoStar.Core.FeatureLayer lyr = new GeoStar.Core.FeatureLayer(fcs); map.AddLayer(lyr); hashStr.Append(item); if (bSingle) { GeoStar.Core.Control.WPF.BaseMapGraphicsLayer basem = new GeoStar.Core.Control.WPF.BaseMapGraphicsLayer( map, new GeoStar.Core.Pyramid()); basem.VectorTile = bVec; basem.DataHash = hashStr.ToString().GetHashCode(); m_GeoSpace.LayerBox.AddLayer(basem); } } if (bSingle) { return; } GeoStar.Core.Control.WPF.BaseMapGraphicsLayer baseMap = new GeoStar.Core.Control.WPF.BaseMapGraphicsLayer( map, new GeoStar.Core.Pyramid()); baseMap.VectorTile = bVec; baseMap.DataHash = hashStr.ToString().GetHashCode(); m_GeoSpace.LayerBox.AddLayer(baseMap); }