[Bug]: Incorrect district/neighborhood returned for coordinates in Istanbul, Turkey

未关闭
#286 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
android, dart, flutter
领域
mobile

调研方向

未指定源文件或测试。首先使用 geocoding 4.0.0 在 41.030011, 28.6397551 复现 Android 结果,然后跟踪 Android 地理编码路径,并检查行政字段是如何填充的。当位置报告 Esenyurt 而不是 Büyükçekmece,或平台限制得到明确记录时,即视为完成。

由索引模型根据 Issue 内容生成。

描述

Please check the following before submitting a new issue.
Please select affected platform(s)
  • Android
  • iOS
Steps to reproduce

Description

The geocode package is returning incorrect administrative area information for coordinates in Istanbul, Turkey. The coordinates point to Esenyurt district (Atatürk Mahallesi), but the package returns Büyükçekmece district instead.

Expected results
  • Coordinates: 41.030011, 28.6397551
  • Expected Location: Atatürk Mahallesi, Esenyurt, Istanbul
  • Verification: Google Maps correctly identifies this location as Esenyurt
Actual results
  • Returned Location: Atatürk, Büyükçekmece, Istanbul
  • Issue: The district (ilçe) is incorrectly identified as Büyükçekmece instead of Esenyurt
Code sample
Code sample
Future getDetailedAddress(double lat, double lng) async {
  // Test coordinates in Esenyurt, Istanbul
  lat = 41.030011;
  lng = 28.6397551;

  try {
    List placemarks = await placemarkFromCoordinates(lat, lng);

    if (placemarks.isNotEmpty) {
      Placemark place = placemarks.first;

      // Debug output
      print('subLocality: ${place.subLocality}');
      print('thoroughfare: ${place.thoroughfare}');
      print('subThoroughfare: ${place.subThoroughfare}');
      print('subAdministrativeArea: ${place.subAdministrativeArea}');
      print('administrativeArea: ${place.administrativeArea}');
      print('locality: ${place.locality}');
      print('country: ${place.country}');

      List addressParts = [];

      if (place.subLocality != null && place.subLocality!.isNotEmpty) {
        addressParts.add(place.subLocality!);
      }

      if (place.thoroughfare != null && place.thoroughfare!.isNotEmpty) {
        addressParts.add(place.thoroughfare!);
      }

      if (place.subThoroughfare != null && place.subThoroughfare!.isNotEmpty) {
        addressParts.add('No: ${place.subThoroughfare}');
      }

      if (place.subAdministrativeArea != null && place.subAdministrativeArea!.isNotEmpty) {
        addressParts.add(place.subAdministrativeArea!);
      }

      if (place.administrativeArea != null && place.administrativeArea!.isNotEmpty) {
        addressParts.add(place.administrativeArea!);
      }

      return addressParts.join(', ');
    }

    return null;
  } catch (e) {
    print('Error: $e');
    return null;
  }
}
Version

geocoding: ^4.0.0

Flutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.38.3, on macOS 26.1 25B78 darwin-arm64, locale tr-TR)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.4)
[✓] Chrome - develop for the web
[✓] Connected device (3 available)
[✓] Network resources
主要语言
Dart
星标
153
派生
92
PR 合并指标
30 天内没有已合并 PR

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Baseflow/flutter-geocoding 的其他 Issue

查看 Baseflow/flutter-geocoding 的全部 Issue

相似的 Issue

更多 Dart Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。