Get lat/long pair from street address

Pass a street address and get a geocoded lat/lon back.

Before you can do this, you need a TGMap . Here's how to get one.

LatLng centerScreen = tgMap.getScreenCenterLatLng();
LatLngBounds screenBounds = tgMap.getScreenBounds(); // Get bounds from map
TGSearchRequest request = new TGSearchRequest(searchText, centerScreen)

TGSearchEndpoint.TGSearchCallback callback = new TGSearchEndpoint.TGSearchCallback() {
   public void onSuccess(TGSearchResponse tgSearchResponse) {
      List<TGSearchResult> results = tgSearchResponse.getResults();
      if (results.isEmpty()) {
         // Handle failure
      // Use the first result as it is likely the best (or filter based on your needs)
      LatLng latLng = results.get(0).getLocation();

   public void onFailure(Exception e) {
      // Handle failure

TallyGo.getTGSearch().search(request, callback);
Check out the Android Reference App to see this example in action.