Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/478.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
创建循环中的javascript语法_Javascript_Google Maps Api 3 - Fatal编程技术网

创建循环中的javascript语法

创建循环中的javascript语法,javascript,google-maps-api-3,Javascript,Google Maps Api 3,我是javascript语言的新手,我正在尝试使用setOptions方法创建一个循环并编写此代码,但不幸的是它没有工作。我的代码中有一些错误 circle_0.setOptions({ center: new google.maps.LatLng(mapCentre.lat(), mapCentre.lng()), radius: 2000 }); 代码看起来不错。也许这包含错误的值?Mapcenter.lat()、Mapcenter.lng()检查浏览器的开发人员控制台是否

我是javascript语言的新手,我正在尝试使用
setOptions
方法创建一个循环并编写此代码,但不幸的是它没有工作。我的代码中有一些错误

circle_0.setOptions({
    center: new google.maps.LatLng(mapCentre.lat(), mapCentre.lng()),
    radius: 2000
});

代码看起来不错。也许这包含错误的值?Mapcenter.lat()、Mapcenter.lng()

检查浏览器的开发人员控制台是否存在错误。