leaflet-grayscale
leaflet-grayscale copied to clipboard
Grayscaling does not work with some tiles
Grayscaling does not work with tiles from http://a.www.toolserver.org/tiles/osm-no-labels/10/530/340.png.
Example: Visit http://www.openrailwaymap.org/ and select the "Mapnik no-labels Grayscale" layer from the layerselection. You will see just an empty background.
Yes, and it prints "Security Violation" to the error log. Very strange, considering it works with standard tiles from osm.org.
OK, there seems to be a problem with crossOrigin. I think this is related to this problem: http://blog.chromium.org/2011/07/using-cross-domain-images-in-webgl-and.html
Is there any way to solve this problem clientside or should I suggest the provider of the tileserver to modify the response headers?
I have noticed that the gray layers at OpenRailwayMap (Mapnik gray and Mapquest gray) are not visible if the plugin HTTPSeverywhere works. If I look into the Firefox console, I do not see HTTP GET requests for map tiles of tiles.openstreetmap.org while moving the map. I only see HTTP GET request for tiles.openrailwaymap.org (this layer is not gray-converted).
Layers which are not converted from RGB to gray are shown as usual.
I tried using this with the following map:
http://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg
And indeed It showed some diagonals tiles wrong. Then I moved to:
http://tile.openstreetmap.org/{z}/{x}/{y}.png
And it worked pretty good. My approach is a little bit different because I'm caching the first 3 zoom levels on my own server to reduce bandwith consumption to openstreemap (it's more of an ethical matter than technical) and I also comprised the png images by my own, reducing them up to the 35% of the original size. This way the images are served faster and more reliable.
Yes, this works. And it works real good. It is a fair alternative to the old Acetate (Hillshading).
Doesn't work for me with secured tiles. Is this problem solved? Any advice?