For Uber Development API, Is it possible to pass source and destination address as parameters to get cost estimation response - uber-api

For Uber ride requests, it requires start location(start Geo Location), end location(end Geo Location) and fair Id.
As from user perspective, i can pass source and destination address.
Is it possible to pass start and end location as address which is given by the user or needs to manually convert the address as geo location using any google api's.
the third parameter fair Id, where should i find the fair id?
I have read the developer.uber.com document, for start location and end location, geo locations are mandatory and start and end address are optional.
Kindly assist to solve the issue.

For version v1.2, you must pass the latitude and longitude of the place. The best solution is to use another api to get the latitude/longitude of a place then send the lat/longitude to thje uber api. There are a few free lat/longitude apis out there, such as google location api.
Answering this for others who may look for this in the future, since I had same question a few weeks ago.

Related

Can I use the place ID to get just the geolocation? - minimise cost in google maps platform

I want to use markers in a map for a start point and endpoint. By searching I found that the way to do that is to use autocomplete, get some suggestions, and based on the place ID of the selected suggestion to return the longitude and latitude of the place by calling the places details API by ID. So I would like to know if there is any better way to avoid using the places details API which is one of the most expensive Places details table cost. Is there any way to get the just geolocation of a place based on the place ID?
You can use the Geocoding API (or the Geocoding Service in the Maps JavaScript API) to fetch a place from its Place ID, simply use the place_id parameter in the web service, or include (only) the placeId field in the JavaScript request. While the Geocoding API returns only a subset of the fields provided by Place Details, it should lower the cost by about 70%.
However, when using this approach there will be an additional cost for Place Autocomplete billed by request, because the Geocoding API does not support the session token that enables billing per session.

Do I need to ask for user permission when Using CoreLocation?

My app never tracks a users location. So do I need to ask for permission from the user when using CoreLocation? The app only downloads data from the server to be displayed on the map.
Core Location provides services that determine a device’s geographic location, altitude, and orientation, or its position relative to a nearby iBeacon device.
You use instances of the CLLocationManager class to configure, start, and stop the Core Location services.
Reference : Core Location | Apple Documentation
If there is no necessity of tracking user's location on app, there is no need to ask for user permission.
It’s not a question of your intent (i.e. “tracking” them or just offering some useful feature). It’s merely a question whether the app uses the user’s current location for any reason, whatsoever.
For example, you might not be tracking them (not storing it anywhere), but rather just using location services to simplify the search for nearby points of interest, or include the user’s location on the map (e.g. mapView.showsUserLocation) to make it easier for them to get their bearings, or calculate directions/distance, etc. If your app uses the user’s current location for any purpose, then you will would need to request authorization (at that point).
But, if your app doesn’t offer any of those capabilities, then you don’t need to request authorization.
For what it’s worth, you don’t have to request location authorization up-front. If location services are not a central feature of the app, but some tangentially related feature, you might defer this authorization request to a point in the app where the location might make life simpler for the user. E.g. you might just show the point of interest on the map, but offer a button so the user can get directions or travel time, right in the app, and if they tap on this button, that’s when you might request location services authorization. But if the user doesn’t need directions, the user might not tap on that button, and the app wouldn’t need to ask for authorization at all.
Bottom line, it’s just a question of whether you use location services for any reason, and if so, when you might ask for authorization.

Uber API retrieve driver history

on Uber developer documentation i have seen that is possible to retrieve the histroy trip about user.
Is possible to retrieve the list of driver trip with start city and end city into response?
The /trips endpoint with the Driver API is essentially /history for drivers. You are correct that this does not include end city, just the start city: https://developer.uber.com/docs/drivers/references/api/v1/partners-trips-get
So if you need the destination location for Driver history, that is currently not possible with Driver API. Thanks for the request, but no changes imminent there.

MKReverseGeocoderDelegate without google maps

In my iPhone application I find the latitude and longitude using the location API available. I want to reverse geocode that and get the country code. But without using 3rd party or external API call I would like to get it. When researching I found that MKReverseGeocoderDelegate will be useful for this. But I dont have any requirement to use google maps. I want to know whether my approach is ok to get the current country where user resides.
Thank you
From the MKReverseGeocoder class reference:
The Google terms of service require
that the reverse geocoding service be
used in conjunction with a Google map;
take this into account when designing
your application's user interface.
So, that means you can't use it without using Google Maps (MKMapView).
I recommend looking at an existing SO question that covers what you want to do - How to get user's country information

Get street address at lat/long pair

I've seen that it's possible to get the latitude and longitude (geocoding, like in Google Maps API) from a street address, but is it possible to do the reverse and get the street address when you know what the lat/long already is?
The application would be an iPhone app (and why the app already knows lat/long), so anything from a web service to an iPhone API would work.
Google again
http://nicogoeminne.googlepages.com/documentation.html
http://groups.google.com/group/Google-Maps-API/web/resources-non-google-geocoders
Google now supports reverse geocoding in both JavaScript API and webservice over HTTP. Request looks like this:
http://maps.google.com/maps/geo?output=xml&oe=utf-8&ll=LAT,LON&key=API_KEY
Note, you must change LAT to latitude, LON to longitude and API_KEY to be you Google Maps API key. Service return results on on countries which geocoding marked as YES in following spreadsheet:
http://gmaps-samples.googlecode.com/svn/trunk/mapcoverage_filtered.html
More info should be found soon from official documentation:
http://code.google.com/apis/maps/documentation/services.html#Geocoding_Direct
This is called "reverse geocoding", and there do exist web services that will provide this functionality.
I'd urge being wary of the quality, scaling, and reliability of free services, but here's a place to start: http://www.geonames.org/export/reverse-geocoding.html
iPhone OS 3.0 now has the MKReverseGeocoder class for precisely this purpose.
You can also use LINK REMOVED library for that purpose. MKReverseGeocoder is nice but it requires you to use it with a Google map. From MKReverseGeocoder reference documentation:
The Google terms of service require that the reverse geocoding service be used in conjunction with a Google map; take this into account when designing your application’s user interface.
SSLocationManager might be an alternative in the case your application does not use a Google Map but just needs to access detailed information about the current location having only latitude and longitude data at hand. It uses Yahoo! PlaceFinder API. Hope this helps.