[OpenLayers-Users] GML/KML feeds not loading

Christopher Schmidt crschmidt at metacarta.com
Tue Dec 30 10:30:05 EST 2008


On Tue, Dec 30, 2008 at 10:16:24AM -0500, Michael Angstadt wrote:
> Thanks for the thorough and very quick response!
> 
> > 1. You're probably violating the same origin policy. 
> >
> >    http://faq.openlayers.org/proxyhost/all/
> >
> >    (Unless your HTML page is hosted on cbsnews.com, which is possible,
> >    but seems unlikely.)
> I am indeed using a proxy.  I set the ProxyHost variable right after I 
> create the Map object:
> OpenLayers.ProxyHost = "proxy?url=";
> 
> > 2. You're attempting to load a NetworkLink. OpenLayers 2.7 does not
> >    support NetworkLinks, which was recently fixed in SVN. You can set
> >    your KML file to maxDepth: 2 or some such, and it will parse the
> >    networklink in the file you have but...
> So you're saying that 2.7 *does* support NetworkLinks--you just have to 
> set the matchDepth property?

no, sorry: I'm saying "2.7 was buggy, SVN is fixed." 

  http://trac.openlayers.org/ticket/1877

Sorry that was unclear.  

> >Quite simply, the CBS news feed doesn't contain any locations, only
> >addresses, so you need a full gazetteer for it to work. Calling this KML
> >at all is simply more evidence that the KML spec is hopelessly
> >overbroad, and since not even Google will read it, I have no qualms
> >saying that OpenLayers won't.
> Yeah, that feed was kind of odd.  I found another one with actual 
> coordinates[1].  Like the CBSNews feed, it has a NetworkLink tag, which 
> links to another KML file with the actual map data.  It works fine if I 
> plug it into Google Maps (it displays a number of points and vectors in 
> central Africa).    However, I can't get it to work in OpenLayers.  
> Maybe it has something to do with it not using the proxy to load the 
> NetworkLink URL?  If so, how can I get it to do this?  I have the 
> maxDepth of the KML layer set to 3.
> 
> [1] http://www.janegoodall.org/news/gombe-blog/feed/gcb-feed.kml

This works fine in OL SVN:
  
  1. Open http://crschmidt.net/mapping/kml
  2. Paste URL
  3. Click "submit"
  4. See little icons and lines between them.
 
But it won't work in 2.7 unless you open the feed with the content: 

  http://www.janegoodall.org/news/gombe-blog/feed/gcb-feed2.kml

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list