FlutterMap(
options: MapOptions(
onTap: (p, point) async {
GeoData location = await Geocoder2.getDataFromCoordinates(
latitude: p.latitude, longitude: p.longitude, googleMapApiKey: '');
);
print("${location.country}");
setState((){
point=p;
});
},
center: LatLng(49.5, -0.09),
zoom: 10.0
),
I am trying to use geocoder2 in my flutter app to work with maps. But I am facing this error. If someone could help, that'd be great.
LatLng point=LatLng(49, -1);
This is my declaration of variables. And now the errors are:
The getter 'latitude' isn't defined for the type 'TapPosition'.
The getter 'longitude' isn't defined for the type 'TapPosition'.
A value of type 'TapPosition' can't be assigned to a variable of type 'LatLng'.
point: point, builder: (ctx)=> Icon(
This is the error where I am trying to use point.