On Oct 21, 8:58 am, Gareth Mann <[email protected]> wrote:
> I am parsing a KML file from a directory on my website using GDownloadUrl.
> All was working fine until this morning when i replaced the kml file with a
> new one (same name).
>
> Now when I try to run the code I get the error message:
>
> XMLHttpRequest cannot load (web address + KML file name), origin (web
> address) is not allowed by Access-Control-Allow-Origin.
>
> I googled the error and it seems that I need to have the host server set up
> to allow "Cross Origin resource sharing". (http://enable-cors.org/)
>
> What I don't get though is why was it working yesterday and now that i
> replaced the kml file with a new one I get the error. Also "Cross origin"
> sounds like something to do with sharing files between different websites.
> My webpage is hosted at the same URL as the kml file so it seems strange I
> would need to set it up to allow cross origin sharing....
>
> Any ideas what the issue is?

You didn't provide enough information.  Sounds like your web page is
in the http://www.mydomain.com and your kml file is in the http://mydomain.com
(or vice versa), those two domains are different for the cross domain
check.  Best to use a relative URL, rather than fully specify it.

If that isn't the problem, please provide a link to your map that
exhibits the problem (as requested in the posting guidelines).

  -- Larry

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API V2" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-api?hl=en.

Reply via email to