如何使用 openlayers 为圆圈设置新的 position/radio?

How to set a new position/radio for a circle with openlayers?

this example or in this中,如何将圆圈移动到新位置并即时更改收音机?

我试过了,但没用:

circle.setPosition(ol.proj.transform([GPS_lon, GPS_lat], 'EPSG:4326', 'EPSG:3857'));

PS:我什至不确定我是否可以用最简单的方式创建一个圆圈:$

提前致谢!

ol.geom.Circle has two methods that you can use for this: setCenter(center) and setCenterAndRadius(center, radius, opt_layout).

circle.setCenterAndRadius(
    ol.proj.transform([4.1833, 46.3833], 'EPSG:4326', 'EPSG:3857'),
    500000
);

http://jsfiddle.net/ob7ggtx6/72/