I have a InfoWindow where I want to display circle radius, however I have no idea how can I update the text whenever radius changes. Whenever I console log my marker I don't see the infoWindow content. Also is there circle listener that reacts instantly whenever the radius changes and not after the radius has changed?
let marker = await new google.maps.Marker({
position: {
lat: sort.position.lat + 0.002,
lng: sort.position.lon + 0.002,
},
map: map.value,
draggable: true,
optimized: false,
zIndex: 999999,
});
marker.Circle = await new google.maps.Circle({
center: marker.getPosition(),
radius: 100,
map: map.value,
editable: true,
});
let infoWindow = new google.maps.InfoWindow({content: `${marker.Circle.radius}`});
infoWindow.open(map.value, marker);
marker.Circle.addListener("radius_changed", () => {
console.log(marker)
});