A Geocoding plugin for Flutter

Overview

Flutter geocoding plugin

The Flutter geocoding plugin is build following the federated plugin architecture. A detailed explanation of the federated plugin concept can be found in the Flutter documentation. This means the geocoding plugin is separated into the following packages:

  1. geocoding: the app facing package. This is the package users depend on to use the plugin in their project. For details on how to use the geocoding plugin you can refer to its README.md file. At this moment the Android and iOS platform implementations are also part of this package;
  2. geocoding_platform_interface: this packages declares the interface which all platform packages must implement to support the app-facing package. Instructions on how to implement a platform packages can be found in the README.md of the geocoding_platform_interface package.
Comments
  • The plugin `geocoder` uses a deprecated version of the Android embedding.

    The plugin `geocoder` uses a deprecated version of the Android embedding.

    To avoid unexpected runtime failures, or future build failures, try to see if this plugin supports the Android V2 embedding. Otherwise, consider removing it since a future release of Flutter will remove these deprecated APIs. If you are plugin author, take a look at the docs for migrating the plugin to the V2 embedding: https://flutter.dev/go/android-plugin-migration.

    platform: android status: waiting for customer response 
    opened by Bilonik 24
  • GeocodingPlugin.java uses or overrides a deprecated API

    GeocodingPlugin.java uses or overrides a deprecated API

    πŸ”™ Regression

    Note: /Users/jouleslabs/AndroidStudioProjects/flutter/.pub-cache/hosted/pub.dartlang.org/geocoding-2.0.1/android/src/main/java/com/baseflow/geocoding/GeocodingPlugin.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use or override a deprecated API.

    Configuration

    Version: 7.7.1

    Platform:

    • [x] :robot: Android
    opened by shaunhossain 11
  • placemarkFromCoordinates() not working

    placemarkFromCoordinates() not working

    πŸ› Bug Report

    i try use placemarkFromCoordinates() but i get bellow error:

    [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: PlatformException(IO_ERROR, A network error occurred trying to lookup the supplied coordinates (latitude: 25.697771, longitude: 78.654394)., null, null)
    E/flutter ( 5364): #0      StandardMethodCodec.decodeEnvelope
    package:flutter/…/services/message_codecs.dart:597
    E/flutter ( 5364): #1      MethodChannel._invokeMethod
    package:flutter/…/services/platform_channel.dart:158
    E/flutter ( 5364): <asynchronous suspension>
    E/flutter ( 5364): #2      MethodChannelGeocoding.placemarkFromCoordinates
    package:geocoding_platform_interface/…/implementations/method_channel_geocoding.dart:56
    E/flutter ( 5364): <asynchronous suspension>
    E/flutter ( 5364): #3      _SingleAddressDetailWidgetState.build.<anonymous closure>.<anonymous closure>
    package:jeanswest/…/userAddresses/single-address-detail-widget.dart:390
    E/flutter ( 5364): <asynchronous suspension>
    E/flutter ( 5364):
    

    I use geocoding: ^2.0.0 plugin and check other older versions like 1.0.5

    my code:

    388    LatLng newLatLng = LatLng(25.697771, 78.654394);
    390    List<Placemark> dbAddress =
    391       await placemarkFromCoordinates(
    392          newLatLng.latitude,
    393          newLatLng.longitude,
    394        );
    

    Version: 2.0.0

    Platform:

    • [ ] :iphone: iOS
    • [x] :robot: Android
    opened by mshamsi502 11
  • locationFromAddress doesn't work

    locationFromAddress doesn't work

    πŸ› Bug Report

    Below is part of my code try { locations = await GeocodingPlatform.instance.locationFromAddress(text);
    } catch (e) { print(e); } print('Total ${locations.length} results found!'); // other parts are fetching the lat, long data from the List and show a tag on google map. //I used Google Place API works perfectly fine, but too expensive so I try to use this plugin.

    Expected behavior

    1. Most of the places doesn't work and return exception like below. I/flutter (11746): London I/flutter (11746): PlatformException(IO_ERROR, A network error occurred trying to lookup the address ''., null, null) I/flutter (11746): Total 0 results found!

    I/flutter (11746): St. Martin in the fields I/flutter (11746): PlatformException(IO_ERROR, A network error occurred trying to lookup the address ''., null, null) I/flutter (11746): Total 0 results found!

    1. It works in some places in Hong Kong(even in Cantonese) and returns one location, like below

    I/flutter (11746): ζ²™η”° I/flutter (11746): Total 1 results found!

    I have read your message on https://github.com/Baseflow/flutter-geocoding/issues/9 and https://github.com/Baseflow/flutter-geocoding/issues/23 but they do not help me to solve the problem.

    Could you please give me more advice? Thank you!

    Reproduction steps

    Configuration

    Run one real Android mobile. Flutter is the latest version that I update on April 2021. using geocoding: ^2.0.0

    Version: 1.x ^2.0.0 Platform:

    • [ ] :robot: Android
    opened by AlanTso 10
  • PlatformException (PlatformException(IO_ERROR, A network error occurred trying to lookup the supplied coordinates (latitude: 30.867672, longitude: 122.209517)., null, null))

    PlatformException (PlatformException(IO_ERROR, A network error occurred trying to lookup the supplied coordinates (latitude: 30.867672, longitude: 122.209517)., null, null))

    πŸ› Bug Report

    the reason is unknown, it was working half an hour ago, this problem happened before but it stopped for a few days and now it came back, my device is connected to the enternet (android emulator on windows pc) also "try{}catch{}" isnt stoping the problem the app crashes.

    image

    Expected behavior

    getting the place marks

    Reproduction steps

    unknown

    Configuration

    Version: 1.x

    Platform:

    • [ ] :iphone: iOS
    • [ ] :robot: Android
    opened by yosef406 9
  • Getting locationFromAddress noticeably freezes main thread

    Getting locationFromAddress noticeably freezes main thread

    πŸ› Bug Report

    When calling locationFromAddress() it noticeably freezes the main thread of the application and we can not move it to separate isolate as then it returns null.

    Expected behavior

    It should work more performance-friendly.

    Reproduction steps

    just call it with some animation or try to click on the UI and it's freezed

    Configuration

    Pixel 4

    Flutter 2.2.1 β€’ channel stable β€’ https://github.com/flutter/flutter.git Framework β€’ revision 02c026b03c (4 weeks ago) β€’ 2021-05-27 12:24:44 -0700 Engine β€’ revision 0fdb562ac8 Tools β€’ Dart 2.13.1

    Version: 1.x

    geocoding: ^2.0.0

    Platform:

    • [ ] :iphone: iOS (didn't test that)
    • [X] :robot: Android
    opened by marcinOz 8
  • placemarkFromCoordinates erratically fails or causes an error exception

    placemarkFromCoordinates erratically fails or causes an error exception

    πŸ› Bug Report

    placemarkFromCoordinates sometimes fails and it seems to me it is random. I cannot reproduce it consistently. Can I get some help?

    Note: occured in emulator, haven't encountered it in a real device but I will update this if it shows there also.

    As it will successfully get an address the next try, my workaround for now is as below (kinda ugly but works for now):

        List<Placemark> placeMarks;
        try {
          placeMarks = await placemarkFromCoordinates(lat, long);
        } catch (e) {
          await Future.delayed(Duration(milliseconds: 300));
          try {
            placeMarks = await placemarkFromCoordinates(lat, long);
          } catch (e) {
            showSnackBar(2, 'Address was not retrieved, please fill out manually');
          }
        }
    

    Expected behavior

    Should consistently get address from coordinates

    Reproduction steps

     List<Placemark> placeMarks = await placemarkFromCoordinates(lat, long);
    

    Configuration

    Version: 1.0.5

    Platform:

    • [ ] :iphone: iOS
    • [x] :robot: Android
    opened by kalmigs 8
  • placemarkFromCoordinates implementation is missing on WEB

    placemarkFromCoordinates implementation is missing on WEB

    Overflow on channel: flutter.baseflow.com/geocoding. Messages on this channel are being discarded in FIFO fashion. The engine may not be running or you need to adjust the buffer size if of the channel. Error: MissingPluginException(No implementation found for method placemarkFromCoordinates on channel flutter.baseflow.com/geocoding)

    Version: geocoding: ^1.0.5

    Platform:

    • WEB
    opened by RajuMuliyashiya 7
  • PlatformException(IO_ERROR, A network error occurred trying to lookup the supplied coordinates

    PlatformException(IO_ERROR, A network error occurred trying to lookup the supplied coordinates

    πŸ”™ Regression

    Old (and correct) behavior

    PlatformException(IO_ERROR, A network error occurred trying to lookup the supplied coordinates

    Reproduction steps

    Configuration

    Version: 1.x

    Platform:

    • [ ] :iphone: iOS
    • [ ] :robot: Android
    opened by dev-abdullah-github 7
  • Any plans for web and other platforms?

    Any plans for web and other platforms?

    πŸš€ Feature Requests

    Hello,

    Any plans for web and other platforms? I was looking at other reverse geocoding packages, and the codebases are pretty similar (https://github.com/bazrafkan/google_geocoding) . Might be just enabling sg on the package page?

    Contextualize the feature

    Describe the feature

    Platforms affected (mark all that apply)

    • [ ] :iphone: iOS
    • [ ] :robot: Android
    opened by giorgio79 6
  • MissingPluginException

    MissingPluginException

    Hi everyone,

    i try to run the "geocoding_platform_interface 1.0.1+1" from pub.dev but i get the error:

    [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: MissingPluginException(No implementation found for method locationFromAddress on channel flutter.baseflow.com/geocoding) #0 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:157:7) <asynchronous suspension> #1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:332:12) #2 MethodChannelGeocoding.locationFromAddress (package:geocoding_platform_interface/src/implementations/method_channel_geocoding.dart:29:46)

    I am not sure, what i did wrong. I want to get the cordinates of an address String:

    List<Location> locations = await GeocodingPlatform.instance.locationFromAddress("Gronausestraat 710, Enschede"); first i try it with:

    List<Location> locations = await locationFromAddress("Gronausestraat 710, Enschede");

    but the methode can not be found.

    The import that i use is:

    import 'package:geocoding_platform_interface/geocoding_platform_interface.dart';

    Have you some ideas ? I see the other issues with the similar problem. but a restart dosnt work.

    Thank you :)

    opened by jonahmons 6
  • Flutter Geocoding iOS locationFromAddress not working in iOS.

    Flutter Geocoding iOS locationFromAddress not working in iOS.

    πŸ› Bug Report

    locationFromAddress is not working in iOS. it is always returning an empty list. while the same code is working in android with the same address.

    Expected behavior

    locationFromAddress should return a list of locations when you pass the address to the method.

    Reproduction steps

    Configuration

    Version: latest

    Platform:

    • [ ] :iphone: iOS
    opened by adiShinwari 0
  • Network Error on Iran Ip

    Network Error on Iran Ip

    πŸ› Bug Report

    when I use this package for reverse coding my addresses with Iran Ip thats throws me a Exception about network error but with VPN every thing works fine

    opened by Abolfazl-MI 0
  • Throttle for max request limit.

    Throttle for max request limit.

    I am using the https://pub.dev/packages/geocoding geocoding package. I have a list of coordinates but it says throttle for max requests. How can i prevent the limit reach error. I like this package but i can't.

    opened by anilenepal 0
  • No implementation found for method placemarkFromCoordinates on channel flutter.baseflow.com/geocoding

    No implementation found for method placemarkFromCoordinates on channel flutter.baseflow.com/geocoding

    πŸ’¬ Questions and Help

    For questions or help we recommend checking:

    List<Placemark> place = await placemarkFromCoordinates(_currentPosition!.latitude, _currentPosition!.longitude);

    Hello guys. I am aware that as of May 2021, the web platform didn't support geocoding. I'd like to know if this is still the case now that it's December 2022. Has there been a fix for it?

    opened by fred33bondi 0
  • How to store Placemark into Firebase with json_serializable / custom JsonConverter?

    How to store Placemark into Firebase with json_serializable / custom JsonConverter?

    I am trying to store a Placemark from the Geolocator plugin to Firebase with json_serializable, but having problem creating a JsonConverter similar to Geopoint

    I tried this so far

    class PlacemarkConverter implements 
    
        JsonConverter<Placemark, Placemark> {
          const PlacemarkConverter();
        
          @override
          Placemark fromJson(map) {
            return Placemark.fromMap(map);
          }
        
          @override
          Placemark toJson(Placemark placemark) => placemark;
        }
    
    

    but getting

    E/flutter (17813): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: type '_InternalLinkedHashMap<String, dynamic>' is not a subtype of type 'Placemark' in type cast

    opened by giorgio79 0
Owner
Baseflow
We provide software, skills and knowledge and with this we want to make a contribution to the world. We love to make innovation happen.
Baseflow
Permission plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and check permissions.

Flutter permission_handler plugin The Flutter permission_handler plugin is build following the federated plugin architecture. A detailed explanation o

Baseflow 1.7k Dec 31, 2022
Unloc customizations of the Permission plugin for Flutter. This plugin provides an API to request and check permissions.

Flutter Permission handler Plugin A permissions plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and check perm

Unloc 1 Nov 26, 2020
Klutter plugin makes it possible to write a Flutter plugin for both Android and iOS using Kotlin only.

The Klutter Framework makes it possible to write a Flutter plugin for both Android and iOS using Kotlin Multiplatform. Instead of writing platform spe

Gillian 33 Dec 18, 2022
A Flutter step_tracker plugin is collect information from user and display progress through a sequence of steps. this plugin also have privilege for fully customization from user side. like flipkart, amazon, myntra, meesho.

step_tracker plugin A Flutter step_tracker plugin is collect information from user and display progress through a sequence of steps. this plugin also

Roshan nahak 5 Oct 21, 2022
Boris Gautier 1 Jan 31, 2022
A Side Menu plugin for flutter and compatible with liquid ui for flutter

Liquid Shrink Side Menu A Side Menu plugin for flutter and compatible with liquid ui Side Menu Types There are 8 configuration of Liquid shrink side m

Raj Singh 18 Nov 24, 2022
FlutterBoost is a Flutter plugin which enables hybrid integration of Flutter for your existing native apps with minimum efforts

δΈ­ζ–‡ζ–‡ζ‘£ 中文介绍 Release Note v3.0-preview.17 PS: Before updating the beta version, please read the CHANGELOG to see if there are any BREAKING CHANGE Flutter

Alibaba 6.3k Dec 30, 2022
Flutter Counter is a plugin written in dart for flutter which is really simple and customizeable.

Flutter Counter (iOS & Android) Description Flutter Counter is a plugin written in dart for flutter which is really simple and customizeable. Create i

Salmaan Ahmed 15 Sep 18, 2022
Flutter simple image crop - A simple and easy to use flutter plugin to crop image on iOS and Android

Image Zoom and Cropping plugin for Flutter A simple and easy used flutter plugin to crop image on iOS and Android. Installation Add simple_image_crop

null 97 Dec 14, 2021
Flutter-ffmpeg - FFmpeg plugin for Flutter. Not maintained anymore. Superseded by FFmpegKit.

flutter_ffmpeg FFmpeg plugin for Flutter. Supports iOS and Android. Not maintained anymore, superseded by FFmpegKit. See FlutterFFmpeg to FFmpegKit Mi

Taner Şener 635 Dec 22, 2022
Rave flutter - A Flutter plugin for Flutterwaves's rave.

Rave Flutter A robust Flutter plugin for accepting payment on Rave with Card Nigerian Bank Account ACH Payments Mobile money Francophone Africa Mpesa

Wilberforce Uwadiegwu 30 Oct 6, 2022
A flutter plugin to add login with facebook in your flutter app

Features Login on iOS, Android and Web. Express login on Android. Granted and declined permissions. User information, picture profile and more. Provid

Darwin Morocho 157 Jan 6, 2023
Flutter blue plus - Flutter plugin for connecting and communicationg with Bluetooth Low Energy devices, on Android and iOS

Introduction FlutterBluePlus is a bluetooth plugin for Flutter, a new app SDK to

null 141 Dec 22, 2022
This is a Flutter plugin that takes a JSON string and converts it onto a customizable Flutter Widget.

Colored JSON Convert JSON string into customizable widget. Getting Started ColoredJson is a stateless widget that produces a structured view of JSON s

null 4 May 20, 2022
Flutter plugin to manage home screen widget within flutter app.

Flutter App Widget App Widget / Home Screen widget plugin for flutter app Usage Please see app_widget subdirectory for the usage documentation. Plafor

Alexander Dischberg 6 Dec 16, 2022
Flutter plugin for creating static & dynamic app shortcuts on the home screen.

Flutter Shortcuts Show some ❀️ and ⭐ the repo Why use Flutter Shortcuts? Flutter Shortcuts Plugin is known for : Flutter Shortcuts Fast, performant &

Divyanshu Shekhar 39 Sep 26, 2022
Flutter plugin for selecting images from the Android and iOS image library, taking new pictures with the camera, and edit them before using such as rotation, cropping, adding sticker/text/filters.

advance_image_picker Flutter plugin for selecting multiple images from the Android and iOS image library, taking new pictures with the camera, and edi

Weta Vietnam 91 Dec 19, 2022
Flutter plugin to simply integrate Agora Video Calling or Live Video Streaming to your app with just a few lines of code.

Agora UI Kit for Flutter Instantly integrate Agora video calling or video streaming into your Flutter application. Getting started Requirements An Ago

Agora.io Community 106 Dec 16, 2022
Flutter plugin for creating static & dynamic app shortcuts on the home screen.

Flutter Shortcuts Compatibility βœ… Android ❌ iOS (active issue: iOS support for quick actions) Show some ❀️ and ⭐ the repo Why use Flutter Shortcuts? F

Devs On Flutter 39 Sep 26, 2022