Hi,<br>I have created a ticket at: <a href="http://trac.openlayers.org/ticket/2600">http://trac.openlayers.org/ticket/2600</a>. I hope I did it correctly, as it was my first ticket :)<br><br>However, I still have a problem with ScaleLine on WGS84-based map. Below I attach a complete html file with a map. In this example when I zoom in to Europe and pan from N to S the ScaleLine does not
 change. Unless I move to the pole, but this was discussed earlier and a ticket for this has been created. <br><br>My questions are also: <br>1. What do you think about updating OpenLayers.INCHES_PER_UNIT instead of calculating N-S or W-E geodesic distances for calibrating the scale line control. <br>
2. If you apply a patch that changes the scale line control to do a West-East measurement instead what will happen if you drag your map beyond -180/180 longitudes?<br>3. Do you have any idea whether MapFish will also adopt geodesic scale bar functionality?<br>
<br>Regards,<br>Jan<br><br><br>&lt;html xmlns=&quot;<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>&quot;&gt;<br>  &lt;head&gt;<br>    &lt;title&gt;ScaleBar Problem&lt;/title&gt;<br><br>    &lt;script src=&quot;<a href="http://openlayers.org/api/OpenLayers.js">http://openlayers.org/api/OpenLayers.js</a>&quot;&gt;&lt;/script&gt;<br>
    &lt;script type=&quot;text/javascript&quot;&gt;<br><br>        var map, scalebar;<br><br>        function init(){<br><br>            map = new OpenLayers.Map(&#39;map&#39;);<br>            var layer = new OpenLayers.Layer.WMS(<br>
                &quot;OpenLayers WMS&quot;,<br>                &quot;<a href="http://labs.metacarta.com/wms/vmap0">http://labs.metacarta.com/wms/vmap0</a>&quot;,<br>                {layers: &#39;basic&#39;}<br>            );<br>
            map.addLayer(layer);<br>            map.setCenter(new OpenLayers.LonLat(0,0), 2);<br>     <br>            map.addControl(new OpenLayers.Control.MousePosition());<br>            map.addControl(new OpenLayers.Control.ScaleLine({geodesic: true}))<br>
        }<br><br>    &lt;/script&gt;<br>  &lt;/head&gt;<br>  &lt;body onload=&quot;init()&quot;&gt;<br>    &lt;div style=&quot;width:600; height:400&quot; id=&quot;map&quot;&gt;&lt;/div&gt;<br>  &lt;/body&gt;<br>&lt;/html&gt;<br>
<br><br clear="all">Jan Burdziej<br>
<br><br><div class="gmail_quote">2010/4/28 Andreas Hocevar <span dir="ltr">&lt;<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im"><br>
On Apr 28, 2010, at 16:46 , Jan wrote:<br>
<br>
&gt; Strange. Now it works, but only with OSM layer (which is in Spherical Mercator) and it does not work when I use WGS-based layer (e.g. &quot;<a href="http://labs.metacarta.com/wms/vmap0" target="_blank">http://labs.metacarta.com/wms/vmap0</a>&quot;) - in this case scaleline changes between 1000 and 10000 km when I drag a map towards poles.<br>

<br>
</div><div class="im">The ScaleLine control uses a line in North-South direction to calculate the scale distance. If you are at the poles, there will be one coordinate that goes beyond the pole. Hence the measurement problem. Can you please create a ticket, I have a patch that changes the scale line control to do a West-East measurement instead.<br>

<br>
Regards,<br>
Andreas.<br>
<br>
&gt;<br>
</div><div class="im">&gt; Regards,<br>
&gt; Jan Burdziej<br>
&gt;<br>
&gt;<br>
&gt; 2010/4/28 Bart van den Eijnden &lt;<a href="mailto:bartvde@osgis.nl">bartvde@osgis.nl</a>&gt;<br>
&gt; Add your control after the call to zoomToMaxExtent.<br>
&gt;<br>
&gt; Best regards,<br>
&gt; Bart<br>
&gt;<br>
&gt; On Apr 28, 2010, at 2:34 PM, Jan wrote:<br>
&gt;<br>
&gt;&gt;         var map, scalebar;<br>
&gt;&gt;<br>
&gt;&gt;         function init(){<br>
&gt;&gt;<br>
&gt;&gt;             map = new OpenLayers.Map(&#39;map&#39;);<br>
&gt;&gt;             var layer = new OpenLayers.Layer.WMS(<br>
&gt;&gt;<br>
&gt;&gt;                 &quot;OpenLayers WMS&quot;,<br>
&gt;&gt;<br>
&gt;&gt;                 &quot;<a href="http://labs.metacarta.com/wms/vmap0" target="_blank">http://labs.metacarta.com/wms/vmap0</a>&quot;,<br>
&gt;&gt;                 {layers: &#39;basic&#39;}<br>
&gt;&gt;<br>
&gt;&gt;             );<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;             map.addLayer(layer);<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;                      var scalebar = new OpenLayers.Control.ScaleLine({<br>
&gt;&gt;                              geodesic: true<br>
&gt;&gt;                      });<br>
&gt;&gt;<br>
&gt;&gt;             map.addControl(scalebar);<br>
&gt;&gt;<br>
&gt;&gt;             map.zoomToMaxExtent();<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;         }<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
</div><div class="im">&gt; _______________________________________________<br>
&gt; Users mailing list<br>
&gt; <a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>
&gt; <a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
<br>
</div><div><div></div><div class="h5">--<br>
Andreas Hocevar<br>
OpenGeo - <a href="http://opengeo.org/" target="_blank">http://opengeo.org/</a><br>
Expert service straight from the developers.<br>
<br>
</div></div></blockquote></div><br>