简体   繁体   English

无法在Google地图上加载KML图层

[英]Can't load KML Layer on Google Map

I created my Google Map loaded successfully an Google Map KML from Google Examples. 我创建的Google Map已成功从Google Examples加载了Google Map KML。 But when I want to load my own kml file which I can open on Google Earth it doesn't load. 但是,当我想加载自己的可以在Google Earth上打开的kml文件时,它不会加载。 I uploaded my kml file (11 MB) to my ftp, it is accessible. 我将kml文件(11 MB)上传到了ftp,可以访问。 Is there any limits or should I convert it? 有限制吗?还是应该转换?

var ctaLayer = new google.maps.KmlLayer({
        url: 'http://blablabla.com/MyOwn.kml',
        //url: 'http://googlemaps.github.io/js-v2-samples/ggeoxml/cta.kml',
        suppressInfoWindows: true,
        map: map
    });

As it seems the KML-documentation has been modified. 看起来KML文档已被修改。

Previously there has been a list of limits, including a filesize-limit of 3MB for a single KML-File , but I can't find this list anymore. 以前有一个限制列表,包括单个KML-File的文件大小限制为3MB,但我找不到此列表了。

I've tested it and it's clear that now there is a limit of 2MB for a single KML-file. 我已经对其进行了测试,很明显,单个KML文件现在限制为2MB。

See also: https://code.google.com/p/gmaps-api-issues/issues/detail?id=9157 另请参阅: https : //code.google.com/p/gmaps-api-issues/issues/detail?id=9157

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM