PlacesService / useMapsLibrary getDetails Inconsistencies & updated documentation #212
-
Two points in one post since they are likely connected behind the scenes: useMapsLibrary documentation/exampleFor the Using Other Libraries of the Maps JavaScript API section, the
placesService getDetails InconsistenciesSince I'm unsure if we're implementing the custom code above correctly, I can imagine this may be part of the problem as well. This is a bare bones example implementing getDetails from PlacesService where the PlaceResult returned from Google's API is inconsistent. Saving the file and having it updated in dev will return all results, but eventually it seems to eliminate these fields from PlaceResult:
What I've tried for debugging: sessionToken, hardcoding a placeId like Big Ben that has thousands of ratings to show inconsistency so we don't incorrectly surmise that it's a bad placeId (Big Ben sometimes has these fields, sometimes does not, but have tried with dozens of other popular places)
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Updated Information (NOT A SOLUTION)I believe that there is something legitimately inconsistent with Google's API. I have set up the Place Details API as well through both a router and also using the CURL query and the results are the same. The screenshot shows how you can get differing results just minutes apart for the same request. This is just analysis and I would rather be shown how I am wrong because I'd rather this work.
|
Beta Was this translation helpful? Give feedback.
-
You are correct about the first part, I completely forgot about the attribution container being required when writing the docs. As for the inconsistent places results, that is an interesting observation, but ultimately nothing we have any influence over. |
Beta Was this translation helpful? Give feedback.
meanwhile, I updated the documentation to include the required parameter.
If I read the documentation about attributions correctly, it is officially required that you render the attribution container somewhere if you are using the PlacesService without a map.