Feb 28

Google Geocoding API added “score”

Category: geek out

At Opower, we use the Google Geocoding API to help us find latitude and longitude for customer’s sites. Today, they pushed out a new field, called “score” that isn’t part of their API. Here is the new response body with lots of information redacted:

“results”: [
“address_components”: [

“long_name”: “New Jersey”,
“short_name”: “NJ”,

…”formatted_address”: “…, Teaneck, NJ 07666, USA”,
“location_type”: “ROOFTOP”,

“score”: 0.8022069931030273,

“types”: [
“status”: “OK”

We don’t yet know what it is or what it’s used for, but I suspect that it’s a score or confidence interval of how good Google things the result is. It caused a few JSON Parsers to bork since we were counting on the fields listed in the API to be the only ones in the request. That was not a wise assumption, and we used this Jackson annotation to prevent this from happening again:

@JsonIgnoreProperties(ignoreUnknown = true)
1 comment

1 Comment so far

  1. rajatNo Gravatar May 1st, 2013 8:32 pm

Leave a comment

CommentLuv badge