搜索插件、代码仓与 APP 分类

插件详情v0.2.1

geocoder

正向和反向地理编码。

近 30 天下载
1200
喜欢数
270
Pub 分数
15

安装插件

flutter pub add geocoder

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

geocoder 包为 Flutter 应用程序提供正向和反向地理编码功能。它允许用户将地址转换为地理坐标(纬度和经度),反之亦然。该包由 aloisdeniel.com 开发,可无缝集成到 Flutter 项目中,并通过统一接口支持多种地理编码服务。该包设计简洁可靠,非常适合需要基于位置功能的应用程序,例如地图、地址搜索或位置跟踪。它是开源的,并托管在 GitHub 上,以确保透明度并促进社区贡献。

适合场景

  • 地址转坐标查询
  • 坐标转地址转换
  • 地图标记位置
  • 应用中的位置搜索
  • 基于地理位置的服务
  • 用户位置标记

主要特点

  • 正向地理编码
  • 逆地理编码
  • 跨平台支持
  • 简单 API
  • Open-source
  • 可扩展的服务集成

适合对象

  • 带有地图集成的移动应用
  • 位置感知应用
  • 旅行和配送应用
  • 需要地址解析的应用程序
  • 寻求轻量级地理编码的开发者
  • 使用 Google 地图或类似服务的项目

使用建议

  • 需要互联网连接
  • 依赖外部地理编码服务
  • 可能会应用速率限制
  • 无内置缓存
  • 有限的平台特定自定义
  • 服务可用性因地区而异

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Really sorry for the lack of updates. I'm currently really busy and can't really give you an ETA for the next release.

In the meantime, you can try the geocoding package which should offer almost the same functionnalities.

geocoder

Forward and reverse geocoding.

Usage

Import package:geocoder/geocoder.dart, and use the Geocoder.local to access geocoding services provided by the device system.

Example:

import 'package:geocoder/geocoder.dart';

// From a query
final query = "1600 Amphiteatre Parkway, Mountain View";
var addresses = await Geocoder.local.findAddressesFromQuery(query);
var first = addresses.first;
print("${first.featureName} : ${first.coordinates}");

// From coordinates
final coordinates = new Coordinates(1.10, 45.50);
addresses = await Geocoder.local.findAddressesFromCoordinates(coordinates);
first = addresses.first;
print("${first.featureName} : ${first.addressLine}");

You can alternatively use Geocoder.google member for requesting distant data from google services instead of native ones.

You will find links to the API docs on the pub page.

Getting Started

For help getting started with Flutter, view our online documentation.

For help on editing plugin code, view the documentation.

所属分类

依赖

依赖清单 1 项

源码仓库

使用此插件的项目