I want to do a server-side check-in. I have the coordinates, which is lat-long; I know the name and street address of the business. Is there a way to get the placeId for the parameter Parameter.with("place", 1234)?
FacebookType publishCheckinResponse = facebookClient.publish("me/checkins",
FacebookType.class, Parameter.with("message", "I'm here!"),
Parameter.with("coordinates", coordinates), Parameter.with("place", 1234)));
If you know the lat-long co-ordinates, why not use Graph API to get the data -
Eg - https://graph.facebook.com/search?type=place¢er=37.76,-122.427&distance=1&access_token=...
This comes from the Graph API doc here - https://developers.facebook.com/docs/reference/api/
Related
I have tried to find a lot over the Internet but I am unable to get a perfect utility/API for my requirement.
I am interested in getting the latitude, longitude values of all areas in a city.
Currently i am using this google maps api
https://developers.google.com/maps/documentation/geocoding/start
But, when i enter a city name, it is giving only one lat-long pair for that city. Is there any way that if i give a city name, i can get all the areas and their corresponding latitude, longitude values?
Thanks.
There's a nice documentation for this at: Places API
I used this to get the latitude / longitude for one of my own projects and I also have an example of this.
If you look at the example, you can just type a location and it will immediately get the lat / long of the location and zoom in, you can also do this for more locations at the same time. Remember there is a limit for the maps api so it can only process so many data at the same time. Hope this may help you out! :)
Is there a way to get all neighborhoods per city by lat and lng from mapbox API V5.
For example, if I search using the lat and lng of Long Beach.
-118.1937, 33.7701
I expect to get back all the neighborhoods, instead, I only get back one result of
"place_name: "Downtown, Long Beach, California 90802, United States""
I have changed the response limit and bound box, with no results.
Here is the mapbox playground.
https://www.mapbox.com/api-playground/#/forward-geocoding
Thanks!
Mapbox doesn't really do neighborhoods, they require some sort of search data to pull either addresses or places.
However, there are services where you can get neighborhood data. I found this Stack Overflow question to have several links (sadly, most of them outdated....), with the reference to Zillow having a lot of promise.
I'd also suggest the Census Bureau data as it may have what you are looking for, but it is what I would call 'less than user friendly' to find anything - unless you are comfortable reading government spec sort of things... :)
I need to geocode address to find the Latitude and Longitude . But I just need the response in XML/JSON format , I don't want to show it on maps. Use of Google Geocoding is prohibited without maps. Please suggest a way to do this.
You can try OpenStreetMap's Nominatim service for example:
http://wiki.openstreetmap.org/wiki/Nominatim
Example output for the following search
http://nominatim.openstreetmap.org/search.php?q=brandenburger+tor%2C+berlin%2C+deutschland&format=json
is
[{"place_id":"67311118","licence":"Data \u00a9 OpenStreetMap
contributors, ODbL 1.0.
http://www.openstreetmap.org/copyright","osm_type":"way","osm_id":"104393803","boundingbox":["52.5159645080566","52.5165634155273","13.3776025772095","13.3781223297119"],"lat":"52.51626405","lon":"13.3777246125974","display_name":"Brandenburger
Tor, Pariser Platz, Berliner Urstromtal, Mitte, Berlin, 11011,
Deutschland, Europ\u00e4ische
Union","class":"tourism","type":"attraction","importance":1.1434728583616,"icon":"http://nominatim.openstreetmap.org/images/mapicons/poi_point_of_interest.p.20.png"}]
I've problem with the house Parameter of the cloudmade geocoding API.
i.e. I'am looking for house number 10 in the German City Gießen:
http://geocoding.cloudmade.com/8ee2a50541944fb9bcedded5165f09d9/geocoding/v2/find.html?query=zipcode:35390;city:giessen;house:10;street:bahnhofstrasse;country:Germany&return_geometry=true&results=1
cloudmade finds the correct street, but number 10 is not in the middle of the street. I've the same problem with all streets.
The API documentation sais I am right: http://developers.cloudmade.com/projects/show/geocoding-http-api#Structured-search
They seem to ignore the house key and just return the same result as if it hasn't been provided. But searching on http://maps.cloudmade.com/ returns the same vague result. While the data you are searching for is in OSM's data base it might not be in CloudMade's data base for whatever reason. Therefore I guess this is a problem with CloudMade's geocoding database and not a problem of their API.
Sometimes there are no house number data in our data set, so we return only street. Also in couple of months we'll launch new geocoding with more detailed data.
Is there a way of obtaining the type of road an object is settled in from a request via nominatim?
For example
http://nominatim.openstreetmap.org/reverse?format=xml&lat=52.5487429714954&lon=-1.81602098644987&zoom=18&addressdetails=1
does provide me with loads of info. yet, there is no info on the road the address is settled in. would like to obtain something like: rural road or even just grade*N* (where N stands for the level of hierarchy.) i hope what i'm looking for is understandable :) thanks in advance!
Nominatim is for searching addresses, you probably want to use the OverpassAPI to query roads around the given coordinates:
http://overpass.osm.rambler.ru/cgi/interpreter?data=[out:json];way[highway](52.52,-1.82,52.55,-1.81);out;
Then choose the one matching your coordinates the best and look at the highway= value.
You can use format=jsonv2 instead of format=xml or format=json.
format=jsonv2 adds the next fields to response: place_rank,category, type,importance, addresstype.
I added this information to Nominatim Reverse Geocoding documentation.
When category tag contains value highway the type tag shows the road type.
Find more information about highway types at OpenStreetMap highway tag