श्रेणियाँ, पैकेज और रिपॉज़िटरी खोजें

पैकेज विवरणv1.5.2

google_geocoding_api

इस पैकेज में डिफ़ॉल्ट और रिवर्स जियोसर्च के साथ Google जियोकोडिंग API का कार्यान्वयन है

AndroidiOSWebmacOSWindowsLinux
30-दिन डाउनलोड
12.6 हज़ार
लाइक
41
Pub अंक
160

पैकेज इंस्टॉल करें

flutter pub add google_geocoding_api

पैकेज अवलोकन

सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।

google_geocoding_api पैकेज फ्लटर एप्लिकेशन में Google के जियोकोडिंग API को एक सीधा तरीके से एकीकृत करने की अनुमति देता है, जिससे फॉरवर्ड और रिवर्स जियोलोकेशन खोज संभव होती है। यह उपयोगकर्ताओं को पते को भौगोलिक निर्देशांक में और विपरीत में बदलने की अनुमति देता है, जो एंड्रॉइड, आईओएस, वेब, मैकओएस, विंडोज और लिनक्स सहित कई प्लेटफॉर्मों का समर्थन करता है। इस पैकेज के साफ और आसान उपयोग वाले तरीकों के कारण API इंटरैक्शन सरल हो जाता है, जिससे ऐप में स्थान-आधारित फीचर्स के लिए यह आदर्श होता है। इसके कार्यान्वयन के लिए एक वैध Google Cloud Platform API की की आवश्यकता होती है।

उपयोग

  • पते से निर्देशांक रूपांतरण
  • स्थान विवरण के लिए उलटा भू-स्थानिकीकरण
  • मैप-आधारित एप्लिकेशन स्थान खोज
  • स्थान-जागरूक मौसम ऐप
  • डिलीवरी और लॉजिस्टिक्स ट्रैकिंग

मुख्य विशेषताएँ

  • स्थान निर्देशांक और विपरीत भूगोलिक कोडिंग समर्थित है
  • क्रॉस-प्लेटफॉर्म संगतता
  • सरल API एकीकरण
  • निर्मित त्रुटि संभाल
  • Google Cloud API कुंजी की आवश्यकता है

इनके लिए उपयुक्त

  • स्थान सेवाओं की आवश्यकता वाले मोबाइल और वेब ऐप्स
  • पते के विश्लेषण की आवश्यकता वाले ऐप्स
  • Google Maps बैकएंड का उपयोग करने वाले विकासकर्मी
  • स्थान-आधारित विश्लेषण उपकरण
  • रियल-टाइम नेविगेशन एप्लिकेशंस

विचार योग्य बातें

  • Google Cloud Platform API की की आवश्यक है
  • प्रश्नों के आधार पर उपयोग लागत हो सकती है
  • दर सीमाएँ लागू हुई हैं
  • इंटरनेट कनेक्शन की आवश्यकता है
  • उत्पादन में API कुंजी को सुरक्षित रखा जाना चाहिए

मूल README

संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।

Pub License: MIT

Buy Me A Coffee


Introduction

This package implement Google Geocoding API with only dart dependency(without flutter).
Before working with the package, be sure to read Before you begin and create an API key in Google Developer Console.

USAGE

Geocoding (latitude/longitude lookup)

This is example code how to use Geocoding Search. Before use it please read Geocoding (latitude/longitude lookup)

import 'package:google_geocoding_api/google_geocoding_api.dart';

Future<void> main() async {
  const String googelApiKey = 'YOUR_API_KEY';
  final bool isDebugMode = true;  
  final api = GoogleGeocodingApi(googelApiKey, isLogged: isDebugMode);  
  final searchResults = await api.search(
    'Boston',
    language: 'en',
  );
}

Reverse geocoding (address lookup)

This is example code how to use Geocoding Reverse Search. Before use it please read Reverse geocoding (address lookup)

import 'package:google_geocoding_api/google_geocoding_api.dart';

Future<void> main() async {
  const String googelApiKey = 'YOUR_API_KEY';
  final bool isDebugMode = true;  
  final api = GoogleGeocodingApi(googelApiKey, isLogged: isDebugMode);  
  final reversedSearchResults = await api.reverse(
    '42.360083,-71.05888',
    language: 'en',
  );
}

Place geocoding

This is example code how to use Place Geocoding. Before use it please read Place Geocoding

import 'package:google_geocoding_api/google_geocoding_api.dart';

Future<void> main() async {
  const String googelApiKey = 'YOUR_API_KEY';
  final bool isDebugMode = true;  
  final api = GoogleGeocodingApi(googelApiKey, isLogged: isDebugMode);  
  final placeSearchResults = await api.placeGeocoding(
    'ChIJd8BlQ2BZwokRAFUEcm_qrcA',
    language: 'en',
  );
}

Pretty Address

Now you can use .mapToPretty() to get an instance of GeocodingPrettyAddress instance containing address, city, country, latitude, longitude, postalCode, state, countryCode, streetNumber, streetName, placeId.

Attention: The feature is experimental and may not work exactly as you need. Any suggestions for improvement may be written in the Issue Tracker.

  final placeSearchResults = await api.placeGeocoding(
    'ChIJd8BlQ2BZwokRAFUEcm_qrcA',
    language: 'en',
  );
  
  final prettyAddress = placeSearchResults.results.firstOrNull?.mapToPretty();

  if (prettyAddress == null) {
    return null;
  }

  print(prettyAddress.postalCode);
  print(prettyAddress.streetNumber);
  print(prettyAddress.streetName);
  print(prettyAddress.city);
  print(prettyAddress.state);
  print(prettyAddress.placeId);
  print(prettyAddress.country);
  print(prettyAddress.address);
  print(prettyAddress.countryCode);
  print(prettyAddress.latitude);
  print(prettyAddress.longitude);

Contact and bugs

Use Issue Tracker for any questions or bug reports.

श्रेणियाँ

निर्भरताएँ

निर्भरता सूची 1 आइटम

सोर्स रिपॉज़िटरी

इस पैकेज का उपयोग करने वाले प्रोजेक्ट

अभी कोई डेटा उपलब्ध नहीं है।