[Mapserver-users] Embeded scalebar and Legend
Eduin Yesid Carriillo
yecarrillo at hotmail.com
Thu Mar 27 21:54:54 PST 2003
This is a multi-part message in MIME format.
------=_NextPart_000_000D_01C2F4C4.A54FC130
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Can Anybody tell me how to embed scalebars and legends in mapscript?
I've tried this code without results...
function DrawMaptoPrint() {
GLOBAL $gpoMap;
GLOBAL $gAppletImgFmt;
$gpoMap->scalebar->set(status , MS_EMBED);
$gpoMap->scalebar->set(position , MS_UL);
$img =3D $gpoMap->drawScaleBar();
$gpoMap->embedScalebar($img);
=20
$img =3D $gpoMap->draw();
$gpoMap->drawLabelCache($img);
$url =3D $img->saveWebImage($gAppletImgFmt, 0, 0, -1);
printf("<img src=3D%s width=3D%d height=3D%d>\n", $url, =
$gpoMap->width, $gpoMap->height);...
}
map file:
SCALEBAR
IMAGECOLOR 255 255 255
...
POSTLABELCACHE true
...
END
I could'n find nothing about this issue on the mailing list..
Thanks
Eduin
------=_NextPart_000_000D_01C2F4C4.A54FC130
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Can Anybody tell me how to embed =
scalebars and=20
legends in mapscript?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I've tried this code without=20
results...</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>function DrawMaptoPrint() =
{<BR> =20
GLOBAL $gpoMap;<BR> GLOBAL =
$gAppletImgFmt;</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2> =20
$gpoMap->scalebar->set(status , MS_EMBED);<BR> =20
$gpoMap->scalebar->set(position , MS_UL);</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2> $img =3D=20
$gpoMap->drawScaleBar();<BR> =20
$gpoMap->embedScalebar($img);<BR> =
<BR> =20
$img =3D $gpoMap->draw();<BR> =20
$gpoMap->drawLabelCache($img);</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> $url =3D=20
$img->saveWebImage($gAppletImgFmt, 0, 0, -1);<BR> =20
printf("<img src=3D%s width=3D%d height=3D%d>\n", $url, =
$gpoMap->width,=20
$gpoMap->height);...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>}</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>map file:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>SCALEBAR<BR> IMAGECOLOR 255 255=20
255<BR>...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> POSTLABELCACHE true</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2><BR>END</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I could'n find nothing about this issue =
on the=20
mailing list..</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Eduin</FONT></DIV></BODY></HTML>
------=_NextPart_000_000D_01C2F4C4.A54FC130--
More information about the MapServer-users
mailing list