सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।
एक फ्लटर पैकेज जो गूगल मैप्स से स्थान का चयन करने को सरल बनाता है। यह उपयोगकर्ताओं को मानचित्र के साथ इंटरैक्ट करके स्थान चुनने के लिए एक स्पष्ट इंटरफेस प्रदान करता है, जो सटीक भौगोलिक स्थिति इनपुट की आवश्यकता वाले ऐप्स के लिए आदर्श है। पैकेज गूगल मैप्स SDK के साथ बिना किसी दिक्कत के एकीकृत होता है और कस्टम मार्कर और स्थान विवरण प्राप्त करने का समर्थन करता है। विकासकर्ताओं के लिए डिज़ाइन किया गया है जो बड़े पैमाने पर बॉइलरप्लेट कोड लिखे बिना मानचित्र-आधारित स्थान चयन के लिए एक सरल समाधान ढूंढ रहे हैं।
उपयोग
नक्शे-आधारित पता चयन
फॉर्म में स्थान चयनकर्ता
यात्रा या डिलीवरी ऐप चेक-इन
जियोटैगिंग फीचर्स
उपयोगकर्ता प्रोफ़ाइल स्थान सेटअप
मुख्य विशेषताएँ
Google Maps SDK के साथ आसान एकीकरण
कस्टमाइज़ेबल मार्कर और यूआई
विस्तृत स्थान डेटा लौटाता है
खोज और पिन स्थापना का समर्थन करता है
हल्का और स्थान चुनाव पर केंद्रित
इनके लिए उपयुक्त
स्थान-जागरूक एप्लिकेशन बना रहे विकासकर्ता
उपयोगकर्ता द्वारा चुनी गई निर्देशांक की आवश्यकता वाले ऐप
Google Maps का व्यापक रूप से उपयोग करने वाले प्रोजेक्ट
त्वरित स्थान इनपुट की आवश्यकता वाले प्रोटोटाइप
विचार योग्य बातें
Google Maps API की की आवश्यक है
Google Maps प्लेटफॉर्म तक सीमित
ऑफलाइन मानचित्र समर्थन नहीं
इंटरनेट कनेक्टिविटी पर निर्भर है
यूआई सुसंगतता के लिए अतिरिक्त स्टाइलिंग की आवश्यकता हो सकती है
मूल README
संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।
Google Maps Pick Place
A pub.dev package to handle picking place from google map and use the picked data in the app.
On iOS you'll need to add the following entries to your Info.plist file (located under ios/Runner) in order to access the device's location.
Simply open your Info.plist file and add the following:
<key>NSLocationWhenInUseUsageDescription</key><string>This app needs access to location when open.</string><key>NSLocationAlwaysUsageDescription</key><string>This app needs access to location when in the background.</string><key>NSLocationAlwaysAndWhenInUseUsageDescription</key><string>This app needs access to location when open and in the background.</string>
In addition, you need to add the Background Modes capability to your XCode project (Project > Signing and Capabilties > "+ Capability" button) and select Location Updates.g>This app needs access to location when open and in the background.
Opt-in to the embedded views preview by adding a boolean property to the app's Info.plist file
with the key io.flutter.embedded_views_preview and the value YES.
You can use GoogleMapsPickPlace by pushing to a new page using Navigator, OR put as a child of any widget.
When the user picks a place on the map, it will return result to 'getResult' with FullAddress type.
import'package:flutter/material.dart';
import'package:google_maps_pick_place/google_maps_pick_place.dart';
// ...Navigator.push(
context,
MaterialPageRoute(
builder: (context) => GoogleMapsPickPlace(
apiKey: "YOU GOOGLE MAPS API KEY",
getResult: (FullAddress result) {
print('${result.address}');
/// Don't use Navigator.of(context).pop() it's build in the method
},
),
),
);
Note
Searching for a place feature needs a paid google map api key.
With free key map and picking a place feature will work correctly without any error.
But searching for a place feature will not work.
Google Maps Pick Place Properties
Parameter
Type
Description
apiKey
String
Google Map Api Token
mapLanguage
Language
map's language used in search and other widgets
getResult
Function(FullAddress)?
Method of Getting the address and position
initialPosition
LatLng
Initial position of the map in case there's no location and GPS is off
enableMyLocationButton
bool
Enable or disable the My Location button
enableSearchButton
bool
Enable or disable the Search button
loader
Widget
Widget to show while the map is loading
doneButton
Widget?
Widget to show when the map is done loading and apply getResult method
errorButton
Widget?
Widget to show when there's a corruption or there's no internet connection