While using OpenLayers to load OpenStreetMap, I observe that part of the map would sometimes be covered with blank pink tiles. I searched and found similar complaints with solutions suggesting the modification of OpenLayers.IMAGE_RELOAD_ATTEMPTS
parameter to an integer number greater than 0. I did exactly that, but it doesn't solve the problem.
Using Firebug, I am able to verify that the tiles were indeed downloaded successfully. However, for some unknown reason, they just do not load onto the map. I have no issue with Google Maps as a base layer. The problem seems to be restricted to OpenStreetMap only. Any idea how to solve this pink tile of death?
Answer
I find that this problem is particular to Firefox 12.0 browser. Google Chrome 21.0 seems unaffected. And only OpenStreetMap is affected, its sister site OpenCycleMap is not. The solution is to set crossOriginKeyword
in tileOptions
of OSM layer to null:
tileOptions: {crossOriginKeyword: null}
No comments:
Post a Comment