From this url:
http://ws.geonames.org/findNearbyPostalCodes?lat=19.0176560&lng=72.8561780
I want is city name that is mumbai can somebody help me?
Once you have parsed out the latitude and longitude, you can use the MKReverseGeocoder to translate that location to meta data about that location. In that meta data, you will find the city name that you are after.
Update
Have a look at the Apple CurrentAddress sample app, this has an example of how you use the MKReverseGeocoder.
Related
I'm tying to get a user's location( just the user's city location) I am await of the plugin geolocation in flutter and I want to know if there's a way I can get just the user's city location.
You need to geocode the coordinates given by your plugin
To do that, there is another plugin like geolocator which provides both features :
Get the current location of the device
Translate an address to geocoordinates and vice verse
The geocoding part can be find here
I am using the uber sdk for iOS. And i see I have to specify the
button.setProductID("abc123-productID")
button.setPickupLocation(latitude: "37.770", longitude: "-122.466", nickname: "California Academy of Sciences")
button.setDropoffLocation(latitude: "37.791", longitude: "-122.405", nickname: "Pier 39")
How can I get the coordinate information based on the location's nickname.
The iOS Uber SDK doesn't provide this functionality. However, Apple's CoreLocation framework has the CLGeocoder class that provides both forward-geocoding and reverse-geocoding. To convert an address into coordinates to pass to the request button, you can use the function geocodeAddressString:completionHandler:.
I am developing an app that will use facebook ad-api to autocomplete city name, however, the city id I get from facebook ad-api is not the same as what I get for the same city from graph-api. For example, pittsburgh, in graph-api, is 11493251851302, which I get from user's current living information. However, when I pull a list of city by ad-api, pittsburgh's key is 2512017. Is there anyway that I can convert between those two different id system? Thank you!
1)I want to fetch the venues for the nearby location by passing the latitude and longitude of to the API in foursquare.
I got this url:-thisand i got peroper response.
But for this latitude and longitude:- 32.3456,141.4346
(url)
I did not get any data.
Same for Facebook.I use this :- facebook API
But i want the list of generalized category listing from this API.And this API only gives me data of hotels only.Because i pass q=hotel.
2)How to get oauth_token for foursquare?
Please help me.
The reason you did not get any data for that location is because there are no venues in that area. If you follow this link you will see that location is in a remote area of Australia.
For help with connecting users to Foursquare, you can use these instructions
Need to post status update and attach user location by passing latitude and longitude. In FB docs they say, we need to pass "place" FB entity that is:
"an object containing id and name of Page associated with this location, and a location field containing geographic information such as latitude, longitude, country, and other fields (fields will vary based on geography and availability of information)"
How to create/get such place name from latitude and longitude? I'v read related post1 and post2 but was not able to find a working solution.
How to create/get such place name from latitude and longitude?
There is currently no API available for developers to create Facebook pages or places. However, you can get place name by doing a FQL query like this...
'SELECT page_id,name,latitude,longitude FROM place WHERE distance(latitude, longitude, "LAT_HERE", "LON_HERE") < 250`
250 refers to the radius(m) that it will search within, it can go up to 50000.
Doing this FQL query will return you the Facebook Place Page's id, place name, latitude and longitude.
(Actually there is no need to get the place name as the page_id is what you really need. With page_id, you will be able to get all the information of that Facebook Place Page.)
Need to post status update and attach user location by passing
latitude and longitude.
Assuming you are actually trying to publish a checkin, you can refer to the references below to proceed further with the data you have obtained from the FQL query...
A normal status update(feed dialog) is different from a status update with location tagged to it(checkins), they are using different APIs.
References:
How to get place_id before checkin?
Facebook - Publish Checkins using PHP SDK/JavaScript SDK
Facebook Documentations
Page FQL - http://developers.facebook.com/docs/reference/fql/page/
Checkins API - http://developers.facebook.com/docs/reference/api/user/#checkins
If you have the lat/long data, you can search for the place and get the place-id which can be included in the POST message.
Please check these related posts -
https://developers.facebook.com/docs/opengraph/actions/#taggingplaces
https://developers.facebook.com/blog/post/2012/03/07/building-better-stories-with-location-and-friends/