I've created a map that loads a shapefile containing streets. I am using the IconValueStyle class to add a highway symbol to interstates and highways. The problem is that the roads are being rendered on top of the icon. It doesn't matter which style I add to the custom style collection first, the icon style or the value style. Any ideas?
I’ve created a map that loads a shapefile containing streets. I am using the IconValueStyle class to add a highway symbol to interstates and highways. The problem is that the roads are being rendered on top of the icon. It doesn’t matter which style I add to the custom style collection first, the icon style or the value style. Any ideas?
The graphic is a shield, white background, black outline, with the rest of the graphic transparent. I have verified that the white part is NOT transparent. I need the icon to be displayed on top of the line, not the line on top of the graphic.
There are 2 ways to solve your problem. 1) Create 2 layers separately. One layer only add the LineStyles, the other layers only add the iconValueStyle, this is the suggested way. Please reference our labeling samples: HowDoI\ Labeling\ DrawCurvedLabels 2) Try following code instead without using the CreateSimpleLineStyle to create your LineStyle: IconValueStyle iconValueStyle = new IconValueStyle("PRE_TYPE"); IconValueItem item1 = new IconValueItem("HIGHWAY", currentdirectory + "\\Support\\bitmaps\\ushwy-1.gif", new TextStyle("NAME", new GeoFont("Arial", 8, DrawingFontStyles.Bold), new GeoSolidBrush(GeoColor.StandardColors.Blue))); item1.TextValueLengthMin = 1; item1.TextValueLengthMax = 8; iconValueStyle.IconValueItems.Add(item1); iconValueStyle.GridSize = 150; iconValueStyle.TextLineSegmentRatio = 10; iconValueStyle.DuplicateRule = LabelDuplicateRule.UnlimitedDuplicateLabels; iconValueStyle.OverlappingRule = LabelOverlappingRule.NoOverlapping; ShapeFileFeatureLayer hwys = new ShapeFileFeatureLayer(shapedir + "\\TEST-roads.shp", shapedir + "\\TEST-highways1.idx");