Hi,
I am having an issue with the same infowindow popping up no matter
what marker is clicked. I know similar questions have been asked
before, but their code doesn't look all that similar to mine.
Here is my code (sorry i don't have a live example yet).
A couple notes:
* The JSON i am reading is fine, i see all the values
* I see this error in firebug: 'Invalid value for property <content>:
[object Object]'
=================================================
var user_coord = "";
var user_name = "";
var user_icon = "";
var user_bubble = "";
var marker = "";
var circle = "";
var infowindow = new google.maps.InfoWindow();
//loop thru the users
$.getJSON("users.json",function(json)
{
$.each(json.markers, function(i,m)
{
user_bubble = "<p class='bubtext'>"+m.name+" likes
maps... wee!
</p>";
// create marker
marker = new google.maps.Marker({
map:map,
position:new google.maps.LatLng(m.lat,m.lng),
title:m.name+ " is cool",
icon:"img/"+ m.icon,
});
google.maps.event.addListener(marker,
"click", function() {
map.panTo(new
google.maps.LatLng(m.lat,m.lng));
infowindow.setContent({content:user_bubble});
infowindow.open(map, marker);
});
// circle overlay
circle = new google.maps.Circle({
map:map,radius:15,clickable:false,fillColor:"#FE9500"
});
circle.bindTo('center', marker,
'position');
});
});
=================================================
Thanks in advance for any help!
-Mike
--
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.