google places api help c# - c#

I dont have much experience with google apis at all , however I need to implement it and would appreciate if you could help me
I have to implement google places api(?) to get results form google places and all details associated with that place
For example if you type pizza London in google places search you'll get 10 places per page. What I need is get "link to that site" and xml(preferable) type of result with details about that place, such as address, contact, link to website, and payment options.
I dont know if something like this is even possible but if it is I would appreciate if you post an example of how it works
Thanks in advance

Basically you will need to register and get a key to use google places. Once you have the key you can access it like this ...
https://maps.googleapis.com/maps/api/place/search/xml?location=31.1556451,-93.7761955&radius=7500&sensor=false&key=enter-google-key-here&types=bar
which lists all bars within 7.5km of the place with latitude: 31.1556451 and longitude: -93.7761955
--- Additions in response to comment below ---
If you only have a place (like London) and not a latitude and longitude to go with it, you can try a two step process -- use google geocoding api to get the lat lon and then use that to search for pizza using the google places api.

Related

Call Google Directions API form Xamarin.Forms app

I'm trying to set up a basic app to call the Google Directions API from a Xamarin.Forms app in Android. I'm new to Xamarin & C# generally, so have struggled searching for the right terms, but am familiar with the directions service from a javascript angle.
I'm using this basic app as a test bed: https://learn.microsoft.com/en-us/xamarin/android/platform/maps-and-location/maps/maps-api
I can add the button and associate a process with it, but how do i call the API & catch the results?
I'll worry about plotting etc later, i just want to write out the results to console for now.
Thanks for your help in advance!
1.First of all, you can used following URL to get Json data.(Please notice:You need to enable the Directions API in Google console,otherwise, you will get error message This API project is not authorized to use this API.)
https://maps.googleapis.com/maps/api/directions/json?origin=lat1,lon1&destination=lat2,lon2&key=yourApiKey
In this URL, you need to provide the latitude and longitude of Origin position and destination postion.API key(You can get the API key from a Google console)
2.You can play and just change variables in this link and open it in browser, to see the returning object like this screenshot.
3.When you receive the return object, you will need to parse it.(Prase json data:http://bsubramanyamraju.blogspot.com/2017/04/xamarinforms-consuming-rest-webserivce_17.html)
4.The distance will be at googleApiRouteObject.routes[0].legs[0].distance; There you will find a int representation in meeters, and string representation like 2km.
5.The waypoints will be coded in Polylines, you will need to parse them. You can find how to do that with code examples here: https://developers.google.com/maps/documentation/utilities/polylineutility
If you want to get the sample code, you can refer to this link.
https://agileapp.co/xamarin-forms-maps-polyline-route-highlighted-google-api

Finding likely locations in Xamarin using google maps API

I am working on a Xamarin iOS project trying to display a list of the most likely locations based on the user's GPS coordinates using either the Place Picker or GMSPlacePickerViewController from the google maps API, as shown in this Swift tutorial.
However I can't seem to find any decent tutorials using C#. I don't want to display the map to users I simply want to retrieve the list of most likely locations based on the coordinates.
Any guidance would be greatly appreciated as I'm at a bit of a loss about how to use the google maps API to achieve this.
Okay answering this for anyone coming after me and trying to do something similar.After lots of searching I have realised it is possible to use the nearbySearch method from the Google Places API Web Service to retrieve a list of addresses near particular coordinates within a specific radius (in metres). You can optionally specify the type of addresses you are searching for, e.g. Restaurants.
Not sure how I missed this but there is a Place Search demo at the bottom of this page;
https://developers.google.com/places/web-service/

How to Reverse-GeoCode an array of Lat/Longs

I am looking for the ability in C# .Net to find the address from an array of Latitudes and Longitudes. My array would have something like the following (39.96481959995778, -83.00803899765015),(39.96575701532093, -83.00681591033936). From the coordinates i would get back all the address within that area. i appreciate any help with this.
This is called as Reverse-GeoCoding. You need to use a third party webservice (free or paid) that returns the user addresses on the basis of Lat/Long. Google has one like this See this on how to use google for this purpose.GEO CODING but there are other such services as well. You find one that is right for you. If you are using it in a commercial environment i guess you will have to purchase a license for that.

Fetching Facebook data of the past year?

I would like to know if any preference status updates of Facebook users of a particular region can be fetched?
I am trying to study location based preferences on brand or likings of people of a particular geographical region. It can be either likes or status updates by searching key words. Is there any way to accomplish this other than hadoop?
I do not know where to start, so any answers, pointers or guidance will be much appreciated.
Have you tried looking at the Graph API? http://developers.facebook.com/docs/getting-started/graphapi/

scraping and parsing google data like page rank and more for a domain

I need to scrape/parse some search engines related data for a given domain name(site).
I need
Google Page Rank (only for the domain name, not each pages).
Number of indexed results/pages (google, bing).
Number of Backlinks (google, bing, yahoo).
Traffic Rank (alexa).
Site thumbnail.
Could you provide me some pointers on where can I start? I tried to look around, but I was able to find only Google Ajax API which provides me number of indexed results only. That too expects valid headers which would mean, I have to be on that site, in order to make that work. So, I can't get data for any given domain.
Thanks
Their search API's are intentionally very limited so you will probably need to scrape this data directly from each website.

Categories