Javascript 在谷歌地图上绘制圆圈和缩放级别问题

Javascript 在谷歌地图上绘制圆圈和缩放级别问题,javascript,google-maps,google-maps-api-3,Javascript,Google Maps,Google Maps Api 3,我正在谷歌地图上用圆圈API绘制一些点 我遇到的问题是,并不是所有的点都以预定义的缩放级别4显示在地图上,如果我只放大一个级别,它们就会显示出来。有没有办法让它们即使在远距离变焦时也能出现 以下是我将标记添加到地图的代码: addMarker: function(opts) { var gLatLng = this.gLatLng(opts); var radius = opts.population / 20; var self = this; this._configure

我正在谷歌地图上用圆圈API绘制一些点

我遇到的问题是,并不是所有的点都以预定义的缩放级别4显示在地图上,如果我只放大一个级别,它们就会显示出来。有没有办法让它们即使在远距离变焦时也能出现

以下是我将标记添加到地图的代码:

addMarker: function(opts) {
  var gLatLng = this.gLatLng(opts);
  var radius = opts.population / 20;
  var self = this;

  this._configure_circle(radius);

  var circle = {
      strokeColor: this.color,
      strokeOpacity: 0.8,
      strokeWeight: this.stroke,
      fillColor: this.color,
      fillOpactiy: 1,
      map: this.map,
      center: gLatLng,
      radius: this.radius
  }
  var gCirle = new google.maps.Circle(circle);
  gCirle.setValues({_id: opts._id});
  this.markers.push(gCirle);

  google.maps.event.addListener(gCirle, 'click', function(event){
    self.map.setZoom(8);
    self.map.setCenter(new google.maps.LatLng(gCirle.getCenter().lat(), gCirle.getCenter().lng()));
    Session.set('currentMapArea', gCirle.get('_id'));
  });

  return gCirle;
},
_configure_circle: function(num) {
    if(num > 4000) {
        this.stroke = 50;
        this.color = '#66FF00'
        this.radius = num + 300;
    } else if(num <= 4000 && num > 3400) {
        this.stroke = 25;
        this.color = '#44E030';
        this.radius = num + 200;
    } else {
        this.stroke = 15;
        this.color = '#22DD60';
        this.radius = num;
    }
}
创建一个LatLngBounds对象,用每个圆的边界扩展这些LatLngBounds,完成圆的创建后,通过将LatLngBounds作为参数传递来调用贴图的fitBounds方法