Maybe I'm a bit dumb today but I'm not able to add/position an info
window for a circle overlay.
What I have coded is the following:
var circleLatLng = new google.maps.LatLng(52.0149436, 8.5275128);
var circle0 = new google.maps.Circle({
center: circleLatLng,
radius: 1000,
map: map
});
var infowindowC0 = new google.maps.InfoWindow({
content: 'Umgebung Sparrenburg',
position: circleLatLng
});
google.maps.event.addListener (circle0, 'click', function() {
if (currentInfoWindow != null) { currentInfoWindow.close(); }
infowindowC0.open(map);
currentInfoWindow = infowindowC0;
alert('here I am!'); // only for debugging
});
The click event works perfect, but no info windows is shown.
When I associate the info window with a marker as an anchor
(infowindowC0.open(map, dummymarker);) the info window will be shown
at the position of the marker dummymarker.
So I thought as a workaround to always associate the circle(s) with a
marker first and use the setPosition method to assign a new position
for the info windows. But even that does not work. The info window ist
still placed at the postion of the marker.
Does anyone have a clue where I'm wrong?
For more details of the sample above you can take a look at
http://87.106.69.162/simpleGMapAPI/api_test.php
Thanks in advance!
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-js-api-v3?hl=en.