Sorry, you need to enable JavaScript to visit this website.

Polygons for reverse geocoding

Polygons for reverse geocoding

Combine Additional Data Provider queries with Reverse Geocoding queries to obtain extra data about a specific entity Type like:

  • Country

  • CountrySubdivision

  • CountrySecondarySubdivision

  • CountryTertiarySubdivision

  • Municipality

  • MunicipalitySubdivision

  • Neighbourhood

  • PostalCodeArea

Sample use case: You want to display Country or Municipality boundaries.

Use the following code to try this in your app:

Create TTReverseGeocoderQuery with the entityType parameter and use Reverse Geocode search.


let query = TTReverseGeocoderQueryBuilder.create(with: coordinate).withEntityType(entityType)
reverseGeocoder.reverseGeocoder(with: query)
TTReverseGeocoderQuery *query = [[[TTReverseGeocoderQueryBuilder createWithCLLocationCoordinate2D:coordinate] withEntityType:self.entityType] build];
[self.reverseGeocoder reverseGeocoderWithQuery:query];


Get the TTGeometryDataSource object from the Response.


guard let address = response.result.addresses.first else { return }
guard let additionalDataSources = address.additionalDataSources else { return }
guard let geometryDataSource = additionalDataSources.geometryDataSource else { return }
- (TTGeometryDataSource *_Nullable)geometryDataSourceFromResponse:(TTReverseGeocoderResponse *)response {
    if (response.result.addresses.firstObject != nil) {
        TTReverseGeocoderFullAddress *addressValue = [TTReverseGeocoderFullAddress alloc];
        addressValue = response.result.addresses.firstObject;
        if (addressValue.additionalDataSources) {
            TTAdditionalDataSources *additionalDataSources = [TTAdditionalDataSources alloc];
            additionalDataSources = addressValue.additionalDataSources;
            if (additionalDataSources.geometryDataSource) {
                return additionalDataSources.geometryDataSource;
    return nil;


Use the TTAdditionalDataSearchQuery object for sending Requests with the TTGeometryDataSource object supported by the Additional Data API.


let query = TTAdditionalDataSearchQueryBuilder.create(with: geometryDataSource)
searchAdditionalData.additionalDataSearch(with: query)
if ([self geometryDataSourceFromResponse:response] != nil) {
    TTAdditionalDataSearchQuery *query = [[[TTAdditionalDataSearchQueryBuilder createWithDataSource:[self geometryDataSourceFromResponse:response]] withGeometriesZoom:geometriesZoom] build];
    [_searchAdditionalData additionalDataSearchWithQuery:query];


Sample views utilizing entities retrieved by combining both services:


Boundaries for a selected country


Boundaries for a selected municipality