baseflow / flutter-geocoding Goto Github PK
View Code? Open in Web Editor NEWA Geocoding plugin for Flutter
Home Page: https://baseflow.com
License: MIT License
A Geocoding plugin for Flutter
Home Page: https://baseflow.com
License: MIT License
Hello,
I just noticed that for Austria, the isoCountryCode is incorrectly set to the country like this:
isoCountryCode is set as "NiederΓΆsterreich" instead of "AT"
Altenreith
Brettl
Scheibbs
NiederΓΆsterreich
AT
3292
isoConutryCode is NiederΓΆsterreich
Using the isoCountryCode at https://cashtic.com
Version: 1.x
Platform:
Hi,
For some reason. I am getting 10k, 15k, 20k 2xx requests, when I used the flutter iOS app with flutter-geocoding for like 1 min. This is replicable in my app. And this is billing me huge sums in GCP. Below is my implementation.
`final String apiKey = "AIzaSyAxqs5NMJTC5wiXXXXXXXXXXXXX";
var googleGeocoding = google_geocoding.GoogleGeocoding(apiKey);
var response = await googleGeocoding.geocoding
.getReverse(LatLon(coordinates.latitude, coordinates.longitude));
var first = response.results.first;
setState(() {
_title = first.formattedAddress;
// _detail = first.addressLine;
_lane1.text = _title;
});`
Above code runs each time, the map is scrolled by user and comes to rest.
Hello,
I got error when calling placemarkFromCoordinates in Isolate.
Here's the error
E/flutter (20127): [ERROR:flutter/runtime/dart_isolate.cc(1137)] Unhandled exception:
E/flutter (20127): Null check operator used on a null value
E/flutter (20127): MethodChannel.binaryMessenger (package:flutter/src/services/platform_channel.dart:142:86)
E/flutter (20127): MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:148:36)
E/flutter (20127): MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:331:12)
E/flutter (20127): MethodChannelGeocoding.placemarkFromCoordinates (package:geocoding_platform_interface/src/implementations/method_channel_geocoding.dart:56:44)
E/flutter (20127): placemarkFromCoordinates (package:geocoding/geocoding.dart:44:32)
Can you give me a solution ?
searching for an address only returns one position, I did some tests using just the street name and should return several locations and only return one.
When searching for a street name, for example, you should return several locations with the same street name.
Future<List<Location>> getPositionAddress(String endereco) async {
List<Location> response;
try {
response = await locationFromAddress(endereco); // endereco = "Avenida Rio Branco"
return response;
} catch (error, exception) {
print(error);
print(exception);
return response;
}
}
Version: 1.0.5
Platform:
Launching lib/main.dart on iPhone 12 Pro Max in debug mode...
Xcode build done. 19.1s
Failed to build iOS app
Error output from Xcode build:
β³
** BUILD FAILED **
Xcode's output:
β³
/Users/shashikumar/HealthAssist/flutter/.pub-cache/hosted/pub.dartlang.org/geolocator-7.0.3/ios/Classes/GeolocatorPlugin.m:199:31: error: unexpected interface name 'NSURL': expected expression
openURL:NSURL URLWithString options:UIApplicationOpenSettingsURLString completionHandler:nil];
^
1 error generated.
/Users/shashikumar/HealthAssist/flutter/.pub-cache/hosted/pub.dartlang.org/geocoding-2.0.0/ios/Classes/Extensions/CLPlacemarkExtensions.m:22:18: warning: 'addressDictionary' is deprecated: first deprecated in iOS 11.0 - Use @properties [-Wdeprecated-declarations]
if (self.addressDictionary != nil) {
^
In module 'CoreLocation' imported from /Users/shashikumar/HealthAssist/flutter/.pub-cache/hosted/pub.dartlang.org/geocoding-2.0.0/ios/Classes/Extensions/CLPlacemarkExtensions.h:10:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CLPlacemark.h:73:63: note: 'addressDictionary' has been explicitly marked deprecated here
@Property (nonatomic, readonly, copy, nullable) NSDictionary *addressDictionary API_DEPRECATED("Use @properties", macos(10.8, 10.13), ios(5.0, 11.0), watchos(1.0, 4.0));
^
/Users/shashikumar/HealthAssist/flutter/.pub-cache/hosted/pub.dartlang.org/geocoding-2.0.0/ios/Classes/Extensions/CLPlacemarkExtensions.m:23:29: warning: 'addressDictionary' is deprecated: first deprecated in iOS 11.0 - Use @properties [-Wdeprecated-declarations]
street = [[self addressDictionary] objectForKey:(NSString *)kABPersonAddressStreetKey];
^
In module 'CoreLocation' imported from /Users/shashikumar/HealthAssist/flutter/.pub-cache/hosted/pub.dartlang.org/geocoding-2.0.0/ios/Classes/Extensions/CLPlacemarkExtensions.h:10:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CLPlacemark.h:73:63: note: property 'addressDictionary' is declared deprecated here
@Property (nonatomic, readonly, copy, nullable) NSDictionary *addressDictionary API_DEPRECATED("Use @properties", macos(10.8, 10.13), ios(5.0, 11.0), watchos(1.0, 4.0));
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/CoreLocation.framework/Headers/CLPlacemark.h:73:63: note: 'addressDictionary' has been explicitly marked deprecated here
/Users/shashikumar/HealthAssist/flutter/.pub-cache/hosted/pub.dartlang.org/geocoding-2.0.0/ios/Classes/Extensions/CLPlacemarkExtensions.m:23:73: warning: 'kABPersonAddressStreetKey' is deprecated: first deprecated in iOS 9.0 - use CNPostalAddress.street [-Wdeprecated-declarations]
street = [[self addressDictionary] objectForKey:(NSString *)kABPersonAddressStreetKey];
^
In module 'AddressBook' imported from /Users/shashikumar/HealthAssist/flutter/.pub-cache/hosted/pub.dartlang.org/geocoding-2.0.0/ios/Classes/Extensions/CLPlacemarkExtensions.m:8:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk/System/Library/Frameworks/AddressBook.framework/Headers/ABPerson.h:113:29: note: 'kABPersonAddressStreetKey' has been explicitly marked deprecated here
AB_EXTERN const CFStringRef kABPersonAddressStreetKey AB_DEPRECATED("use CNPostalAddress.street");
^
3 warnings generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone 12 Pro Max.
Exited (sigterm)
Version: 1.x
Platform:
PlatformException(IO_ERROR, A network error occurred trying to lookup the supplied coordinates
Version: 1.x
Platform:
Exception has occurred.
MissingPluginException (MissingPluginException(No implementation found for method placemarkFromCoordinates on channel flutter.baseflow.com/geocoding))
Here are my function
Future<String> getCityName(double lat, double lon) async { List<Placemark> placemark = await placemarkFromCoordinates(lat, lon); print('City Name ${placemark[0].locality}'); return placemark[0].locality; } }
I am using this version: geocoding: ^1.0.4
Are only the states in the US abbreviated or are there other countries where the admin area label is shortened?
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.
Compile for Android show the next Error
Note: C:\Users\LENOVO\AppData\Local\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.
We need to update the API.
I am currently upgrading from version 5 of the Geolocator to version 6 and since the geocoding is now handled in an extra plugin I have installed this plugin.
Unfortunately the class "Placemark" is unknown, although the plugin is included. The method placemarkFromCoordinates(...) is known.
"placemarkFromCoordinates(...)" returns a list of elements of the known class Placemark.
Install this plugin and try to execute this line:
List<Placemark> placemarks = await placemarkFromCoordinates(point.latitude, point.longitude);
Version: 1.0.1
It works fine for a few days , after few days it is not working. When I supply a co-ordinates to look up into the placemark of that place, It throws an exception "PlatformException(IO_ERROR, A network error occurred trying to lookup the supplied coordinates " . But , the same co-ordinate's placemark was returned correctly at the beginning, after few days of using it , it shows this error.
Version: 1.0.5
Platform:
Android
How much time we have to wait for the web support of geocoding ??
[Only on iOS]
When trying to pass an address which longitude is negative (for example "81 AllΓ©e Joseph Pascal
31500 Pau") locationFromAddress
method fires PlatformException
.
[VERBOSE-2:ui_dart_state.cc(166)] Unhandled Exception: PlatformException(IO_ERROR, Error Domain=kCLErrorDomain Code=8 "(null)", null)
#0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:572:7)
#1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:161:18)
<asynchronous suspension>
#2 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:334:12)
#3 MethodChannelGeocoding.locationFromAddress (package:geocoding_platform_interface/src/implementations/method_channel_geocoding.dart:28:44)
#4 locationFromAddress (package:geocoding/geocoding.dart:22:32)
#5 _MapAddressState._updateAddress (package:jumpets_app/ui/components/maps/google_map_shelters.dart:49:32)
#6 _MapAddressState.didUpdateWidget (package:jumpets_app/ui/components/maps/google_map_shelters.dart:28:7)
#7 StatefulElement.update (package:flutter/src/widgets/framework.dart:4734:58)
#8 Element.updateChild (package:flut<β¦>
The expected behavior is the resulted Location of address
Version:
geocoding: ^1.0.3+1
$ flutter doctor -v
[β] Flutter (Channel stable, 1.20.1, on Mac OS X 10.15.6 19G2021, locale
es-ES)
β’ Flutter version 1.20.1 at /Users/raulmateobeneyto/flutter
β’ Framework revision 2ae34518b8 (6 weeks ago), 2020-08-05 19:53:19
-0700
β’ Engine revision c8e3b94853
β’ Dart version 2.9.0
[β] Android toolchain - develop for Android devices (Android SDK version
29.0.2)
β’ Android SDK at /Users/raulmateobeneyto/Library/Android/sdk
β’ Platform android-29, build-tools 29.0.2
β’ Java binary at:
/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home/bin
/java
β’ Java version Java(TM) SE Runtime Environment (build 1.8.0_192-b12)
β’ All Android licenses accepted.
[β] Xcode - develop for iOS and macOS (Xcode 11.4)
β’ Xcode at /Applications/Xcode.app/Contents/Developer
β’ Xcode 11.4, Build version 11E146
β’ CocoaPods version 1.8.4
[!] Android Studio (not installed)
β’ Android Studio not found; download from
https://developer.android.com/studio/index.html
(or visit
https://flutter.dev/docs/get-started/install/macos#android-setup for
detailed instructions).
[β] VS Code (version 1.49.0)
β’ VS Code at /Applications/Visual Studio Code.app/Contents
β’ Flutter extension version 3.14.1
[β] Connected device (1 available)
β’ iPhone 11 Pro (mobile) β’ D2CC28C5-236E-449A-A0F3-5B96652F3D58 β’ ios
β’ com.apple.CoreSimulator.SimRuntime.iOS-13-4 (simulator)
! Doctor found issues in 1 category.
Platform:
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?
I recently built a feature in my App that will give a location based on where you tap on a map, as well as give you coordinates if you enter an address. Converting coordinates to places, and places to coordinates work fine on Android, but crash the app on iOS. I dug deeper to try to find where I went wrong, and I tracked my bug to ios/Classes/GeocodingPlugin.m.
To give more details, when either toPlacemarkDictionary under toPlacemarkResult, or toLocationDictionary under toLocationResult are called, the App terminates with the follow message:
libc++abi.dylib: terminating with uncaught exception of type NSException *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CLPlacemark toLocationDictionary]: unrecognized selector sent to instance 0x283e7c840'
When viewing a debugger I can see that the correct results are found, but the code throws error only once it attempts to place those results in to a dictionary. So it's not failing because the results are blank. I was able to work around this bug by taking the code that transforms the results in to a dictionary, and placing it inside GeocodingPlugin.m
I expect to be able to pass coordinates or an address and receive back any matches in a formatted list.
I'm simply calling placemarkFromCoordinates or locationFromAddress in my Flutter code. The correct parameters are being sent along and viewing a debugger I can see that the correct results are being found. But the code throws an error when attempting to format the code in a dictionary.
Version: 1.0.5
Platform:
When given a localIdentifier (e.g. 'nl_NL' or 'en_US) the result is not given in the correct language.
Returns result in the corresponding language
Run Geocoding example app and give localIdentifier as parameter
Version: 1.x
Platform:
according to your docs it works https://github.com/baseflow/flutter-geocoding#api
but plugin throws unimplemented exception
Hi, the links in the documentation doesn't point to the Apple / Google documentation, but to the same pag.
(i marked as bold..)
"Important:
This plugin uses the free Geocoding services provided by the iOS and Android platforms. This means that there are restrictions to their use. More information can be found in the Apple documentation for iOS and the Google documentation for Android."
if you could fix the links to the right place plase,
thanks π
placemarkFromCoordinates should return '213 Shrader St, San Francisco, CA'.
final locations = await locationFromAddress('213 Shrader St, San Francisco, CA');
final placemarks = await placemarkFromCoordinates(locations.first.latitude, locations.first.longitude);
[Latitude: 37.7729042, Longitude: -122.4528626, Timestamp: 2021-03-23 14:00:08.888Z]
Subthoroughfare: 2211,
Name: 2235,
Street: 2235 Hayes St,
ISO Country Code: US,
Country: United States,
...
Thoroughfare: Hayes Street, Subtho
Version: 1.x
geocoding: ^1.0.5
Platform:
Hi,
I am trying to retrieve a place mark details using the function placemarkFromCoordinates providing the required latitude, longitude and the localeIdentifier which is basically 'ar_SA' for Arabic language. However, for some reason it is not working. The function will always return the English address regardless of the passed localeIdentifier value
When passing localeIdentifier, the function should return the place mark details in the specified language
Flutter Version: Channel stable, 1.20.3,
OS: Mac OS X 10.15.6 19G2021
IOS 13
Version: 1.0.3
Platform:
I'm attempting to use geocoding in a project that also depends on geolocator ^7.0.3. When I run "Pub get
in my pubspec.yaml file, I get the following version solving error. I do need to use geolocator to get the user's coordinates for a different functionality of my app. Is there something I can do with the plugin platform interface to ensure compatibility?
Because geocoding ^1.0.4 depends on geocoding_platform_interface ^1.0.1 which depends on plugin_platform_interface ^1.0.2, geocoding ^1.0.4 requires plugin_platform_interface ^1.0.2.
And because geolocator_platform_interface >=2.0.0 depends on plugin_platform_interface ^2.0.0, geocoding ^1.0.4 is incompatible with geolocator_platform_interface >=2.0.0.
And because geolocator 7.0.3 depends on geolocator_platform_interface ^2.0.2 and no versions of geolocator match >7.0.3 <8.0.0, geocoding ^1.0.4 is incompatible with geolocator ^7.0.3.
So, because wtfda_radioland depends on both geolocator ^7.0.3 and geocoding ^1.0.5, version solving failed.
pub get failed (1; So, because wtfda_radioland depends on both geolocator ^7.0.3 and geocoding ^1.0.5, version solving failed.)
Process finished with exit code 1
Incompatible with Flutter Fire 1.0.0 / null safe releases.
Due to the dependencies using from what I can see is an unused package dependency of: url_launcher: ^5.4.11
In the main geocoding library I couldn't see any code that would use the url_launcher. It is used in the example but that has its own separate pubspec.yaml.
Remove the url_launcher dependency as it is unused and therefore fixes the incompatibility.
N/A
Version: 1.0.5
Platform:
Hey guys, just wanted to know if you are planning to implement flutter web support in the near future? Thanks in advance and best regards :)
giving the right address even when one misspelled letter.
A simple code, calling locationFromAddress function in order to get lat and lng from a string address.
Using as an example 13 Ruye Roger Salengro 78200 Buchelay
Any configuration
Version:
geocoding: ^1.0.5
Platform:
Hello, the misspelled letter is the y, the real address should be 15 rue Safoni Nulling ***** , I think that the application should return an error instead of giving me a wrong address, or if it possible to correct the word ruye and replace it with rue and return the correct address. I don't know if this is a bug or not but I think that it should be fixed.
Thank you for your great job !
Incompatible with other packages
[App-Waktu-Solat-Malaysia] flutter pub get
Running "flutter pub get" in App-Waktu-Solat-Malaysia...
Because cloud_firestore >=1.0.0 depends on cloud_firestore_platform_interface ^4.0.0 which depends on plugin_platform_interface ^2.0.0, cloud_firestore >=1.0.0 requires plugin_platform_interface ^2.0.0.
And because every version of geocoding_platform_interface depends on plugin_platform_interface ^1.0.2, cloud_firestore >=1.0.0 is incompatible with geocoding_platform_interface.
And because geocoding 1.0.5 depends on geocoding_platform_interface ^1.0.1 and no versions of geocoding match >1.0.5 <2.0.0, cloud_firestore >=1.0.0 is incompatible with geocoding ^1.0.5.
So, because waktusolatmalaysia depends on both geocoding ^1.0.5 and cloud_firestore ^1.0.0, version solving failed.
pub get failed (1; So, because waktusolatmalaysia depends on both geocoding ^1.0.5 and cloud_firestore ^1.0.0, version solving failed.)
exit code 1
Building a project, and getting various warnings
/flutter/.pub-cache/hosted/pub.dartlang.org/geocoding-1.0.5/ios/Classes/Extensions/CLPlacemarkExtensions.m:22:18: 'addressDictionary' is deprecated: first deprecated in iOS 11.0 - Use @properties
/flutter/.pub-cache/hosted/pub.dartlang.org/geocoding-1.0.5/ios/Classes/Extensions/CLPlacemarkExtensions.m:23:73: 'kABPersonAddressStreetKey' is deprecated: first deprecated in iOS 9.0 - use CNPostalAddress.street
Okay, my question is, on the introduction section of this package. There's the following note
This plugin uses the free Geocoding services provided by the iOS and Android platforms. This means that there are restrictions to their use. More information can be found in the Apple documentation for iOS and the Google documentation for Android.
Then Visiting Google Maps Billing i.e places tab , the current charge for geocoding as of now is $5 per 1000 requests.
So I guess my main question is, if this package uses a free API, why does Google Maps make us pay if we are to use their service instead. Is the Google Maps geocoding service i.e place cordinates and names just updated more frequently or something? My application heavily relies on GeoCoding by giving address to location co-ordinates. So what do you advise? Should I use the free Geocoding services throught this package or go with the paid Google maps geocoding API, is it worth it, or do they do 100% the same thing?
Thank you...
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:
The Placemark
class is not available when only importing the geocoding/geocoding.dart
package. Currently you'll need to also import the geocoding_platform_interface/geocoding_platform_interface.dart
package.
The Placemark
class should be available through the geocoding/geocoding.dart
package.
geocoding: ^1.0.2
package in your Flutter app;import 'package:geocoding/geocoding.dart';
;final placemark = await placemarkFromCoordinates(52.2165157, 6.9437819);
Version: 1.0.2
Platform:
The following exception occurs on Android if the underlying platform fails to find address information:
E/MethodChannel#flutter.baseflow.com/geocoding(18312): Failed to handle method call
E/MethodChannel#flutter.baseflow.com/geocoding(18312): java.util.IllegalFormatConversionException: d != java.lang.Double
E/MethodChannel#flutter.baseflow.com/geocoding(18312): at java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:4403)
E/MethodChannel#flutter.baseflow.com/geocoding(18312): at java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:2885)
E/MethodChannel#flutter.baseflow.com/geocoding(18312): at java.util.Formatter$FormatSpecifier.print(Formatter.java:2839)
E/MethodChannel#flutter.baseflow.com/geocoding(18312): at java.util.Formatter.format(Formatter.java:2524)
E/MethodChannel#flutter.baseflow.com/geocoding(18312): at java.util.Formatter.format(Formatter.java:2459)
E/MethodChannel#flutter.baseflow.com/geocoding(18312): at java.lang.String.format(String.java:2870)
E/MethodChannel#flutter.baseflow.com/geocoding(18312): at com.baseflow.geocoding.MethodCallHandlerImpl.onPlacemarkFromCoordinates(MethodCallHandlerImpl.java:137)
E/MethodChannel#flutter.baseflow.com/geocoding(18312): at com.baseflow.geocoding.MethodCallHandlerImpl.onMethodCall(MethodCallHandlerImpl.java:40)
E/MethodChannel#flutter.baseflow.com/geocoding(18312): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:230)
E/MethodChannel#flutter.baseflow.com/geocoding(18312): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
E/MethodChannel#flutter.baseflow.com/geocoding(18312): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:692)
E/MethodChannel#flutter.baseflow.com/geocoding(18312): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#flutter.baseflow.com/geocoding(18312): at android.os.MessageQueue.next(MessageQueue.java:335)
E/MethodChannel#flutter.baseflow.com/geocoding(18312): at android.os.Looper.loop(Looper.java:183)
E/MethodChannel#flutter.baseflow.com/geocoding(18312): at android.app.ActivityThread.main(ActivityThread.java:7656)
E/MethodChannel#flutter.baseflow.com/geocoding(18312): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#flutter.baseflow.com/geocoding(18312): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
E/MethodChannel#flutter.baseflow.com/geocoding(18312): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
The format specifiers do not match the argument types at lines https://github.com/Baseflow/flutter-geocoding/blob/master/geocoding/android/src/main/java/com/baseflow/geocoding/MethodCallHandlerImpl.java#L128 https://github.com/Baseflow/flutter-geocoding/blob/master/geocoding/android/src/main/java/com/baseflow/geocoding/MethodCallHandlerImpl.java#L137.
Version: 1.0.1
Platform:
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.
It should work more performance-friendly.
just call it with some animation or try to click on the UI and it's freezed
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:
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.
getting the place marks
unknown
Version: 1.x
Platform:
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.
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!
I/flutter (11746): ζ²η°
I/flutter (11746): Total 1 results found!
I have read your message on #9 and #23 but they do not help me to solve the problem.
Could you please give me more advice?
Thank you!
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:
This geocoding lib work on web?
I have e app for Android, iOS and Web
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');
}
}
Should consistently get address from coordinates
List<Placemark> placeMarks = await placemarkFromCoordinates(lat, long);
Version: 1.0.5
Platform:
Hi there, trying to get the place from coordinates but getting this error:
No implementation found for method placemarkFromCoordinates on channel flutter.baseflow.com/geocoding
Have done other steps on the https://pub.dev/packages/geocoding page.
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 :)
Update version in README.md to 2.0.0
.
It still shows 1.0.5
which gives an error when flutter pub get
is ran. Updating will fix confusion to new users.
also, the link regarding the full list of android. dependencies in the readme section #3 is not working. could you provide the working link please?
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:
Hi, I have a problem using locationFromAddress()
When building the following on iOS, the 1st print statment never returns. I've provided the address given in the usage example just to be sure that this wasn't the address that was failing.
There is no error message, just the app waiting for the 1st print to return. print('coordinates received');
is never reached.
Any idea of what I could have missed?
import 'package:flutter/material.dart';
import 'package:geocoding/geocoding.dart';
void main() async {
print(await locationFromAddress("Gronausestraat 710, Enschede"));
print('coordinates received');
runApp(MyApp());
}
Getting deprecation warnings!
C:\src\flutter\flutter.pub-cache\hosted\pub.dartlang.org\geocoding-2.0.0\android\src\main\java\com\baseflow\geocoding\GeocodingPlugin.java:7: warning: [deprecation] Registrar in PluginRegistry has been deprecated
import io.flutter.plugin.common.PluginRegistry.Registrar;
^
C:\src\flutter\flutter.pub-cache\hosted\pub.dartlang.org\geocoding-2.0.0\android\src\main\java\com\baseflow\geocoding\GeocodingPlugin.java:26: warning: [deprecation] Registrar in PluginRegistry has been deprecated
public static void registerWith(Registrar registrar) {
^
2 warnings
[β] Flutter (Channel stable, 2.0.4, on Microsoft Windows [Version 10.0.18363.1379], locale en-US)
β’ Flutter version 2.0.4 at C:\src\flutter\flutter
β’ Framework revision b1395592de (4 weeks ago), 2021-04-01 14:25:01 -0700
β’ Engine revision 2dce47073a
β’ Dart version 2.12.2
Version: 1.x
^2.0.0
Platform:
plugin versoin: 1.0.5
android:
9 & 10: Works Perfect...
5.1: Not Working at all
flutter Version: 1.22.6 stable
dev system: win 10
android studio: 4.1.1
gradle: 6.1.1
compilesdk: 30
targetsdk: 30
The current geocoding
plugin is only for iOS and Android available. The plugin uses the geocoding services from Apple and Google, which are to a certain extend free to use on their respected platforms. Since there are more and more issues showing up on the flutter-geocoding
plugin GitHub page requesting to support web, we decided to look into opportunities and see what is possible/available to support the web with the geocoding
plugin. Unlike Apple's and Android's geocoding services, there is no free to use geocoding API that we can implement to support the web. There are some services that require you to register and offer a limited free experience.
The idea is to implement the support for different geocoding services, for example services like HERE, Google's Geocoding API, Mapbox and so on.
The developer using the geocoding
plugin is free to use any of the supported geocoding services to his liking. The developer is also responsible for providing their own API key/access token needed for the geocoding service to make the requests. Keep in mind that geocoding services are not free after exceeding an certain amount of requests, how many requests can be done before you have to pay for the requests depends on the chosen service.
Summary of the proposal:
Since there is a demand for a web implementation of the geocoding
plugin, I am very curious how the community and users of the geocoding
plugin feel about this proposal. It would help me out if you would react with a π if you would like to see this implemented, and if you're not interested or against this proposal please comment with a π. If you're not interested or against this proposal, it would help out to leave a comment on why you don't agree with the proposal.
If you have suggestions on how to improve the proposal, or suggestions about a geocoding API you would like to see implemented then also feel free to react!
placemarkFromAddress was supposed to be moved from geolocator plugin starting with v6 and it did disappear, but it has never been implemented in geocoding plugin.
Documentation on Flutter website for the plugin is of very poor quality e.g. one of examples refers to placemarkFromAddress, but the code is for locationFromAddress. Also hyperlinks to Apple and Android documentation do not point to anything
I need to be able to feed a string with an address and get back matches and that's what placemarkFromAddress was for.
i use this code
List<Placemark> placemarks = await placemarkFromCoordinates(52.2165157, 6.9437819);
I already done all preparation based on this:
https://github.com/Baseflow/flutter-geocoding#usage
import these package:
import 'package:geocoding/geocoding.dart';
import 'package:geocoding_platform_interface/geocoding_platform_interface.dart';
add permission AndroidManifest
I got this error:
PlatformException(NOT_FOUND, No address information found for supplied coordinates (latitude: 52.216516, longitude: 6.943782)., null, null)
i have look at other issue the other face, and try it, but nothing work.
hot reload, restart, flutter clean, uninstall apk.
I use
List<Placemark> placemarks = await placemarkFromCoordinates(37.3259, 127.0993, localeIdentifier: 'ko_KR');
print(placemarks.first);
then in Android
Name: 5,
Street: 5 Pungdeokcheolro171Beon-gil,
ISO Country Code: KR,
Country: South Korea,
Postal code: 448-170,
Administrative area: Gyeonggi-do,
Subadministrative area: ,
Locality: Yongin-si,
Sublocality: Suji-gu,
Thoroughfare: Pungdeokcheon 1(il)-dong,
Subthoroughfare: 5
but in iOS
Name: 62-3 Pungdeokcheon-dong,
Street: 62-3 Pungdeokcheon-dong,
ISO Country Code: KR,
Country: South Korea,
Postal code: 16832,
Administrative area: Gyeonggi-do,
Locality: Yongin-si,
Sublocality: Pungdeokcheon-dong,
Thoroughfare: Pungdeokcheon-dong,
Subthoroughfare: 62-3
Can I get the value of iOS version in both?
In short I want to get address from latitude longitude at offline mode.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.