AW: [OpenLayers-Users] OpenStreetMap: wrong tile http address

Arnd Wippermann arnd.wippermann at web.de
Wed Jan 18 17:12:59 EST 2012


It seem an issue with the maxExtent of the OSM Layer.

Try 20017508.34 instead 20037508.34 as ymax for the maxExtent, then the
error should go away.


OSMLayer.maxExtent = new
OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20017508.34);
OSMLayer.displayOutsideMaxExtent=false;

Arnd 


-----Ursprüngliche Nachricht-----
Von: openlayers-users-bounces at lists.osgeo.org
[mailto:openlayers-users-bounces at lists.osgeo.org] Im Auftrag von rscxdev
Gesendet: Mittwoch, 18. Januar 2012 22:16
An: users at openlayers.org
Betreff: [OpenLayers-Users] OpenStreetMap: wrong tile http address

Hello

I've got an annoying problem:
I use OL to display OSM "Mapnik" and when zooming to level 1 and scrolling
to the edge of the map i always get in firebug

"NetworkError: 404 Not Found - http://a.tile.openstreetmap.org/1/1/2.png"
or
"NetworkError: 404 Not Found - http://a.tile.openstreetmap.org/1/0/2.png"

which blocks the traffic because the browser wants to get the png and get
the png and doesnt get it....
Obviously the http address is wrong; in OSM docs i read that the address
template is

	http://[abc].tile.openstreetmap.org/zoom/x/y.png 

I think the address is evaluated wrong in the XYZ class and XYZ wants to get
a map which doesnt exist.
Can somebody give me a hint how to prevent the error?
By the way when looking at the OL examples there are similar errors.
Look at http://openlayers.org/dev/examples/osm.html, zoom to level 0 and
move the map to the upper/lower border.
And by the way now we see why the examples are initialized at level 10 and
not 0... ;-)

Thanks




--
View this message in context:
http://osgeo-org.1803224.n2.nabble.com/OpenStreetMap-wrong-tile-http-address
-tp7201670p7201670.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
Users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users



More information about the Users mailing list