I want the secondary markers (red "icon" dots) to show the other
restuarants' bubble info on a click. I got the "icons" to show (via a
php data link).

I think I have over-wrote the code. Need help.

The primary GIMarker works with a mouseover; as designed.


Here is a link:

http://www.knifeforkspoon.com/wi_54403/profiles/show_details.cfm?id=360

Here is the code:

       //<![CDATA[

                GDownloadUrl("data_markertest.php", function(data) {
        var xml = GXml.parse(data);
    var markers = xml.documentElement.getElementsByTagName("marker");
    for (var i = 0; i < markers.length; i++) {
    var Company = markers[i].getAttribute("Company");
    var Address = markers[i].getAttribute("Address");
    var Category = markers[i].getAttribute("Category");
    var point = new GLatLng(parseFloat(markers[i].getAttribute
("MapLat")),
                              parseFloat(markers[i].getAttribute
("MapLong")));
        var marker = createMarker(point, Company, Address, Category);
        map.addOverlay(new GMarker(point, icon));

          }
        });
      }
    }

    function createMarker(point, Company, Address, Category) {
      var marker = new GMarker(icon);
      var html = "<b>" + Company + "</b> <br/>" + Category + "</b> <br/
>" + Address;
      GEvent.addListener(icon, 'click', function()
{marker.openInfoWindowHtml(bubble2);});
      var bubble2='<cfoutput><font size="2" face="Arial"
color="black"><b>#mail.Phone#</
b><br>#mail.StarRating#<br>#mail.Address#, #mail.city#</cfoutput>';
      return marker;
    }
    //]]>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to Google-Maps-API@googlegroups.com
To unsubscribe from this group, send email to 
google-maps-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to