简体   繁体   English

OpenLayers中的自定义协议

[英]Custom protocol in OpenLayers

How can you implement a custom protocol in OpenLayers? 如何在OpenLayers中实现自定义协议? What are the specific methods that you need to override in OpenLayers.Protocol to make it work? 您需要在OpenLayers.Protocol中重写哪些特定方法以使其起作用?

I tried to implement just the read method, but specifying the protocol to a Vector layer had no effect. 我尝试仅实现read方法,但是将协议指定给Vector层无效。

The problem was somewhere else. 问题出在别的地方。 Implementing the read method is enough, but you need to call the callback method passed as an argument. 实现read方法就足够了,但是您需要调用作为参数传递的回调方法。

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

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