google maps v3 kmllayer not reading geoserver georss
I'm trying to render a georss or even kml file produced from geoserver in a v3 google map. Here is the link to the georss file:
http://216.2.146.130:8080/geoserver/wms/reflect?layers=PTV:v_incident_event_all&format=rss
Here is my test page:
http://216.2.146.155:8080/maptesting2/kmllayertest.html
When testing, it appears that the google maps js doesn't even t开发者_如何学Gory to process the georss file. I've tried saving the outputted georss file and loading it statically which seems to work, but I want to be able to do this dynamically. Any ideas?
Google must be able to fetch your file from the public Internet in order to display it using KmlLayer, as the file is processed by a server before being displayed on the map.
When loading that file I get a login prompt, which means that any server trying to download that file would be unable to. If you remove the login requirement, it should work.
Note that for the best performance, avoid regenerating your file more than once every 5 - 10 minutes, and make sure you set appropriate cache headers (ideally public caching for 5 minutes).
精彩评论