[OpenLayers-Users] Network links inside KML

Rob Hyx robhyx at gmail.com
Tue Mar 12 09:59:02 PDT 2013


Hello all, when adding a KML layer in OpenLayers, is there a way to alert
the user if the KML contains a network link to a KMZ, rather than just
failing silently and not letting the user an error has occured? I tried:

var kmlLayer = new OpenLayers.Layer.Vector('KML',{...});
try {
    map.addLayer(kmlLayer);
} catch(e) {
    alert('An error occured');
}

But, it seems the error is thrown when the proxy throws an exception and
returns a 500 error: OpenLayers.debug.js (line 45218). The proxy throws an
error because of the encoding in the binary file.
-- 
*HYX*
http://hyx-music.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130312/d9024fbf/attachment-0001.html>


More information about the Users mailing list