flutter-geocoding icon indicating copy to clipboard operation
flutter-geocoding copied to clipboard

[iOS]PLATFORMEXCEPTION: Could not find any result for the supplied address or coordinates

Open KeithBacalso opened this issue 3 years ago • 1 comments

🐛 Bug Report

image

works well on Android, but gives error in iOS.

KeithBacalso avatar Oct 19 '22 06:10 KeithBacalso

Yes, I have same issue in iOS, works well on Android.

[VERBOSE-2:ui_dart_state.cc(209)] Unhandled Exception: Could not find any result for the supplied address or coordinates. #0 MethodChannelGeocoding._handlePlatformException (package:geocoding_platform_interface/src/implementations/method_channel_geocoding.dart:64:9) #1 MethodChannelGeocoding.locationFromAddress (package:geocoding_platform_interface/src/implementations/method_channel_geocoding.dart:36:7) #2 _Clinic_DetailState.getLatLng (package:laxia/views/pages/main/home/detail/clinic_detail.dart:101:32)

pinebluemeta avatar Oct 19 '22 17:10 pinebluemeta

It works in Android but I have the issue for iOS, the places is returning empty string for couple parameters.

Here's my parameters that return empty string: Street, Postal code, Subadministrative area, Thoroughfare, Subthoroughfare.

These parameters are fine: Name, ISO Country Code, Country, Administrative area, Locality, Sublocality.

I'm using iPhone 7 real device.

irhasalh avatar Oct 31 '22 04:10 irhasalh

give me solution for this error

jeeldev9 avatar Jun 09 '23 06:06 jeeldev9

Hi @KeithBacalso, @pinebluemeta, @irhasalh and @jeeldev9,

This is a common issue and working as intended. The Geocoding plugin (as clearly mentioned in the README) makes use of the services provided by the platform.

This means that on Android, Google Maps is used as backing service to do the translation, while on iOS, Apple Maps are being used. In general Google's services are more detailed and it is very well possible Apple cannot resolve an address where Google can resulting in the different behavior.

If you'd like a reliable solution that works the same independent on the platform, I'd suggest a payed solution. There are several options available:

  • Google Maps Plus API: https://developers.google.com/maps/documentation/geocoding/overview
  • HERE SDK: https://developer.here.com/documentation/flutter-sdk-explore/4.3.0.0/dev_guide/index.html
  • MapBox: https://pub.dev/packages/mapbox_gl

mvanbeusekom avatar Jul 12 '23 14:07 mvanbeusekom