[OSM-dev] OpenLayers problem with latitude and longitude placement

Thomas Wood grand.edgemaster at gmail.com
Mon Dec 8 17:54:28 GMT 2008


2008/12/7 Andreas Titz <erddaten at fahrrad.streckenfun.de>:
> Maarten Deen wrote:
>> Thomas Wood wrote:
>>>The maxResolution option on the Map object is currently not doing
>>>anything at a guess, this is what is causing the vectors to disappear
>>>at >z13
>>
>> I've found out that the length of the vectors is affecting at which zoomlevels
>> they disappear. The longer they are, the sooner they disappear. So it must be
>> some kind of bug.
>
> It seems to be a clipping problem. If you zoom to the end of such a
> line, it will be visible even at zoom 18:
> <http://www.maasluip.nl/ebt/test.html?lat=50.99996&lon=9.99998&zoom=18&layers=B0T>
>
> I guess, if you zoom to the center of the line, the endpoints are too
> far away. In that case OL assumes, that the line won't clip the actually
> shown map.
>
> HTH, Andreas

Thanks for that example, I've passed it onto somebody who knows better
than me about the rendering internals.

Maarten: Permalinks will only work as expected if you conditionally
set the center, eg:
if(!map.getCenter()) {
  map.setCenter (lonLat, 6);
}

-- 
Regards,
Thomas Wood
(Edgemaster)




More information about the dev mailing list