|
I'm having a REAL hard time getting plain text labels to display property for polygon layers on a map. I'm drawing polygon layers on the map from a set of Lat/Long points in a database, the layers show up great, just can't seem to get a plain text label to show up right.
I've tried MANY different approaches . . . the Shape.Title and Shape.Tag properties don't seem to have anything to do with this, neither do the same properties on the ShapeLayer. The TextOffset and ImageOffset don't seem to do anything, I change them and the text always shows up in the same place. I tried setting the Icon.CustomText property, but that just displays text along with the default red "pushpin" icon, but I just want plain text. If I specify no IconImage I just get a broken JPG "icon" on top of the text. Also, the text appears to wrap on every whitespace character, so the text "TWP 14S RGE 13E" shows up like:
TWP 14S RGE 13E
The CustomHTML property yeilds better results but not great. My CustomHTML is simple, just a <font> tag and some text. The text always shows up as a clickable hyperlink, regardless of what's in the CustomHTML property, which makes the users think it's something they can click on. I can set the exact centerpoint of the polygon using the Shape.IconAnchor property, but the HTML always shows up slightly offset from the anchor point. There appears to be some hidden "padding" that makes the HTML always high and to the left. Also, the HTML seems to be left-justified to the anchor point, causing longer text to run off the right side of the polygon, leaving plenty of open space to the left.
I hope I'm just doing this wrong, and you have a simple solution for me -- surely there must be an easy way to display a simple text layer over the center of an object I've drawn on the map!
Thanks, Aaron
|