How to query nearby addresses during reverse geocoding request - geocoding

How do I find all the addresses in a small search radius for a specific geocode point? I want to display a user 5-10 address that he can pick from based on geolocation data I retrieve from his phone. I'm using Bing maps location API (http://msdn.microsoft.com/en-us/library/ff701710.aspx), but open to other APIs if this doesn't work. The documentation talks about BoundingBox as a supported location type but I'm unable to use when I tried.

The reverse geocoder will usually only return one location. Bounding boxes are not supported for reverse geocoding. To do what you are looking to do you will need to make multiple reverse geocoder requests over an area. I put together a code sample a few years back on how to do this using Silverlight. You should be able to see the logic in there and migrate it over to use the REST services and what ever programming language you are using.You can find the blog post here: http://rbrundritt.wordpress.com/2010/01/09/reverse-geocoding-over-a-search-area/

Related

Getting current location of user using Azure maps

I'm working on a Django project where I need the current location of the user when the user presses a certain button.
I need to do this with the help of Azure Maps. I have read their documentation. Still, I'm unable to find a way to get the user's location.
What I want is when the user presses the button the Azure maps API must return me the user's location.
1. Is it possible to get the user's location using Azure maps?
2. If yes, how can I get started ( any resource/documentation )?
Getting the users location while in a browser can be done using the geolocation API that is built into the browser, there is no need to use any other library, such as Azure Maps. If Azure Maps were to provide such a feature they would simply wrap this built in feature (this is what other mapping platforms do too). Here is some docs: https://www.w3schools.com/html/html5_geolocation.asp
Here is a code sample that uses the geolocation API with Azure Maps: https://azuremapscodesamples.azurewebsites.net/#device-sensors
This documentation is quite helpful. There are several requests you can make, one of them returns the address based on the latitude and longitude.
Here's an example:
GET https://atlas.microsoft.com/search/address/reverse/{format}?subscription-key={subscription-key}&api-version=1.0&query={query}
Just plug-in the values(format, subscription-key etc.).
format: Desired format of the response. Value can be either json or xml.
subscription-key: Azure Maps subscription key( you will get this through your Azure maps account ).
query: The applicable query specified as a comma separated string composed by latitude followed by longitude e.g. "47.641268,-122.125679".
You can use the above url( with the values plugged in ) to get the required response.

Google Maps Embed without cookies

I'm currently using a Google Maps embed on my website like this.
It shows me the correct position as well as raitings, opening hours and so on.
The only problem I have is that it places some cookies which I am not allowed to use (EU law, it would require some specific informations I do not want to display).
I already read some threads where people advised to use Google Maps API V3 but I can't figure out how to display the exact same informations like icon, raiting.
Is there any way to remove those cookies using the iframe method?

User geolocation - case study

We have a Django app which stores information about places around the world.
The case is, we want to use geolocation (any method) to locate visitors' location and then show places near them using Google maps.
I am looking for advice on best practices how to achieve this. I have in mind that not all browsers support geolocation and, even if it is supported, users may decline geolocation permission.
I was thinking about a scenerio such as this:
new user visits our website
we ask for geolocation permission (if browser supports it)
if user gives us permission - we query database for nearby places
if user declines geolocation - we use geo-IP data to get position
However, in addition to this, immediately after user visit website, I want to center map on his position, then via AJAX request load places near to them.
Do you have any suggestion, how to locate user even on older-browser? Maybe my conception is wrong?
No, your concept is not wrong. You are heading in the right direction, just needs some refinement:
New user visit our website
we use geo-IP data to get position
We show Google Map with user's position centered on the map (using IP)
we ask for geolocation permission (if browser supports it)
if the user accepts permission we center the map to the new
location
we query database for near places (using either browser geolocation), using either geo-IP in case of (decline permission or lack of browser support) or location from geolocation.
You can also add (5.5 step) using Peter Tinkler's suggestion to ask for location in case the browser doesn't support geolocation. (Though not everyone knows their postal code, so you need to ask for free text like nearest intersection, especially useful if you are on the go). This is also useful in case you want to search for things not exactly where you are now

Obtaining the location of places on facebook and integrating it into window phone app

I am trying to obtain information of a users current location I already have the users latitude and longitude what I want to know is are there any businesses (restaurants, clothing stores ect.) in that area. I was just looking at the open graph api and It says that you can search over all public objects in the social graph with https://graph.facebook.com/search. We support searchs for the following types of objects: places https://graph.facebook.com/search?q=coffee&type=place but the ones I really want to use type=location&center=37.76,-122.427&distance=1000 does not work in the API Explorer could anyone tell me what might be the problem and how do I use this in a windows phone 7 app? Links, code snippets, blog post, ebooks, Other web services that would allow me I could send lat and long and will return the location or businesses anything will be very helpfull thanks
https://graph.facebook.com/search?q=coffee&type=place&center=37.76,-122.427&distance=1000
This query should give you the results you need.

Is there a Web Service API to the Google Product Search?

I want to call the Google product search and get back a parse-able XML file rather than having to scrape the HTML. I'm not looking for a SOAP based service, but a service that returns XML based on a URL passed in.
Correction--this did NOT work:
The Google Base API lists only a subset of Google product sellers (apparently only those who are active users of the Google Base product.)
http://code.google.com/apis/base/docs/2.0/attrs-queries.html
I eventually ended up using a screen scraping solution and then found that the data was too inconsistant to use for my purposes at all. :-(
http://answers.oreilly.com/topic/2165-how-to-search-google-and-bing-in-c/
use that refer link ,hopefuly it'll very usefull with you all guys