1
votes

If you wanted the coordinates for 2202 Woodside Lane in Sacramento

https://www.google.com/maps/place/2202+Woodside+Ln,+Sacramento,+CA+95825/@38.579949,-121.4167457,17z/data=!3m1!4b1!4m5!3m4!1s0x809ada5b2c7434a5:0x3f579f08dfa5bf06!8m2!3d38.579949!4d-121.414557

Could you just pluck the coordinates out of the url right after the @ sign? 38.579949,-121.4167457

I tried this but when I plugged those coordinates back into google maps:

https://www.google.com/maps/place/38%C2%B034'47.8%22N+121%C2%B025'00.3%22W/@38.579949,-121.4189397,17z/data=!3m1!4b1!4m5!3m4!1s0x0:0x0!8m2!3d38.579949!4d-121.4167457

it's a slightly different address.

1

1 Answers

0
votes

Those are not the coordinates of the address, they are the center of the map.

Version with the map shifted to the left:

https://www.google.com/maps/place/2202+Woodside+Ln,+Sacramento,+CA+95825/@38.5800077,-121.412261,17z/data=!4m5!3m4!1s0x809ada5b2c7434a5:0x3f579f08dfa5bf06!8m2!3d38.579949!4d-121.414557

The coordinates of the marker are at the end of the URL: !8m2!3d38.579949!4d-121.414557 => 38.579949,-121.414557

The Google Geocoding API returns:

"location" : {
   "lat" : 38.579949,
   "lng" : -121.414557
},
"location_type" : "ROOFTOP"

for this request: https://maps.googleapis.com/maps/api/geocode/json?address=2202+Woodside+Ln,+Sacramento,+CA+95825