圆 Circle


Circle: 表示地图上的圆。

下面的示例向地图添加了一个圆

Document
//创建地图对象
var map = FMap.map('map', {
  center: [38.92705, 121.6580833],
  zoom: 10
});
//创建圆对象
var circle = FMap.circle(
  [38.92705, 121.6580833],
  5000, {color: '#f03', opacity: 0.7})
  //捆绑popup
  .bindPopup("I am a circle.")
  //添加到map图层上
  .addTo(map);
//自适应地图窗口
map.fitBounds(circle.getBounds());

results matching ""

    No results matching ""