我有很多KML文件 - 每个现有国家都有一个。我需要根据用户的输入在Google Map上动态渲染它们。如果我搜索的结果只有少数国家,那么一切都很完美 - 地图会显示所有国家/地区。当有超过15个国家突出显示时,会出现问题。几乎所有KML请求都出现414错误。
据我所知,Google地图按照图块划分,每个图块都会进行一次KML请求。如果需要为磁贴生成太多KML文件,则此类请求的URL太长(414错误)。
你知道我怎么能克服这个问题?
以下是此类请求的示例:
http://mt0.googleapis.com/mapslt?hl=pl&lyrs=kml%3AcuwPC5SCy4YxYqf-KUu31-kH0-baWhlLmIlHaxq3izLNIeOTEA1oE|kv%3A3|api%3A3%2Ckml%3AcuwPC5SCy4YxYqf-KUu31-kH0-baWhlLmIlHaxq1ixq5IeOTEA1oE|kv%3A3|api%3A3%2Ckml%3AcuwPC5SCy4YxYqf-KUu31-kH0-baWhlLmIlHaxq3iz7ZIeOTEA1oE|kv%3A3|api%3A3%2Ckml%3AcuwPC5SCy4YxYqf-KUu31-kH0-baWhlLmIlHaxq1iy61IeOTEA1oE|kv%3A3|api%3A3%2Ckml%3AcuwPC5SCy4YxYqf-KUu31-kH0-baWhlLmIlHaxq2CfZHwyIkHtAg|kv%3A3|api%3A3%2Ckml%3AcuwPC5SCy4YxYqf-KUu31-kH0-baWhlLmIlHaxq3iw6xIeOTEA1oE|kv%3A3|api%3A3%2Ckml%3AcuwPC5SCy4YxYqf-KUu31-kH0-baWhlLmIlHaxq2aCOyKhEdOPKBF|kv%3A3|api%3A3%2Ckml%3AcuwPC5SCy4YxYqf-KUu31-kH0-baWhlLmIlHaxq1ix7BIeOTEA1oE|kv%3A3|api%3A3%2Ckml%3AcuwPC5SCy4YxYqf-KUu31-kH0-baWhlLmIlHaxq2aCAyLhEdOPKBF|kv%3A3|api%3A3%2Ckml%3AcuwPC5SCy4YxYqf-KUu31-kH0-baWhlLmIlHaxq1iy7lIeOTEA1oE|kv%3A3|api%3A3%2Ckml%3AcuwPC5SCy4YxYqf-KUu31-kH0-baWhlLmIlHaxq3iya1IeOT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F|kv%3A3|api%3A3&x=1&y=1&z=1&w=256&h=256&source=maps_api&token=104074
感谢您的帮助
答案 0 :(得分:1)
你是否必须将它们放在单独的kml文件中你可以输出你的xml多个文件夹吗?在每个文件夹中每个区域只是一个想法让我知道它的垃圾