Hi, Mike Williams:
I do want to do it correctly, which is why I'm posting here. :-)
Yes, my classifieds cms replaces the variable {Location} with the
location that the address that the user (the person placing a
classified) types in his/her ad. I have a limited ability to change
what gets done here; what I *can* do is use the correct js for the
Google Map in one field, and a second field for the user's location
(street address) input...but what I seem to be unable to grasp is the
js for geocoding, which I *could* put in a third field and feed to the
Google map field. (It's my impression that there is not one js for
the Maps that has the geocoding included therein, is that correct?)
In other words, I could structure:
{Location} = Where User types address -> feeds to {Geocode JS field,
translates Location to GCoordinates} -> feeds to Google Map field with
my API to generate Google Map.
Here's what I DO NOT know how to do - I don't know what to put in the
second field; I can't seem to find/grasp whether or not there is
javascript that I could put in my second field (I'm limited to
javascript), to geocode the street address and feed the coordinates to
the Google Map field. None of my research seems to find the precise
answer I'm seeking, and most of what I have found seems to require
that I would have to dink around in the backend PHP. If there is a
straight-up JS solution that I could put in that second field (or if
there is one js for Google Maps that has the geocoding included!), I
would be most grateful for either the info or a point in the RIGHT
direction (to js for this). I really have read the API documentation
and I've banged around in the Geocoding info, but I admit I obviously
haven't been able to find what I'm seeking.
Thank you,
Icebox
On Sep 20, 11:53 pm, Mike Williams <[email protected]> wrote:
> The <iframe> is a modified version of a Google embedded map. If you go
> to maps.google.com and look for your location, then click on the "Link"
> link, you'll see a "Paste HTML to embed in website" box that contains
> code that will embed the map into your website. You don't need an API
> key for that.
>
> I guess there's something that crawls through your HTML and replaces
> "{Location}" with the actual value entered by the user. [Unless you're
> using {Location} metalinguistically to indicate that the actual address
> is placed there.]
>
> The way an <iframe> works is that the code inside the frame is
> effectively running in the maps.google.com domain, rather than running
> in your domain, and maps.google.com doesn't need an API key. The
> location gets passed to the <frame> in the same sort of way that it
> would if you call maps.google.com/maps?q=Chicago.
>
> The Terms don't specifically say how far you're allowed to tweak the
> embedded map parameters. I suspect that you're supposed to either use
> the "Paste HTML to embed in website" as provided, or to use the API. If
> you use the "Paste HTML to embed in website" code exactly as provided,
> then it's futureproof - Google aren't going to change the syntax in a
> way that breaks thousands of embedded maps - but if you tweak it as you
> have (e.g. by removing the &ll) then Google could possibly change
> things at some point such that your tweaked version doesn't work.
>
> To be certain of being legal and futureproof, ditch that code and do it
> properly with the API.
>
> --
> Mike Williamshttp://econym.org.uk/gmap
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---