开发者

Google Maps API v3 KML layer from Geoserver doesn't show

开发者 https://www.devze.com 2023-04-12 09:30 出处:网络
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)?

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
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号