Google maps 如何在subgurim谷歌地图中绘制圆圈?

Google maps 如何在subgurim谷歌地图中绘制圆圈?,google-maps,google-maps-api-3,subgurim-maps,Google Maps,Google Maps Api 3,Subgurim Maps,我使用subgurim google maps v4。我需要根据(纬度、纬度、半径)绘制几个不同颜色的圆。我如何执行 在搜索过程中,我发现了多个代码来绘制圆圈,但没有使用subgurim google maps。有人能帮我转换这些代码吗 var Circle = new google.maps.Circle({ center: birrfeld, radius: 2000, strokeColor: color, strokeOpacity: 1, strokeWeight: 2, fillCo

我使用subgurim google maps v4。我需要根据(纬度、纬度、半径)绘制几个不同颜色的圆。我如何执行

在搜索过程中,我发现了多个代码来绘制圆圈,但没有使用subgurim google maps。有人能帮我转换这些代码吗

var Circle = new google.maps.Circle({ center: birrfeld, radius: 2000, strokeColor: color, strokeOpacity: 1, strokeWeight: 2, fillColor: color, fillOpacity: 0.4 });
                                Circle.setMap(map);

这是我的代码,我使用的数据文件中只有long和lat,如json

var latlng;
var marker;
function initialize () {
var mapOptions = {  
      zoom: 2, 
      center: new google.maps.LatLng(2.8,2.8), 
      mapTypeId: google.maps.MapTypeId.TERRAIN
};

var map = new google.maps.Map(document.getElementById("mapCanvas"),mapOptions  );
console.log("alex");

$.getJSON("data/canada.json", function(data) {

  //console.log(latlngArray);
  var populationOptions = {
      strokeColor: '#FF0000',
      strokeOpacity: 0.2,
      strokeWeight: 6,
      fillColor: '#FF0000',
      fillOpacity: 0.35,
      map: map,
      center: latlng,
      radius: 20000,
      } 

  for (var i = 0; i < data.length; i++) {
    populationOptions.center = new google.maps.LatLng(data[i].Latitude,data[i].Longitude);
    cityCircle = new google.maps.Circle(populationOptions);  

  }
});  
}

function loadScript() {
  var script = document.createElement('script');
  script.type = 'text/javascript';
  script.src = 'https://maps.googleapis.com/maps/api/js?v=3.exp&?key=AIzaSyB_h_TZ3jVQstD6ieduDF482_kRIyF4y1I&sensor=false&' 
  + 'callback=initialize';
  document.body.appendChild(script);
  console.log("aaa");
}
window.onload = loadScript;
var-latlng;
var标记;
函数初始化(){
var mapOptions={
缩放:2,
中心:新google.maps.LatLng(2.8,2.8),
mapTypeId:google.maps.mapTypeId.TERRAIN
};
var map=new google.maps.map(document.getElementById(“mapCanvas”)、mapOptions);
控制台日志(“alex”);
$.getJSON(“data/canada.json”),函数(data){
//控制台日志(latlngArray);
变量填充选项={
strokeColor:“#FF0000”,
笔划不透明度:0.2,
冲程重量:6,
填充颜色:'#FF0000',
不透明度:0.35,
地图:地图,
中心:拉特林,
半径:20000,
} 
对于(变量i=0;i
html

<!DOCTYPE html>
<html>

<head>
<style type="text/css">
   html {height:100%},
   body {height:100%;margin:0;padding:0}

</style>
 <script src="js/jquery1.9.js"></script>
<script src="js/jquery-ui.js"></script>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>


<script src="js/AlexMap.js"></script>
</head>

<body >
  <div id="heatmapArea style="width:1100px; height:900px"></div>

</body>

html{height:100%},
正文{高度:100%;边距:0;填充:0}

我也一直在研究数据表示,在一行程序中实现数据表示并不是那么容易。所以对于那些提出要求的人来说“你对这张海报做了些什么,到目前为止要过滤掉所有的数据是很难的。”。我仍然在做这件事,我昨天就开始了,所以再过一周,一旦我完成了,我将创建一个git hub。非常感谢。但是你正在使用它,这是准备好了还是我需要编程?不,我正计划做一些Jquery UI幻灯片,以浏览一年的数据,并从气象站数据制作热图。如果您的映射是灰色的,并且加载的数据是Json,那么请查看调用,因为如果Json格式不正确,则不会出现错误。还要确保为div设置一个边,空白大小也不会产生贴图。请记住,我昨天刚开始学习API,代码“粗糙”,但应该可以避免我经历的心痛。在这篇文章中,我绘制了5374点,我尝试绘制了美国49225点,但所有类型的浏览器都崩溃了。我正在研究谷歌地图中的其他api类型,看看是否能找到更好的内存管理或更少的数据结构。这是一项很好的工作。但这意味着我不能使用subgurim谷歌地图来做到这一点…谢谢你。