MapSuite Team,
I’ve started to incorporate the FittingPolygonInScreen Property as part of TextStyle for polygons.
This is a great feature as my application has a number of large polygons that most times are larger than the displayed extent.
I’ve noticed, and maybe you can help with this, that duplicate labels are being displayed that appear to correspond to the tiles. Attached is a screen shot that shows what I’m talking about. According to the documentation a label is supposed to appear for each visible area of the polygon, but appears as though one is appearing for each tile.
These TextStyle Properties are being used:
LabelOverlappingRule=NoOverlapping
LabelDuplicateRule=NoDuplicateLabels
DrawingLevel=LabelLevel
GridSize=1
FittingPolygonFactor=10
LabelAllPolygonParts=false
FittingPolygon=true
FittingPolygonInScreen=true
Is there some other property that needs to be set or are the above properties set incorrectly?
Thanks for your assistance,
Dennis
PolygonFittingPolygonInScreen.png (41.2 KB)
TextStyle - FittingPolygonInScreen
Hi Dennis,
I think using SingleTile should solve your issue, would you please try it and let us know if any questions?
LayerOverlay staticOverlay = new LayerOverlay();
staticOverlay.Layers.Add("WorldLayer", worldLayer);
staticOverlay.TileType = TileType.SingleTile;
Thanks,
Troy
hi Troy,
Single Tile might be a solution to this one issue, but it would cause all kinds of other issues. My application has been finely tuned in terms of tiles and I would be very afraid of changing to single tile. Any other possible solution you might suggest?
Another issue is that many times the labels are truncated. A screen shot is attached that shows this symptom. The two labels in the center are truncated.
The truncation occurs at a tile boundary.
Thanks,
Dennis
PolygonFittingPolygonInScreenTruncatedLabels.png (42.5 KB)
Hi Dennis,
I am afraid this property only works good for SingleTile as In multi tile mode, each tile is drawn isolate and it is difficult for each label to calculate the new position and that will bring a very bad performance.
For the second issue, I think the DrawingMarginInPixel property from FeatureLayer may be helpful for it, by default, the value is 256,we can try to make it large. If the truncated labels are still many, Making the tile larger is another options like from 256 to 512 etc.
//overlay.TileWidth = 512;
//overlay.TileHeight = 512;
Please let us know if any questions.
Thanks,
Troy