<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
HeyHey--<br>
<br>
I was looking for an answer for a KM only ScaleLine();<br>
<br>
Maybe you should be able to do this by option (in OL v. 2.7), but the
following does the trick.<br>
<br>
adapt the style for the lower (miles/feet) part<br>
<br>
.olControlScaleLineBottom {<br>
<br>
<i><b>&nbsp;&nbsp; display: none;<br>
</b></i>}<br>
<br>
<br>
<br>
Regards, Huub<br>
<br>
On 4/16/2008 5:20 PM, Tim Schaub wrote:
<blockquote cite="mid:48061929.5080905@openplans.org" type="cite">
  <pre wrap="">Hey-

Matthew Doyle wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Hi All,

Using Openlayers 2.6 and coding a map using the ScaleLine control a la:
map.addControl(new OpenLayers.Control.ScaleLine());

My client wishes it only to display kilometres and not miles. Is there any
way to configure this? Or will i have to code a hack or design my own custom
scale which swaps in and out for each zoom level? Apologies if this is an
easy one, but the docs/api and searching through usergroups didn't give me
any joy.

    </pre>
  </blockquote>
  <pre wrap=""><!---->
You might also want to check out the ScaleBar control.

Examples:
<a class="moz-txt-link-freetext" href="http://dev.openlayers.org/addins/scalebar/trunk/examples/scalebar.html">http://dev.openlayers.org/addins/scalebar/trunk/examples/scalebar.html</a>
<a class="moz-txt-link-freetext" href="http://dev.openlayers.org/addins/scalebar/trunk/examples/scalebar-custom.html">http://dev.openlayers.org/addins/scalebar/trunk/examples/scalebar-custom.html</a>

Docs:
<a class="moz-txt-link-freetext" href="http://trac.openlayers.org/wiki/Addins/ScaleBar">http://trac.openlayers.org/wiki/Addins/ScaleBar</a>

Tim

  </pre>
  <blockquote type="cite">
    <pre wrap="">Cheers in advance,
Regards,
Matt
    </pre>
  </blockquote>
  <pre wrap=""><!---->
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@openlayers.org">Users@openlayers.org</a>
<a class="moz-txt-link-freetext" href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</a>



  </pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">-- 
=====================================
Geodan IT b.v.
Buitenhaven 27-A
5211 TP 's-Hertogenbosch (NL)
-------------------------------------
Tel: +31 (0)73 - 692 5151
Fax:  +31 (0)73 - 692 5150
Mobiel:
-------------------------------------
Postadres / mailing address
President Kennedylaan 1
1079 MB Amsterdam (NL)
-------------------------------------
E-mail: <a class="moz-txt-link-abbreviated" href="mailto:huub.fleuren@geodan.nl">huub.fleuren@geodan.nl</a>
Website: <a class="moz-txt-link-abbreviated" href="http://www.geodan.nl">www.geodan.nl</a>
Disclaimer: <a class="moz-txt-link-abbreviated" href="http://www.geodan.nl/disclaimer">www.geodan.nl/disclaimer</a>
-------------------------------------
</pre>
</body>
</html>