[mapserver-users] Adding a logo & attribution

Rahkonen Jukka (MML) jukka.rahkonen at maanmittauslaitos.fi
Wed Feb 17 06:51:43 PST 2016


Hi,

For me the threshold of making PR is high but I have almost no threshold at all with the mailing list which is easy to notice from the number of mails and their grammatical quality. I hope the facts are usually right and here comes my improved "copyright" layer which I just tested to work with MS4W 3.1.1. 
Enhancements:

1) 
REQUIRES "[poly]"
Forces the copyright text to draw always when layer "poly" is requested but not otherwise. Makes is possible to show different copyrights for the layers. With offsets you can arrange place for a few different copyrights on your map.

2) 
METADATA
  "wms_enable_request" "!GetCapabilities GetMap"
END
This metadata block is hiding the layer from WMS GetCapabilities. Otherwise WMS clients will show "copyright" as a normal selectable layer which is annoying.

3) MS4W does not deliver fonts so I commented the "times" font out.



LAYER
  NAME "copyright"
  STATUS DEFAULT
  TYPE point
  TRANSFORM ll # set the image origin to be lower left
  UNITS PIXELS # sets the units for the feature object
  REQUIRES "[poly]"
  METADATA
  "wms_enable_request" "!GetCapabilities GetMap"
  END
  FEATURE
    POINTS
      60 -10    # the offset (from lower left) in pixels
    END # Points
    TEXT "© xyz company 2006"  # this is your displaying text
  END # Feature
  CLASS
    STYLE       # has to have a style
    END # style
    LABEL       # defines the font, colors etc. of the text
     # FONT "times"
     # TYPE truetype
      SIZE 8
      BUFFER 1
      COLOR 0 0 0
      FORCE true
      STYLE
        GEOMTRANSFORM "labelpoly"
        COLOR 255 255 255  # white
      END # Style
    END # Label
  END # Class
END # Layer


-Jukka Rahkonen-

Jeff McKenna wrote:
 
> On 2016-02-12 10:55 PM, Brent Wood wrote:
>> Hi,
>>
>>
>> What is the recommended way to add a logo & text attribution clause in 
>> the bottom right corner of a mapserver WMS service?
>>
>>
>> Thanks
>>
>>
>> Brent Wood
>>
>> Programme leader: Environmental Information Delivery NIWA
>> DDI:  +64 (4) 3860529
>>
>>

> This is documented in the "FAQ", but if you find that it needs updating 
> please submit a documentation pull request: 
> http://www.mapserver.org/faq.html#how-do-i-add-a-copyright-notice-on-the-corner-of-my-map

> (2006, ha, I'm old)

-jeff



-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/




_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


More information about the mapserver-users mailing list