i have a TAB file with extents: 748843, 9295842 : 749579,9296195; scale 1:27726598
when i call it from code with TabFileFeatureLayer class, the map doesn't appear..
is the map too big..??
i have a TAB file with extents: 748843, 9295842 : 749579,9296195; scale 1:27726598
when i call it from code with TabFileFeatureLayer class, the map doesn't appear..
is the map too big..??
Lia,
Can you provide us a sample application that can show the code you are using? It is more likely that there is a problem with the Style or ZoomLevel code in your sample.
I have the same problem and I hade post about it on:
gis.thinkgeo.com/tabid/143/afv/topic/aff/21/aft/7441/Default.aspx
Hi, lia,
I don’t know how you set the MapUnit and whether you have set the right arguments for the constructor of TabFileFeatureLayer. Could you provide us with a simple sample application with your data so that we could checkout that. If the data is big, and please send it to support@thinkgeo.com and ask him forward to me.
If you still feel confused about how to use it; please refer to the “LoadTabFileFeatureLayer” sample in our installed samples which you could find its source code at “Samples\Extending MapSuite\LoadTabFileFeatureLayer.aspx”.
Also, please pay attention to the post that Ben has posted in the last reply; maybe you could find the answer.
Thanks,
Khalil
hi all,
thanks for the responses..
i recreated the map, so the extends being smaller (-2 , -1 : 2 , 1) and the scale = 1:1333816
the map can be showed up with RectangleShape = (-2, 1, 2, -1)
but...i have another problem, sometimes i get an error message when running this map.
The error is "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
below is the code
Map1.MapUnit = GeographyUnit.DecimalDegree;
Map1.CurrentExtent = new RectangleShape(-2, 1, 2, -1);
Map1.MapTools.MouseCoordinate.Enabled = true;
TabFileFeatureLayer worldLayer = new TabFileFeatureLayer(MapPath("~/SampleData/LK_Utara_New/LK100_Kav_new.TAB"), "FID");
worldLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = worldLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.CreateSimpleAreaStyle(GeoColor.FromArgb(100, GeoColor.SimpleColors.Green), GeoColor.SimpleColors.Green);
worldLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
LayerOverlay staticOverlay = new LayerOverlay("StaticOverlay");
staticOverlay.IsBaseOverlay = true;
staticOverlay.Layers.Add(worldLayer);
Hi, lia
Thanks for you code provided for us. If you have deployed your web app on IIS or run it in ASP.NET development server; please make sure that you have full permission for the data you want to access and also you need to make the data as trusted ones too. Another reason about that is maybe your web app is trying to read the data but it doesn’t exist any more.
If you still have this problem, please provide us with the full stack trace or the data. So we could find the cause about that.
Thanks,
Khalil
Thx Khalil for your response.
I did try to publish the map on IIS, the map can show up well without error. The error just appear when i run it in visual studio. so, is there something wrong with my visual studio…?? i’m using visual studio 2008.
the other question i’m going to ask is i have an original map that when i open the map with mapinfo, it looks like this picture :
lh3.ggpht.com/_jGr73CiiPvc/S9fWG1YYhNI/AAAAAAAAAsc/xjMkn7-j-RI/s720/map%20asli.png
but when i call the map with map suite (the code is same as my last reply), the map look like this picture :
lh3.ggpht.com/_jGr73CiiPvc/S9fWcdmOa7I/AAAAAAAAAsg/qWm6Szoj2bg/s800/map%20test.png
am i using wrong classes or functions or parameters?
is there any clearer documentation about all of Map Suite classes & methods/functions plus sample how to use all of the methods/functions?
thanks
Hi, lia
I also don’t know why this problem occurs that’s because I don’t have the same enviroment with you. I mean the same data and code with you in VS2008.
The best method to get familiar with Map Suite products is to learn it from our installed samples and the API documentation which are included in our installation package. API documentation lists all the classes & methods we support. So please have a try.
If you could provide us with data; I think we will quickly address it and find the reason.
Thanks,
Khalil
Hi Khalil,
I want to send the code to you, so you can check my code.
I’ll send my code to support@thinkgeo.com and ask them to forward it to you.
Thanks
Lia
Hi, lia
Thanks for your code. This bug is a known bug for it. It’s caused by the multithreading of FDO extension which is a thrid party’s data access technology. And this error just only occurs when you run it in visual studio.
Thanks,
Khalil
hi khalil,
thanks for your response.
but that's not the one that i want to ask, the question i'm want to ask is i have an original map that when i open the map with mapinfo, it looks like this picture :
lh3.ggpht.com/_jGr73CiiPvc/S9fWG1YYhNI/AAAAAAAAAsc/xjMkn7-j-RI/s720/map%20asli.png
but when i call the map with map suite (the code is same as my last reply), the map look like this picture :
lh3.ggpht.com/_jGr73CiiPvc/S9fWcdmOa7I/AAAAAAAAAsg/qWm6Szoj2bg/s800/map%20test.png
am i using wrong classes or functions or parameters?
thanks
Hi, lia
Your code is right. The reason is the same as just I have said in the last reply post that we use the FDO to render the features in our TabFileFeatureLayer. As far as I know, FDO just render the vector features except that the Pen, Brush or something else about GDI+ included in the Tab Map file. I think it’s the main reason.
Thanks,
Khaill
so, is there any way to view the map completely…??
lia,
Sorry for that; Map Suite don’t support render it completely. But you could use Global Mapper software to view all feature about it.
Thanks,
Khalil