在ios应用程序中使用mapbox的自动完成功能 [英] use autocomplete feature of mapbox in ios application

查看:84
本文介绍了在ios应用程序中使用mapbox的自动完成功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们可以在iOS应用程序中使用Mapbox的自动完成功能吗? 我正在为此寻求某种帮助.

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

我已经使用Mapbox创建了地图视图.但是现在我想在其中添加textfield,当我寻找一个地点时,autocomplete功能应该为我填充一些地点名称.

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.

推荐答案

默认情况下启用autocompletesQuery,您可以使用options.autocompletesQuery = BOOL进行更改,然后获取建议的结果数组,例如

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)
        }

这篇关于在ios应用程序中使用mapbox的自动完成功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆