Thanks Ross!
I've adjusted everything except for the createMarker(), which is
written just like the code in the Google-guide:
GDownloadUrl("phpsqlajax_genxml.php", function(data) { var xml =
GXml.parse(data); var markers =
xml.documentElement.getElementsByTagName("marker"); for (var i = 0; i
< markers.length; i++) { var name = markers[i].getAttribute
("name"); var address = markers[i].getAttribute("address"); var
type = markers[i].getAttribute("type"); var point = new GLatLng
(parseFloat(markers[i].getAttribute
("lat")), parseFloat(markers[i].getAttribute
("lng"))); var marker = createMarker(point, name, address,
type); map.addOverlay(marker); }});
...or about 3/4 scroll down
http://code.google.com/support/bin/answer.py?answer=65622&topic=11364.
It's adjusted to my details, but I haven't made any other changes..
hmm, it should load the variables written just before createMarker().
Any ideas on why it doesn't?
Big thanks!
//Oscar
On 25 Maj, 11:59, Rossko <[email protected]> wrote:
> > Here's my map:
>
> >http://www.naturgym.se/test850611/kartan.html
>
> I get a straightforward javascript error, do you not get that?
> createMarker is not defined
> you seem to have missed a chunk of code out of your page, beginning
> function createMarker()
>
> You have a script between your <head> and <body> sections, which is
> not good.
>
> Your don't have a valid doctype.
>
> Your <title> is in the <body>
>
> You should encode the & in your API script URL to &
>
> cheers, Ross K
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---