Wählen Sie einen Ort aus der Karte aus und suchen Sie nach einem beliebigen Ort in Google Maps und erhalten Sie die Ausgabe sowie den Ortsnamen und die LatLng mit Google Maps und Geolocator.
Aus öffentlichen Paketdaten erstellte Orientierung.
Ein Flutter-Paket, das Benutzern ermöglicht, direkt innerhalb der App über Google Maps einen Ort auszuwählen. Es integriert Google Maps mit Geolocation-Diensten und ermöglicht es Benutzern, Orte zu suchen und präzise Details wie Ortsnamen und LatLng-Koordinaten abzurufen. Aufbauend auf dem Geolocator-Plugin unterstützt es nahtlose Karteninteraktion und Adressauflösung. Ideal für Apps, die eine genaue Standorteingabe über eine intuitive Kartenoberfläche erfordern.
Anwendungsfälle
Ortsauswahl basierend auf Karte
Adressensuche mit Autovervollständigung
Geokodierung über Google Maps
Standortfreigabe in Formularen
Echtzeit-Standortverfolgung
Benutzeronboarding mit Standorteingabe
Hauptmerkmale
Interaktive Google Maps-Integration
Ortsname und LatLng-Ausgabe
Suchbarer Standort-Eingabefeld
Geokodierung mit Geolocator
Einfache API für Karteninteraktion
Reaktive Benutzeroberfläche für mobile Geräte
Geeignet für
Reise- und Lieferungs-Apps
Event-Registrierungsplattformen
Liefer- und Logistiksysteme
Soziale Medien mit Standortmarkierung
Benutzerprofil-Einrichtung mit Standort
Apps, die genaue Geodaten benötigen
Hinweise
Benötigt Internetzugang für Google Maps
API-Schlüssel für Google Maps erforderlich
Beschränkt auf Android und iOS (keine Web-Unterstützung)
Abhängig vom Geolocator-Plugin
Möglicher Leistungseinbruch auf Geräten mit geringer Leistungsfähigkeit
Datenschutzaspekte im Zusammenhang mit Standortdaten
Original-README
Originaler README-Schnappschuss aus dem verknüpften Quell-Repository. Aktuelle Inhalte finden Sie im Repository.
location_map_picker:
widget to pick a location on a map with google map.
The following permissions are not required to use Google Maps Android API v2, but are recommended.
android.permission.ACCESS_COARSE_LOCATION Allows the API to use WiFi or mobile cell data (or both) to determine the device's location. The API returns the location with an accuracy approximately equivalent to a city block.
android.permission.ACCESS_FINE_LOCATION Allows the API to determine as precise a location as possible from the available location providers, including the Global Positioning System (GPS) as well as WiFi and mobile cell data.
You must also explicitly declare that your app uses the android.hardware.location.network or android.hardware.location.gps hardware features if your app targets Android 5.0 (API level 21) or higher and uses the ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION permission in order to receive location updates from the network or a GPS, respectively.
The following permissions are defined in the package manifest, and are automatically merged into your app's manifest at build time. You don't need to add them explicitly to your manifest:
android.permission.INTERNET Used by the API to download map tiles from Google Maps servers.
android.permission.ACCESS_NETWORK_STATE Allows the API to check the connection status in order to determine whether data can be downloaded.
See the example directory for a complete sample app.
Parameters of the MapPicker
/// Here add the starting location, this location will appear directly when entering the widget/// You can leave it blank and it will use a default locationLatLng? startLocation;
/// Here, type the text that appears below before choosing a location, you can leave it blankString? inputText;
/// Here is the widget that will appear in the submit button/// You can leave it blank and it will use the default send iconWidget? sendBtnIcon = constIcon(Icons.send);
///Here is the text color of the text box, it is black by defaultColor? textInputColor;
/// Here is the icon that appears next to the text box for the position name, at the bottomWidget? inputIcon;
/// This String is required and mandatory, here type your API key from Google CloudfinalString apiKey;
/// Here is the text that will appear in the search box at the top/// default phrase (Search For A Place)String? searchBoxHintText;
/// Here is the language of the map and the name of the places, just type the language code/// For example: for Arabic (ar) for English (en)/// You can leave it blank and it will be in English by defaultString? mapLanguage;
///Here is type of the map, if it is normal, satellite, etcMapType? mapType;
/// Here comes the data after selecting the location, including the name of the place and its LatLngfinalvoidFunction(PinData pinData) onPin;