Talk:HERE Maps API - How to display KML file data on the map
Eman.Refaat - XMLHttpRequest cannot load Map.kml. Cross origin requests are only supported for HTTP.
Hi There, I try to load map.kml file on map but, I get this error : ( XMLHttpRequest cannot load Map.kml. Cross origin requests are only supported for HTTP.) I use the same code and same domain. any helpThank you
14:31, 31 January 2013 (EET)
Hamishwillee - Is the URL a local domain?
As I understand it this happens when you do the request a local file rather than one hosted on a web server. Have you followed the instructions above and accessed via an http url?
If so and this still doesn't work I suggest you post on the Qt discussion board cross linking to here - that way you will get more eyes on the problem.
00:02, 1 February 2013 (EET)
Eman.Refaat - Useing Local domain
First of All Thank you Hamish very much. I solve the problem through the following steps:
- open project on visual studio. - open (Web.config) file and add handler for kml file as :
<staticContent> <mimeMap fileExtension=".kml" mimeType="application/vnd.google-earth.kml+xml" /> </staticContent>
the all file :
<system.web> <compilation debug="true" targetFramework="4.5"/> <httpRuntime targetFramework="4.5"/> </system.web> <system.webServer> <staticContent> <mimeMap fileExtension=".kml" mimeType="application/vnd.google-earth.kml+xml" /> </staticContent> </system.webServer>
13:54, 3 February 2013 (EET)
Hamishwillee - That's great
Thanks for adding your solution!
01:05, 4 February 2013 (EET)