We provide a ValueStyle you can set different style based on column values for the same shape files. There is a sample code in our HowDoI sample, you can find it under Styles category.
As you suggested, I have already done with examples, but as per example in value style we can define single value with valueItem, but I have to check a full range of value, as I have defined in my first post. How we can check a range of value. In my case it is TAB file and column data type is Int32. Please help/
James I have completed this with as suggested by you and it is working perfectly, thanks again.
My Next issue is and also company requirement, I have multiple TAB file, which is selected by the user with help of open dialog box, till this point I have no problem.
But some TAB file is working with DefaultAreaStyle, some with DefaultLineStyle and Some with DefaultPointStyle. Perhaps it will based on nature of TAB file, I don’t know about this. So, with code how we can decide about default style.
I have added three custom styles as per following code,
Dim customAreaStyle As Style = New AreaStyle(New GeoSolidBrush(New GeoColor(150, GeoColor.StandardColors.Gray))) Dim customPointStyle As Style = New PointStyle(PointSymbolType.Circle, New GeoSolidBrush(GeoColor.StandardColors.Red), 5) Dim customLineStyle As Style = New LineStyle(New GeoPen(GeoColor.FromArgb(200, GeoColor.StandardColors.Red), 5)) worldLayer.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(customAreaStyle) worldLayer.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(customPointStyle) worldLayer.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(customLineStyle)
But unfotunately its not showing map. I think any correction required in code?
Actually I have written your suggested statements before define the custom style, thats why I think it is not worked, but when I have written this statement after custom style, now its working thanks again.
James, I have a map of State, when I open this with help of map info, it showing with different color coding for Primary Road class, Secondary Road class, Maon Road class, Highway class, Street class, Railway class, water class etc., In map suite all this is property is part of LineStyles or PointStyles or AreaStyle, which I can select seperately.
How can I implement this feature with Map Suite? Can we have to define all this property with custom style, which I have tried and output is attached. Please go through the file. It putting all color simultaneously.
I have checked your attachment, according to your description, I think you have multiple shape file for the primary roads, secondary roads, highway and so on and you render them used different styles. If you don’t want to all color simultaneously please set zoomlevel for each shape file so that they will not render the shape simultaneously. Before James told you that you need to add this code to your application below:
Your are right, Fot the different class multiple shape files required. But when I open a single TAB file with help of MAP SUITE it shows single color which I have selected in LineStyle, but the same file when open with help of MAP INFO, it shows in differentc color code.
Is you are saying that map info has inbuit shape file??
If you not understanding my question then I can send you a screen shot of Both (Map Suite and Map Info).
In MapInfo, each individual point (line/region) in a layer/file can have it's own style - shape/colour/size/etc. My screen dump shows a point .TAB file opened in a map windows & a browser MapInfo 8.0 showing some points as yellow stars and others as pink circles. All this info is stored in the table itself - and a table consists of 4 files - *.tab, *.id, *.map & *.dat. As you can see there is no indication of style differences in the tabular data so it is all contained in the graphic data.
I don't think the MapInfo functionality of ThinkGeo can bring in the styles from MapInfo tables automatically, though I hope it can as I have several thousand MapInfo tables which I would like to be able to bring in at any time without losing all the styles that have been built up in our company over the years.
I want to send the vector and comparative image to you to show the requirement. But the zip file size is 12 MB. Please send your email id, so that you can check it.
Oh, I’m only another ThinkGeo customer, not one of their staff (a lot of Davids on this forum!).
I’ve been using MapInfo for years and in fact wanted to get into ThinkGeo in late 2007 but had to wait until they had some sort of MapInfo capability before I could even consider it. Now that we bought it, I haven’t even started on the MapInfo input yet! :-)
Can you send your shape file and sample application to me so that I can debug and track your problem exactly, as so far I still cannot reproduce your problem correctly, maybe there are differences between us. So I have to request two things to you:
1. Your sample application, we need to see the code logic is correct in your application. 2, Test and debug the sample application what you provided based on your shape file.
In addition, thanks helps from David, we will try the best on our products in the future, so your suggestions and feedbacks are important for us,
As I have written is earlier post, my vectore file with application and screen shot of same vector (both on MAP Suite and MAP Info) is arount 13 MB, So I want the mail Id, on which I can attach all these files for your reference.
Thanks for your sample and data, according to my test, your tab data just has line records, it dose not has point and polygon records, the attachment is my test result for the all features's type. From the attached screen shot you can realize your tab file has 233034 line records, no point records and polygons records.
Also you can test it by youself used the following code:
worldLayer.FeatureSource.Open() Dim features As Collection(Of Feature) = worldLayer.FeatureSource.GetAllFeatures(ReturningColumnsType.AllColumns) Dim type As WellKnownType = WellKnownType.Invalid Dim polygonCount As Integer = 0 Dim lineCount As Integer = 0 Dim pointCount As Integer = 0 For Each tempFeature As Feature In features type = tempFeature.GetWellKnownType() If (type = WellKnownType.Line OrElse type = WellKnownType.Multiline) Then lineCount += 1 ElseIf (type = WellKnownType.Point OrElse type = WellKnownType.Multipoint) Then pointCount += 1 ElseIf (type = WellKnownType.Polygon OrElse type = WellKnownType.Multipolygon) Then polygonCount += 1 End If Next worldLayer.FeatureSource.Close() MessageBox.Show("Line records count: " & lineCount.ToString() & Environment.NewLine & "Point records count: " & pointCount.ToString() & Environment.NewLine & "Polygon records count: " & polygonCount.ToString()) In your sample application although you add three custom styles for area, line and point records, but please not, you tab file just has line records so just the CustomLineStyle is valid in your application. If you still have any questions please let me know,
Scott, Thanks for working on my data. Have you open Vector.Tab file in Map Info? I also given you a comparative picture file, which is taken as screen dump in Map Info and Map Suite. Please check .bmp file of Map Info. The Same TAB file has opened in both application. Is it possible to open tab file like shown by map info screen dump, because it is very important for me and our organization.