[mapguide-users] Labeling for Polygons with SimpleSymbolDefinition
(Resend)
David Anderson
da at donnellandallred.com
Mon Feb 22 12:44:53 EST 2010
I apologize for the double send. I accidentally hit the send button before I was done.
I am trying to label a polygon using a SimpleSymbolDefinition. I can get a piece of text to show but it always shows at the centroid of the area so it disappears when zoomed in. Is there a way to label polygons where you only get one label and it is visible when zoomed in using the SimpleSymbolDefinition?
My symbol definition is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<SimpleSymbolDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:noNamespaceSchemaLocation="SymbolDefinition-1.1.0.xsd" version="1.1.0">
<Name>Zone Label</Name>
<Graphics>
<Text>
<Content>'ZONE'</Content>
<FontName>Arial</FontName>
<Height>4</Height>
</Text>
</Graphics>
<AreaUsage>
<OriginControl>Centroid</OriginControl>
<RepeatX>500000</RepeatX>
<RepeatY>500000</RepeatY>
</AreaUsage>
<ParameterDefinition />
</SimpleSymbolDefinition>
My layer file snippet:
<CompositeRule>
<LegendLabel>D</LegendLabel>
<Filter>"fld_zone" = 'D'</Filter>
<CompositeSymbolization>
<SymbolInstance>
<ResourceId>Library://dfirm/Symbols/zonelabel.SymbolDefinition</ResourceId>
<ParameterOverrides />
</SymbolInstance>
</CompositeSymbolization>
</CompositeRule>
Thanks,
David Anderson, P.E.
Donnell & Allred, Inc.
908 Big Horn Ave
P.O. Box 638
Worland, WY 82401
307-347-8276
307-347-8277 fax
da at donnellandallred.com
More information about the mapguide-users
mailing list