KML 图层的问题 [英] Problems with KML layers

查看:20
本文介绍了KML 图层的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的地图有 9 层,可以通过勾选框打开和关闭.每一层都是由JS加载进来的.我的问题是当他们的勾选框处于活动状态时,只有 5 个加载.可以将多少 kml 层加载到 v3 api 中是否有限制?尽管它们确实有很多自定义标记图标,但总共不到 1mb.

My map has 9 layers which can be toggled on and off by means of a tick box. Each layer is loaded in by JS. My problem is that only 5 of the nine load when their tick box is active. Is there a limit on how many kml layers can be loaded in to v3 api? In total there is less than 1mb, though they do have quite a few custom marker icons.

谢谢达伦

推荐答案

我遇到了一个听起来非常熟悉的问题.我正在以类似的方式处理 KML 文件(一组地图图层作为 KML 文件由 JS 通过勾选框选取/加载,虽然很大,但有很多自定义标记图标、长描述等......).

I am having a eerily familiar-sounding issue. I am working with KML files in similar fashion (an array of map layers as KML files are picked/loaded by JS via a tick box, not big, although quite a few custom marker icons, long descriptions, etc..).

我刚刚意识到似乎是一个新的限制.希望我能提供更多帮助,但我会分享我所知道的.

I have just now become aware of what seems like a NEW limit. Wish I could be more help, but I will share what I know.

就我而言,早在 2011 年 6 月,完全相同的代码就可以正常工作,并且该地图已被 1000 多人查看/使用.这是用于年度活动的自定义 v3 api 地图.图例"有大约 34 层,包含按类型分类的线条或标记,其中任何一个都可以在任何给定时间开启".默认的,也是最常用的,设置大约有 12 个层".只有其中一层(加载时恰好是阵列中的最后一层)每年都会发生显着变化.这也是最重要的一项.如果人们在 2011 年 6 月在某些浏览器/操作系统中遇到重大错误,我会听说过.正是这个文件,我坐下来快速"编辑并及时重新上传,以备 2012 年的活动.在我发现有什么不对劲之前,我什至没有碰它.我从去年开始就不需要看地图了,所以不幸的是,我不能更准确地说明这种情况是什么时候开始发生的.

In my case, the exact same code was working fine as far back as June 2011 and the map has been viewed/used by 1000s of people. It's a custom v3 api map for an annual event. The 'legend' has about 34 layers containing lines or markers, classified by type, any of which could be 'on' at any given time. The default, and most commonly used, setup had about 12 "layers" on. Only one of the layers (happens to be the last one in the array when it loads) is one that changes significantly from year to year. It's also the most important one. If people were getting significant errors in June 2011 in some browser/OS, I would have heard about it. It was this file that I sat down to "quickly" edit and re-upload in time for the 2012 event. I hadn't even touched it before I noticed that something was wrong. I haven't needed to look at the map since last year, so unfortunately I can't be more precise as to when this started happening.

发现/结论/想法?:

  • 转储浏览器缓存没有任何作用

  • dumping the browser cache does nothing

通过反复试验,我发现它实际上最多会加载6个层",但似乎取决于大小/类型/juju?逗号分隔列表中的任何给定 kML 文件.但是,像您一样,通常在 5 或 6 个左右.

Through trial and error, I found that it will actually load up to 6 "layers", but it seems to depend on the size/type/juju? of any given kML file in the comma delineated list. But, like you, it's usually around 5 or 6.

奇怪的是,KML 文件本身似乎就在后台.不可见的标记会影响鼠标指针悬停在上面",点击时会显示它们的信息框.奇怪.

Oddly, the KML files themselves seem to be there in the background. Invisible markers will affect the mouse pointer "on hover over" and their info boxes will show up when clicked. Strange.

这个问题对我来说肯定还不到一年.

This problem is definitely less than a year old for me.

如果不是以某种方式与 Google 的某些新操作有关(在这种情况下,我怀疑我们会听说它或在 API 论坛中找到了一些东西......)我们的服务器之一,只是一个巧合?

If not somehow related to some new action of Google's (in which case I would suspect we'd hear about it or have found something in the API forums..) perhaps it is related to some new limits placed by one of our servers and is simply a coincidence?

---> 嗯.我最近遇到了一个 wordpress 站点的菜单项限制问题,并让我的托管服务提供商更改了一些 suhosin 请求限制(?)如果是这样,那将是一个重要的线索,我会回来报告.

---> hmm. I recently had a wordpress site's menu item limit issue and got my hosting provider to change some suhosin request limits(?) I can try migrating the source file to another server, and see if it works from there. If it does, that would be a significant clue, and I will report back.

除此之外,我不知道.只是想我会分享我所学到的,并希望其他人对正在发生的事情有所了解.

Other than that, I have no idea. Just thought I'd share what I've learned and hope someone else has some idea of what's going on.

这篇关于KML 图层的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆