Baseflow / flutter-geocoding

A Geocoding plugin for Flutter
https://baseflow.com
MIT License
134 stars 71 forks source link

Getting null issue in placemarkFromCoordinates method #240

Closed PriyaManocode-11 closed 1 month ago

PriyaManocode-11 commented 1 month ago

Please check the following before submitting a new issue.

Please select for which platform(s) you need help

Your question

Center( child: ElevatedButton( child: Text('Look up address'), onPressed: () { print("entered"); final latitude = double.parse(_latitudeController.text); final longitude = double.parse(_longitudeController.text);

                placemarkFromCoordinates(latitude, longitude)
                    .then((placemarks) {
                  var output = 'No results found.';
                  if (placemarks.isNotEmpty) {
                    output = placemarks[0].toString();
                    print("output $output");
                  }

                  setState(() {
                    _output = output;
                  });
                });
              }),
        ),

        entered

js_primitives.dart:28 ══╡ EXCEPTION CAUGHT BY GESTURE ╞═══════════════════════════════════════════════════════════════════ js_primitives.dart:28 The following TypeErrorImpl was thrown while handling a gesture: js_primitives.dart:28 Unexpected null value. js_primitives.dart:28 js_primitives.dart:28 When the exception was thrown, this was the stack: js_primitives.dart:28 dart-sdk/lib/_internal/js_dev_runtime/private/ddcruntime/errors.dart 296:3 throw js_primitives.dart:28 dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 586:18 nullCheck js_primitives.dart:28 packages/geocoding/geocoding.dart 31:33 placemarkFromCoordinates

Version

geocoding: ^3.0.0

githubanhduong commented 1 month ago

i same be this error

TimHoogstrate commented 1 month ago

Dear @PriyaManocode-11 ,

What coordinates are you using for testing? Please also don't forget to forget to add the output of flutter doctor -v and clear steps to reproduce.

@githubanhduong,

Can you file a separate issue? Or at least try to add some additional context to your post.

Kind regards,

githubanhduong commented 1 month ago

https://www.youtube.com/watch?v=yLtpMqvMgdY&t=420s&pp=ygUPZmx1dHRlciB3ZWF0aGVy

i coding as video run on web chorme be this error @TimHoogstrate

TimHoogstrate commented 1 month ago

Dear @githubanhduong,

Your issue looks a web issue. In order to resolve the issue please file a separate issue with all the required information.

Kind regards,

RiMac902 commented 1 month ago

flutter-geocoding does not return some objects or returns incorrect datageocoding

latitude: 35.126413, longitude: 33.429859

I receive (Android):

Name: 4CGH+HW9, 
Street: 4CGH+HW9, 
ISO Country Code: , 
Country: , 
Postal code: 2201, 
Administrative area: , 
Subadministrative area: ,
Locality: Aglantzia,
Sublocality: ,
Thoroughfare: ,
Subthoroughfare: 

IOS:

Name: 2201,
Street: ,
ISO Country Code: CY,
Country: Cyprus,
Postal code: 2201, 
Administrative area: Nicosia, 
Subadministrative area: 
Locality: Geri,
Sublocality: ,
Thoroughfare: ,
Subthoroughfare: 
TimHoogstrate commented 1 month ago

Dear @RiMac902,

Your issue has nothing to do with the original post. Please file is a separate issue. However, the data that you see comes from the iOS or Android API's. We can/do not modify the data.

Kind regards,

PriyaManocode-11 commented 1 month ago

closing the issue