Andrew is correct (on both points). Your initialize() function ENDS right BEFORE your first reference to var marker .... Your initialize function is called (correctly) after all the libraries are loaded, and therefore can create the map. But long before that you tried to create var marker ... (that javascript in the head is executed before the page itself is drawn).
I think you want to include the creation of the markers in the initialize function. I, too, had trouble following which closing bracket was the one that ended your initialize function. You may have had that same problem; consistent indenting of brackets not only makes your code pretty, it gives you a better chance of making it work. - Jeff On Jun 2, 10:27 am, en4ce <[email protected]> wrote: > i just tried paste your lat lngs into google maps, it tells me "this > locations 51.451515, -0.190618 is currently not supported" > > something is wrong with your lat lngs > > On 2 Jun., 18:55, Out2lunch <[email protected]> wrote: > > > > > > > > > Thanks for your fast reply, but I think the brackets are ok? Am I missing > > something? > > > var marker = new google.maps.Marker({ > > position: new google.maps.LatLng(51.451515, -0.190618), > > map: map, > > title:"Hello World!" > > }); > > > This was copied directly from the api code examples, apart form - new > > google.maps.LatLng(51.451515, -0.190618), > > This was copied from our location, and to me looks correct? -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" 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-js-api-v3?hl=en.
