At the moment you are redefining point and detailHtml or each marker,
overloading the previous var each time.

1st alternative: Just build on what you've got

    function createMarker(point, infoHtml, detailHtml, icon) {
       var marker = new GMarker(point, {icon:icon});
        GEvent.addListener(marker, "click", function() {
          marker.openInfoWindowHtml(infoHtml);  // set contents of
infoWindow
          document.getElementById("yourdivid").innerHTML =
detailHtml; // set contents of sidebar
        });
        return marker;
    }

var marker;

then, for each point:

      marker = createMarker(new
GLatLng(52.815396,-1.638184),'<h3>Christian International</h3><p>6
Horninglow Rd,<br /> Burton-on-Trent,<br /> DE14 2PR<br />01283
534375</p>','Christian International sidebar details', pin)
      map.addOverlay(marker);

      marker = createMarker(new GLatLng(52.805482,-1.632807),'<h3>St.
Mary and St. Modwen</h3><p>78 Guild St,<br /> Burton-on-Trent,<br />
DE14 1NB<br />01283 563246</p><br />','St Mary and St Modwen sidebar
details', pin)
      map.addOverlay(marker);

etc

2nd alternative: Make it extendible. Have a look at Mike Williams'
example of using an XML file to contain all your data:

http://econym.org.uk/gmap/basic3.htm

For a more complex example see:

http://www.lanerealty.com.au/MapHH.html (xml file: 
http://www.lanerealty.com.au/hh.xml
(load in your browser and 'View Source') )

To completely confuse you, view source of:

http://www.lanerealty.com.au/HomesMap.html (xml file:
http://www.lanerealty.com.au/HomesMap.xml (load in your browser and
'View Source') )


Start small, develop big! We all started somewhere, usually from MIke
Williams' tutorials!

Good luck!


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" 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-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to