简体   繁体   English

在OpenLayers 3中动态创建标记

[英]Dynamically create markers in OpenLayers 3

I'm developing an application that loads lots of markers in OpenLayers 3. However, I would like to dynamically display and load markers while user is panning at a certain zoom level. 我正在开发一个在OpenLayers 3中加载大量标记的应用程序。但是,我想在用户以某个缩放级别进行平移时动态显示和加载标记。

Could someone provide me an example, or directions to do that? 有人可以给我一个例子,或这样做的指示吗?

For instance, I would like to first create an example that drops a marker where user has clicked on the map. 例如,我想首先创建一个示例,在用户单击地图的地方放一个标记。 So, with this information, I will be able to handle the rest and post my solution here. 因此,有了这些信息,我将能够处理其余的并将解决方案发布在这里。

I've managed to create a way for setting this up: 我设法创建了一种设置方法:

http://weebah.com/weebah_examples/click_to_create.html http://weebah.com/weebah_examples/click_to_create.html

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

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