geo_selector 0.0.2 copy "geo_selector: ^0.0.2" to clipboard
geo_selector: ^0.0.2 copied to clipboard

A Flutter package for picking, searching, and selecting locations using OpenStreetMap with address details.

๐ŸŒ geo_selector A Flutter widget that provides a map-based location picker with support for: Location search (forward geocoding) Reverse geocoding (get address from lat/lng) My Location button Route planning (optional) with start & end points Integration with OpenStreetMap using flutter_map โœจ Features ๐Ÿ“ Select any location by tapping on the map ๐Ÿ”Ž Search for places using address or name (OpenStreetMap Nominatim) ๐ŸŽฏ "My Location" button to jump to deviceโ€™s current location ๐Ÿ  Display the address of the selected point ๐Ÿš— Optional Route Mode to calculate routes between two points ๐Ÿ”— Callbacks return LocationResult and routes (List

class LocationPickerExample extends StatelessWidget { const LocationPickerExample({super.key});

@override Widget build(BuildContext context) { return Scaffold( appBar: AppBar(title: const Text("Select Location")), body: GeoSelector( initialLocation: const LatLng(28.6139, 77.2090), // New Delhi enableMyLocation: true, showAddress: true, enableRoute: true, onLocationSelected: (LocationResult result) { debugPrint("Selected: Lat=${result.latitude}, " "Lng=${result.longitude}, " "Address=${result.address}"); }, onRouteCalculated: (List

LocationResult({ required this.latitude, required this.longitude, this.address, }); } ๐Ÿ”น Behavior Single Search Mode (default): Tap on map โ†’ select location Search bar for address lookup Address shown at bottom Route Mode (if enableRoute = true): Start & End location input fields Buttons to set current selection as Start/End "Calculate Route" โ†’ draws polyline on map โšก Dependencies flutter_map โ†’ Map rendering latlong2 โ†’ LatLng model location โ†’ Device GPS http โ†’ API calls (geocoding/routing) ๐Ÿ”ฎ Roadmap โœ… Route planning (basic polyline) โœ… Forward & Reverse geocoding ๐Ÿ”ฒ Autocomplete for search ๐Ÿ”ฒ Custom map tile provider support ๐Ÿ”ฒ Offline maps

0
likes
150
points
65
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package for picking, searching, and selecting locations using OpenStreetMap with address details.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_map, geocoding, http, latlong2, location

More

Packages that depend on geo_selector