Pakete, Repositories und App-Kategorien suchen

Paketdetailsv1.0.3

geocode

Paket zum Ausführen von Geokodierungsanfragen. Es bietet zwei Methoden zur Umwandlung von Koordinaten in Orte und von Adressen in Koordinaten.

AndroidiOSWebmacOSWindowsLinux
30-Tage-Downloads
13.100
Likes
124
Pub-Punkte
160

Paket installieren

flutter pub add geocode

Paketübersicht

Aus öffentlichen Paketdaten erstellte Orientierung.

Das geocode-Paket ermöglicht die nahtlose Umwandlung zwischen geografischen Koordinaten und physischen Adressen. Es bietet zwei zentrale Methoden: eine zum Rückwärtsgenehmigen von Koordinaten in menschenlesbare Orte und eine zum Vorwärts-Genehmigen von Adressen in Breite und Länge. Für den plattformübergreifenden Einsatz konzipiert, unterstützt es Android, iOS, Web, macOS, Windows und Linux. Das Paket ist leichtgewichtig und lässt sich problemlos in Flutter-Anwendungen integrieren, die ortsbasierte Dienste erfordern. Von imanol.dev entwickelt, vereinfacht es Geolokalisierungsaufgaben ohne externe Abhängigkeiten.

Anwendungsfälle

  • Reverse-Geokodierung für die Anzeige der Benutzerposition
  • Adressensuche aus GPS-Koordinaten
  • Standortbasierte Suchfunktionen
  • Platzierung von Kartenmarkierungen anhand von Adressen
  • Geolocation in Reise- oder Liefer-Apps
  • Karten mit Adresseneingabe integrieren

Hauptmerkmale

  • Einfache API für Forward- und Reverse-Geokodierung
  • Plattformübergreifende Kompatibilität
  • Leichtgewichtig und abhängigkeitsfrei
  • Unterstützt alle wichtigen Plattformen
  • Einfache Integration mit Flutter
  • Klare, lesbare Antwortstruktur

Geeignet für

  • Entwickler, die kartenintegrierte Apps erstellen
  • Apps, die eine Adressen-zu-Koordinaten-Umwandlung benötigen
  • Standortbewusste Anwendungen auf mehreren Plattformen
  • Prototypisierung von Geolocation-Funktionen
  • Projekte mit minimaler Geokodierungsüberhead

Hinweise

  • Beruht auf externen Geokodierungsdiensten (z. B. Google Maps, OpenStreetMap)
  • Je nach Backend können Geschwindigkeitsbegrenzungen gelten
  • Internetverbindung erforderlich für Anfragen
  • Die Genauigkeit hängt vom zugrunde liegenden Geokodierungsanbieter ab
  • Kein integrierter Caching-Mechanismus
  • Je nach Anbieter kann die Konfiguration des API-Schlüssels erforderlich sein

Original-README

Originaler README-Schnappschuss aus dem verknüpften Quell-Repository. Aktuelle Inhalte finden Sie im Repository.

Geocode library

workflow name likes popularity pub points

Introduction

Package to make Geocode requests. It exposes two methods to translate coordinates into locations and addresses into coordinates.

It's a basic implementation of the most useful methods in the Dart language of the following API geocode.xyz.

It's free for one request per second quota. Register in the above site to get an API Key and increase the number of requests to 10 per second. These are paid plans that allow more requests per second. For more information, review the site.

Installation

dependecies:
  geocode: 1.0.3

Example

See example/main.dart

import 'package:geocode/geocode.dart';

void main() async {
  GeoCode geoCode = GeoCode();

  try {
    Coordinates coordinates = await geoCode.forwardGeocoding(
        address: "532 S Olive St, Los Angeles, CA 90013");

    print("Latitude: ${coordinates.latitude}");
    print("Longitude: ${coordinates.longitude}");
  } catch (e) {
    print(e);
  }
}

Methods

Constructor

Library GeoCode class constructor, includes an optional parameter to set the apiKey.

GeoCode({this.apiKey});
Reverse Geocode

Method to translate a pair of latitude and longitude coordinates into a real address.

Future<Address> reverseGeocoding({double latitude, double longitude})
Forward Geocode

Method to translate an address into a pair of latitude and longitudecoordinates.

Future<Coordinates> forwardGeocoding({String address})

Responses

Reverse Geocode
Attribute Type Description
elevation double The elevation in meters.
timezone String The timezone.
geoNumber int geocode is an alphanumeric string representing both latitude and longitude as one value. Nearby points will have similar geocodes.
streetNumber int The properly formated street address number to be returned.
streetAddress String The properly formated street address to be returned.
city String The properly formated city name to be returned.
countyCode String The properly formated country code to be returned.
countryName String The properly formated country name to be returned.
region String The properly formated region to be returned.
postal String The properly formated postal code to be returned.
distance double The distance of the result location from the input location.
Forward Geocode
Attribute Type Description
latitude double Latitude coordinate value.
longitude double Longitude coordinate value.

Exceptions

  • AccountOutOfCreditsException: auth has ran out of credits.
  • AuthTokenNotFoundException: authentication token: auth not found.
  • PostalCodeFormatException: postal Code is not in the proper Format.
  • RequestThrottledException: request Throttled.
  • InvalidQueryException: supply a valid query.
  • EmptyResultException: your request did not produce any results. Check your spelling and try again.
  • UnknownErrorException: unkown error.

Dependencies

http: '>=0.13.0 <2.0.0'

License

BSD 3-Clause License

Kategorien

Abhängigkeiten

Abhängigkeiten 1 Einträge

Quell-Repository

Projekte, die dieses Paket verwenden