yandex_geocoder
將地理座標轉換為地址以及反之亦然的 API
將地理座標轉換為地址以及反之亦然的 API
^1.18.0^1.2.0^4.8.1^2.4.8{"sdk":"flutter"}^6.7.1以下為英文專案原文快照,最新內容請造訪 GitHub。
https://firebasestorage.googleapis.com/v0/b/mad-brains-web.appspot.com/o/banner.png?alt=media https://firebasestorage.googleapis.com/v0/b/mad-brains-web.appspot.com/o/banner_geocoder.png?alt=media&token=59013dd3-f0c1-4f91-a1b9-37a9ca1b3066
The geocoder helps to determine the coordinates of an object by its address or, conversely, to set the address by its coordinates.
https://firebasestorage.googleapis.com/v0/b/mad-brains-web.appspot.com/o/get_started_stroke.png?alt=mediaAdd this to your package's pubspec.yaml file:
dependencies:
yandex_geocoder: 2.3.1
To work you will need Api Key, a key to work with Yandex API. It can be obtained in the personal account of developer.
final YandexGeocoder geocoder = YandexGeocoder(apiKey: 'Your Api Key');
final GeocodeResponse geocodeFromPoint = await geocoder.getGeocode(ReverseGeocodeRequest(
pointGeocode: (55.771899,37.597576),
lang: Lang.enEn,
));
final GeocodeResponse geocodeFromAddress = await geocoder.getGeocode(DirectGeocodeRequest(
addressGeocode: 'Moscow, 4th Tverskaya-Yamskaya street, 7',
lang: Lang.enEn,
));
The Example is in the corresponding folder