[mapserver-users] Label not Displaying at Edge of Map Extent

Michele Toma michele.toma at airborne.aero
Wed Feb 24 09:44:22 PST 2016


Hi David,

Thank you for your response. In this application I cannot display partial labels as the map extent varies, so I do not see setting PARTIALS to TRUE to be an option to resolve the issue. The point given is within the bounds of the map extent, but I do not understand why the label would not display when there is an icon present versus no icon.

Originally I had the map file set up with an OGR connection to a database and the DEBUG set to 5. After reviewing the debug, I noticed that it was returning 2 shapes when there is no style attached to the label object. And when there was a style attached to the label object, it returned 0 shapes. This leads me to think that the label is being incorrectly filtered out when the style is attached since the lat/long should still fall within the map extent.

Thanks again,

Michele

From: Fawcett, David (MNIT) [mailto:David.Fawcett at state.mn.us]
Sent: Wednesday, February 24, 2016 6:10 AM
To: Michele Toma; mapserver-users at lists.osgeo.org
Subject: RE: Label not Displaying at Edge of Map Extent

Michele,

I am guessing that if you set LABEL PARTIALS to TRUE (or just comment it out), you will see your label.

http://mapserver.org/mapfile/label.html

David.

From: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Michele Toma
Sent: Tuesday, February 23, 2016 7:14 PM
To: mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>
Subject: [mapserver-users] Label not Displaying at Edge of Map Extent

Hi everyone,

I am having an issue with getting a label to display when it is near the edge of the map extent. From what I have seen, when I attach the style for the icon to the label object, the label does not display. However, if I remove the style for the icon from the label object, it does display. Is this an issue with MapServer 7 or the settings that I have used?

Version Information:
[root at Map18-03 cgi-bin]# ./mapserv -v
MapServer version 7.0.0 OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=FASTCGI SUPPORTS=GEOS INPUT=JPEG INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

Below is the map file to reproduce the issue. Please note that there are two layers - one without the icon style attached, and one with the icon style attached. The layer without the icon style attached has been turned on while the other is off.

==============================

MAP

  EXTENT -87.919802 0.000000 72.177555 90.000000
  SIZE 1280 720
  IMAGECOLOR 140 140 140

  SYMBOL
    NAME 'Airport'
    TYPE ELLIPSE
    POINTS 1 1 END
    FILLED true
  END

  LAYER
    NAME "Label does display (no icon)"
    TYPE POINT
    FEATURE
        POINTS
          -87.9 41.983333
        END
    END
    PROJECTION
      "proj=latlong"
      "ellps=WGS84"
    END # PROJECTION
    STATUS DEFAULT
    CLASS
      TEXT 'Label'
      LABEL
        TYPE BITMAP
        SIZE 20
        COLOR 255 255 255
        PARTIALS FALSE
        POSITION AUTO
        PRIORITY 10
      END # LABEL
    END # CLASS
  END # LAYER


  LAYER
    NAME "Label does not display (with icon)"
    TYPE POINT
    FEATURE
        POINTS
          -87.9 41.983333
        END
    END
    PROJECTION
      "proj=latlong"
      "ellps=WGS84"
    END # PROJECTION
    STATUS OFF
    CLASS
      TEXT 'Label'
      LABEL
        TYPE BITMAP
        SIZE 20
        COLOR 255 255 255
        PARTIALS FALSE
        POSITION AUTO
        PRIORITY 10
        STYLE
          SYMBOL "Airport"
          COLOR 0 255 0
          OUTLINECOLOR 0 0 0
          SIZE 20
        END # STYLE
      END # LABEL
    END # CLASS
  END # LAYER

END

Thank you,

Michele Toma
michele.toma at airborne.aero<mailto:michele.toma at airborne.aero>
www.airborne.aero

[New Small2]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20160224/19ff22c4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 2598 bytes
Desc: image001.jpg
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20160224/19ff22c4/attachment.jpg>


More information about the mapserver-users mailing list