In my data I have found many examples like the following. If you search Google for "Cheyney University PA", you get the following information:
Address: 1837 University Cir, Cheyney, PA 19319
Phone: (610) 399-2000
However, when doing a search using the following:
my $pid_url = Mojo::URL->new('https://maps.googleapis.com/maps/api/place/textsearch/json');
$pid_url->query({query => $query, key => 'removed'});
my $place_id = $ua->get($pid_url)->res->json->{results}->[0]->{place_id};
# Query = https://maps.googleapis.com/maps/api/place/textsearch/json?query=Cheyney+University+PA&key=removed
# Place ID returned = ChIJ5wiPkSvuxokR2rwaVUTMwks
$deets_url = Mojo::URL->new('https://maps.googleapis.com/maps/api/place/details/json');
$deets_url->query({placeid => $place_id, key => 'removed'});
say $ua->get($deets_url)->res->body;
I get the following back from Google:
{
"result" : {
"address_components" : [
{
"long_name" : "Cheyney",
"short_name" : "Cheyney",
"types" : [ "locality", "political" ]
},
{
"long_name" : "Thornbury",
"short_name" : "Thornbury",
"types" : [ "administrative_area_level_3", "political" ]
},
{
"long_name" : "Delaware County",
"short_name" : "Delaware County",
"types" : [ "administrative_area_level_2", "political" ]
},
{
"long_name" : "Pennsylvania",
"short_name" : "PA",
"types" : [ "administrative_area_level_1", "political" ]
},
{
"long_name" : "United States",
"short_name" : "US",
"types" : [ "country", "political" ]
}
],
"formatted_address" : "Cheyney, PA, USA",
"name" : "Cheyney",
"place_id" : "ChIJ5wiPkSvuxokR2rwaVUTMwks",
"scope" : "GOOGLE",
"types" : [ "locality", "political" ],
"url" : "https://maps.google.com/maps/place?q=Cheyney,+PA,+USA&ftid=0x89c6ee2b918f08e7:0x4bc2cc44551abcda",
"vicinity" : "Cheyney"
},
"status" : "OK"
}
(I removed some of the output for clarity.) Notice that in the results the street address components are missing (1837 University Cir), as well as the phone number. I have found many instances like this, and I am trying to figure out why my queries are not returning the same results as what I get when I Google the information.
Here's another example:
Google Results:
Address: 1320 S Dixie Hwy, Coral Gables, FL 33124
Phone: (305) 284-2211
Places API Results:
{
"html_attributions" : [],
"results" : [
{
"formatted_address" : "University of Miami, Coral Gables, FL 33146, USA",
"geometry" : {
"location" : {
"lat" : 25.7216374,
"lng" : -80.2792843
},
"viewport" : {
"northeast" : {
"lat" : 25.7316894,
"lng" : -80.26327689999999
},
"southwest" : {
"lat" : 25.7115846,
"lng" : -80.29529169999999
}
}
},
"icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/geocode-71.png",
"id" : "7eb529034293a6eb760e990e034a4314d83edcf7",
"name" : "University of Miami",
"place_id" : "ChIJn9K4n_C32YgRqR37uAXB5IM",
"reference" : "CqQBnAAAACffq3Xp3JUFowUDlEsge90htrhAoUES9tGmsB919iNQCxgldtq4khP4f_gCAju90qGY1IEUH52hZl_GP_H6xJC5z22EceCfprWEHFhhXKsW23Y9EeV24svXC-PRYnOyQaXZmbQFCeUlsmKWB6570e-8W_w31muZKwFd4hVPdeeqO45zH2zp7CAuSrHjBr0bSiOQufEB59ibxG4QcuwenSASEHvq1xMcCCtMUsFcyLYsrOIaFN0vg6S680hJay1jDSrZ686Mt9Gn",
"types" : [ "sublocality_level_1", "sublocality", "political" ]
}
],
"status" : "OK"
}
{
"html_attributions" : [],
"result" : {
"address_components" : [
{
"long_name" : "University of Miami",
"short_name" : "University of Miami",
"types" : [ "sublocality_level_1", "sublocality", "political" ]
},
{
"long_name" : "Coral Gables",
"short_name" : "Coral Gables",
"types" : [ "locality", "political" ]
},
{
"long_name" : "Miami-Dade County",
"short_name" : "Miami-Dade County",
"types" : [ "administrative_area_level_2", "political" ]
},
{
"long_name" : "Florida",
"short_name" : "FL",
"types" : [ "administrative_area_level_1", "political" ]
},
{
"long_name" : "United States",
"short_name" : "US",
"types" : [ "country", "political" ]
},
{
"long_name" : "33146",
"short_name" : "33146",
"types" : [ "postal_code" ]
}
],
"adr_address" : "University of Miami, \u003cspan class=\"locality\"\u003eCoral Gables\u003c/span\u003e, \u003cspan class=\"region\"\u003eFL\u003c/span\u003e \u003cspan class=\"postal-code\"\u003e33146\u003c/span\u003e, \u003cspan class=\"country-name\"\u003eUSA\u003c/span\u003e",
"formatted_address" : "University of Miami, Coral Gables, FL 33146, USA",
"geometry" : {
"location" : {
"lat" : 25.7216374,
"lng" : -80.2792843
},
"viewport" : {
"northeast" : {
"lat" : 25.7316894,
"lng" : -80.26327689999999
},
"southwest" : {
"lat" : 25.7115846,
"lng" : -80.29529169999999
}
}
},
"icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/geocode-71.png",
"id" : "7eb529034293a6eb760e990e034a4314d83edcf7",
"name" : "University of Miami",
"place_id" : "ChIJn9K4n_C32YgRqR37uAXB5IM",
"reference" : "CqQBlAAAAFeKC7LbGqAr7-LnBXMqbMIhuyuUh22XBMRO11hADojDclomC-InGocKSStmZ8S-S1UVWC1qHAsZi3XSp7PiDOFBgZVMqhm5kr87CfEAJmPdwsmZ6VEg5FxXh5LZmSSZdFgH0UR0OVGLL5M17SmWZp4W3Die8UNa5yCMyV5CP0T0VWmvqCb54qJR6mlyIx1itiLzRp1XhTs8_UmEt9pjIkYSEGrAqS6TWo2G1WBOrDO0YSAaFO4FfqvmFabJLia36vKL0XTz23Mu",
"scope" : "GOOGLE",
"types" : [ "sublocality_level_1", "sublocality", "political" ],
"url" : "https://maps.google.com/maps/place?q=University+of+Miami,+Coral+Gables,+FL+33146,+USA&ftid=0x88d9b7f09fb8d29f:0x83e4c105b8fb1da9",
"vicinity" : "University of Miami"
},
"status" : "OK"
}
It looks like you are wanting to use Google Maps to do some sort of address validation and parsing. The short story is, unfortunately Google Maps cannot be replied upon to return parsed address components consistently. What Google Maps does do really well is geocode - that is translate input into lat/long to be displayed on a map. You could perhaps try reverse geocoding (i.e. giving Google lat/long) to see what that returns, but I'm pretty sure you will get similar results.
I have also wanted and tried in vain to use Google Maps similarly in the past myself. After much testing against various international, real world datasets, I concluded that Google couldn't be used for validation any more than (a) getting lat/long (b) a general yes/no that address sort of looks ok. I have also tried some other Geocoding providers and later settled on GeocodeFarm when Google proved too expensive once my sites outgrew what they previously provided for free. My general conclusion was the same though - I had to stick to fairly traditional address data entry forms without 'fullproof' validation, otherwise users would be told addresses were faulty that were actually valid. GeocodeFarm did "pretty print" localized addresses quite well though (i.e. almost suitable for putting as a mailing label on an envelope), but it wasn't parsed into components for storage into a typical relational database schema.
Doing some more research to verify my own experiences, I found this and this to be useful. These links also point towards a service called 'SmartyStreets' - I cannot vouch for it however, and have zero experience with it.
Hope that helps!
Related
I've seen this problem mentioned in other threads but they are often using older versions of google maps and are no longer valid.
If I use the request parameters and access the following url (https://maps.googleapis.com/maps/api/geocode/json?region=ca&address=10+York+Street%2C+Sydney%2C+NS%2C+Canada&key=API_KEY) directly in my browser I get the following response:
{
"results" : [
{
"address_components" : [
{
"long_name" : "10",
"short_name" : "10",
"types" : [ "street_number" ]
},
{
"long_name" : "York Street",
"short_name" : "York St",
"types" : [ "route" ]
},
{
"long_name" : "Sydney",
"short_name" : "Sydney",
"types" : [ "locality", "political" ]
},
{
"long_name" : "Cape Breton Regional Municipality",
"short_name" : "Cape Breton Regional Municipality",
"types" : [ "administrative_area_level_2", "political" ]
},
{
"long_name" : "Nova Scotia",
"short_name" : "NS",
"types" : [ "administrative_area_level_1", "political" ]
},
{
"long_name" : "Canada",
"short_name" : "CA",
"types" : [ "country", "political" ]
},
{
"long_name" : "B1P 6B1",
"short_name" : "B1P 6B1",
"types" : [ "postal_code" ]
}
],
"formatted_address" : "10 York St, Sydney, NS B1P 6B1, Canada",
"geometry" : {
"bounds" : {
"northeast" : {
"lat" : 46.1427341,
"lng" : -60.19779020000001
},
"southwest" : {
"lat" : 46.1425438,
"lng" : -60.1980493
}
},
"location" : {
"lat" : 46.1426556,
"lng" : -60.19790510000001
},
"location_type" : "ROOFTOP",
"viewport" : {
"northeast" : {
"lat" : 46.14398793029149,
"lng" : -60.19657076970849
},
"southwest" : {
"lat" : 46.1412899697085,
"lng" : -60.1992687302915
}
}
},
"place_id" : "ChIJl_ddHCz7Z0sRQmXbPQOCT90",
"plus_code" : {
"compound_code" : "4RV2+3R Sydney, NS, Canada",
"global_code" : "87RX4RV2+3R"
},
"types" : [ "premise" ]
}
],
"status" : "OK"
}
Which is what I'm looking for. Great.
However if I make that same request in my program I get the wrong place, namely the same street address but in Ontario:
{
"results" : [
{
"address_components" : [
{
"long_name" : "10",
"short_name" : "10",
"types" : [ "street_number" ]
},
{
"long_name" : "York Street",
"short_name" : "York St",
"types" : [ "route" ]
},
{
"long_name" : "Old Toronto",
"short_name" : "Old Toronto",
"types" : [ "political", "sublocality", "sublocality_level_1" ]
},
{
"long_name" : "Toronto",
"short_name" : "Toronto",
"types" : [ "locality", "political" ]
},
{
"long_name" : "Toronto",
"short_name" : "Toronto",
"types" : [ "administrative_area_level_2", "political" ]
},
{
"long_name" : "Ontario",
"short_name" : "ON",
"types" : [ "administrative_area_level_1", "political" ]
},
{
"long_name" : "Canada",
"short_name" : "CA",
"types" : [ "country", "political" ]
},
{
"long_name" : "M5J 0E1",
"short_name" : "M5J 0E1",
"types" : [ "postal_code" ]
}
],
"formatted_address" : "10 York St, Toronto, ON M5J 0E1, Canada",
"geometry" : {
"location" : {
"lat" : 43.64109759999999,
"lng" : -79.38122469999999
},
"location_type" : "ROOFTOP",
"viewport" : {
"northeast" : {
"lat" : 43.64244658029149,
"lng" : -79.37987571970848
},
"southwest" : {
"lat" : 43.6397486197085,
"lng" : -79.3825736802915
}
}
},
"place_id" : "ChIJBQZc3pM1K4gRIf5tNOFZWxI",
"plus_code" : {
"compound_code" : "JJR9+CG Toronto, ON, Canada",
"global_code" : "87M2JJR9+CG"
},
"types" : [ "establishment", "point_of_interest" ]
}
],
"status" : "OK"
}
If I change the address to 12 York Street in my app everything is working great and it shows me the NS address. I guess Google has it out for this one particular address. I make the request in my app with the following code:
$response = $this->client->request('GET', 'geocode/json?', [
'query' => [
'key' => Config::get('services.googleMaps')['key'],
'region' => $this->ccTLD,
'address' => urlencode($this->searchstr),
]
]);
$jsonString = $response->getBody()->getContents();
Log::info($jsonString); // Shows response quoted up above
Where region is 'ca', and address is '10+York+Street%2C+Sydney%2C+NS%2C+Canada'. The client here is a standard GuzzleHttp Client:
$this->client = new Client([
'base_uri' => 'https://maps.googleapis.com/maps/api/'
]);
I've tried using adding the bounds parameter with no difference at all, but the components parameter did ...do something for me. If I add '&components=administrative_area:NS' to the request in my browser (which starts off showing me NS) there is no change as expected.
If I then go back to my http client and add 'components' => 'administrative_area:NS', I would expect that to be the fix, right? Well no, I get ZERO RESULTS.
Out of curiosity I went back to the browser and tried to use administrative_area:ON to force it to show me the Ontario address. I instead was shown ZERO RESULTS in the browser now instead.
Does anyone know how to make my request in the client work correctly? or know why it is behaving completely differently in the first place? Is there a problem with GuzzleHttp I don't know about that could be responsible? I'm completely baffled here.
I am trying to decode an address "344 East Columbia Avenue, Pomona, 91767, CA" but it gives me Location type as Range_interpolated
{
"results" : [
{
"address_components" : [
{
"long_name" : "344",
"short_name" : "344",
"types" : [ "street_number" ]
},
{
"long_name" : "East Columbia Avenue",
"short_name" : "E Columbia Ave",
"types" : [ "route" ]
},
{
"long_name" : "Pomona",
"short_name" : "Pomona",
"types" : [ "locality", "political" ]
},
{
"long_name" : "Los Angeles County",
"short_name" : "Los Angeles County",
"types" : [ "administrative_area_level_2", "political" ]
},
{
"long_name" : "California",
"short_name" : "CA",
"types" : [ "administrative_area_level_1", "political" ]
},
{
"long_name" : "United States",
"short_name" : "US",
"types" : [ "country", "political" ]
},
{
"long_name" : "91767",
"short_name" : "91767",
"types" : [ "postal_code" ]
},
{
"long_name" : "3952",
"short_name" : "3952",
"types" : [ "postal_code_suffix" ]
}
],
"formatted_address" : "344 E Columbia Ave, Pomona, CA 91767, USA",
"geometry" : {
"location" : {
"lat" : 34.0684616,
"lng" : -117.7472136
},
"location_type" : "RANGE_INTERPOLATED",
"viewport" : {
"northeast" : {
"lat" : 34.0698105802915,
"lng" : -117.7458646197085
},
"southwest" : {
"lat" : 34.0671126197085,
"lng" : -117.7485625802915
}
}
},
"partial_match" : true,
"place_id" : "EikzNDQgRSBDb2x1bWJpYSBBdmUsIFBvbW9uYSwgQ0EgOTE3NjcsIFVTQSIbEhkKFAoSCVf7or0HLsOAEaYT6OuR5xZiENgC",
"types" : [ "street_address" ]
}
],
"status" : "OK"
}
Whereas on searching the same address in Google Maps, it is showing me location accurately.
Whereas on decoding "343 East Columbia Avenue, Pomona, 91767, CA" address gives me Rooftop location type.
As per Google documentation, Range_interpolated indicates that the returned result reflects an approximation (usually on a road) interpolated between two precise points (such as intersections). Interpolated results are generally returned when rooftop geocodes are unavailable for a street address.
Does anyone have an idea on accuracy of the Range_interpolated location type? How much accurate location it provides in meters?
Why do I get reponse with a different place_id, then the one I used in my place details API query?
https://maps.googleapis.com/maps/api/place/details/json?placeid=Eiw5LzUwIE1hcmtldCBTdHJlZXQsIE1lbGJvdXJuZSBWSUMsIEF1c3RyYWxpYSIwEi4KFAoSCR3TztZMXdZqEREXsZzx5CRAEDIqFAoSCXUvVtBMXdZqEc9Cc6QFzzMr&fields=address_components,formatted_address,place_id,types&key=
{
"html_attributions" : [],
"result" : {
"address_components" : [
{
"long_name" : "50",
"short_name" : "50",
"types" : [ "street_number" ]
},
{
"long_name" : "Market Street",
"short_name" : "Market St",
"types" : [ "route" ]
},
{
"long_name" : "Melbourne",
"short_name" : "Melbourne",
"types" : [ "locality", "political" ]
},
{
"long_name" : "Melbourne City",
"short_name" : "Melbourne",
"types" : [ "administrative_area_level_2", "political" ]
},
{
"long_name" : "Victoria",
"short_name" : "VIC",
"types" : [ "administrative_area_level_1", "political" ]
},
{
"long_name" : "Australia",
"short_name" : "AU",
"types" : [ "country", "political" ]
},
{
"long_name" : "3000",
"short_name" : "3000",
"types" : [ "postal_code" ]
}
],
"formatted_address" : "50 Market St, Melbourne VIC 3000, Australia",
"place_id" : "Eis1MCBNYXJrZXQgU3QsIE1lbGJvdXJuZSBWSUMgMzAwMCwgQXVzdHJhbGlhIjASLgoUChIJHdPO1kxd1moRERexnPHkJEAQMioUChIJdS9W0Exd1moRz0JzpAXPMys",
"types" : [ "street_address" ]
},
"status" : "OK"
}
Also I noticed the address returned is different.
The placeid in my query, is what I received for an autocompletion service response.
{
"description" : "9/50 Market Street, Melbourne VIC, Australia",
"id" : "06f000a321dc5f1347b79dcbe4d611390f750f36",
"matched_substrings" : [
{
"length" : 18,
"offset" : 0
}
],
"place_id" : "Eiw5LzUwIE1hcmtldCBTdHJlZXQsIE1lbGJvdXJuZSBWSUMsIEF1c3RyYWxpYSIwEi4KFAoSCR3TztZMXdZqEREXsZzx5CRAEDIqFAoSCXUvVtBMXdZqEc9Cc6QFzzMr",
"reference" : "Eiw5LzUwIE1hcmtldCBTdHJlZXQsIE1lbGJvdXJuZSBWSUMsIEF1c3RyYWxpYSIwEi4KFAoSCR3TztZMXdZqEREXsZzx5CRAEDIqFAoSCXUvVtBMXdZqEc9Cc6QFzzMr",
"structured_formatting" : {
"main_text" : "9/50 Market Street",
"main_text_matched_substrings" : [
{
"length" : 18,
"offset" : 0
}
],
"secondary_text" : "Melbourne VIC, Australia"
},
"terms" : [
{
"offset" : 0,
"value" : "9/50 Market Street"
},
{
"offset" : 20,
"value" : "Melbourne"
},
{
"offset" : 30,
"value" : "VIC"
},
{
"offset" : 35,
"value" : "Australia"
}
],
"types" : [ "route", "geocode" ]
}
Looks like for some reason, google maps is dropping the subpermise information, when using the place details API and returning the street_address.
Is there a way I can force google maps API to return me the details for the subpremise?
The long place ID like Eis1MCBNYXJrZXQgU3QsIE1lbGJvdXJuZSBWSUMgMzAwMCwgQXVzdHJhbGlhIjASLgoUChIJHdPO1kxd1moRERexnPHkJEAQMioUChIJdS9W0Exd1moRz0JzpAXPMys in your example means that there is no exact street address for your search in database of Google. This is an approximation. When you search an address that exists in the database you will get shorter place ID (e.g. ChIJrTLr-GyuEmsRBfy61i59si0).
If address doesn't exists in Google database you can get one long place ID from autocomplete service and a different long place ID from the place details endpoint. These endpoints can use different algorithms for approximations that results in different place IDs for addresses that are not found in the database.
Both types of place IDs are mentioned in the documentation
https://developers.google.com/places/place-id#id-overview
The most straightforward way to fix the issue is reporting a missing address to Google data team as described in
https://support.google.com/maps/answer/6320846.
Once added in Google database your issue will disappear, you will get a short place ID both in autocomplete and in details.
Also your issue might be related to the bug reported in Google issue tracker regarding limited support of subpremises in place autocomplete service. Have a look at
https://issuetracker.google.com/issues/35830389
I hope this addresses your doubt.
I'm using JSON in Google Sheets to lookup a Zip and find the county. I only want the county returned. I can get it to return every value so the ImportJSON function is working.
Here's my formula. I've tried all permutations of the reference but I just don't know how to format it.
=ImportJSON(CONCATENATE("https://maps.googleapis.com/maps/api/geocode/json?address="92660), "results/address_components/long_name[3]", "noHeaders")
Here's the JSON data from Google Maps Geocoding API. I only want the county long name. In this example it's, "Orange County".
{
"results" : [
{
"address_components" : [
{
"long_name" : "92660",
"short_name" : "92660",
"types" : [ "postal_code" ]
},
{
"long_name" : "Newport Beach",
"short_name" : "Newport Beach",
"types" : [ "locality", "political" ]
},
{
"long_name" : "Orange County",
"short_name" : "Orange County",
"types" : [ "administrative_area_level_2", "political" ]
},
{
"long_name" : "California",
"short_name" : "CA",
"types" : [ "administrative_area_level_1", "political" ]
},
{
"long_name" : "United States",
"short_name" : "US",
"types" : [ "country", "political" ]
}
],
"formatted_address" : "Newport Beach, CA 92660, USA",
"geometry" : {
"bounds" : {
"northeast" : {
"lat" : 33.671823,
"lng" : -117.841337
},
"southwest" : {
"lat" : 33.6040739,
"lng" : -117.909447
}
},
"location" : {
"lat" : 33.6301328,
"lng" : -117.8721676
},
"location_type" : "APPROXIMATE",
"viewport" : {
"northeast" : {
"lat" : 33.671823,
"lng" : -117.841337
},
"southwest" : {
"lat" : 33.6040739,
"lng" : -117.909447
}
}
},
"place_id" : "ChIJRdSajSne3IAR8T4A2x-wgrE",
"types" : [ "postal_code" ]
}
],
"status" : "OK"
}
There are 3 things that are preventing it to properly import:
specifically in the concatenate function you have address="92660
which should be address=",92660
or you can eliminate the concat function altogether and format the url like this:
"https://maps.googleapis.com/maps/api/geocode/json?address="&"92660"
or technically point to the cell such as A1 with the 92660 value e.g. "https://maps.googleapis.com/maps/api/geocode/json?address="&A1
your missing the beginning / in front of results
In order to get the 3rd item, instead of using [3] , wrap your formula in the index function and reference the index of 3
the full thing:
=index(importjson("https://maps.googleapis.com/maps/api/geocode/json?address="&A1,"/results/address_components/long_name","noHeaders"),3)
You don't give a lot of details, but what about just parsing the json, and then doing results["address_components"][2]["long_name"]?
If I have a PlaceId that represents a road, how can I obtain the shape of the road to highlight it on the map? The Places API only returns a single location in the geometry field for roads.
For example given PlaceID: ChIJ8R8rpjCuEmsRKxCMhhWn9Kg
I get the following response. Notice the types field has value of "route", but the geometry field only provides single location instead of a path.
{
"html_attributions" : [],
"result" : {
"address_components" : [
{
"long_name" : "Darling Dr",
"short_name" : "Darling Dr",
"types" : [ "route" ]
},
{
"long_name" : "Sydney",
"short_name" : "Sydney",
"types" : [ "locality", "political" ]
},
{
"long_name" : "New South Wales",
"short_name" : "NSW",
"types" : [ "administrative_area_level_1", "political" ]
},
{
"long_name" : "Australia",
"short_name" : "AU",
"types" : [ "country", "political" ]
},
{
"long_name" : "2000",
"short_name" : "2000",
"types" : [ "postal_code" ]
}
],
"adr_address" : "\u003cspan class=\"street-address\"\u003eDarling Dr\u003c/span\u003e, \u003cspan class=\"locality\"\u003eSydney\u003c/span\u003e \u003cspan class=\"region\"\u003eNSW\u003c/span\u003e \u003cspan class=\"postal-code\"\u003e2000\u003c/span\u003e, \u003cspan class=\"country-name\"\u003eAustralia\u003c/span\u003e",
"formatted_address" : "Darling Dr, Sydney NSW 2000, Australia",
"geometry" : {
"location" : {
"lat" : -33.8718136,
"lng" : 151.1984465
}
},
"icon" : "http://maps.gstatic.com/mapfiles/place_api/icons/geocode-71.png",
"id" : "82a04f4f0548a2e7c467b71ed9c2a3a1615dac50",
"name" : "Darling Dr",
"place_id" : "ChIJ8R8rpjCuEmsRKxCMhhWn9Kg",
"reference" : "CpQBhAAAAA4dsRcdqFcTxsVmwWs1ZWWSg9XdclQgRHhLYT2XJwEIU8BOXoS3D4cM58oNhcND-bJU7k7nmLvgHZFep405LokQpkTu0yUPQtrrgNonLRVPdLy4j9Z0M7iBpmGkPN6BuDntYu6JG9urfnIJZRdIvpibFI9QxzP7uheEnJQtI7S8Aoxth99pVl5OvyySDSfn5hIQ4Nf4YLpRjiuY34ND9qvTyBoUr24qn9M1aFa6GoO46wrfW2a12DA",
"scope" : "GOOGLE",
"types" : [ "route" ],
"url" : "https://maps.google.com/maps/place?q=Darling+Dr,+Sydney+NSW+2000,+Australia&ftid=0x6b12ae30a62b1ff1:0xa8f4a715868c102b",
"vicinity" : "Sydney"
},
"status" : "OK"
}
This functionality is not supported. What you can do is create a map on MyMap and add a driving route for the path you want to highlight. Then, you can save it and export it as a KML layer. If you wanted to do this programmatically, you could use the Directions API to get the polyline for the route.