Skip to main content
Tweeted twitter.com/#!/StackGIS/status/158102649852538880

How can iI change the display name of the "Scale" control?

Here is the thing. I added the Scale control to my web and is displayed in a div at the bottom. I need to translate the "Scale" text to other language but i don'tI can't find how to do it. I searchsearched in the openlayers website for examples or code to do it without results. None of the properties of Scale control tell me how to do this ( inin openlayers website).

So iI ask to you, people, if you know some method to customize this feature.

hereHere is the code iI use in my script:

map.addControl(new OpenLayers.Control.Scale($('scale')));

and this is the div where iI displayed:

    <div id="wrapper">
       <div id="location"></div>
       <div id="scale"></div>
    </div>

I tried with writing the label in the div but the scale control overwrite the label. Hope you can help me with this.

How can i change the display name of the "Scale" control?

Here is the thing. I added the Scale control to my web and is displayed in a div at the bottom. I need to translate the "Scale" text to other language but i don't find how to do it. I search in the openlayers website for examples or code to do it without results. None of the properties of Scale control tell me how to do this ( in openlayers website).

So i ask to you, people, if you know some method to customize this feature.

here is the code i use in my script:

map.addControl(new OpenLayers.Control.Scale($('scale')));

and this is the div where i displayed:

    <div id="wrapper">
       <div id="location"></div>
       <div id="scale"></div>
    </div>

I tried with writing the label in the div but the scale control overwrite the label. Hope you can help me with this.

How can I change the display name of the "Scale" control?

Here is the thing. I added the Scale control to my web and is displayed in a div at the bottom. I need to translate the "Scale" text to other language but I can't find how to do it. I searched in the openlayers website for examples or code to do it without results. None of the properties of Scale control tell me how to do this (in openlayers website).

So I ask to you, people, if you know some method to customize this feature.

Here is the code I use in my script:

map.addControl(new OpenLayers.Control.Scale($('scale')));

and this is the div where I displayed:

    <div id="wrapper">
       <div id="location"></div>
       <div id="scale"></div>
    </div>

I tried with writing the label in the div but the scale control overwrite the label. Hope you can help me with this.

Source Link

How can i change the display name of the "Scale" control?

Here is the thing. I added the Scale control to my web and is displayed in a div at the bottom. I need to translate the "Scale" text to other language but i don't find how to do it. I search in the openlayers website for examples or code to do it without results. None of the properties of Scale control tell me how to do this ( in openlayers website).

So i ask to you, people, if you know some method to customize this feature.

here is the code i use in my script:

map.addControl(new OpenLayers.Control.Scale($('scale')));

and this is the div where i displayed:

    <div id="wrapper">
       <div id="location"></div>
       <div id="scale"></div>
    </div>

I tried with writing the label in the div but the scale control overwrite the label. Hope you can help me with this.