RES: [UMN_MAPSERVER-USERS] scalebar units

Murilo Lacerda Yoshida murilo.yoshida at AGX.COM.BR
Thu Mar 17 09:56:48 EST 2005


-----Mensagem original-----
De: Murilo Lacerda Yoshida [mailto:murilo.yoshida at agx.com.br] 
Enviada em: quinta-feira, 17 de março de 2005 11:53
Para: 'Stéphane RIFF'; 'MAPSERVER-USERS at LISTS.UMN.EDU'
Assunto: RES: [UMN_MAPSERVER-USERS] scalebar units

  Stephane,
  I do the same way you do, with $map->scalebar->set("units",MS_METERS);
  But in my case and don't do $map->save because I only change the
scalebar unit when the user zooms in... if he zooms out I change the
scalebar back to kilometers.
  I don't know if this will help you, but yes, I had success in changing
scalebar units with php/mapscript...
  Bye,
    Murilo

-----Mensagem original-----
De: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] Em
nome de Stéphane RIFF
Enviada em: quinta-feira, 17 de março de 2005 05:14
Para: MAPSERVER-USERS at LISTS.UMN.EDU
Assunto: [UMN_MAPSERVER-USERS] scalebar units

I want to change scalebar units via phpmapscript when scale under a
certain number.
I want to change from MS_KILOMETERS to MS_METERS.
I did it like this :
  $map->scalebar->set("units",MS_METERS);

This seems to work because when i look in the mapfile after
$map->save(<filename>)
I see UNITS METERS in the scalebar section. The problem
is when i reload the .map file i've just save and draw an image from it
the scale is still in KILOMETERS........

Does someone success in changing scalebar units with phpmapscript ???
Thanks



More information about the mapserver-users mailing list