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

插件详情v0.2.0

lat_lng_to_timezone

Dart 中的纬度/经度到时区映射器。无需网络服务或数据文件

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
2.3万
喜欢数
25
Pub 分数
150

安装插件

flutter pub add lat_lng_to_timezone

插件介绍

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

一个 Dart 包,可将纬度和经度坐标转换为其对应的时区,无需依赖外部网络服务或数据文件。它使用内置逻辑根据地理位置确定时区,非常适合离线应用。该包轻量且高效,适用于需要从位置数据中准确检测时区的应用程序。支持所有主要平台,包括移动、Web 和桌面。

适合场景

  • 离线时区检测
  • 基于位置的应用功能
  • 旅行或日程安排应用
  • 时间区域感知的数据处理
  • 实时位置跟踪

主要特点

  • 无外部依赖
  • 离线工作
  • 跨平台支持
  • 精确的时区映射
  • 轻量且快速

适合对象

  • 移动和网页应用
  • 需要隐私的应用
  • 离线优先的应用程序
  • 地理位置工具
  • 开发者避免 API 调用

使用建议

  • 限于已知的时区边界
  • 可能不反映最近的政治变化
  • 不自动处理夏令时
  • 准确性取决于内部数据精度
  • 不适合用于高精度地理空间分析

原始 README

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

latLngToTimezone

Lat/long to timezone mapper in Dart. Does not require web services or data files

The "lat/long to timezone polygon mapping" is hardcoded, and we hope this rarely changes, but the changes to offsets and daylight savings changeover dates etc. (which are more frequent) are taken care of by your system libraries and so these are automatically kept up-to-date. From time to time, someone updates the files with the latest timezone polygons, but these rarely change...I think the most recent change is the Crimean peninsular.

This Dart library is port of the original project
available at https://github.com/drtimcooper/LatLongToTimezone. Ported it to Dart to make it easily available on pub.dev. In order to support updates from the upstream version, the formatting was changed as little as possible (specifically not adding control flow braces or truncating lines at 80 characters).

Usage

See the example at pub.dev.

所属分类

源码仓库

使用此插件的项目