Google maps gmap api循环警告:此页面上的脚本导致您的web浏览器运行缓慢
我在谷歌地图上有120多个标记,我想在每个标记上绑定2个圆圈。 我已经做到了这一点,但我不断得到警告:- “停止运行此脚本?此页面上的脚本导致您的web浏览器运行缓慢。如果它继续运行,您的计算机可能会在IE上失去响应。” 我得到这个错误只为圆覆盖 我该怎么解决这个问题?优化的方法是什么 下面是一个例子。位置不是我使用的确切位置,但这就是我在应用程序中实现的方式Google maps gmap api循环警告:此页面上的脚本导致您的web浏览器运行缓慢,google-maps,google-maps-api-3,Google Maps,Google Maps Api 3,我在谷歌地图上有120多个标记,我想在每个标记上绑定2个圆圈。 我已经做到了这一点,但我不断得到警告:- “停止运行此脚本?此页面上的脚本导致您的web浏览器运行缓慢。如果它继续运行,您的计算机可能会在IE上失去响应。” 我得到这个错误只为圆覆盖 我该怎么解决这个问题?优化的方法是什么 下面是一个例子。位置不是我使用的确切位置,但这就是我在应用程序中实现的方式 <script src="https://maps.googleapis.com/maps/api/js?v=3.4&se
<script src="https://maps.googleapis.com/maps/api/js?v=3.4&sensor=false"></script>
<script>
var cityLoacations = [
new google.maps.LatLng(37.782551, -122.445368),
new google.maps.LatLng(37.782745, -122.444586),
new google.maps.LatLng(37.782842, -122.443688),
new google.maps.LatLng(37.782919, -122.442815),
new google.maps.LatLng(37.782992, -122.442112),
new google.maps.LatLng(37.783100, -122.441461),
new google.maps.LatLng(37.783206, -122.440829),
new google.maps.LatLng(37.783273, -122.440324),
new google.maps.LatLng(37.783316, -122.440023),
new google.maps.LatLng(37.783357, -122.439794),
new google.maps.LatLng(37.783371, -122.439687),
new google.maps.LatLng(37.783368, -122.439666),
new google.maps.LatLng(37.783383, -122.439594),
new google.maps.LatLng(37.783508, -122.439525),
new google.maps.LatLng(37.783842, -122.439591),
new google.maps.LatLng(37.784147, -122.439668),
new google.maps.LatLng(37.784206, -122.439686),
new google.maps.LatLng(37.784386, -122.439790),
new google.maps.LatLng(37.784701, -122.439902),
new google.maps.LatLng(37.784965, -122.439938),
new google.maps.LatLng(37.785010, -122.439947),
new google.maps.LatLng(37.785360, -122.439952),
new google.maps.LatLng(37.785715, -122.440030),
new google.maps.LatLng(37.786117, -122.440119),
new google.maps.LatLng(37.786564, -122.440209),
new google.maps.LatLng(37.786905, -122.440270),
new google.maps.LatLng(37.786956, -122.440279),
new google.maps.LatLng(37.800224, -122.433520),
new google.maps.LatLng(37.800155, -122.434101),
new google.maps.LatLng(37.800160, -122.434430),
new google.maps.LatLng(37.800378, -122.434527),
new google.maps.LatLng(37.800738, -122.434598),
new google.maps.LatLng(37.800938, -122.434650),
new google.maps.LatLng(37.801024, -122.434889),
new google.maps.LatLng(37.800955, -122.435392),
new google.maps.LatLng(37.800886, -122.435959),
new google.maps.LatLng(37.800811, -122.436275),
new google.maps.LatLng(37.800788, -122.436299),
new google.maps.LatLng(37.800719, -122.436302),
new google.maps.LatLng(37.800702, -122.436298),
new google.maps.LatLng(37.800661, -122.436273),
new google.maps.LatLng(37.800395, -122.436172),
new google.maps.LatLng(37.800228, -122.436116),
new google.maps.LatLng(37.800169, -122.436130),
new google.maps.LatLng(37.800066, -122.436167),
new google.maps.LatLng(37.784345, -122.422922),
new google.maps.LatLng(37.784389, -122.422926),
new google.maps.LatLng(37.784437, -122.422924),
new google.maps.LatLng(37.784746, -122.422818),
new google.maps.LatLng(37.785436, -122.422959),
new google.maps.LatLng(37.786120, -122.423112),
new google.maps.LatLng(37.786433, -122.423029),
new google.maps.LatLng(37.786631, -122.421213),
new google.maps.LatLng(37.786660, -122.421033),
new google.maps.LatLng(37.786801, -122.420141),
new google.maps.LatLng(37.786823, -122.420034),
new google.maps.LatLng(37.786831, -122.419916),
new google.maps.LatLng(37.787034, -122.418208),
new google.maps.LatLng(37.787056, -122.418034),
new google.maps.LatLng(37.787169, -122.417145),
new google.maps.LatLng(37.787217, -122.416715),
new google.maps.LatLng(37.786144, -122.416403),
new google.maps.LatLng(37.785292, -122.416257),
new google.maps.LatLng(37.780666, -122.390374),
new google.maps.LatLng(37.780501, -122.391281),
new google.maps.LatLng(37.780148, -122.392052),
new google.maps.LatLng(37.780173, -122.391148),
new google.maps.LatLng(37.780693, -122.390592),
new google.maps.LatLng(37.781261, -122.391142),
new google.maps.LatLng(37.781808, -122.391730),
new google.maps.LatLng(37.782340, -122.392341),
new google.maps.LatLng(37.782812, -122.393022),
new google.maps.LatLng(37.783300, -122.393672),
new google.maps.LatLng(37.783809, -122.394275),
new google.maps.LatLng(37.784246, -122.394979),
new google.maps.LatLng(37.784791, -122.395958),
new google.maps.LatLng(37.785675, -122.396746),
new google.maps.LatLng(37.786262, -122.395780),
new google.maps.LatLng(37.786776, -122.395093),
new google.maps.LatLng(37.787282, -122.394426),
new google.maps.LatLng(37.787783, -122.393767),
new google.maps.LatLng(37.788343, -122.393184),
new google.maps.LatLng(37.788895, -122.392506),
new google.maps.LatLng(37.789371, -122.391701),
new google.maps.LatLng(37.789722, -122.390952),
new google.maps.LatLng(37.790315, -122.390305),
new google.maps.LatLng(37.790738, -122.389616),
new google.maps.LatLng(37.779448, -122.438702),
new google.maps.LatLng(37.779023, -122.438585),
new google.maps.LatLng(37.778542, -122.438492),
new google.maps.LatLng(37.778100, -122.438411),
new google.maps.LatLng(37.777986, -122.438376),
new google.maps.LatLng(37.777680, -122.438313),
new google.maps.LatLng(37.777316, -122.438273),
new google.maps.LatLng(37.777135, -122.438254),
new google.maps.LatLng(37.776987, -122.438303),
new google.maps.LatLng(37.776946, -122.438404),
new google.maps.LatLng(37.776944, -122.438467),
new google.maps.LatLng(37.776892, -122.438459),
new google.maps.LatLng(37.776842, -122.438442),
new google.maps.LatLng(37.776822, -122.438391),
new google.maps.LatLng(37.776814, -122.438412),
new google.maps.LatLng(37.776787, -122.438628),
new google.maps.LatLng(37.776729, -122.438650),
new google.maps.LatLng(37.776759, -122.438677),
new google.maps.LatLng(37.776772, -122.438498),
new google.maps.LatLng(37.776787, -122.438389),
new google.maps.LatLng(37.776848, -122.438283),
new google.maps.LatLng(37.776870, -122.438239),
new google.maps.LatLng(37.777015, -122.438198),
new google.maps.LatLng(37.777333, -122.438256),
new google.maps.LatLng(37.777595, -122.438308),
new google.maps.LatLng(37.777797, -122.438344),
new google.maps.LatLng(37.778160, -122.438442),
new google.maps.LatLng(37.778414, -122.438508),
new google.maps.LatLng(37.778445, -122.438516),
new google.maps.LatLng(37.778503, -122.438529),
new google.maps.LatLng(37.778607, -122.438549),
new google.maps.LatLng(37.778670, -122.438644),
new google.maps.LatLng(37.778847, -122.438706),
new google.maps.LatLng(37.779240, -122.438744)
];
var cityOuterCircle , cityInnerCircle;
function addMarkers() {
for (var city in cityLoacations) {
var myLatlng = new google.maps.LatLng(city[0],city[1]);
var marker = new google.maps.Marker({
position: myLatlng
});
marker.setMap(map);
}
}
function addCircle() {
for (var city in cityLoacations) {
var outerCircleOptions = {
strokeColor: '#FF0000',
strokeOpacity: 0.8,
strokeWeight: 2,
fillColor: '#F781F3',
fillOpacity: 0.35,
map: map,
center: new google.maps.LatLng(city[0],city[1]),
radius: 120701
};
var innerCircleOptions = {
strokeColor: '#FF0000',
strokeOpacity: 0.8,
strokeWeight: 2,
fillColor: '#F4FA58',
fillOpacity: 0.35,
map: map,
center: new google.maps.LatLng(city[0],city[1]),
radius: 241402
};
cityOuterCircle = new google.maps.Circle(outerCircleOptions);
cityInnerCircle = new google.maps.Circle(innerCircleOptions);
}
}
function initialize() {
var mapOptions = {
zoom: 2,
center: new google.maps.LatLng(37.09024, -95.712891),
mapTypeId: google.maps.MapTypeId.ROADMAP
};
map = new google.maps.Map(document.getElementById('map-canvas'),mapOptions);
addMarkers();
addCircle();
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
var Cityloactions=[
新的google.maps.LatLng(37.782551,-122.445368),
新google.maps.LatLng(37.782745,-122.444586),
新google.maps.LatLng(37.782842,-122.443688),
新google.maps.LatLng(37.782919,-122.442815),
新google.maps.LatLng(37.782992,-122.442112),
新google.maps.LatLng(37.783100,-122.441461),
新google.maps.LatLng(37.783206,-122.440829),
新google.maps.LatLng(37.783273,-122.440324),
新google.maps.LatLng(37.783316,-122.440023),
新google.maps.LatLng(37.783357,-122.439794),
新的google.maps.LatLng(37.783371,-122.439687),
新google.maps.LatLng(37.783368,-122.439666),
新google.maps.LatLng(37.783383,-122.439594),
新google.maps.LatLng(37.783508,-122.439525),
新google.maps.LatLng(37.783842,-122.439591),
新的google.maps.LatLng(37.784147,-122.439668),
新google.maps.LatLng(37.784206,-122.439686),
新的google.maps.LatLng(37.784386,-122.439790),
新的google.maps.LatLng(37.784701,-122.439902),
新google.maps.LatLng(37.784965,-122.439938),
新的google.maps.LatLng(37.785010,-122.439947),
新google.maps.LatLng(37.785360,-122.439952),
新google.maps.LatLng(37.785715,-122.440030),
新google.maps.LatLng(37.786117,-122.440119),
新google.maps.LatLng(37.786564,-122.440209),
新google.maps.LatLng(37.786905,-122.440270),
新google.maps.LatLng(37.786956,-122.440279),
新的google.maps.LatLng(37.800224,-122.433520),
新的google.maps.LatLng(37.800155,-122.434101),
新的google.maps.LatLng(37.800160,-122.434430),
新的google.maps.LatLng(37.800378,-122.434527),
新的google.maps.LatLng(37.800738,-122.434598),
新的google.maps.LatLng(37.800938,-122.434650),
新的google.maps.LatLng(37.80102122.434889),
新的google.maps.LatLng(37.800955,-122.435392),
新的google.maps.LatLng(37.800886,-122.435959),
新的google.maps.LatLng(37.800811,-122.436275),
新的google.maps.LatLng(37.800788,-122.436299),
新的google.maps.LatLng(37.800719,-122.436302),
新的google.maps.LatLng(37.800702,-122.436298),
新的google.maps.LatLng(37.800661,-122.436273),
新的google.maps.LatLng(37.800395,-122.436172),
新的google.maps.LatLng(37.800228,-122.436116),
新的google.maps.LatLng(37.800169,-122.436130),
新的google.maps.LatLng(37.800066,-122.436167),
新google.maps.LatLng(37.784345,-122.422922),
新google.maps.LatLng(37.784389,-122.422926),
新的google.maps.LatLng(37.784437,-122.422924),
新的google.maps.LatLng(37.784746,-122.422818),
新google.maps.LatLng(37.785436,-122.422959),
新google.maps.LatLng(37.786120,-122.423112),
新google.maps.LatLng(37.786433,-122.423029),
新google.maps.LatLng(37.786631,-122.421213),
新google.maps.LatLng(37.786660,-122.421033),
新google.maps.LatLng(37.786801,-122.420141),
新google.maps.LatLng(37.786823,-122.420034),
新google.maps.LatLng(37.786831,-122.419916),
新google.maps.LatLng(37.787034,-122.418208),
新google.maps.LatLng(37.787056,-122.418034),
新的google.maps.LatLng(37.787169,-122.417145),
新的google.maps.LatLng(37.787217,-122.416715),
新的google.maps.LatLng(37.786144,-122.416403),
新google.maps.LatLng(37.785292,-122.416257),
新的google.maps.LatLng(37.780666,-122.390374),
新google.maps.LatLng(37.780501,-122.391281),
新google.maps.LatLng(37.780148,-122.392052),
新google.maps.LatLng(37.780173,-122.391148),
新google.maps.LatLng(37.780693,-122.390592),
新google.maps.LatLng(37.781261,-122.391142),
新google.maps.LatLng(37.781808,-122.391730),
新的google.maps.LatLng(37.782340,-122.392341),
新google.maps.LatLng(37.782812,-122.393022),
新google.maps.LatLng(37.783300,-122.393672),
新google.maps.LatLng(37.783809,-122.394275),
新google.maps.LatLng(37.784246,-122.394979),
新google.maps.LatLng(37.784791,-122.395958),
新google.maps.LatLng(37.785675,-122.396746),
新google.maps.LatLng(37.786262,-122.395780),
新google.maps.LatLng(37.786776,-122.395093),
新google.maps.LatLng(37.787282,-122.394426),
新的google.maps.LatLng(37.787783,-122.393767),
新google.maps.LatLng(37.788343,-122.393184),
新google.maps.LatLng(37.788895,-122.392506),
新google.maps.LatLng(37.789371,-122.391701),
新google.maps.LatLng(37.789722,-122.390952),
新的google.maps.LatLng(37.790315,-122.390305),
新google.maps.LatLng(37.790738,-122.389616),
新的google.maps.LatLng(37.779448,-122.438702),
新google.maps.LatLng(37.779023,-122.438585),
新google.maps.LatLng(37.778542,-122.438492),
新google.maps.LatLng(37.778100,-122.438411),
新google.maps.LatLng(37.777986,-122.438376),
新的google.maps.LatLng(37.777680,-122.438313),
新的google.maps.LatLng(37.777316,-122.438273),
新的google.maps.LatLng(37.777135,-122.438254),
新的google.maps.LatLng(37.776987,-122.438303),
新的google.maps.LatLng(37.776946,-122.438404),
新的google.maps.LatLng(37.776944,-122.438467),
新google.maps.LatLng(37.776892,-122.438459),
新的google.maps.LatLng(37.776842,-122.438442),
新google.maps.LatLng(37.776822,-122.438391),
新的google.maps.LatLng(37.776814,-122.438412),
新的google.maps.LatLng(37.776787,-122.438628),
新的google.maps.LatLng(37.776729,-122.438650),
新的google.maps.LatLng(37.776759,-122.438677),
新的google.maps.LatLng(37.776772,-122.438498),
新谷歌