[mapserver-users] copyright, logos, etc

Julien Cigar jcigar at ulb.ac.be
Wed Feb 11 04:04:08 PST 2015


On Thu, Feb 05, 2015 at 02:41:40PM +0100, Julien Cigar wrote:
> Hello,
> 
> I'm using Mapserver to generate maps for various PostGIS layers and it
> works pretty well, especially with SLD to filter WMS requests.
> 
> Now the users want to include:
> - a logo (PNG file) in the upper right corner
> - a copyright text at the bottom center of the page
> - a text "generated at ..." with the date
> 
> For now I have the following MAP file:
> https://gist.github.com/silenius/545d479132981dc5a55a (only relevant
> parts are shown)
> 
> For the logo and the copyright text it works more or less (although it
> seems "über complicated" for such simple thing, but maybe there is a
> simpler way of doing it ?), the only problem I have is that if I change
> the WIDTH and HEIGHT of the map the things disappear, as the POINTS in
> the FEATURE section don't fit the map size. I wonder if there is a
> simple way to tell Mapserver to "just put that 20px .PNG file in the
> upper right corner of the generated map" or something like that .. ?
> 
> Any idea how could I do for the generated date ?
> 
> Thanks !
> 
> Julien

Hello,

After digging hours in the documentation I ended by modifying the
generated image file with PIL ... It's not the ideal solution but I
don't see an easy way in Mapserver to simply add some text to a
generated image.

I used
http://www.mapserver.org/faq.html#how-do-i-add-a-copyright-notice-on-the-corner-of-my-map
for the static ones (which works) but what I really need to do is to
make an SQL query (something like select name from map where id=%MYID%)
and use that attribute in the TEXT part of the FEATURE section (something
like FEATURE POINTS x y END TEXT "Species name: [name]" END)

Any idea is welcome on how to do that in the "Mapserver way" ..

Julien

> 
> -- 
> Julien Cigar
> Belgian Biodiversity Platform (http://www.biodiversity.be)
> PGP fingerprint: EEF9 F697 4B68 D275 7B11  6A25 B2BB 3710 A204 23C0
> No trees were killed in the creation of this message.
> However, many electrons were terribly inconvenienced.



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


-- 
Julien Cigar
Belgian Biodiversity Platform (http://www.biodiversity.be)
PGP fingerprint: EEF9 F697 4B68 D275 7B11  6A25 B2BB 3710 A204 23C0
No trees were killed in the creation of this message.
However, many electrons were terribly inconvenienced.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20150211/0fd8e738/attachment-0001.pgp>


More information about the mapserver-users mailing list