[mapserver-users] SVG OUTPUTFORMAT TEXT LABEL

Adrian Dahinden A.Dahinden at alpgis.ch
Wed Feb 27 02:50:50 PST 2019


Hello mapserver users

Does anyone have experience with the SVG OUTPUTFORMAT of MapServer when rendering text labels?

For a GetMap request with the format <FORMAT = image / svg + xml> the mapserver returns on text labels the labels as <path ...> instead of <text ...> svg elements.
According to the documentation, this should not be the case with TRUETYPE fonts: https://mapserver.org/output/svg.html#text-features

I assume there the docs isn't true yet, since it is over 10 years old. Or is this simply not implemented in the CAIRO/SVG render engine?

My MapFile configuration looks like this:

MAP
...
  IMAGETYPE svg
...
  OUTPUTFORMAT
    NAME svg
    MIMETYPE "image/svg+xml"
    DRIVER CAIRO/SVG
    FORMATOPTION "COMPRESSED_OUTPUT=FALSE"
    FORMATOPTION "FULL_RESOLUTION=TRUE"
    IMAGEMODE RGB
    EXTENSION "svg"
  END
...
 WEB
    IMAGEPATH 'geotmp/log/mapserver/'
    IMAGEURL  'geotmp/log/mapserver/'
  END
...
  LAYER
    NAME "Nr"
    TYPE POINT
    PROJECTION
      "init=epsg:2056"
    END
    CONNECTIONTYPE postgis
    PROCESSING "CLOSE_CONNECTION=DEFER"
    CONNECTION "user=www-data password=www-data dbname=... host=..."
    DATA  "pos from (SELECT ... FROM ...) AS foo using unique gid using epsg:2056"
    LABELITEM "nummer"

    CLASS
      LABEL
        TYPE TRUETYPE
        FONT arial
        SIZE 5
        COLOR 0 0 0
      END
    END

  END
...
END

We use MapServer version 7.0.4.

Kind regards

Adrian Dahinden

ALPGIS AG
Raumentwicklung und Geoinformation
Fliederweg 11
3600 Thun

Telefon 033 224 04 30 / direkt 033 224 04 34
Fax 033 224 40 60
www.alpgis.ch<http://www.alpgis.ch/>
mailto:a.dahinden at alpgis.ch

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20190227/c835ace6/attachment.html>


More information about the mapserver-users mailing list