flutter_map icon indicating copy to clipboard operation
flutter_map copied to clipboard

LatLng doesn't work

Open Nicolios opened this issue 6 years ago • 2 comments

Hello, I write here because the function LatLng doesn't work. I just copy and past the "Open Street Map provider" on the github page. The error is "The constructor returns type 'dynamic' that isn't of expected type 'LatLng'." and "Undefined class 'LatLng'." Before I add flutter_map: any in my pubspec and run command "pub get". That's not the first time I tried use LatLng but it's never work. That's for your answer

EDIT: Just need to : import 'package:latlong/latlong.dart';

Nicolios avatar Jun 18 '20 08:06 Nicolios

Could you show the code using it (maybe just a minimal test example) and pubspec.yaml

ibrierley avatar Jun 18 '20 08:06 ibrierley

Had this problem too, i think it is because of the package

import 'package:mapbox_gl/mapbox_gl.dart';

it has LatLng too

yuehernkang avatar Jun 20 '20 20:06 yuehernkang