Your search returned no results

Try another search term or view Stack Exchange, where we have active conversations with Developers about GIS.
    Support channel in Stack Exchange

    Thousands of developers around the world have helped make CartoDB a success, and we have active conversations with them about GIS in Stack Exchange.

    Go to Stack Exchange

    Mobile Geocoding

    As per Wikipedia, “Geocoding is the computational process of transforming a postal address description to a location on the Earth’s surface (spatial representation in numerical coordinates). Reverse geocoding converts geographic coordinates to a description of a location, usually the name of a place or an addressable location.”

    In layman’s terms, geocoding is when you enter an address (text) and the output is latitude/longitude. Reverse geocoding is when you click on the map and it finds a nearby address, or point of interest.

    Existing Samples

    For minimal geocoding implementation, use our sample app code for different mobile platforms. You can add this sample code to your mobile project.

    Online Geocoding

    Online geocoding is available through MapBox’s geocoding service. You will need your own Mapbox token. Sign up at to obtain your token.

    Implement online geocoding to initialize the service, create the request, and calculate addresses:

    GeocodingResultVector is just a list of results, you can loop through it as you would with any other list.

    From your GeocodingResult objects, you can simply access name, locality, country etc. properties and display them to the user.

    Reverse Geocoding

    Online reverse geocoding is also available through MapBox’s geocoding service. You will need your own Mapbox token. Sign up at obtain your token.

    Offline Geocoding

    CARTO Mobile SDK also supports offline geocoding and reverse geocoding, In order to geocode offline, you must first download the required country packages. You will not be able to geocode without data!

    The list of country packages for geocoding is the same as other offline maps. See Offline Map Packages for the full list of offline packages. The download size of an offline geocoding package is somewhat smaller (10-40%) than the size of the corresponding offline map package.

    Offline geocoding requires a more complicated preparation of your offline map packages, listener events, package initialization, and geocoding calculation parameters.

    First, you need to initialize a package manager and a listener to download packages. See PackageManager documentation to find more about offline packages.

    If relevant packages are downloaded and (reverse) geocoding service is ready, you can start geocoding:

    Create a PackageManager and PackageManagerReverseGeocodingService or PackageManagerGeocodingService. Then define the GeocodingRequest with at least two points. Start geocoding with the service and read response as GeocodingResult:

    … Lastly, simply call calculateAddresses with the appropriate arguments, as presented in our online geocoding sample.

    Parsing Results

    The following example displays how to parse your GeocodingResult into a readable string. This is only a suggestion, you can parse results however you prefer.