ho risolto ma stato il solito colpo di fortuna... mi spiego:
ho risolto cosi
codice:
google.maps.event.addListener(circleOptions, 'click', function() {
infoWindow.setPosition(this.center);
infoWindow.setContent(this.info);
infoWindow.open(map,this);
})
ma perché mettendo :
codice:
google.maps.event.addListener(circleOptions, 'click', function() {
infoWindow.setPosition(centrocircle);
infoWindow.setContent(this.info);
infoWindow.open(map,this);
})
non funziona, però se dichiaro la variabile circleOptions in questo modo:
codice:
var centrocircle= new google.maps.LatLng(X,Z);
var circleOptions = new google.maps.Circle({
strokeColor: colore,
strokeOpacity: 1,
strokeWeight: 2,
fillColor: colore,
fillOpacity: 0.85,
map: map,
position:centrocircle,
center: centrocircle,
info: 'casa',
radius: raggio*770
});
quindi dichiarando position.. se metto:
codice:
google.maps.event.addListener(circleOptions, 'click', function() {
infoWindow.setPosition(centrocircle);
infoWindow.setContent(this.info);
infoWindow.open(map,this);
})
funziona ??
Mha...
spero possiate farmi capire