Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我和我一起工作Openlayer并且我有多个层(A,B,C,D)。
Openlayer
A,B,C,D
A层是基础层。我想单击图层 C 以获取信息,但操作属于图层A作为基础图层。
A
有谁能够帮我?
如果您通读 Openlayers API 文档,您会发现可以将单击操作添加到多个层。然后单击可以从这些多层中设置一个动作。
您可以在此处找到示例列表。你会感兴趣的例子是特征事件。示例中使用的 Javascript 可以在这里查看。
由于您的基础层上已经发生了点击事件,如果您只希望来自 C 层的信息和点击功能不在基础层上发生,您可能需要将其关闭或删除。