Scalebar Rendering Problem
Hong
ljfong at SDF.LONESTAR.ORG
Fri Oct 20 12:02:23 PDT 2006
Hello,
I am having trouble where the numbers below the scale bar seems to be
overdrawn rather than redrawn after the map is redrawn. The scale bar is
embedded through C#-MapScript. The output format of my map is PNG with image
mode PC256.
The portion of VB 2005 code I used to embed the scale bar:
Public Sub New()
m_Position = MS_LABEL_POSITIONS.MS_LL
m_scaleUnits = MS_UNITS.MS_MILES
'Actually create and position the scale bar object
m_scalebarObj = New scalebarObj
Dim p_labelObj As labelObj = New labelObj
p_labelObj.type = MS_FONT_TYPE.MS_BITMAP
p_labelObj.color = New colorObj(0, 0, 0, -4)
With m_scalebarObj
.label = p_labelObj
.backgroundcolor = New colorObj(255, 255, 255, -4)
.imagecolor = New colorObj(255, 255, 255, -4)
.intervals = 4
.postlabelcache = mapscript.MS_TRUE
.width = 150
.height = 10
.status = mapscript.MS_EMBED
.position = m_Position
.units = m_scaleUnits
End With
End Sub
m_scalebarObj is then attached to mapObj through scalebar property.
Here are two screenshots of the scale bar:
http://ljfong.freeshell.org/scalebar_before_map_redraw.png
http://ljfong.freeshell.org/scalebar_after_map_redraw.png
I could use any suggestions here.
More information about the MapServer-users
mailing list