Hello, I’m trying to implement the PdfGeoCanvas extension. The issues I am having are the LocalRoad LineStyles always print over any other custom LineStyle when it gets created into a PDF even though they are on top in the Layer Order.
Also, I can’t seem to get my MapShapeLayer to show up at all in the PDF. I have included some screenshots so you can see what I’m talking about.
If I change the LineStyle to use one of your preset LineStyles it puts it on top correctly. Is there a way to have a custom LineStyle display on top of a preset LineStyle?
I can't seem to find a way to get the MapShapeLayer to show up in the PDF at all. Even if i use a preset LineStyle it still won't show up. I can provide a sample project if needed.
Thanks for your detail description for your problem, I think it’s maybe a bug in our MapSuiteCore, to find it quickly could you provide some sample code to help us recreate it and debug?
At the same time, we are trying to write code to recreate it, any progress we will let you know ASAP
1, To show red line on pdf page, you need to add code for mobjShapesOverlay drawing in btnPDF_Click method, I think you missed it:
Dim labelsInLayers As New Collection(Of SimpleCandidate)() objGeoCanvas.BeginDrawing(page, Map1.CurrentExtent, Map1.MapUnit) For Each layer As Layer In CType(Map1.Overlays(0), LayerOverlay).Layers layer.Open() layer.Draw(objGeoCanvas, labelsInLayers) layer.Close() Next
For Each layer As Layer In CType(Map1.Overlays(1), LayerOverlay).Layers layer.Open() layer.Draw(objGeoCanvas, labelsInLayers) layer.Close() Next
Try objGeoCanvas.EndDrawing()
2, To show blue line on pdf page, you can adjust the DrawingLevel for style of blue line, For example, I set it to LabelLevel so that it's topest.
Case "SUPERVISORIAL_DISTRICTS" objLayer.Name = "Supervisor Districts"
With objLayer.ZoomLevelSet Dim objZoom1 As ZoomLevel = .ZoomLevel01 objZoom1.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20 objZoom1.CustomStyles.Add(GetHaloLabelRender(12, "DISTRICT", GeoColor.StandardColors.DarkSlateBlue)) Dim objStyle As New AreaStyle(New GeoPen(GeoColor.StandardColors.DarkSlateBlue, 5), New GeoSolidBrush(GeoColor.StandardColors.Transparent)) objStyle.DrawingLevel = DrawingLevel.LabelLevel objZoom1.CustomStyles.Add(objStyle) .CustomZoomLevels.Add(objZoom1) End With