|Geocode via HTTP, callback function?||mp-||5/9/09 10:59 PM|
I am using the geocode via HTTP service for my web application.
I would like to translate dynamically on the web application a city
into a longitude/latitude using AJAX.
However, I do not see any type of callback functionality in the
geocode via HTTP documentation.
Without callback functionality, it renders the geocode via HTTP
useless b/c developers cannot call the API using AJAX because that
would be a cross domain violation.
Note: I'm talking about the geocode via *HTTP* api ... not the
fullblown Google Maps API (i.e. http://code.google.com/apis/maps/documentation/geocoding/index.html)
Does anyone know if callback functionality exists in the geocode via
HTTP like it does for the fullblown Google Maps API? Or is there
another way around this?
Thanks in advance
|Re: Geocode via HTTP, callback function?||mp-||5/10/09 12:28 AM|
Essentially, I want to know if JSONP exist for the geocode via HTTP as
like what's found if using GClientGeocoder.
> fullblown Google Maps API (i.e.http://code.google.com/apis/maps/documentation/geocoding/index.html)
|Re: Geocode via HTTP, callback function?||Econym [Maps API Guru]||5/10/09 12:56 AM|
that case you can use GClientGeocoder.
Use the HTTP access only from server code where there's no cross-domain
I suppose there's no reason why you couldn't AJAX to your own local
|Re: Geocode via HTTP, callback function?||Andrew Leach||5/10/09 6:36 AM|
On May 10, 6:59 am, mp- <miche...@gmail.com> wrote:
> Note: I'm talking about the geocode via *HTTP* api ... not theSee paragraph 10.12 of the Terms: http://code.google.com/apis/maps/terms.html
-- "you must not use geocodes obtained through the Service except in
conjunction with a Google map". And in fact that's in the second
paragraph of your linked documentation. Since that is the case, you
may as well use the "fullblown Google Maps API" and an API map. If you
can't use the API because your "web application" isn't browser-based,
you mustn't use the HTTP geocoder.
This may or not be relevant: you haven't really given enough
information about your application.
|Re: Geocode via HTTP, callback function?||mp-||5/10/09 8:33 AM|
I actually am using it in conjunction for the map.
My use case is that I have a map where people enter in their city and
find the relevant push-pin markers in their area.
What happens is that if I have to load the map first, it's a serial
blocker until the Google Map fully loads that I can then geocode and
query the database to find what push pins should be shown.
In the case of using the geocode via HTTP, I can attempt to parallel-
ize this step more.
So what I want to do (hopefully) is:
I can geocode via HTTP (super quick b/c of now big api download) the
long/latitude. Temporary display a *static* google map to make the web
page appear to load fast. Then at the same time (parrallel) do both
querying my database (using the long/latitude info) to find the
relevant push-pin markers while loading the full blown interactive
Essentially, what I'm trying to eliminate is the long perceived load
time of the interactive google maps and database queried push-pin
markers for non-primed caches.
On May 10, 8:36 am, Andrew Leach <andrew.leac...@googlemail.com>
|Re: Geocode via HTTP, callback function?||Andrew Leach||5/10/09 1:41 PM|
On May 10, 4:33 pm, mp- <miche...@gmail.com> wrote:So what you need to do is a two-stage data retrieval. Pass the user
entry back to your server, geocode it there and get the server to
construct the page with the static map <img> tag and (say) a hidden
field with a unique reference in it. Then once the API is loaded do a
GDownloadUrl to pass that unique reference to your server and get the
relevant marker data.
|Re: Geocode via HTTP, callback function?||mp-||5/10/09 5:55 PM|
I could create a simply proxy on my server written in PHP/Java/etc to
simply fetch the geocode information via HTTP and then echo the long/
lat information back out but that seems like a silly middleman step
that shouldn't need to be done.
But, if no callback functionality exists - I will have to create a
same domain from which it's being called. That would be a crossdomain
So, does anyone know if the geocode via HTTP api supports the callback
On May 10, 3:41 pm, Andrew Leach <andrew.leac...@googlemail.com>
|Re: Geocode via HTTP, callback function?||geoco...@gmail.com||5/10/09 10:49 PM|
On May 10, 5:55 pm, mp- <miche...@gmail.com> wrote:If you have looked at the documentation and not found it and both
Andrew and Mike have not said "yes", and told you how to do it, I
suspect you have your answer.
|Re: Geocode via HTTP, callback function?||mp-||5/11/09 5:47 AM|
|Re: Geocode via HTTP, callback function?||Andrew Leach||5/11/09 5:52 AM|
On May 11, 1:47 pm, mp- <miche...@gmail.com> wrote:Yes. It doesn't, as indicated in the documentation. That's why we
suggested other methods.