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

Tyler Mitchell tylermitchell at SHAW.CA
Fri May 20 09:44:04 EDT 2005


HI Philippe,
I suspect that your map's projection and units settings are not complete.
It might be trying its best to make the scalebar, but will look at those
settings to figure it out.  Do you set map units or map projection in your
code or map file?  Post it so we can see.

Tyler

On May 18, 2005 05:25 am, Philippe Gondek wrote:
> 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