Problem with the Height and Width of my scalebar...

Philippe Gondek philippe.gondek at GMAIL.COM
Wed May 18 05:25:00 PDT 2005


Hi List,

I try to render a scalebar and to show it. I work with PHP/Mapscript
and here is the way I do;

$map->scalebar->set("units",MS_KILOMETERS);
$map->scalebar->set("style",0);
$map->scalebar->set("intervals",5);
$map->scalebar->set("height",40);

$image2=$map->drawScaleBar();
               $ScaleBar_url = $image2->saveWebImage();

?>

<html>
<body>

<!-- AFFICHAGE DE L'IMAGE -->
<img src=<?php echo "'http://139.165.123.213".$image_url."'
width='".$map->width.
       "px' height='".$map->height."px'";?>/>

<BR>

<!-- AFFICHAGE DE L'ECHELLE -->
<img src=<?php echo "'http://139.165.123.213".$ScaleBar_url." height=40 px";?>/>

</body>
</html>

How must I do to have the real units. I have kilometers on my scalebar
but it is too small to match with reality!!!



More information about the MapServer-users mailing list