I would simply like to know how to display a star rating taken from individual pages to be displayed in google results ala rotten tomatoes or metacritic or imdb. If you search for 'Drive Rotten Tomatoes' in google it returns a link that also contains a rating % as well as Directed by and staring Actors links.
Where do i insert this information to have similar results. Does it go in the metadata for each page? How does it work?
See Google rich snippets and schema.org - Ratings
Related
I´m going to build an interactive frontend webpage with a simple map-function. I will include 10 cities from a sustainable cities-list, to choose from in the search field. Now my question is, after you have chosen one of these cities from this search field - if it´s possible to build a list to choose from, with specific words to look for in the chosen city, for example instead of choosing "restaurants" or "accommodations", have words like "organic" or "eco". My hope is that this word search will find all the places in the city with the e.g word "organic" in it, like "The organic market" or "Organic food-store" and so on. Is there a function where I can narrow down the search for these specific words in a list of like 15 by me pre-chosen words, and that this will not include all the possible imaginable words in the world, in this search field? - but instead exclude all the other words than my pre-chosen ones like "organic" or "eco" etc?
-Also, is the Google maps API best for this, or Google-places API?
Using Places API's Text Search, you can search for keywords/text string and the API will return a list of places matching the text string and any location bias that you will set.
For client-side implementation, please refer to this guide: https://developers.google.com/maps/documentation/javascript/places#TextSearchRequests
Hope this helps!
I am trying to use the Google places API to get information on certain places. I have an
example from Google search:
here of what I am trying to find. I thought that the "types" field of the Places API text search would contain it, but this text appears to be different and not within the provided list of options. If anyone can provide some info on where this comes from and how to obtain it, it would be much appreciated. Thanks
Currently you cannot obtain this data via Places API. There is a feature request in Google issue tracker to make the detailed business type available in Places API, however Google doesn't expose any ETA:
https://issuetracker.google.com/issues/35822953
Feel free to star this feature request to express your interest and subscribe to notification from Google.
According to Google Places SDK to Android:
Since September 24, 2015 we have:
This release adds three new methods to AutocompletePrediction, giving you easy access to the primary and secondary parts of the place description as well as the full text of the description. This is useful, for example, when you want to display a short title followed by further detail about the place. See the sample code on GitHub. The new methods are as follows:
getFullText(CharacterStyle matchStyle) returns the full text of a place description. This is a combination of the primary and secondary text. Example: "Eiffel Tower, Avenue Anatole France, Paris, France".
This method is equivalent to the existing getDescription() method. In addition, it lets you highlight the sections of the description that match the search with a style of your choice, using CharacterStyle. The CharacterStyle parameter is optional. Set it to null if you don't need any highlighting.
getPrimaryText(CharacterStyle matchStyle) returns the main text describing a place. This is usually the name of the place. Examples: "Eiffel Tower", and "123 Pitt Street".
getSecondaryText(CharacterStyle matchStyle) returns the subsidiary text of a place description. This is useful, for example, as a second line when showing autocomplete predictions. Examples: "Avenue Anatole France, Paris, France", and "Sydney, New South Wales".
Accompanying the above improvement, the following methods on AutocompletePrediction, are now deprecated:
getDescription() is now deprecated.
Please use getFullText(), getPrimaryText(), and/or getSecondaryText() to retrieve the full or partial description, getMatchedSubstrings() is now deprecated. Please use getFullText() to format matches more easily.
Is it possible to get the Elements from a Google Map by a current viewport?
Example, given following view:
Now Google Maps API should return: "Nicaragua, Costa Rica, Colombia, Venezuela, Ecuador, etc.". Basically all countries and, in this example, states of Brazil like "Amazonas, Acre, Mato Grosso, etc.". Capitals like "Caracas, Bogota, Quito, etc." are shown in the current view as well so they should be returned, too.
Is this possible somehow?
You may want to use VisibleRegion, which makes it possible to get the coordinates of your screen.The problem lies with the coverage of your search. It is too large and there is no direct solution that is available in the documentations. The search that would yield the largest result is the Radar Search in Google Places API, which would yield 200 search results in a maximum 50000 meters(radius).
I'm trying to debug something very weird.
I want to get reviews using Google Places API from this url:
Henderson Nisan
What I did?
First I search for Google Place ID via this URL
And the result for the Place ID was: ChIJoV7T0hjRyIAR24qv5IfRcWM
Than I fetch all information about Place with the next link:
https://maps.googleapis.com/maps/api/place/details/json?placeid=ChIJN1t_tDeuEmsRUsoyG83frY4&key=MY_API_KEY
I'm getting those reviews: http://prntscr.com/8q7bsd
Problem is that those reviews which you can see on above printscreen are not corresponding to the reviews that are on the page of Henderson Nisan
Any kind of help will be acceptable. What I miss? Did I use wrong Place ID?
Thanks
I've done what you've done:
searched for Henderson Nissan in https://developers.google.com/places/place-id , the returned place-id was ChIJlfPkKh_RyIARWKYl-XpSyAQ (not ChIJoV7T0hjRyIAR24qv5IfRcWM )
used this place-id to fetch results: https://maps.googleapis.com/maps/api/place/details/json?placeid=ChIJlfPkKh_RyIARWKYl-XpSyAQ&key=mykey
the reviews there are related to the particular google+ page
it's not clear how you got the place-ID ChIJoV7T0hjRyIAR24qv5IfRcWM, but it's clear that the detailsRequest to https://maps.googleapis.com/maps/api/place/details/json?placeid=ChIJN1t_tDeuEmsRUsoyG83frY4&key=MY_API_KEY uses a completely different place-ID: ChIJN1t_tDeuEmsRUsoyG83frY4 (for Google-Sydney )
I have a website which shows scheduled upcoming bike rides using Google Calendar. The location field automatically links to Google maps, but some of the information can make the Google maps search fail, and there's no way to turn off the map link.
Example: The upcoming ride has in the location field "Seven Hills Station, North side of the train tracks, 9am sharp". When you click on the map link, it just brings up a map of the US. If you search for "Seven Hills Station", it comes up with the train station in Seven Hills NSW, which is what we want. So if there was an operator that made the Google maps search ignore everything after "Hills" (like the question mark in URLs), I could keep displaying the calendar events in the same format and have working maps linked from it. Does anyone know of an operator that can make Google maps ignore part of a search?
Cheers,
Aston
I think you can use regex to delete everything after the ,
using the replace function, this is how you replace something in JS: str.replace(/,.*/g, "");
http://jsfiddle.net/gvzpe9h9/