engrabid411 / kmzol3

KMZ parser for OL3 (Openlayers 3). Under construnction
6 stars 2 forks source link

Not working, blank map #1

Open Krukarius opened 5 years ago

Krukarius commented 5 years ago

Hi,

I run the main index.html page and it looks completely blank.

The code looks fine. Could you tell me where the problem can exist?

Thanks & Regards,

Krukarius commented 5 years ago

I tried on the another .kmz file in the web and Console states: Access to XMLHttpRequest at 'http://xjubier.free.fr/download/GE/en/TSE_2001_06_21.kmz' from origin 'http://localhost' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Uncaught Error: InvalidStateError: Failed to read the 'responseText' property from 'XMLHttpRequest': The value is only accessible if the object's 'responseType' is '' or 'text' (was 'arraybuffer'). at XMLHttpRequest.xhr.onreadystatechange (jszip-utils.js:93)

I guess, that is something wrong with:

if (!/^(?:f|ht)tps?\:\/\//.test(url)) { url = "http://" + url; } JSZipUtils.getBinaryContent( 'proxy/index.php?url='+url, function(err, data) { if(err) { throw err; }