-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KML NetworkLink CORS Issue #8381
Comments
Hello @gogo1211, the site serving your KML file will need to enable CORS. If you don't have control over that site, i would recommend trying to contact the site owner. You can find resources to learn more about CORS here: https://enable-cors.org/ |
For local testing (the error shows your Origin as being localhost) I suggest running your site in a browser with CORS protections disabled. I believe Firefox may have extensions that facilitate this. I use Chrome with the arguments
You can probably get away with just |
Hello, guys.
I was trying to add KML to cesium map using KmlDataSource.
But I am getting the following error on console.
Access to XMLHttpRequest at 'http://alphaalpha.ddns.net:4181/pp_google.kml' from origin 'http://localhost:3001' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
This is the content of KML file.
<?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://earth.google.com/kml/2.0"> <Document> <visibility>1</visibility> <NetworkLink> <name>PP1</name> <flyToView>0</flyToView> <Url><href>http://alphaalpha.ddns.net:4181/pp_google.kml</href> <refreshMode>onInterval</refreshMode> <refreshInterval>4</refreshInterval> <viewRefreshMode>never</viewRefreshMode> </Url> <refreshVisibility>1</refreshVisibility> </NetworkLink> </Document> </kml>
The text was updated successfully, but these errors were encountered: