Google Maps query businesses Near Me Search - wordpress

Objective
Client wants a map on the search results page that shows a Google Map with all business listings, matching the users search parameters, that are near that user.
Background
I have a client who is building a business directory website.
This client is currently using a WordPress plugin called GeoDirectory and would like to have a map on the search results page that shows a Google Map with all business listings, matching the users search parameters, that are near that user.
These would not be the businesses on the website they would be the businesses that you would get if you did a search on Google say "restaurants near me" and it would show those businesses.
The client wants it to look exactly like the google map that results from that search so it would take the query created by the GeoDirectory plugin and show a list of businesses from the clients site that match a specific category and also a google map of other businesses in the area that are listed on Google.
Question
Is this possible?
I don't really have a link to show an example but if you type in "restaurants near me" in the google search bar and click on the map that pops up in the search results you will see what I mean.

Is it possible?
I don't know WordPress, but coming from a Google Maps background, I can definitely tell you that yes, it is possible.
What can I use?
Depending where you make your request from, you can either use the Places API Web Service (server side) or the JavaScript API with the Places Library (for client side).
For more information about the Places API and related products you can visit https://developers.google.com/places/documentation/
How can the Places API help me?
The Places API Web Service and its library for the JavaScript API have a functionality that you can use called PlacesSearch, which is exactly what you need.
Examples and Docs
To use this functionality, lets say, using the Web API, you need to make a GET request like the following:
https://maps.googleapis.com/maps/api/place/nearbysearch/output?parameters
Using the JavaScript API, you would send a request like this:
https://developers.google.com/maps/documentation/javascript/places#place_search_requests
With this information, you can include a map, and quickly get the information you need by having the user type in a text box.
The example below demonstrates how this concept works
https://developers.google.com/maps/documentation/javascript/examples/place-search

Related

Is it possible to find out what people from specific state searched for in my website through Google Analytics?

I know that by going to Audience>Geo>Location I can see which state uses my website the most
Is there a way to tell what search term/keywords the people in those state uses the most when they visit my website?
When I put in "keyword" and "search query" as secondary dimension in analytics, the result is (not set) or (not provided).
Is it something with my settings or is it google not letting us view user search by state?
Is there another analytics tool that would give me that info?
Back in 2010, Google announced that it would no longer provide the keyword data as a result personalising our search experiences based on our behaviour, and this change has been implemented in the interest of protecting the privacy of the searcher.
I believe Google did it also to push on Google Ads, in that case it is possible to know the keywords entered by users who click on the ads link.

Panoramio - Will I be able to use 'get_panoramas.php' after November 4th 2016?

I saw the deprecation message and the blog post by Google and I'm completely stumped on what will continue to work and what not.
I don't upload images to my account. I understand that this service will no longer be available.
What I do use, is this api: http://www.panoramio.com/map/get_panoramas.php, for showing images near locations on my website.
Will I be able to keep using it?
If so, until when? And shouldn't that be clearly stated?
If not, is there a parallel Google Maps api to get such images? I'm aware of Google Locations api, but I'm more interested in nearby outdoors images, and not places of business and named land marks.
Thank you.
UPDATE: as stated in the comment, the service is indeed down. The image urls we already have are still operational for another year, but we can't search for other existing images anymore. So we made the transition to Flickr. It was very easy and it works great.
It is stated in the link that you provide that after November 4, 2016, you’ll continue to have access to your photos in Panoramio for a year, but take note that you will no longer be able to add new photos, likes, or comments.
I suggest you to check this Google Static Maps API, it lets you embed a Google Maps image on your web page without requiring JavaScript or any dynamic page loading. The Google Static Maps API service creates your map based on URL parameters sent through a standard HTTP request and returns the map as an image you can display on your web page.

Adding Google's standard search (not custom) to my website

My intention is to embed Google results in my website. I don't want to customise the domain/s on which the search is performed or anything, just a 'bog standard' Google search based on search parameters I pass it.
2 questions:
How do I display google results on my website as a response to search criteria entered into a textbox I have?
Is there any legislation I need to take into account?
I know my second question sounds rather strange but I'm aware that what I'm appearing to do here is present content driven by Google as though it's my own so want to avoid breaching any copyright or 'same-origin policy' type thing.
What I've Tried/Ways I Know I Could Achieve This
Screen scraping Google's response to a simple web request with the necessary query parameters (but seems a bit excessive)
Google's custom search (but I don't want to customise anything)
I've tagged this question for some more context.
As it is mentioned here
you can use your own XML parser to customize the display for your
search users.
with an http request like this:
GET /search?q=bill+material&output=xml&client=test&site=operations
But it has a limitation on number of requests per day, 500 or 1000 I guess.
Custom Search can be configured to include the entire Web in its results:
From the Google Custom Search homepage, click New search engine.
In the Sites to Search box, enter at least one valid URL (e.g. www.google.com).
Click Create.
On the next page, under Optional next steps, click Edit.
On the Basics tab, under Search Preferences, select Search the entire web but emphasize included sites.
Click Save Changes.
In the left-hand menu, under Control Panel, click Sites.
Delete the site you entered during the initial setup process.

Spotify integration with Facebook OpenGraph

I'm trying to reproduce some cool things of the Spotify opengraph integration but there is one thing I understand how they do :
when you go on your spotify app profile (mine : https://www.facebook.com/antonio.mendespinto/music) you can see that the musician links points to the facebook page and not the spotify web pages (http://open.spotify.com/artist/7CajNmpbOovFoOoasH2HaY). How do they do that.
Also, is it this that lets Facebook to do behind the scenes the nice box in the artists page https://www.facebook.com/ogp/464730384564/ on the top showing friends interactions with the artist and spotify friend interactions.
Everything seems to point to the facebook pages instead of the spotify pages. How do they do that?
Yes, Spotify uses Facebook Open Graph Music, a predefined set of objects and properties for music.
https://developers.facebook.com/docs/opengraph/music/
Then I guess the Spotify account is marked in a way that makes this available. It is possible that this is what makes Facebook show the nice box in the artist page.
I work at Spotify, but I am not really sure about all the details of this. I know other music streaming services also use this, but I am not sure if it still requires a special account. It did in the beginning. Spotify was one of the first users of Open Graph.
The destination of the links inside Open Graph artifacts are left to the discretion of the developer. Say you're writing an app that lets people share restaurant tips. When you post a "Tip" object to OG, you naturally would include a link to the restaurant. As the app developer, you could choose the restaurant's web page, its Yelp page, its OpenTable page, your own representation of the restaurant page on your web site or any other web page on the internets. :-)
Being faced with a similar situation, I chose to use my own application's web page representing a restaurant. I experimented with using the restaurant's Facebook page (which I had to look up using the Graph API for search) as well as a third-party provider of restaurant information, e.g. Yelp. Using the Facebook page, my app felt more tightly integrated with Facebook, but I didn't get the luxury of having my own Facebook app metadata. Because I chose to link to my own restaurant page, I was able to set and retrieve whatever metadata I wanted, which really came in handy later when I started configuring aggregations.
I don't know how Spotify data surfaces on artist pages nor do I know how they managed to shoehorn song AND album objects into each listen post on OpenGraph, e.g.: "Chris listened to Torn and Frayed on Exile on Main Street." I could only ever get ONE object linked to an action, e.g. "Chris left a tip on California Pizza Kitchen." My assumption is that since they were one of the (if not the only) Facebook Open Graph launch partner, they probably had some inside help.

Redirecting search results into an ASP.NET page

I've an ASP.NET page with a textbox and a option from user of the following choices: Wikipedia, Google, Dictionary.com, Flickr, Google images.
The user enters a word(s) in the textbox and selects a choice among the following.
Depending on the choice select by the user I wish to return the following.
Wikipedia: Return the content and link to the page corresponding to the topic about the word.
Google: Return the top 10 results of google search for this word.
Flickr: Return a few images atmost 10 images from flickr search
GoogleImage: Return a few images from google image search.
Dictionary: Return the meaning of the word.
How can I do that?
Since you are wanting to do some processing on the results prior to displaying them, your best bet is probably to invoke a web request on the server to fetch your results as RSS or some other parsable XML format.
So first up, we have Wikipedia, which has API support for open search, and queries with XML or JSON output. You can get the details of the API by going to: http://en.wikipedia.org/w/api.php
I would think either the query action, or opensearch action would be what you want.
Right, now there is Google, which supports search results as RSS through their Active Search feature. The link takes you to the main page where you can build the query, at which point it should be easy to drop in your search terms. There is also the Google Search AJAX API, which you can find out about here (See the "Flash and other Non-Javascript Environments" section for building the URLs directly. I believe this option should give you access to Google Image results as well.
For Flickr, have a look at this App Garden page. There are several output formats available to choose from.
I wasn't able to find anything real solid on getting results from Dictionary.com, but it does appear that they have an API. You might be able to dig through google and find some references on how to get search results as XML or JSON. There are also several other Dictionary sites which may have more information about their APIs. While searching I managed to find this SO question about word lookup from google dictionary.
Hope this helps.
Have an iframe within your page, and then set the src of the frame to the appropriate query string that you craft from the user's input.
This can be done from javascript within the page, in response to the user selecting something in the 'choice' dropdown. You can have the appropriate urls already embedded in the javascript (as variables), and just substitute in the user's input.

Resources