We use a set of custom Zoom Levels which we assign to FeatureLayers (SqlFeatureLayer and ShapefileFeatureLayer) so that layers can change visibility automatically as they are zoomed in and out. We allow the user of our application to choose what that scale should be. When these layers are displayed in the MapView in a LayerOverlay the layers show and hide exactly when they should. However, when displayed in the MapPrinterLayer they do not change visibility at the correct scale. I can only assume that, internally, ThinkGeo’s calculated scale is coming up with a different value than what I see.
For testing I am using two different methods for visually determining the current scale of the MapPrinterLayer. I am using the ThinkGeo’s ScaleTextPrinterLayer and also my own scale text class called SilvicsScaleTextPrinterLayer. I think the ThinkGeo class is displaying incorrectly. The class I wrote appears to be displaying correctly according to the scale being set when I zoom in or out on the MapPrinterLayer.
I have attached a sample project to demonstrate this issue. In the project, I use a single shapefile and set up its zoom levels so that it should become invisible if the scale is above 1:63360. However, according to my SilvicsScaleTextPrinterLayer, the layer remains visible through scale 1:110880. In the sample project, you can see where the shapefile is initialized and added to the MapPrinterLayer in class frmMain in mLoadShapeFiles. Please note that the text in Black is the ThinkGeo ScaleTextPrinterLayer and the Blue text is my scale text, SilvicsScaleTextPrinterLayer.
I suspect that this has something to do with my monitor, which is a 4k set at 175% magnification, since that was to be the problem with some of the previous issues.
Please have a look and see what you think.
Thanks,
Steve
PageLayoutControl_TG_14.zip (2.0 MB)