与绑定标记一起隐藏一个圆圈 [英] Hide a circle along with the binded marker

查看:160
本文介绍了与绑定标记一起隐藏一个圆圈的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Google Maps v3,并使用MarkerManager将标记隐藏在某个缩放级别上。我将圆形物体绑定到这些标记上。无论如何,这些标记都不会隐藏。如何绑定圈子以隐藏标记?

I'm working with Google Maps v3 and I use the MarkerManager to hide the markers on a certain zoom level. I bind circle objects to these markers. Anyway, they aren't hided when the markers are. How can I bind the circles to hide with the markers?

绑定:

var marker = new google.maps.Marker({
  position: new google.maps.LatLng(lat,lng),
});
var circle = new google.maps.Circle({
  map: map, 
  radius: 50,
});
circle.bindTo('center', marker, 'position');
Array.push(marker);


推荐答案

你解决了你的问题吗?如果不添加:

Did you solved your problem? If not add this:

circle.bindTo('map', marker);

这篇关于与绑定标记一起隐藏一个圆圈的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆