MapServer Suggestion

Grzegorz Myrda mapadm at polsl.gliwice.pl
Sun Jan 30 08:58:44 PST 2000


> 2. if the scale bar is available into the map;
> but keep the old functionality.

It can be done by simply inserting following code at the end of msDrawMap():

-------
  /*
  ** Build the scalebar if the user wants it and a mapfile has been read
  */
  if(map->scalebar.status == MS_ON) {
    if((imgSB = msDrawScalebar(map)) == NULL)
        writeError();
    black = gdImageColorExact(imgSB, 255, 255, 255);
     /* If black is present... */
    if (black != (-1)) {
             /* Make it transparent */
             gdImageColorTransparent(imgSB, black);
    }
    gdImageCopy(img, imgSB, 0, 0, 0, 0, imgSB->sx, imgSB->sy);
    gdImageDestroy(imgSB);
  }
------

Grzegorz




More information about the MapServer-users mailing list