I'm a new user with MapSuite, and is currently evaluating it. I downloaded and installed it today.In VS 2008 I've built a small windows application with vb.net. I've used the online demo as a guide line.After running the application it shows word "Unlicensed" ! I'm aware this is trial version, but why not map is showing?
WinformsMap1.BackgroundOverlay.BackgroundBrush = New GeoSolidBrush(GeoColor.GeographicColors.ShallowOcean)
Dim worldLayer As New TabFileFeatureLayer("D:\TestSuite\TestSuite\MAP Files\UP.TAB", "FID")worldLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.CreateSimpleAreaStyle(GeoColor.FromArgb(100, GeoColor.SimpleColors.Green), GeoColor.SimpleColors.Green)worldLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20
Did you have a try on the HowDoI sample to load a tab file to see if it works? That is in the following location: How Do I \ Data Providers\ Load TabFileFeatureLayer
Also, which operating system are you using against? Did you copy the corresponding DLLs to the System32 folder?
As You suggest I have used sample of TabFileFutureLayer, which you can see in my sample code. Even if I am able to load HoustonMuniBdySamp_Boundary.Tab file and it shows Map as said in How Do I sample. But when I am trying to load my TAB file, it not shows any map.
I have copied all corresponding DLL into system32 folder. My OS is Window XP Professional with service pack 2.
Please guide me further to go ahead.
Another request is how we decide to define CurrentExtent for different TAB file.
Thanks for your updated and letting me know your stauts.
Now, I am doubting the current extent is not setting correctly , please try to set it to the bounding box of the specified tab file.
Dim worldLayer As New TabFileFeatureLayer("D:\TestSuite\TestSuite\MAP Files\UP.TAB", "FID") worldLayer.Open() winformsMap1.CurrentExtent = worldLayer.GetBoundingBox()
winformsMap1.Refresh()
If you still could not recreate this problem, could you send us the tab file, we can take a try against it? It would be helpful to identify the problem and find a solution for it.
Any more questions please feel free to let me know.
I have already written same code as you suggested, but it gives Exceptions "Exception has been thrown by the target of an invocation", which I have posted already, and this also replied by you only. As per your suggested link I also set Affinity of processor, but the problem is same.
I am sending the map file as attechment, Please check and guide me to display map.
It gives run time error "Exception Has been thrown by the target of an invocation", when try to execute worldLayer.open line. Why this error is coming when I have also set the processor affinity.
It seems that the run time error you encountered is caused by FDO libraries. Could you please try to ignore the parameter “OGRSchema” and try to just specify the parameter as null instead when initializing TabFileFeatureLayer? Like this: Dim worldLayer As TabFileFeatureLayer = New TabFileFeatureLayer("D:\BSNL-UP.TAB", "No", null, "BSNL-UP", "GEOMETRY") I encountered this kind of error once and had it resolved in this way. FYI: We’ve added x64 system support for MapSuiteFdoExtension, you can contact our support to get a copy of the FDO library package, there you will find two sets of MapSuiteFdoExtension, one is with suffix x86, another is with suffix x64. The way to use FDO Extension on x86 platform remains the same; for x64 system, please add a reference of the latest build of FdoExtension.dll to your application, and put MapSuiteFdoExtensionx64 under system32 folder. Further questions please let me know.
In my application, user has choice to open .Tab file or .Shp file. Here I have a shape file, when I am trying to open this shape file, it not displayed any data and not any error. Although I had try to open this shape file in map suite explorer sample, but nothing displayed. But I am able to open shape file which you have provided in sample data.Below is sample code and data file is attached. allColumns Return value but map not display. Please guide about problem.
As far as I can see, there’s nothing wrong with your code. After testing the file you attached, I found that it’s the shapefile you’re trying to consume in your application caused the problem. I’ve tried to open it with different map viewers, like ArcView, ArcGis Explorer. The results are the same with what I got when I tried to open it with MapSuite Map Explorer. Sorry that I can’t provide further information about this issue. Further questions please let us know. Thanks.
The same shape file is open by MapInfo, if you can check it.
Second problem is my some tab file opens, when I am setting Map Unit as DecimalDegree, but some map file opens with Map Unit Meter, so how can set map unit dynamically through statement, so that Map Unit can take automatically with Map Style or any other solution is there.
For the shape file “shp0121_01.shp” not displayed correctly problem, I think the root reason is that the shx file not set up correctly, just as mentioned in ticket 3370.
I do not think it is reasonable and realistic to identify the unit of data dynamically as the data unit should be known on top of everything. While one thing I noticed but I am not sure 100% correct is that the non-decimal degree data bounding box is always outside the scope (-180,180,180,-180), hope this can give you some hints.
Any more questions please feel free to let me know.
As per map unit problem, now it is very important for me.
I am working with .tab file, at the same time I have to open 4 ot 5 or more tab file at times, but some displaying data and some not in both case. Means if I have taken GeographicalUnit.DecimalDegree, it displays some tab file but some not, and if I have taken GeographicalUnit.Meter, it also works in same way. So, Please guide me, how to solve this problem. Actually I have not much knowledge of GIS, So if any sample regarding to control map unit, it will better for me.
I think your tab files are in different projections, some of them maybe WGS84 so they can display at DecimalDegree unit, some of them maybe Mercator so they can display at Meter unit. You need to set Projection on FeatureLayer.FeatureSource.Projection to convert data to the same. If you are not familiar with Projection you can refer the sample in Code community, wiki.thinkgeo.com/wiki/Map_S...Google_Map
James, I had gone through sample. But there is some question-
1. How to know the nature of file, when you are going to load into application (WGS84 / Mercator / any other format), so the unit can be set dynamically.
2. Is it possible to convert Mercator to WGS83 format?
I want to give some of my options only about the second question here as I am not a GIS specialist. Every projection has two SRIDs, from srid stands for the data original projection reference system, and the toSrid stands for the target projection reference system. Each srid number can also be represented by a projection string just like the GoogleMapProjection string stands for Srid number 900913, so the 4326 number is not a fixed value, it stands for the WGS84 projection system which is very common used, you need to change it if you original data projection is not WGS84.
Actually this is big problem with me. Since I have not much knowlege about GIS, So the first thing is we should know about the nature of tab file, so the projection can be set.
Since whole application is develeop on degree decimal, I am not getting any problem with it. But now we have to handle both nature of file. So, there is two case arises: 1. Tab file with decimal degree : not require projection 2. Tab file with Meter : required projection,
So, my means is how to decide that projection required or not ? - It is very important for me. And if projection require, then how to defile Internal and external projection Parameter, Means some basic information from where I can get. Regards Sanjay
It is imperative that you know the projection information of the geographic data you are dealing with. You need to contact your data provider and they should provide you with the projection info for each file (shapefile or TAB file) that you are using so that you can apply the appropriate projection conversion for each file to line up with World Map Kit in WGS84.There is no GIS software in the world that can magically determine the projection of a layer just by looking at the bounding box, the coordinates or anything if the projection is not explicitly specified. The bottom line is that you need to get that info from your data provider because it is the responsablity of the creator of the GIS data to be complete and provide the projection information. Thank you.