[OpenLayers-Users] custom control.scale text

Jorge Gaspar Sanz Salinas jsanz at osgeo.org
Tue May 19 04:44:33 EDT 2009


2009/5/19 André Mendonça <andremalms at hotmail.com>:
> Hi all!
>
> Is it possible to configure the text of the OpenLayers.Control.Scale control
> ?
>
> I want to translate the string "scale" to portuguese, or just eliminate it
> from my map.
>
> to edit the scale.js file is a recommended solution?
>
> Thank you!
>
> Andre Mendonca
>
>
>

I've had the same problem but I was luck and the Spanish translation
was available. For 2.8 at least, there is a pt-BR.js on
OpenLayers.Lang.

Edit Scale.js shouldn't be the best solution, I think extending an
instance of the control and overriding the updateScale method using
OpenLayers.Util.extend (see example at [1]) should be better.

Cheers
[1] http://dev.openlayers.org/docs/files/OpenLayers/Control-js.html
-- 
Jorge Gaspar Sanz Salinas
Ingeniero en Geodesia y Cartografía
http://wiki.osgeo.org/wiki/Jorge_Sanz



More information about the Users mailing list