Hi guys,

I must admit I am rather a n00b at programming and Javascript in
general, so please keep that in mind. I'm trying to do what this
article is suggesting:http://code.google.com/apis/maps/articles/
phpsqlajax.html

...but also make it so each marker is created as an object/variable
that can be used to mess around afterward.

This is what my website currently looks like:
www.mtlparking.com

This is what is it supposed to look like:
www.mtlparking.com/

Code snippet:

                plist = new Array();

                GDownloadUrl("outputXML2.php", function(data) {
  var xml = GXml.parse(data);
  var markers = xml.documentElement.getElementsByTagName("marker");
  for (i = 0; i < markers.length; i++) {
    var id = markers[i].getAttribute("id");
    var name = markers[i].getAttribute("name");
    var address = markers[i].getAttribute("address");
    var point = new
GLatLng(parseFloat(markers[i].getAttribute("lat")),
 
parseFloat(markers[i].getAttribute("lng")));
        var icon = markers[i].getAttribute("icon");
        var pw = markers[i].getAttribute("pw");

     plist[i] = new demo(id, point, address, name, icon, pw);

        GEvent.addListener(plist[i].markerz, 'mouseover', function()
        {
                plist[i].markerz.openInfoWindowHtml(plist[i].html)}
        );

    map.addOverlay(plist[i].markerz);

      // alert(plist[i].name);
    }


...
(later on)


        function demo(id, point, address, name, icon, pw)
                {
                this.id = id;
                this.add = address;
                this.name = name;
                this.markerz = new GMarker(point, icon);
                this.pw = pw;
                this.html = name + address;
                this.icon;
                }



Sorry if this is a n00b question, it's frustrating me to no end. I've
really messed around and tried a lot of different things also, but
then the API gives me undecipherable error messages like 'a
undefined'.

Thanks folks

-- 
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