开发者

Hide a circle along with the binded marker

开发者 https://www.devze.com 2023-01-19 16:31 出处:网络
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 c

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 bi开发者_StackOverflownd the circles to hide with the markers?

The binding:

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);
0

精彩评论

暂无评论...
验证码 换一张
取 消