Reputation: 7765
I have a mousemove event in my map and now I want to draw a circle with just the stroke line.
var circle = new google.maps.Circle({
strokeColor: '#0000FF',
strokeWeight: 2,
fillOpacity: 0,
map: map,
center: new google.maps.LatLng(lat, lon),
radius: 100
});
The problem is that the transparent fill center of that circle is still "capturing" the mouse event so it doesn't go to my Map mousemove listener.
Is there any way to really set the circle fill center to transparent as in: transparent color AND transparent dealing with mouse events?
In alternative, a way to easily propagate the event to the Map?
Upvotes: 1
Views: 918
Reputation: 161334
Add clickable: false
to the CircleOptions passed to the constructor:
var circle = new google.maps.Circle({
strokeColor: '#0000FF',
strokeWeight: 2,
fillOpacity: 0,
clickable: false,
map: map,
center: new google.maps.LatLng(lat, lon),
radius: 100
});
Upvotes: 3