ThinkGeo.com    |     Documentation    |     Premium Support

In Silverlight Edition,Is not have "TabFeatureLayer"?

my company work with mapinfo.


i need to use "tabfiles" insert to map.


i see in your destop version have the class "ThinkGeo.MapSuite.Core.TabFeatureLayer",


but not have in silverlight.


how will i do?


thanks and sorry for my english. 


:)


 


 



Hello sumeth, 



Welcome to MapSuite world. 



TabFeatureLayer only supported in server side but not supportted in client side.  



Here is a sample that shows you how to render the TabFeatureLayer in the Server Side and retrieve it from the Client Side. 



You can get the USA.TAB data from:


wiki.thinkgeo.com/wiki/File:DesktopEditionSample_NativeTabFileSupport_CS_110524.zip 



And then change the SimpleServerRendering class and default class in our SilverLight HowDoISample project like this:  


For SimpleServerRendering class:  


private void UserControl_Loaded(object sender, RoutedEventArgs e) 

Map1.MapUnit = GeographyUnit.DecimalDegree; 
Map1.CurrentExtent = new RectangleShape(-96.51477,30.759543,-94.355788,28.910652); 

ServerLayerOverlay serverLayerOverlay = new ServerLayerOverlay("NativeServer", "SilverlightMapConnector1"); 
Map1.Overlays.Add(serverLayerOverlay); 

Map1.Refresh(); 

 



For default.aspx.cs:  


TabFeatureLayer tabFeatureLayer = new TabFeatureLayer(MapPath("~/app_data/USA.TAB")); 
tabFeatureLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.CreateSimpleAreaStyle(GeoColor.StandardColors.White, GeoColor.FromArgb(100, GeoColor.SimpleColors.Green)); 
tabFeatureLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; 
tabFeatureLayer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle = PointStyles.City1; 
tabFeatureLayer.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = LineStyles.Canal1; 
tabFeatureLayer.RequireIndex = false; 

// Native Server 1 
BackgroundLayer backgroundLayer = new BackgroundLayer(new GeoSolidBrush(GeoColor.FromArgb(255, 156, 187, 216))); 
ServerLayerOverlay layerOverlay = new ServerLayerOverlay("NativeServer"); 
layerOverlay.Layers.Add(backgroundLayer); 
layerOverlay.Layers.Add(tabFeatureLayer); 
SilverlightMapConnector1.ServerLayerOverlays.Add(layerOverlay); 



Don't forget move the USA.TAB to target folder.  



Regards  



Gary



 


 


 



Hello sumeth, 
  
 I will answer your question in your other post, please look at there. 
  
 Regards, 
  
 Gary