Thank you very much... This is resolved..
Erik -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Sunday, November 23, 2008 2:04 PM To: Google Maps API Subject: Re: How to dynamically load map On Nov 23, 11:38 am, "Erik @ America's Finest Construction Company, Inc." <[EMAIL PROTECTED]> wrote: > I have changed the code around and I missing something because my function > is not being called back for some reason. > > http://googlemaps.afccinc.com How are you debugging the page? I would suggest the Error console in Firefox or Opera. Error: GControl is not defined Source File: http://www.google.com/uds/solutions/localsearch/gmlocalsearch.js Line: 46 Error: point is not defined Source File: http://googlemaps.afccinc.com/ Line: 38 You want to provide a function as the call back function. SetMap (point) does not return a function, change this: geocoder.getLatLng('7805 new castle ct, mckinney, tx', SetMap (point)) to: geocoder.getLatLng('7805 new castle ct, mckinney, tx', SetMap); The first error is caused by your include of the map script after the the other scripts that depend on it. I would suggest moving it up to the head with the other google scripts, it should be first. -- Larry > > -----Original Message----- > From: [email protected] > > [mailto:[EMAIL PROTECTED] On Behalf Of Barry Hunter > Sent: Sunday, November 23, 2008 1:06 PM > To: [email protected] > Subject: Re: How to dynamically load map > > I think you have failed to note the Asynchronous nature of getLatLng > > http://econym.org.uk/gmap/async.htm > > You've got the callback in the showAddress function - its an inline - > or anonymous function - in that getLatLng expects a function to call > when its got the results, so you define the function there and then, > similarlly you can just pass the name of a function. > > I also like the GetPoint, not sure what you intending with that? It > just returns whats it passed in, useful! > > 2008/11/23 [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > > > I am able to load map by clicking the button after the document is > > loaded; however, I cannot get the map to load when the page loads. I > > am loading the map from a query string parameter. > > > As of now I have hard coded the address for testing. > > > How do I load the map when the document is loading? > > >http://googlemaps.afccinc.com > > > Thanks > > -- > Barry > > -www.nearby.org.uk-www.geograph.org.uk- --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
