You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since some time ago I was experiencing problems running osmWebWizard in Chrome: The whole app started but it did not display any map tiles, all images were shown as inaccessible. Today I had a look using the developer mode and the console is full of the following error messages:
Redirect from 'http://b.tile.openstreetmap.org/16/35207/21492.png' to 'https://b.tile.openstreetmap.org/16/35207/21492.png' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'null' that is not equal to the supplied origin. Origin 'null' is therefore not allowed access.
CORS stands for Cross-Origin Resource Sharing and it seems that the tile server will not honour the redirect of http://... to https://... if the origin is not server by a server but it is coming from a file (the wizard page is displayed using file://...).
// OSM mapvarmap=newOpenLayers.Map("map");varmaplayer=newOpenLayers.Layer.OSM("OpenStreetMap",// Official OSM tileset as forced HTTPS URLs['https://a.tile.openstreetmap.org/${z}/${x}/${y}.png','https://b.tile.openstreetmap.org/${z}/${x}/${y}.png','https://c.tile.openstreetmap.org/${z}/${x}/${y}.png'],null);map.addLayer(maplayer);
I do not know yet if this is Windows/Chrome specific.
Jan
The text was updated successfully, but these errors were encountered:
Since some time ago I was experiencing problems running osmWebWizard in Chrome: The whole app started but it did not display any map tiles, all images were shown as inaccessible. Today I had a look using the developer mode and the console is full of the following error messages:
Redirect from 'http://b.tile.openstreetmap.org/16/35207/21492.png' to 'https://b.tile.openstreetmap.org/16/35207/21492.png' has been blocked by CORS policy: The 'Access-Control-Allow-Origin' header has a value 'null' that is not equal to the supplied origin. Origin 'null' is therefore not allowed access.
CORS stands for Cross-Origin Resource Sharing and it seems that the tile server will not honour the redirect of
http://...
tohttps://...
if the origin is not server by a server but it is coming from a file (the wizard page is displayed usingfile://...
).I have solved it by using the approach described in this StackExchange discussion, i.e. changing the code at
https://github.com/eclipse/sumo/blob/5b91df43ebe956661769e903b2da8f83e7665f60/tools/webWizard/script.js#L236
to
I do not know yet if this is Windows/Chrome specific.
Jan
The text was updated successfully, but these errors were encountered: