CORS Error with IE (11) and Edge Only

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

CORS Error with IE (11) and Edge Only

MHerel
Hi,
I am getting the following error in IE and Edge browsers when using
OpenStreetMaps as my basemap in Fusion MGOS 3.1.2

Works in Chrome, Firefox, Opera

The origin 'http://mapnet.rogers.com' did not find 'http://my.domain.com' in
the Access-Control-Allow-Origin response header for cross-origin image
resource at 'http://b.tile.openstreetmap.org/19/262144/262143.png'.

This seems to have happened recently I think.  Anyone else having this? Any
ideas?

Thanks,

  Mike



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: CORS Error with IE (11) and Edge Only

Benoit Begin
A little bit ago, I remember OpenStreetMap started automatically redirecting
from http to https. Like if you navigate to
http://b.tile.openstreetmap.org/19/262144/262143.png you will notice you get
sent off to https automatically. I know this caused issues with Safari and
actually returned "pink images" since it made it invalid images due to "too
many redirections".

You could try to edit the OpenLayers.js file in your fusion deployment and
replace http://a.tile.openstreetmap.org, http://b.tile.openstreetmap.org and
http://c.tile.openstreetmap.org to be https://

I'm not sure if it'd fix your problem, but it's a fairly quick fix to
attempt.

Regards!



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: CORS Error with IE (11) and Edge Only

GordonL
If you use Generic XYZ for the OpenStreetMap and pass the HTTPS, do you get
the same error?

https://a.tile.openstreetmap.org/{z}/{x}/{y}.png

<http://osgeo-org.1560.x6.nabble.com/file/t195347/openstreetmapxyz.jpg>



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: CORS Error with IE (11) and Edge Only

MHerel
In reply to this post by Benoit Begin
Hi Benoit,

Thank you so much.

I edited the file you mentioned but it didn't work. I noticed that the URL
did not change in the debug console, so I dug a little further and found
that I had to change the same URL in fusionSF.js to make it work.

Thanks so much for putting me on the right track.

Cheers,

   Mike



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: CORS Error with IE (11) and Edge Only

MHerel
In reply to this post by GordonL
Hi Gordon,

I am unable to get the OpenStreetMap XYZ layer to work with or without
"https".  I may give it at try again when I have more time to revert my
other fix and test properly.

Thanks



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: CORS Error with IE (11) and Edge Only

MHerel
In reply to this post by GordonL
Hi Gordon,

I got around to testing, and both http and https work with OSM as a generic
XYZ layer. Interesting...



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: CORS Error with IE (11) and Edge Only

GordonL
That is how I add all the various Backgrounds now. Using Generic XYZ:

For example:

OpenStreetMap: https://a.tile.openstreetmap.org/${z}/${x}/${y}.png

Google Maps: https://mt1.google.com/vt/lyrs=m&x=${x}&y=${y}&z=${z}
Google Satellite: https://mt1.google.com/vt/lyrs=s&x=${x}&y=${y}&z=${z}
Google Terrain: https://mt1.google.com/vt/lyrs=p&x=${x}&y=${y}&z=${z}


ESRI Streets:
https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/${z}/${y}/${x}
Esri Topography:
https://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/${z}/${y}/${x}

And so on...





--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users