Re: Maps API key not functioning with the registered URL

2009-01-16 Thread railscoder
Right. I think I finally understand what you mean. So the JS scripts are being executed as in an ordinary file, from top to bottom, as the page loads. (I thought the external .js files were merely loaded, not executed, and then responded to "browser callbacks" when events were triggered). Global s

Re: Maps API key not functioning with the registered URL

2009-01-16 Thread warden [Andrew Leach - Maps API Guru]
On Jan 16, 5:05 pm, railscoder wrote: > All right then, I'll have to figure out THE CODE by myself. I'm sorry if I'm pitching my answers wrongly. Your code has this, inter alia: http://maps.google.com/jsapi? key="> so application.js is loaded and run first before the API script. appli

Re: Maps API key not functioning with the registered URL

2009-01-16 Thread railscoder
All right then, I'll have to figure out THE CODE by myself. / Vahagn On Jan 16, 6:02 pm, "warden [Andrew Leach - Maps API Guru]" wrote: > On Jan 16, 4:57 pm, railscoder wrote: > > > You know, if you gave me the straight answer to my question it would > > actually be better for my understanding

Re: Maps API key not functioning with the registered URL

2009-01-16 Thread warden [Andrew Leach - Maps API Guru]
On Jan 16, 4:57 pm, railscoder wrote: > You know, if you gave me the straight answer to my question it would > actually be better for my understanding of what you're trying to tell > me. You can set event handlers which exist. You cannot set event handlers which do not yet exist. At the time yo

Re: Maps API key not functioning with the registered URL

2009-01-16 Thread railscoder
You know, if you gave me the straight answer to my question it would actually be better for my understanding of what you're trying to tell me. ""initialize()" exists, so window.onload is happy. " That sort of obfuscated, I'm-giving-you-a-nudge-in-the-right-direction- so-you-can-figure-it-out-you

Re: Maps API key not functioning with the registered URL

2009-01-16 Thread warden [Andrew Leach - Maps API Guru]
On Jan 16, 3:20 pm, railscoder wrote: > All right then, allow me the Next n00b Question: > > How do I load this Google Maps API script with GUnload in it? I have > this Maps recipe from a book and just applied it exactly as it was in > the book (you know, great programmers don't write code but re

Re: Maps API key not functioning with the registered URL

2009-01-16 Thread railscoder
All right then, allow me the Next n00b Question: How do I load this Google Maps API script with GUnload in it? I have this Maps recipe from a book and just applied it exactly as it was in the book (you know, great programmers don't write code but re-use it). Turns out the recipe is incomplete. >

Re: Maps API key not functioning with the registered URL

2009-01-16 Thread Rossko
> When I load the page at the URL previously cited, the execution jumps > from the first line ("function initialize()") to straight outside the > function (to "window.onload=initialize;"). Then it continues on to the > "window.onunload=GUnload;" line at which point it complains that > GUnload is u

Re: Maps API key not functioning with the registered URL

2009-01-16 Thread warden [Andrew Leach - Maps API Guru]
On Jan 16, 12:02 pm, railscoder wrote: > GUnload is undefined. You load and execute application.js before the API script, so it's that script which is complaining about GUnload being undefined. That script contains your initialize function, and you have defined a function createMarker() **with

Re: Maps API key not functioning with the registered URL

2009-01-16 Thread railscoder
Well I just debugged the page using both Venkman and Firebug, and this is what's happening: I have a file called application.js where the GMaps script is defined. It goes: function initialize() { if (GBrowserIsCompatible() && typeof gyms != 'undefined') { // CODE } } window.onload=initialize

Re: Maps API key not functioning with the registered URL

2009-01-15 Thread Mike Williams
Wasn't it railscoder who wrote: >The URL I first gave you got broken in the browser but it will work if >copy&pasted into the address bar. RFC compliant programs will chop the URL at the [ character. It looks like Firefox and Chrome aren't RFC compliant because they accept [ and ] characters,

Re: Maps API key not functioning with the registered URL

2009-01-15 Thread Rossko
> gyms that then are supposed to be plotted on the Map - however that is > not happening for some reason... It might have something to do with the javascript errors. Why not get a debugger and have a look into those in the first instance - you can always ask if you don't understand the errors. c

Re: Maps API key not functioning with the registered URL

2009-01-15 Thread railscoder
Hi Andrew,- many thanks, I've corrected the javascript to a one-liner and now the key seems to be recognized, however the map is not being shown! The URL I first gave you got broken in the browser but it will work if copy&pasted into the address bar. It basically performs a search of gyms that th

Re: Maps API key not functioning with the registered URL

2009-01-14 Thread warden [Andrew Leach - Maps API Guru]
On Jan 14, 3:58 pm, railscoder wrote: > > However when I try to use this functionality it says the key was > registered for a different URL: > > http://functionalgyms.com/gyms/locate?address=San+Diego&within[miles]=1 > > Can anyone tell me what the issue is here? I found the following at http://