简体   繁体   中英

Unable to render kml file in google earth

I am getting big transparent white box with a red border and red X as output when I try to render below kml file in Google Earth. Could anyone please let me know why it is not rendering properly.

kml file link : https://www.wpc.ncep.noaa.gov/kml/winwx/HPC_Day1-3_psnow_gt_08_nlbody.kml

If you're trying to view this in the new Google Earth (v9) on web, then you're likely hitting CORS issues.

The link provided the comments is working for me when viewed in Earth Pro (v7), where it loads a screen overlay with a legend, a few small data polygons in the Rocky Mountains, and a giant ground-overlay image with white text on it over the middle of the USA.

On Google Earth for web, it gives me the red X that you're describing. If you look at the Chrome developer console, you'll see that the images requested by that KML file come from a server that does not have the necessary CORS (Cross Origin Request) headers set on the outgoing files (screenshot below). The red X is just what Earth shows when it can't get or load an image. Unfortunately Earth on web has additional security requirements, and all files requested by the app must have CORS enabled. Unless you know someone at NOAA who can update the server to provide the necessary CORS headers, you'll have to stick with Earth Pro to view this one.

您在地球上为Web加载的KML的屏幕截图,在控制台中出现CORS错误

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM