Thanks for your help Andrew, removing those 5 lines cured the problem. Kind Regards,
Paul Strowger Tel: 01473 743910 Mob: 07717 837393 [email protected] -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Andrew Leach Sent: 10 July 2009 16:47 To: Google Maps API Subject: Re: Error in main.js On Jul 10, 4:40 pm, "[email protected]" <[email protected]> wrote: > Hi, > > I'm getting the following error: > > Message: Object required > Line: 299 > Char: 26 > Code: 0 > URI:http://maps.gstatic.com/intl/en_ALL/mapfiles/159e/maps2.api/main.js The problem is what you have above your function "initialize" in the code. Those lines are run as the page is being read by the browser, because they are not in a function to be executed later. At the time they are read, "map_canvas" hasn't been found, and neither are myLatitude and myLongitude known. As the map appears to work, you can remove those five lines of code entirely. You could add map.setUIToDefault() into your function initialize(). Andrew E-mail message checked by Spyware Doctor (6.0.1.441) Database version: 6.12800 http://www.pctools.com/uk/spyware-doctor-antivirus/ E-mail message checked by Spyware Doctor (6.0.1.441) Database version: 6.12800 http://www.pctools.com/uk/spyware-doctor-antivirus/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
