It is possible to save a map in .gst form using the WorkSpacePersistence class.
1. Firstly you will need to create an object of FileStream class.
2. The First argument in the constructor of the FileStream class is the file path i.e path where this file needs to be saved.
3. Second argument is the FileMode, I have used FileMode.Create. There are various other option when using FileStream, refer this link same.
4. Use the save method from the WorkSpacePersistance class, pass the map and stream as arguments.
(Note : myMap is the name of the MapControl I have used in my application)
1. Firstly you will need to create an object of FileStream class.
2. The First argument in the constructor of the FileStream class is the file path i.e path where this file needs to be saved.
3. Second argument is the FileMode, I have used FileMode.Create. There are various other option when using FileStream, refer this link same.
4. Use the save method from the WorkSpacePersistance class, pass the map and stream as arguments.
(Note : myMap is the name of the MapControl I have used in my application)
Dim stream As Stream stream = New FileStream("D:/vaibhav/mumbai.gst", FileMode.Create) Dim wsp As New MapInfo.Persistence.WorkSpacePersistence() wsp.Save(myMap.Map, stream)
1 comments:
I am glad to find amazing information from the blog.
Thanks for sharing the information.
GST filling
Post a Comment