On May 22, 2:16 pm, Bob Archer <[email protected]> wrote: > http://www.myvrad.com/temp/googlemaps/g1.htmhttp://www.myvrad.com/temp/googlemaps/g2.htm > > First link works, second produces error. Same key used on both pages. > > Second page produces js alert: "The Google Maps API server rejected > your request. This could be because the API key used on this site was > registered for a different site. You can generate a new key for this > web site at %1$s. > > I'm trying to have all map related code returned by one function call. > In my .Net application I have a Business Object in a User Control. The > User Control could be used on any given page on the site. > > My goal is to be able to write a map to the page and call the map js > libraries dynamically - which is what you see in the second pages code > source. I don't want to include the map js libraries unnecessarily if > a map isn't on the page. > > The code can write 1 or more map canvases to the page. > > Why doesn't this work? I'm finally asking after spending 2 days going > through Google Groups, API docs and troubleshooting on my own.
Why do you expect it to work? 1. you call loadGoogleScripts followed immediately by initializeGoogleMaps (the script takes time to load) 2. the way your code is writen all three calls to loadGoogleScripts can happen before the actual code is loaded. Have you looked at what google has: http://code.google.com/apis/ajax/documentation/ -- Larry > > Thanks, > > - Bob --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
