Scalebar Rendering Problem

Steve Lime Steve.Lime at DNR.STATE.MN.US
Mon Oct 23 13:24:01 EDT 2006


The process of embedding a scalebar actually creates a new layer in in
the mapfile
behind the scenes. This new layer is then used to draw the scalebar
image (as a
marker) within the map. What you're seeing is undoubtedly a bug. Could
you
file a bug report?

What version of MapServer are you using?

Steve

>>> Hong <ljfong at SDF.LONESTAR.ORG> 10/20/2006 2:02:23 PM >>>
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