Google Maps API v3 KML layer from Geoserver doesn't show
Trying to load KML from Geoserver 2.1.1 in Google Maps v3. Nothing shows up. Should this URL work (except with our actual domain)?
http://mydomain.org/geoserver/wms/kml?layers=parks_and_recreation:City_Parks_Locations
Tried a couple of different layers; same 开发者_如何学编程result. I see this response from the Google KmlOverlayService:
_xdc_._7hdyfu && _xdc_._7hdyfu( [1] )
I got it to work:
The correct URL:
http://myhost:8080/geoserver/myworkspace/wms/reflect?layers=myworkspace:mylayer&format=kml
(funny I can't find a document to show using "reflect" and "format=kml". Only got the knowledge by googling.)
And myhost:8080 must be accessible to google. Things like "localhost" doesn't work.
Got it to work using this URL.
http://mydomain.org/geoserver/wms/reflect?layers=parks_and_recreation:City_Parks_Locations&format=kml
精彩评论