代码如下:
map = new google.maps.Map(document.getElementById("map_canvas"),
myOptions);
        var ctaLayer = new google.maps.KmlLayer('http://www.**.net/gis/
test.kml');
    ctaLayer.setMap(map);
kml是放到公网的,并且也设置了WEB服务器的KML 文件MIME 类型
application/vnd.google-earth.kml+xml
按照网上的说法应该是可以的,google官方的说法也是必须要保证kml的URL必须为公网的,test.kml在本地用google earth加
载是没问题的。
个人感觉条件都满足,但就是不能正常显示,
把URL换成google的kml url 可以正常显示,排除了我本身程序代码的问题。
网上还有的方式是通过下面一个语句加载
                 var gx = new GGeoXml(url);
      map.addOverlay(gx);
我使用后的错误提示是GGeoXml(url);未定义,这个GGeoXml好像不是API3的语句。
我真的很郁闷了,跪求高手出现~!

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to