amap_search_fluttify 0.2.0 amap_search_fluttify: ^0.2.0 copied to clipboard
A `Amap` search component, based on `fluttify` engine.
amap_search_fluttify #
高德地图搜索
组件. Dart接口基于fluttify引擎生成. dartdoc接口文档.
主接口类AmapSearch
:
/// 搜索关键字poi
final poiList = await AmapSearch.searchKeyword(
_keywordController.text,
city: _cityController.text,
);
/// 搜索周边poi
final poiList = await AmapSearch.searchAround(
LatLng(
double.tryParse(_latController.text) ?? 29.08,
double.tryParse(_lngController.text) ?? 119.65,
),
keyword: _keywordController.text,
);
/// 输入提示
final inputTipList = await AmapSearch.fetchInputTips(
_keywordController.text,
city: _cityController.text,
);
/// 地理编码(地址转坐标)
final geocodeList = await AmapSearch.searchGeocode(
_keywordController.text,
city: _cityController.text,
);
/// 逆地理编码(坐标转地址)
final reGeocodeList = await AmapSearch.searchReGeocode(
LatLng(
double.parse(_latController.text),
double.parse(_lngController.text),
),
radius: 200.0,
);
/// 获取行政区划数据
final district = await AmapSearch.searchDistrict(_keywordController.text);
/// 获取天气数据
final district = await AmapSearch.searchDistrict(_keywordController.text);
/// 公交路径规划(未完成)
final routeResult = await AmapSearch.searchBusRoute(
from: LatLng(
double.parse(_fromLatController.text),
double.parse(_fromLngController.text),
),
to: LatLng(
double.parse(_toLatController.text),
double.parse(_toLngController.text),
),
city: '杭州',
);
/// 驾车路径规划
final routeResult = await AmapSearch.searchDriveRoute(
from: LatLng(
double.parse(_fromLatController.text),
double.parse(_fromLngController.text),
),
to: LatLng(
double.parse(_toLatController.text),
double.parse(_toLngController.text),
),
);
/// 骑行路径规划
final routeResult = await AmapSearch.searchRideRoute(
from: LatLng(
double.parse(_fromLatController.text),
double.parse(_fromLngController.text),
),
to: LatLng(
double.parse(_toLatController.text),
double.parse(_toLngController.text),
),
);
/// 步行路径规划
final routeResult = await AmapSearch.searchWalkRoute(
from: LatLng(
double.parse(_fromLatController.text),
double.parse(_fromLngController.text),
),
to: LatLng(
double.parse(_toLatController.text),
double.parse(_toLngController.text),
),
);