On Mar 16, 8:03 pm, justanobody <[email protected]> wrote:
> I am trying to customize the 'Using PHP/MySQL with Google
> Maps' (http://code.google.com/apis/maps/articles/phpsqlajax.html).
> Everything is working fine for me within the scope of the
> instructions.
>
> I have added another column to my db (contact1) and would like that to
> display on the marker along with the rest of the information (name,
> address, type). Actually, I have several more variables that I want
> to show up but I'm starting one at a time.
>
> I updated the genxml file and the xml shows up correctly
> (http://www.jaemac.com/phpsqlajax_genxml.php).
>
> I tried adding "var contact1 = markers[i].getAttribute("contact1");"
> within the GDownloadUrl function but this is where things break. The
> map shows but the markers no longer appear. (http://www.jaemac.com/
> phpsqlajax_map.htm)
>
> How can I pull more variables from my db to display on the marker?
Have you checked your javascript errors?
I get (in IE6):
Line:64
Error: 'contact1' is undefined
on this line:
var html = "<b>" + name + "</b> <br/>" + address + "<br/>" + type +
"<br/>" + contact1;
The function definition doesn't include the new variable...
function createMarker(point, name, address, type) {
-- Larry
--
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.