Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a place or place_id (for testing purposes) in Google Places API that has associated html_attributions?

We are using the Google Places Place Details API (more specifically, the Google Maps Javascript API). As part of the terms of use, we must display the value of html_attributions from the response if it exists.

However, in trying to test our implementation, I am having difficulty of finding a place for which the PlacesService.getDetails() response contains a non-empty value of html_attributions.

Is there a reference page for sample place_ids or places for which the Place Details API will return a non-empty html_attributions?

like image 232
mattliu Avatar asked Nov 04 '16 06:11

mattliu


People also ask

What is Google places API used for?

The Places API and the client libraries are for use in server applications. If you're building a client-side application, take a look at the Places SDK for Android, the Places SDK for iOS, and the Places Library, Maps JavaScript API. The Places API is a service that returns information about places using HTTP requests.

What is Place_id?

A place ID is a textual identifier that uniquely identifies places such as businesses, landmarks, parks, and intersections. The length of the identifier can vary (there is no maximum length for Place IDs). For more information, see Google Map Place ID.

What is Google map places API?

The Places API lets you search for place information using a variety of categories, including establishments, prominent points of interest, and geographic locations. You can search for places either by proximity or a text string.

How do I restrict Google places API?

You can restrict results from a Place Autocomplete request to be of a certain type by passing the types parameter. This parameter specifies a type or a type collection, as listed in Place Types. If nothing is specified, all types are returned.


1 Answers

As mentioned in the following docs, if you reproduce any content from the google it must contain three types of attributions.

  • Maps attribution
  • Powered by google attribution
  • And attribution for the third parties

Since you are getting the data from the google maps, they already show the map and the logo for it.

But you require the third party attributions if any for it. The html-attributions contain the third party listings as mention in the example

"html_attributions" : [
  "Listings by \u003ca href=\"http://www.example.com/\"\u003eExample Company\u003c/a\u003e"
]

Since almost all the places data do not require attribution since the data is retrieved by google itself therefore they don't contain any attributions.

A simple example to it would be the html_attributions required by the photos, since they are hosted by third party mostly hence their attribution is shown with all the locations.

Other details as to how to get the attributions are mentioned in the docs.

like image 111
Pritish Vaidya Avatar answered Sep 29 '22 23:09

Pritish Vaidya