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.
Get the TTGeometryDataSource object from the Response.
Use the TTAdditionalDataSearchQuery object for sending Requests with the ** TTGeometryDataSource** object supported by the Additional Data API.
1let query = TTAdditionalDataSearchQueryBuilder.create(with: geometryDataSource)2 .withGeometriesZoom(geometriesZoom)3 .build()
searchAdditionalData.additionalDataSearch(with: query)
1if ([self geometryDataSourceFromResponse:response] != nil) {2 TTAdditionalDataSearchQuery *query = [[[TTAdditionalDataSearchQueryBuilder createWithDataSource:[self geometryDataSourceFromResponse:response]] withGeometriesZoom:geometriesZoom] build];3 [_searchAdditionalData additionalDataSearchWithQuery:query];4}
Sample views utilizing entities retrieved by combining both services:
Boundaries for a selected country | Boundaries for a selected municipality |