Hi ,
I have a .shp file and there are many 0’s value in my column(SitusStNo).I want to see “blank” on the place of 0’s on Map ,I can’t change my database. so please any one give me solution.
Please download the data and screen of my app from following URL:
dropbox.com/s/2kpomrrtx3kzyqa/Data%20And%20Screen.zip?dl=0
Thank’s Regards:
Rupesh
I want to Replace o from blank Value on Map
Hi Rupesh,
I am sorry we cannot succeed to download from dropbox succeed.
But I think if you want to shows that, you can create an inmemmoryFeatureLayer, put all features into it, then modify the columnvalue in the new inmemoryFeatureLayer and shows the inmemmoryFeatureLayer instead of shapefileFeatureLayer.
Regards,
Don
Hi Don,
Please copy and paste the URL it will be download ,
I tried your solution but not helpful for me, please send me any demo link on your demo center or any demo code.
Regards,
Rupesh
Hi Rupesh,
I am sorry I cannot download that because our network environment cannot visit dropbox website.
If you need to share us your data please upload it here (small data) or upload to our FTP (big data).
BTW, if possible, please upload the project how you tried my solution, so I can help you modify it, because for your scenario, I think we don’t have sample for it.
Regards,
Don
Hi Rupesh,
Your data have some problem, I cannot use it render label but only can see the shape.
Please modify the code as below, you can implement your logic in the function DrawCore and replace the label what you don’t want to show:
ShapeFileFeatureLayer layer = new ShapeFileFeatureLayer(@"…\SampleData\Data\Countries02.shp");
TextStyle cityStyle = TextStyles.City1(“CNTRY_NAME”);
layer.ZoomLevelSet.ZoomLevel01.DefaultTextStyle = new MyTextStyle(cityStyle.TextColumnName, cityStyle.Font, cityStyle.TextSolidBrush);
layer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.CreateSimpleAreaStyle(GeoColor.SimpleColors.Transparent, GeoColor.FromArgb(100, GeoColor.SimpleColors.Green));
layer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
public class MyTextStyle : TextStyle
{
public MyTextStyle(string textColumnName, GeoFont textFont, GeoSolidBrush textSolidBrush)
: base(textColumnName, textFont, textSolidBrush)
{
}
protected override void DrawCore(System.Collections.Generic.IEnumerable<Feature> features, GeoCanvas canvas, Collection<SimpleCandidate> labelsInThisLayer, Collection<SimpleCandidate> labelsInAllLayers)
{
foreach (Feature feature in features)
{
feature.ColumnValues[“CNTRY_NAME”] = “It’s a sample”;
}
base.DrawCore(features, canvas, labelsInThisLayer, labelsInAllLayers);
}
}
Regards,
Don