I wrote a wrapper of the Google Maps API in JS, did some local tests with static html, and everything worked fine. Then I uploaded the files to the local web server running in localhost: 8080, tested the map panels, and again everything was fine.
Then a week passed, I added a map to the page, and I could not load it. Nothing has changed (which I know in any case, obviously, there is something), and the static tests continue to work fine, but when I try to download the API from the server, I get this in the debug console:
XMLHttpRequest cannot load http://maps.google.com/maps/api/js?sensor=false.
Origin http://localhost:8080 is not allowed by Access-Control-Allow-Origin.
I read a little, but I still can not understand the error, much less correct it. Can someone please give me a hand?
edit: I use a simple tagto download google js. No jQuery, nothing.
Thanks in advance!
source
share