Skip to main content

apiverve_reversegeocode 1.2.5 copy "apiverve_reversegeocode: ^1.2.5" to clipboard
apiverve_reversegeocode: ^1.2.5 copied to clipboard

Reverse Geocode converts latitude and longitude coordinates into US and Canada location details. Pass geographic coordinates to retrieve the corresponding city, state, postal code, and country code.

Reverse Geocode API - Dart/Flutter Client #

Reverse Geocode converts latitude and longitude coordinates into US and Canada location details. Pass geographic coordinates to retrieve the corresponding city, state, postal code, and country code.

pub package License: MIT

This is the Dart/Flutter client for the Reverse Geocode API.

Installation #

Add this to your pubspec.yaml:

dependencies:
  apiverve_reversegeocode: ^1.2.5

Then run:

dart pub get
# or for Flutter
flutter pub get

Usage #

import 'package:apiverve_reversegeocode/apiverve_reversegeocode.dart';

void main() async {
  final client = ReversegeocodeClient('YOUR_API_KEY');

  try {
    final response = await client.execute({
      'lat': 40.714224,
      'lon': -73.961452
    });

    print('Status: ${response.status}');
    print('Data: ${response.data}');
  } catch (e) {
    print('Error: $e');
  }
}

Response #

{
  "status": "ok",
  "error": null,
  "data": {
    "zipcode": "11211",
    "state_abbr": "NY",
    "city": "Brooklyn",
    "state": "New York",
    "distance": 0.6501757300758664,
    "latitudeClosest": "40.712090",
    "longitudeClosest": "-73.95427",
    "countryCode": "US",
    "latitude": 40.714224,
    "longitude": -73.961452,
    "estimatedCity": true,
    "nearestCities": [
      "Brooklyn",
      "Brooklyn Park",
      "East Brooklyn",
      "Brooklyn Center",
      "Brooklyn Heights"
    ]
  }
}

API Reference #

Authentication #

All requests require an API key. Get yours at apiverve.com.

License #

MIT License - see LICENSE for details.


Built with Dart for APIVerve

0
likes
0
points
144
downloads

Publisher

unverified uploader

Weekly Downloads

Reverse Geocode converts latitude and longitude coordinates into US and Canada location details. Pass geographic coordinates to retrieve the corresponding city, state, postal code, and country code.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

http, http_parser

More

Packages that depend on apiverve_reversegeocode