This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

OpenLayers Displaying out of bounds

0

I have a map displaying a feature overlaying the islands to the west of Alaska and when I extend the bounds, it is zooming way out to world view and repeating part of the feature on the other side of the map - I guess because it is so close to the border.

How do I prevent this? (I am thinking either by setting the max bounds or by shifting the IDL but I have no success withe either).

asked 18 Apr '11, 18:16

Denn's gravatar image

Denn
1111
accept rate: 0%


One Answer:

0

For all I can tell that is a bug in the rather simple way Openlayers calculates the bounding box. The best chances to get help with this is probably the openlayers mailinglist.

answered 24 Apr '11, 09:31

petschge's gravatar image

petschge
8.3k217398
accept rate: 21%

Source code available on GitHub .