Rajesh
Rajesh

Reputation: 556

use autocomplete feature of mapbox in ios application

Can we use autocomplete feature of Mapbox into iOS application ? I'm looking for some kind of help for that.

I have already created a map view using Mapbox. But now I want to add a textfield onto it and when i look for a place, the autocomplete feature should populate some place names for me.

Upvotes: 3

Views: 1583

Answers (2)

user4713761
user4713761

Reputation:

autocompletesQuery is enabled by default, you can change it with options.autocompletesQuery = BOOL then get the results array of suggestions like

let task = geocoder.geocode(options: options) { (placemarks,     attribution, error) in
            print(placemarks)
        }

Upvotes: 1

friedbunny
friedbunny

Reputation: 2421

Have a look at MapboxGeocoder.swift and UISearchBar.

Upvotes: 0

Related Questions