对 OpenLayers 来说非常新,并试图在地图上围绕点击的原点画一个圆圈。我有这个代码 -
circleLayer = new OpenLayers.Layer.Vector "Circle Search"
circle = new OpenLayers.Geometry.Polygon.createRegularPolygon(
new OpenLayers.Geometry.Point(lat,lon),
100,
30
)
console.log(circle)
feature = new OpenLayers.Feature.Vector(circle)
circleLayer.addFeatures(feature)
mapApp.map.openLayersMap.addLayer circleLayer
但是圆圈没有出现,我不知道为什么。谁能告诉我?