mathkid91
mathkid91

Reputation: 679

Google Place Details API returning strange Lat value

I am using the Google Places Api Web Service documented here. I am returning the JSON version. The values I want are in the json object in geometry > location > lat/lng.

This is what the documentation shows:

"geometry" : {
     "location" : {
       "lat" : -33.8669710,
       "lng" : 151.1958750
     }

And this is what I get when I run the request:

"geometry": {
  "location": {
    "lat": {
      "s": 1,
      "e": 1,
      "c": [
        5,
        9,
        9,
        2,
        1,
        9,
        0,
        6,
        0,
        0,
        0,
        0,
        0,
        0,
        0,
        1
      ]
    },
    "lng": 10.759083
  }

What is this? Is it possible to convert it somehow? Or is this a Google-LatLng-object that Google maps will understand?

This is the request I send, without my API key: https://maps.googleapis.com/maps/api/place/details/json?placeid=ChIJhSA4MWZuQUYRcr6KDHnWwgU&key=MY_API_KEY

Upvotes: 1

Views: 104

Answers (1)

mathkid91
mathkid91

Reputation: 679

Not sure why, but it turns out Postman (Chrome extension) is returning this strange value. Everywhere else I try its working :)

Upvotes: 1

Related Questions