MapServer Suggestion

Grzegorz Myrda mapadm at polsl.gliwice.pl
Sun Jan 30 11:58:44 EST 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