Hi,
I've tried everything with this one but still can't find out why I can't get the roads in my shapefile to label correctly. I have three major roads in this shapefile and each one the labels show up at a different scale ??? which doesn't make sense as the labels are handled all at the same time in the same file.
I've used all the different methods to help place more labels i.e.
DefaultTextStyle.TextLineSegmentRatio = 2; DefaultTextStyle.SuppressPartialLabels = true; .DefaultTextStyle.GridSize = 5; .DefaultTextStyle.DuplicateRule = LabelDuplicateRule.UnlimitedDuplicateLabels;
I've also tried removing other elements from other shapefiles to see if they were affecting the placement time of these road labels. I'am using custom labels but even when custom labels are turned off the labels still appear at different times for the different roads.
Here is some code:
//Major Roads Only for viewing at 6/7
shapeFileName = "AB_Line_DividedHighway.shp";
shapePathName = shapePath + shapeFileName;
ShapeFileFeatureLayer ABMajorRoads = new ShapeFileFeatureLayer(MapPath(shapePathName));
ShapeFileFeatureLayer.BuildIndexFile(MapPath(shapePathName));
ABMajorRoads.ZoomLevelSet.ZoomLevel05.DefaultLineStyle = LineStyles.Highway4;
ABMajorRoads.ZoomLevelSet.ZoomLevel05.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level07;
ABMajorRoads.ZoomLevelSet.ZoomLevel08.DefaultLineStyle = PriHWayLineStyle;
ABMajorRoads.ZoomLevelSet.ZoomLevel08.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
//Style for labeling
ShapeFileFeatureLayer ABMajorRoadsLabelLayer = new ShapeFileFeatureLayer(MapPath(shapePathName));
//The TextStyle we set here is available from ZoomLevel01 to ZoomLevel20.
ABMajorRoadsLabelLayer.ZoomLevelSet.ZoomLevel06.CustomStyles.Add(AB_highwayPriIconStyle);
ABMajorRoadsLabelLayer.ZoomLevelSet.ZoomLevel06.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
ABMajorRoadsLabelLayer.ZoomLevelSet.ZoomLevel05.CustomStyles.Add(highwayTCHValueStyle);
ABMajorRoadsLabelLayer.ZoomLevelSet.ZoomLevel05.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
Looking forward to some help with this one I've tried everything from removing the other side of the major highway in ArcGis to creating one line in the shapefile...etc... But one of the roads labels as expected and the other roads in the shapefile do not.
Thanks in advance,
Kevin