[mapserver-users] watermarking

Matt Carlson matt at aruke.com
Wed Aug 15 20:37:25 PDT 2001


here's my solution for a baseline copywright embedded on the map using perl
mapscript.  company-logo points to a pixmap symbol in my markerset file.

##### place copywright on map ############################
  $layer = new layerObj($map);
  $layer->{name} = "copywright";
  $layer->{type} = $mapscript::MS_POINT;
  $layer->{status} = $mapscript::MS_ON;

  $class = new classObj($layer);
  $class->{name} = 'copywrightclass';
  $symx = $map->getSymbolByName($mapscript::MS_MARKERSET,'company-logo');
  $class->{symbol} = $symx;

  $lat_pix = ($latdf * 2)/$setmh; ## setmw and setmh are map height and
width values.  latdf and londf are lat and lon degree distance values across
the map.
  $lon_pix = ($londf * 2)/$setmw;


  $cpy_lat = $lat - ($lat_pix * 262);  ##these will change dependant on map
size (262,170)
  $cpy_lon = $lon - ($lon_pix * 170);

  $point = new pointObj();
  $point->{x} = $cpy_lon;
  $point->{y} = $cpy_lat;
  $point->draw($map,$layer,$img,'copywrightclass',undef);

  $layer->draw($map,$img);
#######################################################

what i'm looking for is some way to prevent people from right clicking the
map gif image on the browser screen and saving the map image onto thier
desktop.  the effect i'm wanting is when someone does save the map image,
somehow an embedded image shows up with a big copywright message in the
middle.  i thought company's like digimarc and ewatermark were doing
something similair to this??

matt



----- Original Message -----
From: "Lyndon Zimmermann" <lyndon.zimmermann at adelaide.edu.au>
To: "Matt Carlson" <matt at aruke.com>
Sent: Thursday, August 16, 2001 12:06 PM
Subject: Re: [mapserver-users] watermarking


> Matt,
>
> a screen dump does a reasonable job of copying a map - you won't
> watermark that!  The "as-delivered" png or gif is tidier though.
>
> On a similar note, I can't see how to add text to the scalebar either
> for a copyright, acknowledgment or caveat. Any clues?
>
> Lyndon Z
>
> Matt Carlson wrote:
> >
> > Hello,
> >
> > we are currently pursing a client that wishes to copywright thier images
in
> > case someone attempts to save a map from the browser.  i want to do
> > something similar to what ewatermark.com is doing
http://www.ewatermark.com
> > with their visible watermark.  does anyone have experience in
integrating
> > something like this with mapserver?
> >
> > Thanks in advance,
> >
> > Matt
>




More information about the MapServer-users mailing list