We have a pretty cool change coming out soon for the API Geocoder.
Now, in the KML/JSON outputs, you'll also get information about the
recommended bounding box associated with a geocode. You can then use
that along with map.getBoundsZoomLevel(GLatLngBounds) to set an
appropriate center and zoom after a geocode.
The KML structure would look something like this (with bogus latlngs):
<kml xmlns="http://earth.google.com/kml/2.0">
<Response>
<name>US</name>
<Status>
<code>200</code><request>geocode</request>
</Status>
<Placemark id="p1">
<address>USA</address>
<AddressDetails>...</AddressDetails>
<ExtendedData>
<LatLonBox xmlns="http://maps.google.com/geo?output=kml">
<north>0.000300</north>
<south>0.000100</south>
<east>0.000400</east>
<west>0.000200</west>
</LatLonBox>
</ExtendedData>
<Point><coordinates>0.000000,0.000000,0</coordinates></Point></
Placemark>
</Response>
</kml>
And here's a real JSON output:
{"name":"-122.073212,37.400665","Status":{"code":
200,"request":"geocode"},"Placemark":[{"id":"p1","address":"Whisman
Elementary, United States","AddressDetails":{"Country":
{"CountryNameCode":"US","CountryName":"United States","AddressLine":
["Whisman Elementary"]},"Accuracy": 1},"ExtendedData":{"LatLonBox":
{"north":37.477838,"south":
37.391718,"east":-122.059105,"west":-122.115674}},"Point":
{"coordinates":[-122.072382,37.428434,0]}}
And some sample code for using the JSON response in
GClientGeocoder.getLocations:
var exData = location.Placemark[0].ExtendedData;
var bounds = exData ? exData.LatLonBox : undefined;
if (bounds) {
var llbounds = new GLatLngBounds(
new GLatLng(bounds.south, bounds.west),
new GLatLng(bounds.north, bounds.east));
map.setCenter(point, map.getBoundsZoomLevel(llbounds));
}
Anyway, just wanted to give you a heads up, since it affects the HTTP
geocoder output. Pending any technical or legal obstacles, the change
should be out in a few weeks.
Will this be available through the static API or just the JavaScript
one? I'd assume the former, but wondering as we're in need of
determining a bounding box for a static maps project.
Thanks,
Kevin
On Sep 4, 3:41 am, "pamela (Google Employee)" <pamela....@gmail.com>
wrote:
> Anyway, just wanted to give you a heads up, since it affects the HTTP
> geocoder output. Pending any technical or legal obstacles, the change
> should be out in a few weeks.
> Will this be available through the static API or just the JavaScript > one? I'd assume the former, but wondering as we're in need of > determining a bounding box for a static maps project.
>> Anyway, just wanted to give you a heads up, since it affects the HTTP >> geocoder output. Pending any technical or legal obstacles, the change >> should be out in a few weeks.
Do you have a status update on this by chance? We've been holding off
on rolling our own bounding box calculation, figuring Google could do
it better than we could. But, if it's going to be a while longer,
we'll probably have to pull the trigger.
Thanks,
Kevin
On Sep 30, 1:18 pm, "pamela (Google Employee)" <pamela...@gmail.com>
wrote:
> Do you have a status update on this by chance? We've been holding off > on rolling our own bounding box calculation, figuring Google could do > it better than we could. But, if it's going to be a while longer, > we'll probably have to pull the trigger.
> Thanks, > Kevin
> On Sep 30, 1:18 pm, "pamela (Google Employee)" <pamela...@gmail.com> > wrote: > > Kevin- > > This would be available in the HTTP Geocoder output and JS/Flash > > Geocoder functions. (I assume by static you mean HTTP).
> > Marcelo- > > Interesting idea.
> > By the way, we're waiting another few weeks before releasing this change.
> Hi Kevin-
> We expect the change to go out in the next few weeks, but we, of course,
> cannot make guarantees.
> - pamela
> On Tue, Oct 28, 2008 at 8:16 PM, Kevin Menard
> <kevin.men...@snapmylife.com>wrote:
> > Hi Pamela,
> > Correct. Apologies for the loose terminology.
> > Do you have a status update on this by chance? We've been holding off
> > on rolling our own bounding box calculation, figuring Google could do
> > it better than we could. But, if it's going to be a while longer,
> > we'll probably have to pull the trigger.
> > Thanks,
> > Kevin
> > On Sep 30, 1:18 pm, "pamela (Google Employee)" <pamela...@gmail.com>
> > wrote:
> > > Kevin-
> > > This would be available in the HTTP Geocoder output and JS/Flash
> > > Geocoder functions. (I assume by static you mean HTTP).
> > > Marcelo-
> > > Interesting idea.
> > > By the way, we're waiting another few weeks before releasing this change.
On Mon, Dec 8, 2008 at 2:31 PM, Erik Frey <erikf...@gmail.com> wrote:
> Hi Pamela,
> Would just like to chime in that this would be a very useful feature.
> I hope it emerges one day!
> Erik
> On Nov 3, 3:32 am, "pamela (Google Employee)" <pamela...@gmail.com>
> wrote:
> > Hi Kevin-
> > We expect the change to go out in the next few weeks, but we, of course,
> > cannot make guarantees.
> > - pamela
> > On Tue, Oct 28, 2008 at 8:16 PM, Kevin Menard
> > <kevin.men...@snapmylife.com>wrote:
> > > Hi Pamela,
> > > Correct. Apologies for the loose terminology.
> > > Do you have a status update on this by chance? We've been holding off
> > > on rolling our own bounding box calculation, figuring Google could do
> > > it better than we could. But, if it's going to be a while longer,
> > > we'll probably have to pull the trigger.
> > > Thanks,
> > > Kevin
> > > On Sep 30, 1:18 pm, "pamela (Google Employee)" <pamela...@gmail.com>
> > > wrote:
> > > > Kevin-
> > > > This would be available in the HTTP Geocoder output and JS/Flash
> > > > Geocoder functions. (I assume by static you mean HTTP).
> > > > Marcelo-
> > > > Interesting idea.
> > > > By the way, we're waiting another few weeks before releasing this
> change.
> On Mon, Dec 8, 2008 at 2:31 PM, Erik Frey <erikf...@gmail.com > <mailto:erikf...@gmail.com>> wrote:
> Hi Pamela,
> Would just like to chime in that this would be a very useful feature.
> I hope it emerges one day!
> Erik
> On Nov 3, 3:32 am, "pamela (Google Employee)" <pamela...@gmail.com
> <mailto:pamela...@gmail.com>>
> wrote:
> > Hi Kevin-
> > We expect the change to go out in the next few weeks, but we, of
> course,
> > cannot make guarantees.
> > - pamela
> > On Tue, Oct 28, 2008 at 8:16 PM, Kevin Menard
> > <kevin.men...@snapmylife.com
> <mailto:kevin.men...@snapmylife.com>>wrote:
> > > Hi Pamela,
> > > Correct. Apologies for the loose terminology.
> > > Do you have a status update on this by chance? We've been
> holding off
> > > on rolling our own bounding box calculation, figuring Google
> could do
> > > it better than we could. But, if it's going to be a while longer,
> > > we'll probably have to pull the trigger.
> > > Thanks,
> > > Kevin
> > > On Sep 30, 1:18 pm, "pamela (Google Employee)"
> <pamela...@gmail.com <mailto:pamela...@gmail.com>>
> > > wrote:
> > > > Kevin-
> > > > This would be available in the HTTP Geocoder output and JS/Flash
> > > > Geocoder functions. (I assume by static you mean HTTP).
> > > > Marcelo-
> > > > Interesting idea.
> > > > By the way, we're waiting another few weeks before releasing
> this change.
> > On Mon, Dec 8, 2008 at 2:31 PM, Erik Frey <erikf...@gmail.com
> > <mailto:erikf...@gmail.com>> wrote:
> > Hi Pamela,
> > Would just like to chime in that this would be a very useful feature.
> > I hope it emerges one day!
> > Erik
> > On Nov 3, 3:32 am, "pamela (Google Employee)" <pamela...@gmail.com
> > <mailto:pamela...@gmail.com>>
> > wrote:
> > > Hi Kevin-
> > > We expect the change to go out in the next few weeks, but we, of
> > course,
> > > cannot make guarantees.
> > > - pamela
> > > On Tue, Oct 28, 2008 at 8:16 PM, Kevin Menard
> > > <kevin.men...@snapmylife.com
> > <mailto:kevin.men...@snapmylife.com>>wrote:
> > > > Hi Pamela,
> > > > Correct. Apologies for the loose terminology.
> > > > Do you have a status update on this by chance? We've been
> > holding off
> > > > on rolling our own bounding box calculation, figuring Google
> > could do
> > > > it better than we could. But, if it's going to be a while longer,
> > > > we'll probably have to pull the trigger.
> > > > Thanks,
> > > > Kevin
> > > > On Sep 30, 1:18 pm, "pamela (Google Employee)"
> > <pamela...@gmail.com <mailto:pamela...@gmail.com>>
> > > > wrote:
> > > > > Kevin-
> > > > > This would be available in the HTTP Geocoder output and JS/Flash
> > > > > Geocoder functions. (I assume by static you mean HTTP).
> > > > > Marcelo-
> > > > > Interesting idea.
> > > > > By the way, we're waiting another few weeks before releasing
> > this change.
> > > On Mon, Dec 8, 2008 at 2:31 PM, Erik Frey <erikf...@gmail.com
> > > <mailto:erikf...@gmail.com>> wrote:
> > > Hi Pamela,
> > > Would just like to chime in that this would be a very useful feature.
> > > I hope it emerges one day!
> > > Erik
> > > On Nov 3, 3:32 am, "pamela (Google Employee)" <pamela...@gmail.com
> > > <mailto:pamela...@gmail.com>>
> > > wrote:
> > > > Hi Kevin-
> > > > We expect the change to go out in the next few weeks, but we, of
> > > course,
> > > > cannot make guarantees.
> > > > - pamela
> > > > On Tue, Oct 28, 2008 at 8:16 PM, Kevin Menard
> > > > <kevin.men...@snapmylife.com
> > > <mailto:kevin.men...@snapmylife.com>>wrote:
> > > > > Hi Pamela,
> > > > > Correct. Apologies for the loose terminology.
> > > > > Do you have a status update on this by chance? We've been
> > > holding off
> > > > > on rolling our own bounding box calculation, figuring Google
> > > could do
> > > > > it better than we could. But, if it's going to be a while longer,
> > > > > we'll probably have to pull the trigger.
> > > > > Thanks,
> > > > > Kevin
> > > > > On Sep 30, 1:18 pm, "pamela (Google Employee)"
> > > <pamela...@gmail.com <mailto:pamela...@gmail.com>>
> > > > > wrote:
> > > > > > Kevin-
> > > > > > This would be available in the HTTP Geocoder output and JS/Flash
> > > > > > Geocoder functions. (I assume by static you mean HTTP).
>> > > On Mon, Dec 8, 2008 at 2:31 PM, Erik Frey <erikf...@gmail.com
>> > > <mailto:erikf...@gmail.com>> wrote:
>> > > Hi Pamela,
>> > > Would just like to chime in that this would be a very useful feature.
>> > > I hope it emerges one day!
>> > > Erik
>> > > On Nov 3, 3:32 am, "pamela (Google Employee)" <pamela...@gmail.com
>> > > <mailto:pamela...@gmail.com>>
>> > > wrote:
>> > > > Hi Kevin-
>> > > > We expect the change to go out in the next few weeks, but we, of
>> > > course,
>> > > > cannot make guarantees.
>> > > > - pamela
>> > > > On Tue, Oct 28, 2008 at 8:16 PM, Kevin Menard
>> > > > <kevin.men...@snapmylife.com
>> > > <mailto:kevin.men...@snapmylife.com>>wrote:
>> > > > > Hi Pamela,
>> > > > > Correct. Apologies for the loose terminology.
>> > > > > Do you have a status update on this by chance? We've been
>> > > holding off
>> > > > > on rolling our own bounding box calculation, figuring Google
>> > > could do
>> > > > > it better than we could. But, if it's going to be a while longer,
>> > > > > we'll probably have to pull the trigger.
>> > > > > Thanks,
>> > > > > Kevin
>> > > > > On Sep 30, 1:18 pm, "pamela (Google Employee)"
>> > > <pamela...@gmail.com <mailto:pamela...@gmail.com>>
>> > > > > wrote:
>> > > > > > Kevin-
>> > > > > > This would be available in the HTTP Geocoder output and JS/Flash
>> > > > > > Geocoder functions. (I assume by static you mean HTTP).
> On Mon, Dec 8, 2008 at 2:31 PM, Erik Frey <erikf...@gmail.com> wrote:
> > Hi Pamela,
> > Would just like to chime in that this would be a very useful feature.
> > I hope it emerges one day!
> > Erik
> > On Nov 3, 3:32 am, "pamela (Google Employee)" <pamela...@gmail.com>
> > wrote:
> > > Hi Kevin-
> > > We expect the change to go out in the next few weeks, but we, of course,
> > > cannot make guarantees.
> > > - pamela
> > > On Tue, Oct 28, 2008 at 8:16 PM, Kevin Menard
> > > <kevin.men...@snapmylife.com>wrote:
> > > > Hi Pamela,
> > > > Correct. Apologies for the loose terminology.
> > > > Do you have a status update on this by chance? We've been holding off
> > > > on rolling our own bounding box calculation, figuring Google could do
> > > > it better than we could. But, if it's going to be a while longer,
> > > > we'll probably have to pull the trigger.
> > > > Thanks,
> > > > Kevin
> > > > On Sep 30, 1:18 pm, "pamela (Google Employee)" <pamela...@gmail.com>
> > > > wrote:
> > > > > Kevin-
> > > > > This would be available in the HTTP Geocoder output and JS/Flash
> > > > > Geocoder functions. (I assume by static you mean HTTP).
> > > > > Marcelo-
> > > > > Interesting idea.
> > > > > By the way, we're waiting another few weeks before releasing this
> > change.
Hey developers-
Apologies, it appears that I'm hitting an internal version of the geocoder.
I'll look into that and the release date for the bounding box change
externally.
- pamela
On Tue, Dec 9, 2008 at 5:16 AM, Guillaume Carbonneau <
> > On Mon, Dec 8, 2008 at 2:31 PM, Erik Frey <erikf...@gmail.com> wrote:
> > > Hi Pamela,
> > > Would just like to chime in that this would be a very useful feature.
> > > I hope it emerges one day!
> > > Erik
> > > On Nov 3, 3:32 am, "pamela (Google Employee)" <pamela...@gmail.com>
> > > wrote:
> > > > Hi Kevin-
> > > > We expect the change to go out in the next few weeks, but we, of
> course,
> > > > cannot make guarantees.
> > > > - pamela
> > > > On Tue, Oct 28, 2008 at 8:16 PM, Kevin Menard
> > > > <kevin.men...@snapmylife.com>wrote:
> > > > > Hi Pamela,
> > > > > Correct. Apologies for the loose terminology.
> > > > > Do you have a status update on this by chance? We've been holding
> off
> > > > > on rolling our own bounding box calculation, figuring Google could
> do
> > > > > it better than we could. But, if it's going to be a while longer,
> > > > > we'll probably have to pull the trigger.
> > > > > Thanks,
> > > > > Kevin
> > > > > On Sep 30, 1:18 pm, "pamela (Google Employee)" <
> pamela...@gmail.com>
> > > > > wrote:
> > > > > > Kevin-
> > > > > > This would be available in the HTTP Geocoder output and JS/Flash
> > > > > > Geocoder functions. (I assume by static you mean HTTP).
> Hey developers-
> Apologies, it appears that I'm hitting an internal version of the geocoder.
> I'll look into that and the release date for the bounding box change
> externally.
> - pamela
> On Tue, Dec 9, 2008 at 5:16 AM, Guillaume Carbonneau <
> > > On Mon, Dec 8, 2008 at 2:31 PM, Erik Frey <erikf...@gmail.com> wrote:
> > > > Hi Pamela,
> > > > Would just like to chime in that this would be a very useful feature.
> > > > I hope it emerges one day!
> > > > Erik
> > > > On Nov 3, 3:32 am, "pamela (Google Employee)" <pamela...@gmail.com>
> > > > wrote:
> > > > > Hi Kevin-
> > > > > We expect the change to go out in the next few weeks, but we, of
> > course,
> > > > > cannot make guarantees.
> > > > > - pamela
> > > > > On Tue, Oct 28, 2008 at 8:16 PM, Kevin Menard
> > > > > <kevin.men...@snapmylife.com>wrote:
> > > > > > Hi Pamela,
> > > > > > Correct. Apologies for the loose terminology.
> > > > > > Do you have a status update on this by chance? We've been holding
> > off
> > > > > > on rolling our own bounding box calculation, figuring Google could
> > do
> > > > > > it better than we could. But, if it's going to be a while longer,
> > > > > > we'll probably have to pull the trigger.
> > > > > > Thanks,
> > > > > > Kevin
> > > > > > On Sep 30, 1:18 pm, "pamela (Google Employee)" <
> > pamela...@gmail.com>
> > > > > > wrote:
> > > > > > > Kevin-
> > > > > > > This would be available in the HTTP Geocoder output and JS/Flash
> > > > > > > Geocoder functions. (I assume by static you mean HTTP).
We decided not to release the feature as early as we originally
thought we would. Because timelines often change like this, we don't
often pre-announce new features to developers. I did announce this
feature as there was some concern about adding additional elements
into the output that developers were parsing, and making sure they
were aware of such additions.
When this feature is actually introduced, I will post again.
- pamela
On Sat, Dec 20, 2008 at 6:50 AM, Guillaume Carbonneau
> On Dec 8, 2:51 pm, "pamela (Google Employee)" <pamela...@gmail.com>
> wrote:
>> Hey developers-
>> Apologies, it appears that I'm hitting an internal version of the geocoder.
>> I'll look into that and the release date for the bounding box change
>> externally.
>> - pamela
>> On Tue, Dec 9, 2008 at 5:16 AM, Guillaume Carbonneau <
>> > > On Mon, Dec 8, 2008 at 2:31 PM, Erik Frey <erikf...@gmail.com> wrote:
>> > > > Hi Pamela,
>> > > > Would just like to chime in that this would be a very useful feature.
>> > > > I hope it emerges one day!
>> > > > Erik
>> > > > On Nov 3, 3:32 am, "pamela (Google Employee)" <pamela...@gmail.com>
>> > > > wrote:
>> > > > > Hi Kevin-
>> > > > > We expect the change to go out in the next few weeks, but we, of
>> > course,
>> > > > > cannot make guarantees.
>> > > > > - pamela
>> > > > > On Tue, Oct 28, 2008 at 8:16 PM, Kevin Menard
>> > > > > <kevin.men...@snapmylife.com>wrote:
>> > > > > > Hi Pamela,
>> > > > > > Correct. Apologies for the loose terminology.
>> > > > > > Do you have a status update on this by chance? We've been holding
>> > off
>> > > > > > on rolling our own bounding box calculation, figuring Google could
>> > do
>> > > > > > it better than we could. But, if it's going to be a while longer,
>> > > > > > we'll probably have to pull the trigger.
>> > > > > > Thanks,
>> > > > > > Kevin
>> > > > > > On Sep 30, 1:18 pm, "pamela (Google Employee)" <
>> > pamela...@gmail.com>
>> > > > > > wrote:
>> > > > > > > Kevin-
>> > > > > > > This would be available in the HTTP Geocoder output and JS/Flash
>> > > > > > > Geocoder functions. (I assume by static you mean HTTP).
> We decided not to release the feature as early as we originally
> thought we would. Because timelines often change like this, we don't
> often pre-announce new features to developers. I did announce this
> feature as there was some concern about adding additional elements
> into the output that developers were parsing, and making sure they
> were aware of such additions.
> When this feature is actually introduced, I will post again.
> - pamela
> On Sat, Dec 20, 2008 at 6:50 AM, Guillaume Carbonneau
> > On Dec 8, 2:51 pm, "pamela (Google Employee)" <pamela...@gmail.com>
> > wrote:
> >> Hey developers-
> >> Apologies, it appears that I'm hitting an internal version of the geocoder.
> >> I'll look into that and the release date for the bounding box change
> >> externally.
> >> - pamela
> >> On Tue, Dec 9, 2008 at 5:16 AM, Guillaume Carbonneau <
> >> > > On Mon, Dec 8, 2008 at 2:31 PM, Erik Frey <erikf...@gmail.com> wrote:
> >> > > > Hi Pamela,
> >> > > > Would just like to chime in that this would be a very useful feature.
> >> > > > I hope it emerges one day!
> >> > > > Erik
> >> > > > On Nov 3, 3:32 am, "pamela (Google Employee)" <pamela...@gmail.com>
> >> > > > wrote:
> >> > > > > Hi Kevin-
> >> > > > > We expect the change to go out in the next few weeks, but we, of
> >> > course,
> >> > > > > cannot make guarantees.
> >> > > > > - pamela
> >> > > > > On Tue, Oct 28, 2008 at 8:16 PM, Kevin Menard
> >> > > > > <kevin.men...@snapmylife.com>wrote:
> >> > > > > > Hi Pamela,
> >> > > > > > Correct. Apologies for the loose terminology.
> >> > > > > > Do you have a status update on this by chance? We've been holding
> >> > off
> >> > > > > > on rolling our own bounding box calculation, figuring Google could
> >> > do
> >> > > > > > it better than we could. But, if it's going to be a while longer,
> >> > > > > > we'll probably have to pull the trigger.
> >> > > > > > Thanks,
> >> > > > > > Kevin
> >> > > > > > On Sep 30, 1:18 pm, "pamela (Google Employee)" <
> >> > pamela...@gmail.com>
> >> > > > > > wrote:
> >> > > > > > > Kevin-
> >> > > > > > > This would be available in the HTTP Geocoder output and JS/Flash
> >> > > > > > > Geocoder functions. (I assume by static you mean HTTP).
> On Jan 5, 11:35 am, "pamela (Google Employee)" <pamela...@gmail.com>
> wrote:
> > Hi developers -
> > We decided not to release the feature as early as we originally
> > thought we would. Because timelines often change like this, we don't
> > often pre-announce new features to developers. I did announce this
> > feature as there was some concern about adding additional elements
> > into the output that developers were parsing, and making sure they
> > were aware of such additions.
> > When this feature is actually introduced, I will post again.
> > - pamela
> > On Sat, Dec 20, 2008 at 6:50 AM, Guillaume Carbonneau
> > > On Dec 8, 2:51 pm, "pamela (Google Employee)" <pamela...@gmail.com>
> > > wrote:
> > >> Hey developers-
> > >> Apologies, it appears that I'm hitting an internal version of the
> geocoder.
> > >> I'll look into that and the release date for the bounding box change
> > >> externally.
> > >> - pamela
> > >> On Tue, Dec 9, 2008 at 5:16 AM, Guillaume Carbonneau <
> > >> > > On Mon, Dec 8, 2008 at 2:31 PM, Erik Frey <erikf...@gmail.com>
> wrote:
> > >> > > > Hi Pamela,
> > >> > > > Would just like to chime in that this would be a very useful
> feature.
> > >> > > > I hope it emerges one day!
> > >> > > > Erik
> > >> > > > On Nov 3, 3:32 am, "pamela (Google Employee)" <
> pamela...@gmail.com>
> > >> > > > wrote:
> > >> > > > > Hi Kevin-
> > >> > > > > We expect the change to go out in the next few weeks, but we,
> of
> > >> > course,
> > >> > > > > cannot make guarantees.
> > >> > > > > - pamela
> > >> > > > > On Tue, Oct 28, 2008 at 8:16 PM, Kevin Menard
> > >> > > > > <kevin.men...@snapmylife.com>wrote:
> > >> > > > > > Hi Pamela,
> > >> > > > > > Correct. Apologies for the loose terminology.
> > >> > > > > > Do you have a status update on this by chance? We've been
> holding
> > >> > off
> > >> > > > > > on rolling our own bounding box calculation, figuring Google
> could
> > >> > do
> > >> > > > > > it better than we could. But, if it's going to be a while
> longer,
> > >> > > > > > we'll probably have to pull the trigger.
> > >> > > > > > Thanks,
> > >> > > > > > Kevin
> > >> > > > > > On Sep 30, 1:18 pm, "pamela (Google Employee)" <
> > >> > pamela...@gmail.com>
> > >> > > > > > wrote:
> > >> > > > > > > Kevin-
> > >> > > > > > > This would be available in the HTTP Geocoder output and
> JS/Flash
> > >> > > > > > > Geocoder functions. (I assume by static you mean HTTP).