How to implement feature like Gmail mail Map this feature - c#

Does anybody know google provide the gmail mail Map this feature API. I researched a lot but didn't find desired result. I want the google API on which i give the string message like
BREA PROBLEM F:830 N MAIN ST 46, MT ANGEL:R454,
MED23:MAP-2530C:57YOF/ C/DIFFB BEE STING:BAVARIAN VILLAGE 503 845-2586::
and goole return me the result same as it user for Map this
830 N MAIN ST
MT ANGEL, OR
(http://maps.google.com/maps?q=830+N+MAIN+ST+MT+ANGEL,+OR&oi=gmail)
here is the image to understand my question

You should be able to use the Geocoding API to do this lookup. For example, performing the following query returns a json object with a "formatted_address" field containing the re-written address you're looking for. Of course you need to replace API_KEY with an API key from your Developer Console project.
https://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&key=API_KEY

Related

WinForms Map location coordinates

when the form loads user needs to enter street and city. After that I need to show him that location on the map and also to save longitude and latitude of that address.
I've done only this, which finds the location of the street and I can display it on the form(but it's ugly,if you have better solution please share). But I don't know how to get coordinates of that location.
StringBuilder queryAddress = new StringBuilder();
queryAddress.Append("http://maps.google.com/maps?q=");
queryAddress.Append(street + "," + "+");
queryAddress.Append(city);
webBrowser1.Navigate(queryAddress.ToString());
What you're looking for is known as Geocoding, getting coordinates based on address.
Google has a Geocoding API, which has a really nice documentation here.
I recommend you to read it thoroughly, and I will summarize the crux of the approach:
You can use Google's Geocoding API over HTTP(S) like this:
http://maps.googleapis.com/maps/api/geocode/outputFormat?parameters
where output is json/xml and paramaters can vary, but the simples form is address like in your example above and a mandatory Google's API key.
Example:
https://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&key=YOUR_API_KEY

azure maps differentiate address from point of interest

I would like to be able to differentiate an address given by a user, by a point of interest.
For example, if I make an address reasearch with "Assemblée nationale" (which is a part of the parliament), I get a street called "assemblée nationale" in Versailles, instead of the parliament in Paris.
Of course, it works with the Point Of Interest research.
Is it possible with Azure Maps, to 'detect' that what the user inputs is an address or a point of interest ?
You can use Azure Maps fuzzy search API. You can check the "type" field for results in API response to see whether a search result is a POI or a street.
Here are the supported result type:
POI,
Street,
Geography,
Point Address,
Address Range,
Cross Street

How can I scrape instagram followers?

there are a lot of websites where you can get a list of all followers from an Instagram profile. For example the profile of Jennifer Lopez. If I click on followers and scroll the hole list down, I only see round about 1000 users. Is there any way to get a list of all followers, or something in the range between 10 thousand and 100 thousand users? How do the others do it?
Here are a few pages where it seems to work:
crowdbabble
Instagram Scraper
magimetrics
I would be very grateful if you could help me!
I believe most of the pages you are seeing is using the Instagram API (or the method described below). However, that is a bit hard to get access to without an application that they are happy with. As far as I have understood it, you will have to make the application before you know if you will have access, which is a bit stupid. I guess they are trying to stop new users from using it while they keep letting the people already using it keep using it.
The documentation for their API seems to be missing a lot of what was available earlier, and right now there is no endpoint to get followers(that might be something temporarily wrong with the documentation page: https://www.instagram.com/developer/endpoints/).
You could get the followers the same way the Instagram webpage is doing it. However, it seems only to work if you request up to around 5000-6000 followers at a time, and you might get rate limited.
They are making a GET request to: https://www.instagram.com/graphql/query/ with the query parameters query_hash and variables.
The query_hash I guess is a hash of the variables. However, I might be wrong since it will keep working even tho you change the variables. The same hash might not work forever, so its possible you would have to get the same way the Instagram page is doing it. You will get that even tho you are not logged in, so I would not think it would be very hard.
The variables parameter is an URL encoded JSON object containing your search variables.
The JSON should look like this:
{
"id":"305701719",
"first":20
}
The id is the user's id. The first is the number of followers you want.
The URL would look like this when you encode it. https://www.instagram.com/graphql/query/?query_hash=bfe6fc64e0775b47b311fc0398df88a9&variables=%7B%22id%22%3A%22305701719%22%2C%22first%22%3A20%7D
This will return a json object like this:
"data": {
"user": {
"edge_followed_by": {
"count": 73785285,
"page_info": {
"has_next_page": true,
"end_cursor": "AQDJzGlG3jGfM6KGYF7oOhlMqDm9_-db8DW_8gKYTeKO5eIca7cRqL1ODK1SsMA33BYBbAZz3BdC3ImMT79a1YytB1j9z7f-ZaTIkQKEoBGepA"
},
"edges": [
{
"node": {}
}
]
}
}
}
The edges array will contain a list of node elements containg user info about people that are following the person you where searching for.
To get the next x number of followers, you would have to change the json used in the variables query to something like this:
{
"id":"305701719",
"first":10,
"after":"AQDJzGlG3jGfM6KGYF7oOhlMqDm9_-db8DW_8gKYTeKO5eIca7cRqL1ODK1SsMA33BYBbAZz3BdC3ImMT79a1YytB1j9z7f-ZaTIkQKEoBGepA"
}
after would be what you received as an end_cursor in the previous request.
and your new URL would look like this: https://www.instagram.com/graphql/query/?query_hash=bfe6fc64e0775b47b311fc0398df88a9&variables=%7B%22id%22%3A%22305701719%22%2C%22first%22%3A10%2C%22after%22%3A%22AQDJzGlG3jGfM6KGYF7oOhlMqDm9_-db8DW_8gKYTeKO5eIca7cRqL1ODK1SsMA33BYBbAZz3BdC3ImMT79a1YytB1j9z7f-ZaTIkQKEoBGepA%22%7D
This way you can keep looping until has_next_page is false in the response.
EDIT 23/08/2018
Instagram seems to have blocked any scrolling/query hash request to get followers list/likers list on a post, at least on desktop, even for your own account.
https://developers.facebook.com/blog/post/2018/01/30/instagram-graph-api-updates/
It should be although still possible from a phone, maybe following a Selenium-like for mobile, using Appmium : http://appium.io/
Maybe some reverse app engineering may also be the key, if any idea from that side :
https://www.blackhatworld.com/seo/journey-instagram-app-reverse-engineer.971468/
EDIT 25/08/2018
It seems to be back... if any information about it ?

Search by country and keyword/term?

I have recently started using google places api and am a big noob on it, I have looked around the main docs on how to run a query on the API but seems that It does not support what I want or im looking at the wrong place.
I need to search on a specific place for a specific term for example:
Restaurants and USA
Is this possible or how would I have to go in order to produce it using the API ?
When you do a Places Search: https://developers.google.com/maps/documentation/places/#PlaceSearches
You can specify a types parameter which limits the types of things you are searching for.
Or you can specify a keyword parameter which selects for a certain term across the whole Place record.
For location, your only option is to select a latitude/longitude pair and specify a radius. This won't work for "USA" as the maximum radius is 50000 meters. You could add that as a keyword however. For locations such as cities, you could geocode first to get the lat/long pair:
https://developers.google.com/maps/documentation/geocoding/

how to show locations in a Google map

I have a database and every person has a location.
In this point, l need some sugesstions to show all the person's location in a single map.
To give an example,
X man = at y, X1 man = at z,X2 man = at q
y,z,q will be shown in a singe map?
start by reading this article:
Show Your Data on Google Map using C# and JavaScript
if you have more specific questions ask more details
i think it will helps you
The Google Maps API is accessed via JavaScript (any server controls are just abstracting this away from you). In the case you described, you would need to dynamically output the required JavaScript to tell the maps API what to display.
See http://dotnet.sys-con.com/node/171162

Categories