AMapWebService class

Available extensions

Constructors

AMapWebService.new({Client? httpClient, required String apiKey, String? secretKey, Map<String, String>? apiHeaders, String? baseUrl})

Properties

apiHeaders Map<String, String>?
no setter
apiKey String
no setter
hashCode int
The hash code for this object.
no setterinherited
httpClient → Client
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
secretKey String?
no setter
uri Uri
no setter

Methods

appendApiPath(Uri uri, String apiPath) Uri
appendParameters(Uri uri, Map<String, dynamic> params) Uri
dispose() → void
doGet(String url, {Map<String, String>? headers}) Future<Response>
doPost(String url, String body, {Map<String, String>? headers}) Future<Response>
generateSignature(Map<String, dynamic> params) String
geocode(String address, {String? city, String? output}) Future<GeocodeResponse>

Available on AMapWebService, provided by the GeocodeService extension

地理编码 address: 结构化地址信息 city: 指定查询的城市,默认全国范围 output: 返回数据格式类型,默认为JSON
locationIP({String? ip}) Future<LocationIpResponse>

Available on AMapWebService, provided by the LocationIpService extension

高级IP定位 ip: 需要搜索的IP地址(仅支持国内),若用户不填写IP,则取客户http之中的请求来进行定位
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reGeocode(LatLng location, {int? radius, String? output, String? extensions, String? poiType, String? roadLevel, String? homeOrCorp}) Future<ReGeocodeResponse>

Available on AMapWebService, provided by the GeocodeService extension

逆地理编码 location: 必填,经纬度坐标 radius: 搜索半径,取值范围在0~3000,默认是1000,单位:米 output: 返回数据格式类型,默认为JSON extensions:返回结果控制,取值为base只返回基本地址信息,取值为all时会返回基本地址信息、附近POI内容、道路信息以及道路交叉口信息 poiType: 返回附近POI类型,extensions参数为all时生效 roadLevel: 道路等级,extensions参数为all时生效 homeOrCorp: 是否优化POI返回顺序,extensions参数为all时生效
searchAround(LatLng location, {String? keywords, String? types, int? radius, String? sortRule, String? region, bool? cityLimit, String? showFields, int? pageSize, int? pageNum, String? output}) Future<SearchPoiResponse>

Available on AMapWebService, provided by the SearchPoiService extension

周边搜索 location: 必填,中心点坐标 keywords: 地点关键字 types: 指定地点类型 radius: 搜索半径,取值范围:0-50000,大于50000时按默认值,单位:米,默认为5000 sortrule: 排序规则,按距离排序:distance;综合排序:weight,默认为distance region: 搜索区划 city_limit: 指定城市数据召回限制,可选值:true/false,默认为false show_fields: 返回结果控制 page_size: 当前分页展示的数据条数,page_size的取值1-25,默认为10 page_num: 请求第几分页,page_num的取值1-100,默认为1 output: 返回结果格式类型,默认格式为json,目前只支持json格式
textSearch({String? keywords, String? types, String? region, bool? cityLimit, String? showFields, int? pageSize, int? pageNum, String? output}) Future<SearchPoiResponse>

Available on AMapWebService, provided by the SearchPoiService extension

关键字搜索 必填: keyword或者types二选一 keywords: 地点关键字 types: 指定地点类型 region: 搜索区划 city_limit: 指定城市数据召回限制, 默认为false show_fields: 返回结果控制 page_size: 当前分页展示的数据条数,取值为1-25,默认为10 page_num: 请求第几分页,取值为1-100,默认为1 output: 返回结果格式类型,默认格式为json,目前只支持json格式
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited