internal static Map InitializeMap(float angle, string[] filenames) { var providers = new SharpMap.Data.Providers.Ogr[filenames.Length]; for (int i = 0; i < filenames.Length; i++) { providers[i] = new Ogr(filenames[i]); } var map = LayerTools.GetMapForProviders(providers); Matrix mat = new Matrix(); mat.RotateAt(angle, map.WorldToImage(map.Center)); map.MapTransform = mat; map.ZoomToExtents(); return(map); }
internal static Map InitializeMap(float angle, string[] filenames) { if (filenames == null) { return(null); } var providers = new SharpMap.Data.Providers.ShapeFile[filenames.Length]; for (int i = 0; i < filenames.Length; i++) { providers[i] = new ShapeFile(filenames[i], true); providers[i].Open(); } var map = LayerTools.GetMapForProviders(providers); Matrix mat = new Matrix(); mat.RotateAt(angle, map.WorldToImage(map.Center)); map.MapTransform = mat; return(map); }