Hi,
I'm just starting out on trying to develop a category based POI as a
new feature for my website. I've studied all of the examples, googled
extensively but I've reached a bit of an impasse. I'm certain the
solution is going to be blindingly obvious once it's pointed out to me
but I've spent days trying to figure this out.

Essentially clicking on any of the markers opens the infowindow for
the last one added.

Here's the code snippet

        // populate map with POIs

                for (i in mapData.POI)
                {
                        thisPOI = mapData.POI[i];
                        POIPos = new google.maps.LatLng(thisPOI.map_lat, 
thisPOI.map_long);

                        marker = new google.maps.Marker(
                        {
                                position: POIPos,
                                map: map,
                                title:thisPOI.POI_title,
                        zIndex: Math.round(POIPos.lat()*-100000)<<5
                        });
                        contentString = thisPOI.POI_desc;
                        google.maps.event.addListener(marker, 'click', 
function() {
                                infowindow.setContent(contentString);
                                infowindow.open(map,marker);
                        });
                }

Can anyone see any obvious mistakes?

I am having another problem. If I use a custom Icon then the
infowindow doesn't show up at all although the map pans to fit it on
screen.

Regards
Doug

-- 
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 google-maps-js-api...@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to